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
Gets the list of moves that represent round number X. Rounds start at 0 like arrays.
public ArrayList<Move> getRound(int round) { int startIndex; int endIndex; ArrayList<Move> moves = new ArrayList<Move>(); // Guard against negatives if (round < 0) { round = 0; } if (round >= offsets.size()) { round = offsets.size() - 1; endIndex = offsets.size(); } else { endIndex = offsets.get(round+1); } startIndex = offsets.get(round); for(int i = startIndex; i < endIndex; i++) { moves.add(this.getResults().get(i)); } return moves; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Match> getRound(int roundNum) {\n\t\tList<Match> round = new ArrayList<Match>();\n\t\tint numInRound = numInRound(roundNum);\n\t\tint roundStart = numInRound - 1;\n\t\tfor (int i = 0; i < numInRound; i++)\n\t\t\tround.add(matches[roundStart + i]);\n\t\treturn round;\n\t}", "public int[] getMove(){\n\t\tArrayList<Node> children = root.getChildren();\n\t\tint i;\n\t\tfor(i = 0; i < children.size(); i++){\n\t\t\tif(children.get(i).getScore() == root.getScore()){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tArrayList<int[]> legalMoves = activeBoard.getLegalMoves();\n\t\treturn legalMoves.get(i);\n\t}", "public ArrayList<Point> moves() {\n\t\tmoves = new ArrayList<Point>();\n\t\tif (point.x > 0 && board.pieceAt(point.x - 1, point.y) == null)\n\t\t\tmoves.add(board.left(point));\n\t\tif (point.x < board.getXDim() - 1 && board.pieceAt(point.x + 1, point.y) == null)\n\t\t\tmoves.add(board.right(point));\n\t\tif (point.y > 0 && board.pieceAt(point.x, point.y - 1) == null)\n\t\t\tmoves.add(board.above(point));\n\t\tif (point.y < board.getYDim() - 1 && board.pieceAt(point.x, point.y + 1) == null)\n\t\t\tmoves.add(board.below(point));\n\t\treturn (ArrayList<Point>) moves.clone();\n\t}", "public List<Integer> GetMoves() {\n return GetMoves(true, true, true, Settings.MaxVolcanoLevel);\n }", "public Round(int roundNo) {\n\t\tthis.niceMoves = new ArrayList<Move>();\n\t\tthis.roundNo = roundNo;\n\t}", "abstract public List<Move> getPossibleMoves();", "public ArrayList<Move> getNiceMoves() {\n\t\treturn niceMoves;\n\t}", "public Round(ArrayList<Move> niceMoves, int roundNo) {\n\t\tthis.niceMoves = niceMoves;\n\t\tthis.roundNo = roundNo;\n\t}", "public List<IMove> getMoves() {\n List<ICard> hand = hands.get(currentTurn);\n\n List<IMove> moves = new ArrayList<>(hand.size() + 1);\n for (ICard card : hand) {\n if (isValidPlay(card)) {\n moves.addAll(card.getMoves(this));\n }\n }\n\n moves.add(new DrawCardMove(currentTurn));\n\n return moves;\n }", "public int[] getPlayableMovesNaive() {\n\t\tint ret[];\n\t\t\n\t\tint curNumPlayable = 0;\n\t\t\n\t\tfor(int i=0; i<Constants.SIZE; i++) {\n\t\t\tfor(int j=0; j<Constants.SIZE; j++) {\n\t\t\t\tif(P1turn && P1Movable[i][j]) {\n\t\t\t\t\tcurNumPlayable++;\n\t\t\t\t} else if(P1turn == false && P2Movable[i][j]) {\n\t\t\t\t\tcurNumPlayable++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tret = new int[curNumPlayable];\n\t\tcurNumPlayable = 0;\n\t\t\n\t\tfor(int i=0; i<Constants.SIZE; i++) {\n\t\t\tfor(int j=0; j<Constants.SIZE; j++) {\n\t\t\t\tif(P1turn && P1Movable[i][j]) {\n\t\t\t\t\tret[curNumPlayable] = i * Constants.SIZE + j;\n\t\t\t\t\tcurNumPlayable++;\n\t\t\t\t\t\n\t\t\t\t} else if(P1turn == false && P2Movable[i][j]) {\n\t\t\t\t\tret[curNumPlayable] = i * Constants.SIZE + j;\n\t\t\t\t\tcurNumPlayable++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ret;\n\t}", "@Override\n public ArrayList<xMCTSStringGameState> getPossibleMoves(xMCTSStringGameState gameState)\n {\n\t ArrayList<xMCTSStringGameState> posMoves = new ArrayList<xMCTSStringGameState>();\n\t if (gameStatus(gameState) == xMCTSGame.status.ONGOING) {\n\t \t String activeCard = gameState.toString().substring(gameState.toString().length() - 2, gameState.toString().length());\n\t \t int gridSize = SIZE*2;\n\t for (int i = 0; i < gridSize; i += 2) {\n\t for (int j = 0; j < gridSize; j += 2) {\n\t int pos = i * SIZE + j;\n\t if (gameState.toString().charAt(pos) == '_') {\n\t String temp = gameState.toString().substring(0, pos)\n\t \t\t + activeCard\n\t + gameState.toString().substring(pos + 2,\n\t gameState.toString().length());\n\t posMoves.add(new xMCTSStringGameState(temp, 0.0, 0));\n\t }\n\t }\n\n\t }\n\t }\n\t else {\n\t \t // System.out.println(\"No moves can be made from this state\");\n\t \t// callsFromFullBoards++;\n\t \t// System.out.println(\"There have been \" + callsFromFullBoards + \"attempts to get possible moves from a full board\");\n\t }\n\t return posMoves;\n }", "private ArrayList<Integer> getMoves(int mSpot,\n ArrayList<Integer> config) {\n char myType = (char)(int)config.get(mSpot);\n\n //Generate all possible moves\n ArrayList<Integer> myMoves = generateUnitMoves(myType, mSpot);\n\n //Remove rulebreaking placements\n myMoves = pruneIllegals(myMoves, config);\n return myMoves;\n }", "ArrayList<Move> getMoves() {\n ArrayList<Move> result = new ArrayList<>();\n getMoves(result);\n return result;\n }", "List<Move> legalMoves(Piece side) {\r\n legalMovesArr = new ArrayList<Move>();\r\n HashSet<Square> pieceSide = pieceLocations(side);\r\n for (Square pieces : pieceSide) {\r\n for (int i = 0; i <= 8; i++) {\r\n Move x = mv(pieces, sq(pieces.col(), i));\r\n legalMovesArr.add(x);\r\n }\r\n for (int j = 0; j <= 8; j++) {\r\n Move y = mv(pieces, sq(j, pieces.row()));\r\n legalMovesArr.add(y);\r\n }\r\n while (legalMovesArr.remove(null));\r\n }\r\n return legalMovesArr;\r\n }", "public String [] getMoves() {\n return moves;\n }", "@Override\r\n\tint[] move( int turnNo ) {\n\t\treturn getUserMove();\r\n\t}", "public Round(ArrayList<Move> niceMoves) {\n\t\tthis.niceMoves = niceMoves;\n\t\tthis.roundNo = 1;\n\t}", "public List<Move> getMoves(ChessBoard chessBoard) {\r\n\t\tList<Move> moves = new ArrayList<>();\r\n\t\tfor (Direction direction : directions) {\r\n\t\t\tfor (int n = 1; n <= maxRange ; n++) {\r\n\t\t\t\tMove move = new Move(x, y, direction, n);\r\n\t\t\t\tif (chessBoard.allows(move)) {\r\n\t\t\t\t\tif (move.isTake(chessBoard)) {\r\n\t\t\t\t\t\tTakeMove takeMove = new TakeMove(x, y, direction, n);\r\n\t\t\t\t\t\ttakeMove.setPiece(this);\r\n\t\t\t\t\t\tPiece pieceAtDestination = chessBoard.pieceAtField(move.getToX(), move.getToY());\r\n\t\t\t\t\t\ttakeMove.setTaken(pieceAtDestination);\r\n\t\t\t\t\t\tmoves.add(takeMove);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmove.setPiece(this);\r\n\t\t\t\t\t\tmoves.add(move);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn moves;\r\n\t}", "List<ValidMove> getValidMoves();", "private Cell[] allPossibleMoves(Cell source) {\n\t\tCell[] moves = new Cell[2 * Board.BOARD_SIZE - 2]; // Вертикаль и горизонталь, которые бьет ладья\n\t\tint columnIndex = source.getColumn();\n\t\tint rowIndex = source.getRow();\n\t\tint k = 0;\n\t\tfor (int i = 0; i < Board.BOARD_SIZE; i++) {\n\t\t\tif (i != rowIndex) {\n\t\t\t\tmoves[k++] = new Cell(columnIndex, i);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < Board.BOARD_SIZE; i++) {\n\t\t\tif (i != columnIndex) {\n\t\t\t\tmoves[k++] = new Cell(i, rowIndex);\n\t\t\t}\n\t\t}\n\t\treturn moves;\n\t}", "protected List<Move> getMoves() {\n return moves;\n }", "public int[] getMove() {\n int[] bestMove = new int[] {-1, -1, -1};\n int bestEval = Integer.MIN_VALUE;\n for (final BoardTree child : this.children) {\n if (child.evaluation > bestEval) {\n bestEval = child.evaluation;\n bestMove = child.prevMove;\n }\n if (VERBOSE) {\n System.out.println(Arrays.toString(child.prevMove)+\":\"+child.evaluation);\n }\n }\n delTree(this);\n\n if (VERBOSE) {\n System.out.println(\"Chose eval: \"+bestEval);\n }\n return bestMove;\n }", "List<Moves> getMoveSet();", "ArrayList<Move> legalMoves() {\n ArrayList<Move> result = new ArrayList<Move>();\n int f, b;\n Move m;\n for (int i = 1; i < 8; i++) {\n for (int j = 1; j < 8; j++) {\n if (get(i,j).side() == _turn) {\n f = forward(j, i);\n b = backward(j, i);\n c = _col[j];\n r = _row[i];\n m = Move.create(j, i, j - b, i - b);\n addMove(result, m);\n m = Move.create(j, i, j + b, i + b);\n addMove(result, m);\n m = Move.create(j, i, j + f, i - f);\n addMove(result, m);\n m = Move.create(j, i, j - f, i + f);\n addMove(result, m);\n m = Move.create(j, i, j + c, i);\n addMove(result, m);\n m = Move.create(j, i, j - c, i);\n addMove(result, m);\n m = Move.create(j, i, j, i + r);\n addMove(result, m);\n m = Move.create(j, i, j, i - r);\n addMove(result, m);\n } else {\n continue;\n }\n }\n }\n return result;\n }", "public int moves()\n {\n return moves;\n }", "public int moves() {\n return moves;\n }", "public int moves() {\n return moves;\n }", "private void getMoves(ArrayList<Move> moves, int k) {\n for (int i = -1; i <= 1; i += 1) {\n for (int j = -1; j <= 1; j += 1) {\n char nextCol = (char) (col(k) + i);\n char nextRow = (char) (row(k) + j);\n if (validSquare(nextCol, nextRow)) {\n Move rec = Move.move(col(k),\n row(k), nextCol, nextRow);\n if (legalMove(rec)) {\n moves.add(rec);\n }\n }\n }\n }\n }", "public List<Move> getAvailableSpaces() {\n List<Move> availableMoves = new ArrayList<>();\n for (int i = 0; i < LENGTH; i++) {\n for (int j = 0; j < LENGTH; j++) {\n Move move = new Move(i, j);\n if (isValidMove(move)) {\n availableMoves.add(move);\n }\n }\n }\n return availableMoves;\n }", "public ArrayList<Move> getPossibleMoves() \n\t{\n\t\tArrayList<Move> possibleMoves = new ArrayList<Move>();\n\t\t\n\t\tfor(int i = - 1; i <= 1; i += 2)\n\t\t{\n\t\t\tfor(int j = -1; j <= 1; j += 2)\n\t\t\t{\n\t\t\t\tLocation currentLoc = new Location(getLoc().getRow() + j, getLoc().getCol() + i);\n\t\t\t\t\n\t\t\t\tif(getBoard().isValid(currentLoc))\n\t\t\t\t{\n\t\t\t\t\tif(getBoard().getPiece(currentLoc) == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tArrayList<Node> move = new ArrayList<Node>();\n\t\t\t\t\t\tmove.add(getNode());\n\t\t\t\t\t\tmove.add(getBoard().getNode(currentLoc));\n\t\t\t\t\t\t\n\t\t\t\t\t\tpossibleMoves.add(new CheckersMove(move, getBoard(), getLoyalty()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(ArrayList<Node> move : getNextJumps(getLoc(), new ArrayList<Location>()))\n\t\t{\n\t\t\tif(move.size() > 1)\n\t\t\t{\n\t\t\t\tpossibleMoves.add(new CheckersMove(move, getBoard(), getLoyalty()));\n\t\t\t}\n\t\t}\n\t\t\n\t\tArrayList<Move> jumpMoves = new ArrayList<Move>();\n\t\t\n\t\tfor(Move possibleMove : possibleMoves)\n\t\t{\n\t\t\tif(!possibleMove.getJumped().isEmpty())\n\t\t\t{\n\t\t\t\tjumpMoves.add(possibleMove);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!jumpMoves.isEmpty())\n\t\t{\n\t\t\treturn jumpMoves;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn possibleMoves;\n\t\t}\n\t}", "public List<Integer> getLegalMoves()\n\t{\n\t\tArrayList<Integer> moves = new ArrayList<Integer>();\n\t\tfor (int col = 0; col < cols; col++)\n\t\t{\n\t\t\tif (isEmpty(0,col))\n\t\t\t\tmoves.add(col);\n\t\t}\n\t\treturn moves;\n\t}", "public void getTopLeft(List<Piece> moves){\n\t\t\n\t\tint pNum = PhiletoNum(this.phile);\n\t\tint rNum = this.rank;\n\t\twhile(pNum > 1 && rNum < 8){\n\t\t\tmoves.add(new Bishop(NumtoPhile(pNum - 1), rNum + 1));\n\t\t\tpNum -= 1;\n\t\t\trNum += 1;\n\t\t}\n\t}", "private Set<Line> getPossibleMoves(Square[][] board, Set<Line> moves, int sides) {\n if (moves.size() >= width || sides > 3) return moves;\n else {\n Set<Square> squares = squaresWithMarkedSides(board, order[sides]);\n for (Square square : squares) {\n for (Line line : square.openLines()) {\n if (moves.size() < width)\n moves.add(line);\n }\n }\n return getPossibleMoves(board, moves, sides+1);\n }\n }", "public String getMoves() {\n\t\treturn moves;\n\t}", "public int[][] legalMoves() {\n return legalMoves[nextPiece];\n }", "public LinkedList<Move> getPossibleMoves() {\n\t\tAIPossibleMoves.clear();\n\t\tint xOrigin = 0, yOrigin = 0, xMove1 = 0, xMove2 = 0, yMove1 = 0, yMove2 = 0;\n\t\tMove move = null;\t\n\t\t\tint type = 0;\n\t\t\tfor(Checker checker: model.whitePieces) {\n\t\t\t\t\n\t\t\t\txOrigin = checker.getCurrentXPosition();\n\t\t\t\tyOrigin = checker.getCurrentYPosition();\n\t\t\t\txMove1 = (checker.getCurrentXPosition() - 1);\n\t\t\t\txMove2 = (checker.getCurrentXPosition() + 1);\n\t\t\t\tyMove1 = (checker.getCurrentYPosition() - 1);\n\t\t\t\tyMove2 = (checker.getCurrentYPosition() + 1);\n\t\t\t\ttype = checker.getType();\n\t\t\t\tswitch(type) {\n\t\t\t\tcase 2:\n\n\t\t\t\t\tif((xMove1 < 0) || (yMove1 <0)) {\n\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove1, false, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove1)) {\n\t\t\t\t\t\t\t//System.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove1, false, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n \n\t\t\t\t\tif((xMove2 > 7) || (yMove1 < 0)) {\n\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove1, true, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove1)) {\n\t\t\t\t\t\t\t// System.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove1, true, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 4:\n\t\t\t\t\t//Moving up and left isMovingRight,IsMovingDown\n\t\t\t\t\tif((xMove1 <0) || (yMove1 < 0)) {\n\t\t\t\t\t\t//continue;\n\t\t\t\t\t} else {\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove1, false, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove1)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove1, false, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove2 > 7) || (yMove1 < 0)) {\n\t\t\t\t\t//continue;\n\t\t\t\t} else {\n\t\t\t\t\t//moving up and right\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove1, true, false )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove1)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove1,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove1, true, false)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove1);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove1 < 0) || (yMove2 > 7)) {\n\t\t\t\t//\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\t//moving down and left isMovingRight,IsMovingDown\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove1, yMove2, false, true )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove1,yMove2)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove2);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove1,yMove2,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove1, yMove2, false, true)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove1, yMove2);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((xMove2 > 7) || (yMove2 > 7)) {\n\t\t\t\t\t//continue;\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\t//moving down and right isMovingRight,IsMovingDown\n\t\t\t\t\tif(isMoveValid(xOrigin,yOrigin, xMove2, yMove2, true, true )) {\n\t\t\t\t\t\tif(!isSpaceTaken(xMove2,yMove2)) {\n\t\t\t\t\t\t//\tSystem.out.println(\"Space is not Taken\");\n\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove2);\n\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(isPieceEnemy(xMove2,yMove2,checker,2)) {\n\t\t\t\t\t\t\t\tif(isJumpValid(xOrigin, yOrigin, xMove2, yMove2, true, true)) {\n\t\t\t\t\t\t\t\t\tmove = new Move(xOrigin, yOrigin, xMove2, yMove2);\n\t\t\t\t\t\t\t\t\tAIPossibleMoves.add(move);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tbreak;\t\n\t\t\t\t}\t\n\t\t\t\n\t\t\t}\n\n\t\t\treturn AIPossibleMoves;\n\t\t\t\n\t\t}", "public List<Move> validMoves(){\n List<Move> results = new LinkedList<>();\n int kingVal = turn == WHITE ? WHITE_KING : BLACK_KING;\n int kingX = 0, kingY = 0;\n List<Piece> checks = null;\n kingSearch:\n for (int y = 0; y < 8; y++){\n for (int x = 0; x < 8; x++){\n if (board[y][x] == kingVal){\n kingX = x;\n kingY = y;\n checks = inCheck(x,y);\n break kingSearch;\n }\n }\n }\n if (checks.size() > 1){ // must move king\n for (int x = -1; x < 2; x++){\n for (int y = -1; y < 2; y++){\n if (kingX+x >= 0 && kingX + x < 8 && kingY+y >= 0 && kingY+y < 8){\n int val = board[kingY+y][kingX+x];\n if (val == 0 || turn == WHITE && val > WHITE_KING || turn == BLACK && val < BLACK_PAWN){\n // may still be a move into check, must test at end\n results.add(new Move(kingVal, kingX, kingY, kingX+x, kingY+y, val, 0, this));\n }\n }\n }\n }\n } else { // could be in check TODO: split into case of single check and none, identify pin/capture lines\n int queen = turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN;\n int knight = turn == WHITE ? WHITE_KNIGHT : BLACK_KNIGHT;\n int rook = turn == WHITE ? WHITE_ROOK : BLACK_ROOK;\n int bishop = turn == WHITE ? WHITE_BISHOP : BLACK_BISHOP;\n for (int y = 0; y < 8; y++) {\n for (int x = 0; x < 8; x++) {\n int piece = board[y][x];\n if (piece == (turn == WHITE ? WHITE_PAWN : BLACK_PAWN)) { // pawns\n // regular | 2 move\n if (board[y+turn][x] == 0){\n if (y+turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x, y + turn, 0, queen, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, knight, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, rook, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, bishop, this));\n }\n else {\n results.add(new Move(piece, x, y, x, y + turn, 0, 0, this));\n if ((y == (turn == WHITE ? 1 : 6)) && board[y + 2 * turn][x] == 0) { // initial 2 move\n results.add(new Move(piece, x, y, x, y + 2*turn, 0, 0, this));\n }\n }\n }\n // capture\n for (int dx = -1; dx <= 1; dx += 2){\n if (x + dx >= 0 && x + dx < 8) {\n int val = board[y+turn][x+dx];\n if (val > 0 && (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n if (y + turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x+dx, y + turn, val, queen, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, knight, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, rook, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, bishop, this));\n } else {\n results.add(new Move(piece, x, y, x+dx, y + turn, val, 0, this));\n }\n }\n if (val == 0 && y == (turn == WHITE ? 4 : 3) && x+dx == enPassant){ // en passant\n results.add(new Move(piece, x, y, x+dx, y + turn, 0, 0, this));\n }\n }\n }\n\n } else if (piece == knight) { // knights TODO: lookup table\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -2; dy <= 2; dy += 4){\n if (x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n if (x+dy >= 0 && x + dy < 8 && y + dx >= 0 && y + dx < 8){\n int val = board[y+dx][x+dy];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dy,y+dx,val,0,this));\n }\n }\n }\n }\n } else if (piece == bishop) { // bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == rook) { // rooks\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN)) { // queens\n // Diagonals - same as bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_KING : BLACK_KING)) { // king\n for (int dx = -1; dx < 2; dx++){\n for (int dy = -1; dy < 2; dy++){\n if ((dx != 0 || dy != 0) && x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n }\n }\n }\n }\n }\n // castle\n if (checks.size() == 0){\n if (turn == WHITE && (castles & 0b11) != 0){//(castles[0] || castles[1])){\n board[0][4] = 0; // remove king to avoid check test collisions with extra king\n if ((castles & WHITE_SHORT) != 0 && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n //if (castles[0] && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 6, 0, 0, 0, this));\n }\n if ((castles & WHITE_LONG) != 0 && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 &&\n inCheck(3,0).size() == 0){\n //if (castles[1] && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 && inCheck(3,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 2, 0, 0, 0, this));\n }\n board[0][4] = WHITE_KING;\n }else if (turn == BLACK && (castles & 0b1100) != 0){//(castles[2] || castles[3])) {\n board[7][4] = 0; // remove king to avoid check test collisions with extra king\n //if (castles[2] && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n if ((castles & BLACK_SHORT) != 0 && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 6, 7, 0, 0, this));\n }\n //if (castles[3] && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 && inCheck(3, 7).size() == 0) {\n if ((castles & BLACK_LONG) != 0 && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 &&\n inCheck(3, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 2, 7, 0, 0, this));\n }\n board[7][4] = BLACK_KING;\n }\n }\n }\n List<Move> fullLegal = new LinkedList<>();\n for (Move m : results){\n makeMove(m);\n turn = -turn;\n if (m.piece == WHITE_KING || m.piece == BLACK_KING){\n if (inCheck(m.toX,m.toY).size() == 0){\n fullLegal.add(m);\n }\n }else if (inCheck(kingX,kingY).size() == 0){\n fullLegal.add(m);\n }\n turn = -turn;\n undoMove(m);\n }\n Collections.sort(fullLegal, (o1, o2) -> o2.score - o1.score); // greatest score treated as least so appears first\n return fullLegal;\n }", "public List<String> allSquaresNoMove ()\n {\n List<Square> squareList = new ArrayList<>();\n List<String> stringList = new ArrayList<>();\n\n squareList.addAll(player.getSquare().getGameBoard().getArena().squareReachableNoWall(player.getSquare().getX() , player.getSquare().getY(),2));\n\n for (Square square : squareList)\n stringList.add(square.toStringCoordinates());\n\n return stringList;\n\n }", "public ArrayList<Move> availableMoves() {\n if (getColour() == PieceCode.WHITE)\n return whiteKing();\n else\n return blackKing();\n }", "public int calculate(java.util.List<Round> rounds, int index, Round round);", "int moves() {\n return moves;\n }", "public ArrayList<Move> generateMoves(Board board, Piece piece, boolean getMoves, boolean getCaptures){\r\n\r\n\t\tArrayList<Move> list = new ArrayList<Move>();\r\n\t\tint moveNumber = piece.getMoveNumber();\r\n\t\tif(!(moveNumber >= minMove && moveNumber <= maxMove)) {\r\n\t\t\treturn list;\r\n\t\t}\r\n\t\tint i = 0;\r\n\t\tint x = piece.getPosition().getXNumeral();\r\n\t\tint y = piece.getPosition().getYNumeral();\r\n\t\twhile(board.isValidSquare(new Touple(x + dx, y + dy)) && i < limit) {\r\n\t\t\tx += dx;\r\n\t\t\ty += dy;\r\n\t\t\ti++;\r\n\t\t\t\r\n\t\t\tif(board.spaceEmpty(new Touple(x,y))) {\r\n\t\t\t\tif(move && getMoves) {\r\n\t\t\t\t\tlist.add(new Move(x-piece.getPosition().getXNumeral(),y-piece.getPosition().getYNumeral()));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tTouple proposedCapture = new Touple(x,y);\r\n\t\t\t\t//if(capture && getMoves && !board.getPiece(proposedCapture).getColor().equals(piece.getColor())) {\r\n\t\t\t\tif(capture && getMoves && !board.pieceColorIs(proposedCapture, piece.getColor())) {\r\n\t\t\t\t\tlist.add(new Move(x-piece.getPosition().getXNumeral(),y-piece.getPosition().getYNumeral()));\r\n\t\t\t\t}\r\n\t\t\t\tif(blockable) {\t//if this move class is blockable\r\n\t\t\t\t\ti = limit; //allow no futher moves.\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "public int[] findMove(){\n int[] blackCheckerSpots = new int[12];\n int i =0;\n while(mCheckerBoard.indexOf(new Checker(1, false)) != -1){\n int startPosition = mCheckerBoard.indexOf(new Checker(1, false)); //need to override Checker equals method\n Checker current = mCheckerBoard.get(startPosition);\n int[] answer = jumpRight(startPosition, false, current);\n if(answer.length > 1)\n {\n //jumped right downwards\n return answer;\n }\n answer = jumpLeft(startPosition, false, current);\n if(answer.length > 1){\n //jumped left downwards\n return answer;\n }\n answer = moveDiagonalRight(startPosition, false, current);\n if(answer.length > 1){\n //moved diagonal right downwards\n return;\n }\n answer = moveDiagonalLeft(startPosition, false, current);\n if(answer.length > 1){\n //moved diagonal left downwards\n return;\n }\n\n //end of loop\n //these are the ones that need to be set back to black at the end\n current.setIsRed(true);\n blackCheckerSpots[i]=startPosition;\n i++;\n }\n\n for(int j =0; j<blackCheckerSpots.length; j++){\n Checker changed = mCheckerBoard.get(blackCheckerSpots[j]);\n changed.setIsRed(false);\n mCheckerBoard.set(blackCheckerSpots[j], changed);\n }\n\n }", "public int[] move(int num){\n int[]loc = new int[2];\n for(int c = 0; c<num; c++){\n loc = this.move();\n }\n return loc;\n }", "public List<RubiksMove> getSolutionMoves() {\n return solutionMoves;\n }", "static List<Move> generateLegalMoves(Position pos) {\n\t\tList<Move> moves = new ArrayList<>();\n\n\t\t// for (int square : pos.pieces) {\n\t\t// \tif (pos.pieces.size() > 32) {\n\t\t// \t\tSystem.out.println(\"problem\" + pos.pieces.size());\n\t\t// \t}\n\t\t// \tif (pos.at(square) != 0 && Piece.isColor(pos.at(square), pos.toMove)) {\n\t\t// \t\tint piece = pos.at(square);\n\t\t// \t\tint name = Piece.name(piece);\n\t\t// \t\tif (name == Piece.Pawn) {\n\t\t// \t\t\tint step = pos.toMove == 'w' ? MoveData.Up : MoveData.Down;\n\t\t// \t\t\tif (square + step >= 0 && square + step < 64) {\n\t\t// \t\t\t\t// 1 square\n\t\t// \t\t\t\tif (pos.board.squares[square + step] == 0) {\n\t\t// \t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'q'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'b'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'n'));\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step, 'r'));\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + step));\n\t\t// \t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t// \t\t\t\t}\n\t\t// \t\t\t\t// 2 squares\n\t\t// \t\t\t\tif ((square < 16 && pos.toMove == 'w') || square > 47 && pos.toMove == 'b') {\n\t\t// \t\t\t\t\tif (pos.board.squares[square + 2*step] == 0 && pos.board.squares[square + step] == 0) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, square + 2*step));\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t\t// capture\n\t\t// \t\t\t\t// right\n\t\t// \t\t\t\tif (MoveData.DistanceToEdge[square][3] > 0) {\n\t\t// \t\t\t\t\tint target = square + step + 1;\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'q'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'b'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'n'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'r'));\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\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\t\t\t\n\t\t// \t\t\t\t\t} \n\t\t// \t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target));\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\t// left\n\t\t// \t\t\t\tif (MoveData.DistanceToEdge[square][2] > 0) {\n\t\t// \t\t\t\t\tint target = square + step - 1;\n\t\t// \t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && square >= 48) || (pos.toMove == 'b' && square <= 15)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'q'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'b'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'n'));\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target, 'r'));\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\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\t\t\t\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t// \t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t// \t\t\t\t\t\t\tmoves.add(new Move(square, target));\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t}\t\t\t\t\t\t\t\t\n\t\t// \t\t}\n\t\t// \t\telse if (name == Piece.Knight) {\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\tfor (int offset : MoveData.KnightOffsets.get(square)) {\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\tif (!Piece.isColor(pos.board.squares[square + offset], pos.toMove)) {\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tMove move = new Move(square, square + offset);\n\t\t// \t\t\t\t\tmoves.add(move);\t\t\t\t\t\t\t\n\t\t// \t\t\t\t}\t\n\t\t// \t\t\t}\t\t\t\t\t\n\t\t// \t\t}\n\t\t// \t\telse {\n\t\t// \t\t\tint dirStart = name == Piece.Bishop ? 4 : 0;\n\t\t// \t\t\tint dirEnd = name == Piece.Rook ? 4 : 8;\n\t\t// \t\t\tfor (int dir = dirStart; dir < dirEnd; dir++) {\n\t\t// \t\t\t\tint maxDist = MoveData.DistanceToEdge[square][dir];\n\t\t// \t\t\t\tint dist = name == Piece.King ? Math.min(1, maxDist) : maxDist;\n\n\t\t// \t\t\t\tfor (int steps = 1; steps <= dist; steps++) {\n\t\t// \t\t\t\t\tint squareIdx = square + steps * MoveData.Offsets[dir];\t\t\t\t\t\t\t\t\t\t\t\n\t\t// \t\t\t\t\tif (!Piece.isColor(pos.board.squares[squareIdx], pos.toMove)) {\n\t\t// \t\t\t\t\t\tmoves.add(new Move(square, squareIdx));\n\t\t// \t\t\t\t\t\tif (Piece.isColor(pos.board.squares[squareIdx], Opposite(pos.toMove))) {\n\t\t// \t\t\t\t\t\t\tbreak;\n\t\t// \t\t\t\t\t\t}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t\telse {\n\t\t// \t\t\t\t\t\tbreak;\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\t\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\tfor (int i = 0; i < 64; i++) {\n\t\t\tif (pos.board.squares[i] != 0 && Piece.isColor(pos.board.squares[i], pos.toMove)) {\n\t\t\t\tint piece = pos.board.squares[i];\n\t\t\t\tint name = Piece.name(piece);\n\t\t\t\tif (name == Piece.Pawn) {\n\t\t\t\t\tint step = pos.toMove == 'w' ? MoveData.Up : MoveData.Down;\n\t\t\t\t\tif (i + step >= 0 && i + step < 64) {\n\t\t\t\t\t\t// 1 square\n\t\t\t\t\t\tif (pos.board.squares[i + step] == 0) {\n\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'q'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'b'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'n'));\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step, 'r'));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + step));\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// 2 squares\n\t\t\t\t\t\tif ((i < 16 && pos.toMove == 'w') || i > 47 && pos.toMove == 'b') {\n\t\t\t\t\t\t\tif (pos.board.squares[i + 2*step] == 0 && pos.board.squares[i + step] == 0) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, i + 2*step));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t// capture\n\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (MoveData.DistanceToEdge[i][3] > 0) {\n\t\t\t\t\t\t\tint target = i + step + 1;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'q'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'b'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'n'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'r'));\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\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target));\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\t// left\n\t\t\t\t\t\tif (MoveData.DistanceToEdge[i][2] > 0) {\n\t\t\t\t\t\t\tint target = i + step - 1;\n\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[target], Opposite(pos.toMove))) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && i >= 48) || (pos.toMove == 'b' && i <= 15)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'q'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'b'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'n'));\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target, 'r'));\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\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (target == pos.enPassantTarget) {\n\t\t\t\t\t\t\t\tif ((pos.toMove == 'w' && target > 32) || (pos.toMove == 'b' && target < 24)) {\n\t\t\t\t\t\t\t\t\tmoves.add(new Move(i, target));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if (name == Piece.Knight) {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tfor (int offset : MoveData.KnightOffsets.get(i)) {\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (!Piece.isColor(pos.board.squares[i + offset], pos.toMove)) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tMove move = new Move(i, i + offset);\n\t\t\t\t\t\t\tmoves.add(move);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tint dirStart = name == Piece.Bishop ? 4 : 0;\n\t\t\t\t\tint dirEnd = name == Piece.Rook ? 4 : 8;\n\t\t\t\t\tfor (int dir = dirStart; dir < dirEnd; dir++) {\n\t\t\t\t\t\tint maxDist = MoveData.DistanceToEdge[i][dir];\n\t\t\t\t\t\tint dist = name == Piece.King ? Math.min(1, maxDist) : maxDist;\n\t\t\t\t\t\tfor (int steps = 1; steps <= dist; steps++) {\n\t\t\t\t\t\t\tint squareIdx = i + steps * MoveData.Offsets[dir];\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (!Piece.isColor(pos.board.squares[squareIdx], pos.toMove)) {\n\t\t\t\t\t\t\t\tmoves.add(new Move(i, squareIdx));\n\t\t\t\t\t\t\t\tif (Piece.isColor(pos.board.squares[squareIdx], Opposite(pos.toMove))) {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\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// castling\t\t\n\t\tif (pos.toMove == 'w' && !underAttack(pos, pos.whiteKing, 'b')) {\t\t\t\n\t\t\tif (pos.castlingRights.whiteKingSide && pos.at(Board.H1) == (Piece.Rook | Piece.White)) {\n\t\t\t\tif (pos.at(Board.F1) == Piece.Empty && pos.at(Board.G1) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.F1, 'b') && !underAttack(pos, Board.G1, 'b')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E1, Board.G1));\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\tif (pos.castlingRights.whiteQueenSide && pos.at(Board.A1) == (Piece.Rook | Piece.White)) {\t\t\t\t\n\t\t\t\tif (pos.at(Board.B1) == Piece.Empty && pos.at(Board.C1) == Piece.Empty && pos.at(Board.D1) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.D1, 'b') && !underAttack(pos, Board.C1, 'b')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E1, Board.C1));\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\telse if (pos.toMove == 'b' && !underAttack(pos, pos.blackKing, 'w')){\n\t\t\tif (pos.castlingRights.blackKingSide && pos.at(Board.H8) == (Piece.Rook | Piece.Black)) {\n\t\t\t\tif (pos.at(Board.F8) == Piece.Empty && pos.at(Board.G8) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.F8, 'w') && !underAttack(pos, Board.G8, 'w')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E8, Board.G8));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pos.castlingRights.blackQueenSide && pos.at(Board.A8) == (Piece.Rook | Piece.Black)) {\n\t\t\t\tif (pos.at(Board.B8) == Piece.Empty && pos.at(Board.C8) == Piece.Empty && pos.at(Board.D8) == Piece.Empty) {\n\t\t\t\t\tif (!underAttack(pos, Board.D8, 'w') && !underAttack(pos, Board.C8, 'w')) {\n\t\t\t\t\t\tmoves.add(new Move(Board.E8, Board.C8));\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// filter illegal moves\n\t\tList<Move> legalMoves = new ArrayList<>();\n\t\tchar color = pos.toMove;\n\t\tfor (Move move : moves) {\n\t\t\tpos.makeMove(move);\n\t\t\tif (!kingInCheck(pos, color)) {\n\t\t\t\tlegalMoves.add(move);\n\t\t\t}\t\t\t\n\t\t\tpos.undoMove();\n\t\t}\n\n\t\treturn legalMoves;\n\t}", "public int getMoves(){\n return moves;\n }", "public abstract ArrayList<Move> possibleMoves(Board board);", "public int getMoves(){\r\n return moves;\r\n }", "public ArrayList<Coordinate> getPossibleMoveCoordinate() {\n ChessBoard board = this.getChessBoard(); // get chess board\n ArrayList<Coordinate> coords = new ArrayList<Coordinate>(); // create return ArrayList\n int x, y;\n /*\n several cases\n 2 3\n 1 4\n\n 5 8\n 6 7\n\n */\n // case1\n x = this.x_coordinate - 2;\n y = this.y_coordinate + 1;\n if(x >= 0 && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case2\n x = this.x_coordinate - 1;\n y = this.y_coordinate + 2;\n if(x >= 0 && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case3\n x = this.x_coordinate + 1;\n y = this.y_coordinate + 2;\n if(x < board.getWidth() && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case4\n x = this.x_coordinate + 2;\n y = this.y_coordinate + 1;\n if(x < board.getWidth() && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case5\n x = this.x_coordinate - 2;\n y = this.y_coordinate - 1;\n if(x >= 0 && y >= 0 ){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case6\n x = this.x_coordinate - 1;\n y = this.y_coordinate - 2;\n if(x >= 0 && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case7\n x = this.x_coordinate + 1;\n y = this.y_coordinate - 2;\n if(x < board.getWidth() && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case1\n x = this.x_coordinate + 2;\n y = this.y_coordinate - 1;\n if(x < board.getWidth() && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n\n\n return coords;\n }", "public ArrayList<MoveType> getMoves(BotState state, long timeout) {\n ArrayList<MoveType> moves = new ArrayList<MoveType>();\n\n Field field = state.getMyField();\n ShapeType current = state.getCurrentShape();\n ShapeType next = state.getNextShape();\n int myCombo = state.getMyCombo();\n\n Shape piece = new Shape(current, field, state.getShapeLocation());\n Shape nextPiece = new Shape(next, field, (next == ShapeType.O) ? new Point(4, -1) : new Point(3, -1));\n\n Best best = getBestFitness(field, piece, myCombo, nextPiece);\n\n int bestRot = best.bestRot;\n int bestLeft = best.bestLeft;\n\n for (; bestRot > 0; bestRot--)\n moves.add(MoveType.TURNRIGHT);\n if (bestLeft < 0)\n for (; bestLeft < 0; bestLeft++)\n moves.add(MoveType.RIGHT);\n else\n for (; bestLeft > 0; bestLeft--)\n moves.add(MoveType.LEFT);\n\n moves.add(MoveType.DROP);\n return moves;\n }", "public List<ScoredMove> allmShipMoves(GameState gm){\n\t\t\n\t\tList<ScoredMove> mShipMoves = new ArrayList<ScoredMove>();\n\t\t\n\t\tif (getHand().hasMShip()) {\n\t\t\tfor (Card c: getHand().getCards()) {\n\t\t\t\tif (c instanceof MerchantShip) {\n\t\t\t\t\tmShipMoves.add(new ScoredMove(ACTION.PLAY_MERCHANT_SHIP, c, null));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn mShipMoves;\n\t}", "@Override\n\tpublic List<Point> getAvailableMoves() {\n\t\treturn new ArrayList<Point>();\n\t}", "public Iterator<Move> getMoves() {\n\t\treturn new MoveSetIterator<CMNMove>(movesLeft);\n\t}", "public ArrayList<SlidingPuzzleState> getPossibleNextMoves(){\n\t\tArrayList<SlidingPuzzleState> moves = new ArrayList<SlidingPuzzleState>();\n\t\tint holeNum = 0;\n\t\tfor (Coordinate h: _holes){\n\t\t\t\n\t\t\t//for every hole, check if its not on the edges\n\t\t\t//of the puzzle and if his next position is not\n\t\t\t//already a hole\n\t\t\t\n\t\t\tif (h.getI() > 0 && _puzzle[h.getI()-1][h.getJ()]!=0){\n\t\t\t\t\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.UP));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getI() < (_rows-1) && _puzzle[h.getI()+1][h.getJ()]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.DOWN));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getJ() > 0 && _puzzle[h.getI()][h.getJ()-1]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.LEFT));\n\t\t\t}\n\t\t\t\n\t\t\tif (h.getJ() < (_cols-1) && _puzzle[h.getI()][h.getJ()+1]!=0){\n\t\t\t\tmoves.add(new SlidingPuzzleState(this).moveHole(holeNum, Dir.RIGHT));\n\t\t\t}\n\t\t\tholeNum++;\n\t\t}\n\t\treturn moves;\n\t}", "ArrayList<int[]> findValidMoves();", "private List<Coordinate> getAvailableMoves(ImmutableGameBoard gameBoard) {\n List<Coordinate> availableMoves = new ArrayList<Coordinate>();\n\n for (int x = 0; x < gameBoard.getWidth(); x++) {\n for (int y = 0; y < gameBoard.getHeight(); y++) {\n if(gameBoard.getSquare(x, y) == TicTacToeGame.EMPTY)\n availableMoves.add(new Coordinate(x, y));\n }\n }\n\n return availableMoves;\n }", "public PossibleMove[] getPossibleMoves(Coordinate from);", "public Round() {\n\t\tthis.niceMoves = null;\n\t\tthis.roundNo = 1;\n\t}", "public int[][] getMovesRook(Piece p) {\n x = p.getX();\n y = p.getY();\n int legalMoves[][] = new int[8][8];\n\n for (int i = x + 1; i < 8; i++) {//Traversing from piece coords, right till end of board.\n if (b.getPieceAt(y, i) != null) {\n if (p.isWhite() == b.getPieceAt(y, i).isWhite()) {\n break;\n } else {\n legalMoves[y][i] = 1;\n break;\n }\n } else {\n legalMoves[y][i] = 1;\n }\n }\n for (int i = x - 1; i > -1; i--) {//Traversing from piece coords, left till end of board.\n if (b.getPieceAt((y), i) != null) {\n if (p.isWhite() == b.getPieceAt((y), i).isWhite()) {\n break;\n } else {\n legalMoves[(y)][i] = 1;\n break;\n }\n } else {\n legalMoves[y][i] = 1;\n }\n }\n for (int i = y - 1; i > -1; i--) { //Traversing from piece coords, downwards till end of board.\n if (b.getPieceAt((i), x) != null) {\n if (p.isWhite() == b.getPieceAt(i, x).isWhite()) {\n break;\n } else {\n legalMoves[i][x] = 1;\n break;\n }\n } else {\n legalMoves[i][x] = 1;\n }\n }\n for (int i = y + 1; i < 8; i++) { //Traversing from piece coords, upwards till end of board.\n if (b.getPieceAt((i), x) != null) {\n if (p.isWhite() == b.getPieceAt(i, x).isWhite()) {\n break;\n } else {\n legalMoves[i][x] = 1;\n break;\n }\n } else {\n legalMoves[i][x] = 1;\n }\n }\n return legalMoves;\n }", "public ArrayList<Cell> getPseudoLegalMoves() {\n\n int[][] offsetMultiplier = {{-1,-1},{-1,1},{1,-1},{1,1}}; //4 directions NW, NE, SW, SE\n int x = getRow(); int y = getColumn();\n\n\n return Piece.slidingPieceMoves(x,y,this.getColor(),offsetMultiplier);\n\n }", "public void getPossibleMoves() { \n\t\t\tsuper.getPossibleMoves();\n\t\t\tfor (int i = 0; i < Math.abs(xrange); i++) {\n\t\t\t\tif (currentx + xrange - ((int) Math.pow(-1,color)*i) >= 0) { \n\t\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + xrange - ((int) Math.pow(-1,color)*i) ][currenty]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( currentx - 1 >= 0 && currenty - 1 >= 0 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1].isOccupiedByOpponent()) {\t// Diagonol left space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1]);\n\t\t\t}\n\t\t\tif (currentx - 1 >= 0 && currenty + 1 <= 7 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1].isOccupiedByOpponent()) { \t//Diagonol right space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1]);\n\t\t\t}\n\t\t\t\n\t}", "public int[] getMove(int[][] grid) {\n int tmp;\n int max = _MIN_EVAL;\n int maxi = -1;\n int maxj = -1;\n\n //Si la _profondeur est nulle ou la partie est finie,\n //on ne fait pas le calcul\n //On parcourt les cases du morpion\n for (int row = 0; row < 3; row++) {\n for (int column = 0; column < 3; column++) {\n //Si la case est vide\n if (RuleController.isMoveLegal(grid, row, column)) {\n grid = RuleController.playMoveAt(grid, player, row, column);\n tmp = calculateMin(grid, proof - 1);\n if (tmp > max) {\n //On le choisit\n max = tmp;\n maxi = row;\n maxj = column;\n }\n grid = RuleController.cancelMove(grid, row, column);\n }\n }\n }\n return new int[]{maxi, maxj};\n }", "@Override\n\tpublic List<Move> getPossibleMoves(Chessboard chessboard) {\n\t\tthrow new UnsupportedOperationException(\"Not supported yet.\");\n\t}", "public int[] makeMove(ArrayList < String > movesArray) {\n movesArray.get(0);\n Random rand = new Random();\n int ri = rand.nextInt(3);\n int rj = rand.nextInt(3);\n return new int[] {ri,rj};\n }", "public ArrayList<Move> generateMoves(Board board, Piece piece){\r\n\t\treturn generateMoves(board, piece, true, true);\r\n\t}", "public int moves() {\n if (isSolvable())\n return _moves;\n else\n return -1;\n }", "public ArrayList<Cell> getPseudoLegalMoves() {\n\n Cell[][] board = Board.getBoard();\n ArrayList<Cell> moves = new ArrayList<Cell>();\n\n //Possible ways to move a knight\n int[][] possibleOffsets = {{-2,-1},{-2,1},{-1,-2},{-1,2},{1,-2},{1,2},{2,1},{2,-1}};\n\n for(int i=0; i<possibleOffsets.length; i++){\n int x = possibleOffsets[i][0] + getRow();\n int y = possibleOffsets[i][1] + getColumn();\n\n //Making sure we dont leave the board\n if(x >= board.length || x < 0\n || y >= board.length || y < 0)\n continue;\n\n //Making sure destination does not contain a friendly piece\n if(Board.containsPieceOfColor(x,y,this.getColor()))\n continue;\n\n moves.add(board[x][y]);\n }\n\n return moves;\n }", "public ArrayList<int[]> getRoundHistory()\n {\n return this.roundHistory;\n }", "public List<String> legalMoves() {\n List<String> result = new ArrayList<>();\n for (int col = 1; col < _board.length + 1; col += 1) {\n for (int row = 1; row < _board.length + 1; row += 1) {\n String move = row + \",\" + col;\n if (isLegal(move)) {\n result.add(move);\n }\n }\n }\n return result;\n }", "@Test\n\tpublic void testGetMoves() {\n\t\tGameState test = new GameState();\n\t\ttest.move(4);\n\t\ttest.move(7);\n\t\ttest.move(15);\n\t\ttest.move(20);\n\t\tassertEquals(4, test.getMoves());\n\t\ttest.move(24);\n\t\ttest.move(16);\n\t\tassertEquals(6, test.getMoves());\n\t}", "public PaxosRound getRound(int a_round)\n {\n PaxosRound result = (PaxosRound) m_rounds.get(new Integer(a_round));\n return result;\n }", "@Override\n public int[][] getMoveList(int destinationX, int destinationY) { return new int[0][0]; }", "private ArrayList<Integer> generateUnitMoves(char myType, int mSpot) {\n //Keep track of character moves (cm)\n ArrayList<Integer> cm = new ArrayList<Integer>();\n int row = mSpot / Cols;\n int col = mSpot % Cols;\n\n //We only need to worry about overstepping the\n //range of colomns. Overstepping rows will\n //be pruned out in \"pruneIllegals\"\n if (myType == 'N') {\n //Get Knight moves\n if (col >= 1) {\n cm.add(new Integer(mSpot - Cols - Cols - 1));\n cm.add(new Integer(mSpot + Cols + Cols - 1));\n }\n if (col < Cols - 1) {\n cm.add(new Integer(mSpot - Cols - Cols + 1));\n cm.add(new Integer(mSpot + Cols + Cols + 1));\n }\n if (col >= 2) {\n cm.add(new Integer(mSpot - Cols - 2));\n cm.add(new Integer(mSpot + Cols - 2));\n }\n if (col < Cols - 1) {\n cm.add(new Integer(mSpot - Cols + 2));\n cm.add(new Integer(mSpot + Cols + 2));\n }\n } else if (myType == 'R') {\n //Rook Moves\n //Get moves along Rows\n for (int i = 0; i < Rows; i++) {\n if (i == row) { continue; }\n cm.add(new Integer((i * Cols) + col));\n }\n\n //Get moves along Cols\n for (int i = 0; i < Cols; i++) {\n if (i == col) { continue; }\n cm.add(new Integer((row * Cols) + i));\n }\n } else if (myType == 'B') {\n //Bishop Moves\n\n //Diagonal movement\n //East movements\n for(int i = 1; i < Cols - col; i++) {\n cm.add(new Integer(mSpot + (i*Cols) + i));\n cm.add(new Integer((mSpot - (i*Cols)) + i));\n }\n //West movements\n for(int i = 1; i <= col; i++) {\n cm.add(new Integer((mSpot + (i*Cols)) - i));\n cm.add(new Integer((mSpot - (i*Cols)) - i));\n }\n } else if (myType == 'P') {\n //Pawn Moves\n if (col >= 1) {\n cm.add(new Integer((mSpot - Cols) - 1));\n }\n if (col < Cols - 1) {\n cm.add(new Integer((mSpot - Cols) + 1));\n }\n } else if (myType == 'Q') {\n //Queen Moves\n\n //Get moves along Rows\n for (int i = 0; i < Rows; i++) {\n if (i == row) { continue; }\n cm.add(new Integer((i * Cols) + col));\n }\n\n //Get moves along Cols\n for (int i = 0; i < Cols; i++) {\n if (i == col) { continue; }\n cm.add(new Integer((row * Cols) + i));\n }\n\n //Diagonal movement\n //East movements\n for(int i = 1; i < Cols - col; i++) {\n cm.add(new Integer(mSpot + (i*Cols) + i));\n cm.add(new Integer((mSpot - (i*Cols)) + i));\n }\n //West movements\n for(int i = 1; i <= col; i++) {\n cm.add(new Integer((mSpot + (i*Cols)) - i));\n cm.add(new Integer((mSpot - (i*Cols)) - i));\n }\n } else if (myType == 'K') {\n //King Movement\n if (col >= 1) {\n cm.add(new Integer((mSpot - Cols) - 1));\n cm.add(new Integer(mSpot - 1));\n cm.add(new Integer((mSpot + Cols) - 1));\n }\n if (col < Cols - 1) {\n cm.add(new Integer((mSpot - Cols) + 1));\n cm.add(new Integer(mSpot + 1));\n cm.add(new Integer((mSpot + Cols) + 1));\n }\n cm.add(new Integer(mSpot - Cols));\n cm.add(new Integer(mSpot + Cols));\n }\n return cm;\n }", "List<Move> getLegalMoves(Player player);", "public int[] move(){\n double inProb = Math.random();\n if (inProb < .25){\n y--;\n }\n else if (inProb < .5){\n y ++;\n }\n else if (inProb <.75){\n x--;\n }\n else {\n x++;\n }\n int[]loc = new int[2];\n loc[0] = x;\n loc[1] = y;\n \n return loc;\n }", "public ArrayList<Integer> neighNumbers() {\n ArrayList<Integer> neighNumbers = new ArrayList<Integer>();\n if(isValid(this.frame-10)) { neighNumbers.add(this.frame-10); }\n if(isValid(this.frame+10)) { neighNumbers.add(this.frame+10); }\n\n //Right edge\n if(this.frame % 10 == 0) {\n if(isValid(this.frame+9)) { neighNumbers.add(this.frame+9); }\n if(isValid(this.frame-1)) { neighNumbers.add(this.frame-1); }\n if(isValid(this.frame-11)) { neighNumbers.add(this.frame-11); }\n\n }\n\n //Left edge\n else if((this.frame -1) % 10 == 0) {\n if(isValid(this.frame-9)) { neighNumbers.add(this.frame-9); }\n if(isValid(this.frame+1)) { neighNumbers.add(this.frame+1); }\n if(isValid(this.frame+11)) { neighNumbers.add(this.frame+11); }\n }\n\n else {\n if(isValid(this.frame-11)) { neighNumbers.add(this.frame-11); }\n if(isValid(this.frame+11)) { neighNumbers.add(this.frame+11); }\n if(isValid(this.frame-1)) { neighNumbers.add(this.frame-1); }\n if(isValid(this.frame+1)) { neighNumbers.add(this.frame+1); }\n if(isValid(this.frame-9)) { neighNumbers.add(this.frame-9); }\n if(isValid(this.frame+9)) { neighNumbers.add(this.frame+9); }\n }\n\n return neighNumbers;\n }", "public List<ScoredMove> allValidMoves(GameState gm){\n\t\tList<ScoredMove> validMoves = new ArrayList<ScoredMove>();\n\t\t\n\t\t// check for draw move\n\t\tif (getDeckSize() > 0) {\n\t\t\tvalidMoves.add(new ScoredMove(ACTION.DRAW, null, null));\n\t\t}\n\t\t/*\n\t\telse {\n\t\t\t// check for discarding move (note: only allowing if decksize is empty)\n\t\t\tfor (Card c: getHand().getCards()){\n\t\t\t\tif (!(c instanceof MerchantShip)) {\n\t\t\t\t\tvalidMoves.add(new ScoredMove(ACTION.DISCARD, c, null));\n\t\t\t\t}\n\t\t\t}\n\t\t}*/\n\t\t\n\t\tvalidMoves.addAll(allDiscardMoves(gm));\n\t\t\n\t\t// check for playing merchant ships\n\t\tvalidMoves.addAll(allmShipMoves(gm));\n\t\t\n\t\t// add all attacks\n\t\tvalidMoves.addAll(allAttackMoves(gm));\n\t\t\n\t\tif (super.getVerbosity()) {\n\t\t\tSystem.out.println(\"Valid moves found: \" + validMoves.size());\n\t\t}\n\t\treturn validMoves;\n\t}", "public ArrayList<Coordinates> getHeroesPositions (){\n\t\tArrayList<Coordinates> path = new ArrayList<>();\n\t\tArrayList<Coordinates> coordinatePieces = chessboard.getTurnPieces();\n\t\tArrayList<Coordinates> threats = getThreats();\n\n\t\tfor ( Coordinates c : threats ){\n\t\t\tpath.add(c); //aggiungo la posizione dell'avversario\n\t\t\tif ( !(chessboard.at(c) instanceof Knight) )\n\t\t\t\tpath.addAll(chessboard.at(c).getPath(c, chessboard.getTurnKing())); //tutte le posizione in cui può andare\n\t\t}\n\t\t\n\t\tArrayList<Coordinates> result = new ArrayList<>();\n\t\t\tfor ( Coordinates c : coordinatePieces )\n\t\t\t\tfor ( Coordinates to : path)\n\t\t\t\t\tif ( !(chessboard.at(c) instanceof King) && checkMove(c, to) )\n\t\t\t\t\t\tresult.add(to);\n\t\treturn result;\n\t}", "protected Set<ChessMove> getPossibleCastlingMoves(ChessModel model, Location location, Set<ChessMove> movesSoFar) {\n\t\tCastlingAvailability castlingAvailability = model.getCastlingAvailability();\n\t\tif ((location == E1) && (getColor() == White)) {\n\t\t\t// this is the white king in the starting position\n\t\t\tif (castlingAvailability.isWhiteCanCastleKingSide()) {\n\t\t\t\tif (model.isLocationEmpty(F1) && model.isLocationEmpty(G1)) {\n\t\t\t\t\tif (!isInCheckAtLocations(model, E1, F1, G1)) {\n\t\t\t\t\t\tChessMove move = new ChessMoveCastleKingSide(getPiece(), E1, G1);\n\t\t\t\t\t\tmovesSoFar.add(move);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (castlingAvailability.isWhiteCanCastleQueenSide()) {\n\t\t\t\tif (model.isLocationEmpty(B1) && model.isLocationEmpty(C1) && model.isLocationEmpty(D1)) {\n\t\t\t\t\tif (!isInCheckAtLocations(model, B1, C1, D1, E1)) {\n\t\t\t\t\t\tChessMove move = new ChessMoveCastleQueenSide(getPiece(), E1, C1);\n\t\t\t\t\t\tmovesSoFar.add(move);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ((location == E8) && (getColor() == Black)) {\n\t\t\t// this is the black king in the starting position\n\t\t\tif (castlingAvailability.isBlackCanCastleKingSide()) {\n\t\t\t\tif (model.isLocationEmpty(F8) && model.isLocationEmpty(G8)) {\n\t\t\t\t\tif (!isInCheckAtLocations(model, E8, F8, G8)) {\n\t\t\t\t\t\tChessMove move = new ChessMoveCastleKingSide(getPiece(), E8, G8);\n\t\t\t\t\t\tmovesSoFar.add(move);\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tif (castlingAvailability.isBlackCanCastleQueenSide()) {\n\t\t\t\tif (model.isLocationEmpty(B8) && model.isLocationEmpty(C8) && model.isLocationEmpty(D8)) {\n\t\t\t\t\tif (!isInCheckAtLocations(model, B8, C8, D8, E8)) {\n\t\t\t\t\t\tChessMove move = new ChessMoveCastleQueenSide(getPiece(), E8, C8);\n\t\t\t\t\t\tmovesSoFar.add(move);\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn movesSoFar;\n\t}", "public List<BoardPos> getMoves(BoardPos from) {\n List<BoardPos> result;\n\n // strike check\n if (board.get(from).isCrown())\n result = getStrikesCrown(from);\n else result = getStrikes(from);\n\n // regular moves\n final int[] shifts = {-1, 1};\n if (result.isEmpty() && !board.get(from).isEmpty()) {\n if (board.get(from).isCrown())\n for (int shiftX : shifts)\n for (int shiftY : shifts) {\n BoardPos to = from.add(shiftX, shiftY);\n while (to.inBounds(board.side()) && board.get(to).isEmpty()) {\n result.add(to);\n to = to.add(shiftX, shiftY);\n }\n }\n else for (int shift : shifts) { // add adjacent empty positions\n BoardPos move = from.add(new BoardPos(shift,\n board.get(from).color() ? 1 : -1));\n if (board.get(move) != null && board.get(move).isEmpty())\n result.add(new BoardPos(move));\n } }\n\n // complete by adding the start position to every legal route, so that\n // it will be cleared as well when the player will move\n for (BoardPos pos : result)\n pos.addToRoute(new BoardPos(from));\n\n return result;\n }", "private static ArrayList<Point> getCurrentlyValidMoves(){\n ArrayList<Point> currentlyValidMoves = new ArrayList<Point>();\n //iterate through the gameboard, checking if the move is valid\n for( int row = 0; row < 8; row++ ){\n for( int column = 0; column < 8; column++ ){\n if( gamepieces[ row ][ column ] == BACKGROUND_COLOR && isMoveValid( row, column ) ){\n //if it is valid, add it to our list\n currentlyValidMoves.add( new Point( row, column ) );\n }\n }\n }\n return currentlyValidMoves;\n }", "public List<Integer> getChopsticks() {\n\t\tint chop_one = this.getId();\n\t\tint chop_two = 0;\n\t\tif (chop_one == 1) {\n\t\t\tchop_two = PhilosopherEat.TOTAL_MOUNT;\n\t\t} else {\n\t\t\tchop_two = chop_one - 1;\n\t\t}\n\t\tList<Integer> chopsList = new ArrayList<Integer>();\n\t\tchopsList.add(chop_one);\n\t\tchopsList.add(chop_two);\n\t\treturn chopsList;\n\t}", "public List<Position> getAllMoves(Board chessBoard) {\n return getAllDiscreteMoves(chessBoard);\n }", "@Override\r\n\tpublic ArrayList<String> allPossibleMoves(boolean whoPlays) {\r\n\t\t\r\n\t\tArrayList<String> Moves = new ArrayList<String>();\r\n\t\t\r\n\t\tif(whoPlays) {\r\n\t\t\tif( (new Board2048model(this)).moveUP()) \r\n\t\t\tMoves.add(\"UP\");\r\n\t\t\tif( (new Board2048model(this)).moveDOWN()) \r\n\t\t\tMoves.add(\"DOWN\");\r\n\t\t\tif( (new Board2048model(this)).moveRIGHT()) \r\n\t\t\tMoves.add(\"RIGHT\");\r\n\t\t\tif( (new Board2048model(this)).moveLEFT()) \r\n\t\t\tMoves.add(\"LEFT\");\r\n\t\t\t}\r\n\t\telse { \r\n\t\t\tfor( int i = 0; i < rows_size ; i++) {\r\n\t\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\t\t\tif(isEmpty(i,j)) {\r\n\t\t\t\t\t\tMoves.add(new String(Integer.toString(i) + \",\" + Integer.toString(j) + \",\" + Integer.toString(2)));\r\n\t\t\t\t\t\tMoves.add(new String(Integer.toString(i) + \",\" + Integer.toString(j) + \",\" + Integer.toString(4)));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} \r\n\t\t}\r\n\treturn Moves;\r\n\t}", "public List<Move> getValidMoves(Board board, boolean checkKing) {\n List<Move> moves = new ArrayList<Move>();\n\n // if no board given, return empty list\n if (board == null)\n return moves;\n\n // checks moves where the pawn advances a rank\n advance(board, moves);\n // checks moves where the pawn captures another piece\n capture(board, moves);\n // checks en passant moves\n enPassant(board, moves);\n\n // check that move doesn't put own king in check\n if (checkKing)\n for(int i = 0; i < moves.size(); i++)\n if (board.movePutsKingInCheck(moves.get(i), this.color)) {\n // if move would put king it check, it is invalid and\n // is removed from the list\n moves.remove(moves.get(i));\n // iterator is decremented due to the size of the list\n // decreasing.\n i--;\n }\n return moves;\n }", "ArrayList<Integer> getStepCounterTileX();", "public ArrayList<PentagoGame> nextPossibleMoves() {\n ArrayList<PentagoGame> children = new ArrayList<>();\n for(int i = 0; i < 6; i++) { // for each row I can place a piece\n for(int j = 0; j < 6; j++) { // for each column\n for(int k = 0; k < 4; k++ ) { // for each board to rotate\n for(int d = 0; d < 2; d ++) {// for each direction to rotate\n boolean leftRotate = false;\n if(d == 0) {\n leftRotate = true;\n }\n Move move = new Move(i, j, k, leftRotate);\n if(validMove(whosTurn(), move)) {\n PentagoGame tempGame = new PentagoGame(this);\n tempGame.playPiece(whosTurn(), move);\n tempGame.rotateBoard(whosTurn(), move);\n tempGame.turnOver();\n move.setGameState(tempGame);\n move.setUtility(calulateUtility(move));\n // todo\n children.add(tempGame);\n }\n }\n }\n }\n }\n\n return children;\n }", "public void playRound() {\n int count = 0;\n boolean hasZeros = false;\n \n //remove one card from every pile\n for (int i = 0; i < numPiles; i++){\n count++;\n piles[i] -= 1;\n \n //checks the array for any zeros beforehand\n if (piles[i] == 0 && !hasZeros){\n hasZeros = true;\n }\n }\n \n // shift piles over if there is a zero in the pile and decreases the\n // amount of elements in the array\n if (hasZeros){\n for (int i = 0; i < numPiles; i++){\n while (piles[i] == 0 && i < numPiles){\n for (int a = i; a < numPiles - 1; a++){\n piles[a] = piles[a+1];\n }\n numPiles --;\n }\n }\n }\n \n // add the number of cards removed into the last pile in the array and\n // increase the number of elements in the array\n piles[numPiles] = count;\n numPiles++;\n \n //check if board is valid\n assert isValidSolitaireBoard();\n }", "@Test\n public void callGetPossibleMoves() {\n\n game.setNode(new NodeImp(\"3,3\",\"P2\"));\n\n game.setNode(new NodeImp(\"3,4\",\"P1\"));\n\n game.setNode(new NodeImp(\"4,3\",\"P1\"));\n\n game.setNode(new NodeImp(\"4,4\",\"P2\"));\n\n String[] expectedMoves = {\"2,3\",\"4,5\",\"3,2\",\"5,4\"};\n Arrays.sort(expectedMoves);\n\n List<Node> actualPossibleMoves = game.getPossibleMoves();\n List<String> stringList = new Vector<>();\n for(Node node:actualPossibleMoves) {\n\n stringList.add(node.getId());\n\n }\n\n Object[] objectList = stringList.toArray();\n String[] actualMoves = Arrays.copyOf(objectList, objectList.length, String[].class);\n Arrays.sort(actualMoves);\n assertArrayEquals(expectedMoves, actualMoves);\n }", "private void updateMoveList(Move m) {\n \t//first check for castling move\n \tif(m.getSource().getName().equals(\"King\")) {\n \tint sx = m.getSource().getLocation().getX();\n \tint dx = m.getDest().getLocation().getX();\n \t\n \t//castle king side\n \tif(dx - sx == 2) {\n \t\tmoveList.add(\"0-0\");\n \t\treturn;\n \t}\n \t//castle queen side\n \telse if(sx - dx == 2) {\n \t\tmoveList.add(\"0-0-0\");\n \t\treturn;\n \t}\n \t}\n \t\n \t//now do normal checks for moves\n \t//if no piece, normal notation\n \tif(m.getDest().getName().equals(\"None\")) {\n \t\t\n \t\t//check for en passant\n \t\tif(m.getSource().getName().equals(\"Pawn\")) {\n \t\t\t\n \t\t\t//it's only en passant if the pawn moves diagonally to an empty square \n \t\t\tif(m.getSource().getLocation().getX() != m.getDest().getLocation().getX()) {\n \t\t\t\tmoveList.add(m.getSource().getLocation().getFile()+ \"x\" + m.getDest().getLocation().getNotation());\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t\t\n \t\tmoveList.add(m.getSource().getID() + m.getDest().getLocation().getNotation());\n \t}\n \t//add \"x\" for capturing\n \t//for pawn, it's a bit different\n \telse if(m.getSource().getName().equals(\"Pawn\")) {\n \t\tmoveList.add(m.getSource().getLocation().getFile()+ \"x\" + m.getDest().getLocation().getNotation());\n \t}\n \telse {\n \t\tmoveList.add(m.getSource().getID() + \"x\" + m.getDest().getLocation().getNotation());\n \t}\n }", "public ArrayList<Coordinates> getKingSafetyPositions (){\t\t\n\t\tArrayList<Coordinates> result = new ArrayList<>();\n\t\tCoordinates king = chessboard.getTurnKing();\n\t\t\n\t\tfor ( Coordinates c : chessboard.at(king).validPositions(king) ){\t\n\t\t\t\t\t\n\t\t\tif ( checkMove(king, c) ) {\n\t\t\t\t\n\t\t\t\tRules temp = new Rules(chessboard.move(king, c));\n\n\t\t\t\tif (!temp.kingOnCheck()){\n\t\t\t\t\tresult.add(c);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public int getRound() {\n\t\treturn myHistory.size() + opponentHistory.size();\n\t}", "public ArrayList<Point> getKingMovingPositions(int positionX, int positionY, Color col){\n ArrayList<Point> mp = new ArrayList<Point>();\n ArrayList<Point> moves = new ArrayList<Point>();\n for(OrientationMove orM:orientationMoveCombs){\n moves = getKingMovingPositions(new Point(positionX, positionY), col, orM.m , orM.or);\n if( moves.size()>0) mp.addAll(moves);\n }\n return mp;\n }", "private List<Cell> getSurroundingCells(int x, int y) {\n ArrayList<Cell> cells = new ArrayList<>();\n for (int i = x - 1; i <= x + 1; i++) {\n for (int j = y - 1; j <= y + 1; j++) {\n // Don't include the current position i != x && j != y &&\n if ( isValidCoordinate(i, j)) {\n if (i == x && j == y) {\n continue;\n } else {\n cells.add(gameState.map[j][i]);\n }\n }\n }\n }\n return cells;\n }", "public ArrayList<String> getMoves() {\n \treturn moveList;\n }", "public int getRoundNum(){\n return gameRounds;\n }", "public int[][] getMove()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\twhile (br.ready())\r\n\t\t\t\tSystem.out.println(\"Dumping: \" + br.readLine());\r\n\r\n\t\t\tSystem.out.printf(\"Player %d queried for move%n\", colour);\r\n\t\t\tpw.println(\"4\");\r\n\t\t\tpw.flush();\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tlong start = System.currentTimeMillis();\r\n\t\tMoveThread m = new MoveThread();\r\n\t\tThread t = new Thread(m);\r\n\r\n\t\tt.start();\r\n\r\n\t\t// Query for a move every 10ms until the timeout is reached or the move\r\n\t\t// is received\r\n\t\twhile (m.getMove() == null\r\n\t\t\t\t&& System.currentTimeMillis() - start < timeOut)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tThread.sleep(10);\r\n\t\t\t}\r\n\t\t\tcatch (InterruptedException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tm.timeout();\r\n\r\n\t\tint[][] move = m.getMove();\r\n\r\n\t\t// Tell a player of timeout\r\n\t\tif (move == null)\r\n\t\t{\r\n\t\t\tSystem.out.printf(\"Player %d timed out while choosing a move%n\",\r\n\t\t\t\t\tcolour);\r\n\t\t\tpw.println(\"6\");\r\n\t\t\tpw.flush();\r\n\t\t}\r\n\r\n\t\treturn move;\r\n\t}", "private ArrayList<Coordinates> getThreats() {\n\t\tArrayList<Coordinates> result = new ArrayList<>();\n\t\tArrayList<Coordinates> adversary = chessboard.getEnemyPieces();\n\t\tCoordinates king = null;\n\t\tking = chessboard.getTurnKing();\n\t\t\t\t\n\t\tfor (Coordinates c : adversary ){\n\t\t\tif ( checkMove(c, king) ){\n\t\t\t\tresult.add(c);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public Position[] getWinningPositions();" ]
[ "0.6582886", "0.61842763", "0.6156833", "0.6111727", "0.602635", "0.5981627", "0.59608006", "0.5912997", "0.58889246", "0.584407", "0.5791157", "0.5780082", "0.5716481", "0.56816745", "0.56647056", "0.5652381", "0.5633863", "0.56080914", "0.55929774", "0.558104", "0.5576959", "0.5568008", "0.55656856", "0.5547533", "0.5534116", "0.55238837", "0.55238837", "0.55053794", "0.55019146", "0.5481123", "0.5478267", "0.5469815", "0.5455507", "0.5441798", "0.5432498", "0.54323274", "0.5427871", "0.54239416", "0.5415128", "0.5406921", "0.5394641", "0.539437", "0.5392396", "0.53696924", "0.5366006", "0.5365139", "0.53582734", "0.5341895", "0.53336954", "0.5332339", "0.5332054", "0.5329466", "0.53284407", "0.53082085", "0.53074956", "0.5301726", "0.52940834", "0.529343", "0.5290089", "0.52818894", "0.52813864", "0.52677876", "0.5264033", "0.5263124", "0.52614725", "0.52583444", "0.5253477", "0.5248052", "0.5223677", "0.52109754", "0.51947206", "0.5166942", "0.51511467", "0.5150878", "0.5145091", "0.51417536", "0.5141622", "0.512696", "0.5109099", "0.5102953", "0.5094506", "0.50883466", "0.508737", "0.50759155", "0.50730383", "0.50686544", "0.5066982", "0.5064879", "0.5061918", "0.50613445", "0.5059759", "0.5052681", "0.5048683", "0.50445795", "0.5042345", "0.50306135", "0.502782", "0.50202775", "0.5019651", "0.5008879" ]
0.7492278
0
Admin logins the Retail website and navigates to Dashboard
@Test(priority=1) public void setUp() throws Exception { driver = DriverFactory.getDriver(DriverNames.CHROME); filterReturnsList=new RTTC025POM(driver); baseUrl = properties.getProperty("baseURL"); driver.get(baseUrl); filterReturnsList.sendUserName("admin"); filterReturnsList.sendPassword("admin@123"); filterReturnsList.clickLoginBtn(); String expectedPageTitle="Dashboard"; String actualPageTitle=driver.getTitle(); assertEquals(actualPageTitle, expectedPageTitle); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void adminLogin() {\n\t\tdriver.get(loginUrl);\r\n\t\t// fill the form\r\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(USERNAME);\r\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(PASSWORD);\r\n\t\t// submit login\r\n\t\tdriver.findElement(By.name(\"btn_submit\")).click();\r\n\t}", "private void loginAsAdmin() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"admin\");\n vinyardApp.fillPassord(\"321\");\n vinyardApp.clickSubmitButton();\n }", "public static void navigateAdminLoginPage() {\n Browser.driver.get(\"http://shop.pragmatic.bg/admin\");\n }", "public void gotoAdminLogin(){ application.gotoAdminLogin(); }", "@Override\r\n\tpublic void login_admin() {\n\t\trender(\"admin/login.jsp\");\r\n\t}", "public void logincredentials() {\n\t\tutil.entertext(prop.getValue(\"locators.text.uname\"), \"admin\");\n\t\tutil.entertext(prop.getValue(\"locators.text.password\"), \"Admin123\");\n\t\tutil.ClickElement(prop.getValue(\"locators.button.regdesk\"));\n\t\tutil.ClickElement(prop.getValue(\"locators.button.login\"));\n\t\tlogreport.info(\"logged into the application\");\n\n\t}", "@Given ( \"I am logged into iTrust2 as an Admin\" )\r\n public void loginAsAdmin () {\r\n driver.get( baseUrl );\r\n final WebElement username = driver.findElement( By.name( \"username\" ) );\r\n username.clear();\r\n username.sendKeys( \"admin\" );\r\n final WebElement password = driver.findElement( By.name( \"password\" ) );\r\n password.clear();\r\n password.sendKeys( \"123456\" );\r\n final WebElement submit = driver.findElement( By.className( \"btn\" ) );\r\n submit.click();\r\n\r\n }", "public static Result index() {\n // Check that the email matches a confirmed user before we redirect\n String email = ctx().session().get(\"email\");\n if (email != null) {\n User user = User.findByEmail(email);\n if (user != null && user.validated) {\n return GO_DASHBOARD;\n } else {\n Logger.debug(\"Clearing invalid session credentials\");\n session().clear();\n }\n }\n\n return GO_HOME;\n }", "private static void postLoginPage() {\n post(\"/login\", \"application/json\", (req, res) -> {\n HomerAccount loggedInAccount = homerAuth.login(req.body());\n if(loggedInAccount != null) {\n req.session().attribute(\"account\", loggedInAccount);\n res.redirect(\"/team\");\n } else {\n res.redirect(\"/login\");\n }\n return null;\n });\n }", "public void login() {\n try {\n callApi(\"GET\", \"account/session\", null, null, true);\n } catch (RuntimeException re) {\n\n }\n\n Map<String, Object> payload = new HashMap<>();\n payload.put(\"name\", \"admin\");\n payload.put(\"password\", apiAdminPassword);\n payload.put(\"remember\", 1);\n\n callApi(\"POST\", \"account/signin\", null, payload, true);\n }", "public void loginAsUser() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"user\");\n vinyardApp.fillPassord(\"123\");\n vinyardApp.clickSubmitButton();\n }", "public DashboardPage clickLogin() {\n driver.findElement(By.id(\"login-button\")).click();\n return new DashboardPage(driver);\n }", "@Public\n\t@Get(\"/login\")\n\tpublic void login() {\n\t\tif (userSession.isLogged()) {\n\t\t\tresult.redirectTo(HomeController.class).home();\n\t\t}\n\t}", "protected void login() {\n\t\t\r\n\t}", "public void navigateToLoginPage() {\r\n\t\tBrowser.open(PhpTravelsGlobal.PHP_TRAVELS_LOGIN_URL);\r\n\t}", "private void launchLoginScreen() {\n NavGraphDirections.GotoLoginUrlGlobalAction action = gotoLoginUrlGlobalAction(authenticatorUtils.buildAuthUrl());\n\n navController.navigate(action);\n }", "public void clciklogin() {\n\t driver.findElement(loginBtn).click();\r\n\t \r\n\t //Print the web page heading\r\n\t System.out.println(\"The page title is : \" +driver.findElement(By.xpath(\"//*[@id=\\\"app\\\"]//div[@class=\\\"main-header\\\"]\")).getText());\r\n\t \r\n\t //Click on Logout button\r\n\t// driver.findElement(By.id(\"submit\")).click();\r\n\t }", "private void startAdmin() {\n final Intent adminActivity = new Intent(this, AdminActivity.class);\n finish();\n startActivity(adminActivity);\n }", "public void AdminLink(){\n\t\tAdminLink.click();\n\t}", "public login() {\n initComponents();\n setTitle(\"COLLAGE MANAGEMENT SYSTEM\");\n }", "@Test(priority=1)\n public void adminPage(){\n\t\tdriver.findElement(By.xpath(\"/html/body/div[1]/nav/a[5]\")).click();\n\t}", "public AdminLogInPage() {\n initComponents();\n }", "@Test\n\tpublic void checkValidLoginAdmin() {\n\t\ttest = report.createTest(\"CheckValidLoginAdmin\");\n\t\t\n\t\tadminhomepage = loginpage.successfullLoginAdmin(UserContainer.getAdmin());\n\t\ttest.log(Status.INFO, \"Signed in\");\n\t\t\n\t\tAssert.assertEquals(adminhomepage.getUserNameText(), UserContainer.getAdmin().getLogin());\n\t\ttest.log(Status.PASS, \"Checked if the right page is opened.\");\n\t\t\n\t\tloginpage = adminhomepage.clickLogout();\n\t\ttest.log(Status.INFO, \"Signed off\");\n\t}", "@GET\n\t@RequestMapping(value = \"/admin\")\n\t@Secured(value = { \"ROLE_ADMIN\" })\n\tpublic String openAdminMainPage() {\n\t\t\n\t\treturn \"admin/admin\";\n\t}", "public void doLogin() {\n\t\tSystem.out.println(\"loginpage ----dologin\");\n\t\t\n\t}", "public DashboardPage clickloginButton (){\n driver.findElement(loginButton).click ();\n\n return new DashboardPage (driver);\n }", "public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}", "public Page_Home doDefaultLogin() {\n\t\tLogStatus.info(\"Logging in with username :: \\'\" + TestUtils.getValue(\"username\") + \"\\' and password :: \\'\"\n\t\t\t\t+ TestUtils.getValue(\"password\") + \"\\'\");\n\t\tDriverManager.getDriver().findElement(By.name(\"username\")).sendKeys(TestUtils.getValue(\"username\"));\n\t\tDriverManager.getDriver().findElement(By.name(\"password\")).sendKeys(TestUtils.getValue(\"password\"));\n\t\tDriverManager.getDriver().findElement(By.id(\"Registration Desk\")).click();\n\t\tDriverManager.getDriver().findElement(By.id(\"loginButton\")).click();\n\n\t\treturn new Page_Home();\n\n\t}", "@RequestMapping(value = \"/admin\", method = RequestMethod.GET)\n public ModelAndView adminPage() {\n logger.info(\"Admin GET request\");\n\n String login = authorizationUtils.getCurrentUserLogin();\n String message = MessageFormat.format(\"User login: {0}\", login);\n logger.info(message);\n\n ModelAndView model = new ModelAndView();\n model.addObject(\"search\", new SearchDto());\n model.setViewName(\"admin\");\n return model;\n }", "protected void login() {\n\t\tdriver.get(getProperty(\"baseUrl\"));\n\n\t\t// 2. Enter valid credentials in the Username and Password fields.\n\t\tLoginPageObjects.usernameTextField(driver).sendKeys(getProperty(\"validUsername\"));\n\t\tLoginPageObjects.passwordTextField(driver).sendKeys(getProperty(\"validPassword\"));\n\n\t\t// 3. Click on the Login button\n\t\tLoginPageObjects.loginButton(driver).click();\n\t\t// waiting.waitForLoad(driver);\n\t}", "public void verifyOnDashboardPage() {\n verifyUserLoggedIn.waitForState().enabled(30);\n verifyUserLoggedIn.assertContains().text(\"Dev Links\");\n }", "public static void login() {\n\t\trender();\n\t}", "@Override\n\tpublic void onActivate() {\n\t\tsetCurrentPageWhenReady(StaticPageNames.Core_UserLogin, 30, pageName -> {\n\t\t\t//TODO: Show error popup\n\t\t\tlogger.severe(\"Failed to load Login page, timed out while waiting for page!\");\n\t\t});\n\t}", "private void startDashboard() {\n Intent intent = new Intent(this, Dashboard.class);\n startActivity(intent);\n }", "public void LogIn() {\n\t\t\r\n\t}", "@And(\"is on login page\")\n\tpublic void is_on_login_page() {\n\t\tSystem.out.println(\"user on 1\");\n\t\tdriver.navigate().to(\"https://example.testproject.io/web/\");\n\n\t}", "@BeforeGroups(groups = \"SUPER_ADMIN\")\n protected void loginSuperAdmin() throws Exception {\n login(\"spravce@eos.cz\", \"spravce\");\n }", "protected void submitAction() {\n\t\ttry {\n\t\t\tString username = userField.getText();\n\t\t\tAbstractAgent loggedClient = parent.getAgent().login(username, new String(passField.getPassword()));\n\t\t\tif (loggedClient instanceof AdminMS) {\n\t\t\t\tAdminUI adminUI = new AdminUI((AdminMS) loggedClient);\n\t\t\t\tparent.setVisible(false);\n\t\t\t\tadminUI.run();\n\t\t\t} else if (loggedClient instanceof IUser) {\n\t\t\t\tUserUI userUI = new UserUI((IUser) loggedClient);\n\t\t\t\tparent.setVisible(false);\n\t\t\t\tuserUI.run();\n\t\t\t}\n\t\t\tif (loggedClient != null)\n\t\t\t\tparent.dispose();\n\t\t} catch (LoginException e) {\n\t\t\tmessageLabel.setText(e.getMessage());\n\t\t} catch (RemoteException e) {\n\t\t\tJOptionPane.showMessageDialog(parent, e);\n\t\t}\n\t}", "public void login() {\n\n String username = usernameEditText.getText().toString();\n String password = passwordEditText.getText().toString();\n regPresenter.setHost(hostEditText.getText().toString());\n regPresenter.login(username, password);\n }", "@Override\r\n public Boolean loginAdmin(LoginAccessVo vo) throws Exception {\n return null;\r\n }", "@Override\r\n public Boolean loginAdmin(LoginAccessVo vo) throws Exception {\n return null;\r\n }", "public void tener_acceso_a_la_plataforma() {\n\t\tbaseState.setUrl(\"http://km.choucairtesting.com/login/index.php\");\t\n\t\tbaseState.setBrowserType(BrowserType.GoogleChrome);\n\t\tbaseState.execute(desktop);\t\n\t\tSerenity.takeScreenshot();\n\t\t\n\t}", "@Override\n\tpublic void goToLogin() {\n\t\t\n\t}", "protected void callHome() {\n\t\tIntent intent = new Intent(this, AdminHome.class);\r\n\t\tstartActivity(intent);\r\n\t}", "public void gotoLogin() {\n try {\n LoginController login = (LoginController) replaceSceneContent(\"Login.fxml\");\n login.setApp(this);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "void goToLogin() {\n mainFrame.setPanel(panelFactory.createPanel(PanelFactoryOptions.panelNames.LOGIN));\n }", "public void navigateToDashboard() {\n String currentUrl = driver.getCurrentUrl();\n if(!currentUrl.contains(DashboardPageAddress)) {\n driver.navigate().to(baseUrl + DashboardPageAddress);\n }\n }", "@Override\n\tprotected void login() {\n\t\tsuper.login();\n\t}", "void admin() {\n\t\tSystem.out.println(\"i am from admin\");\n\t}", "@RequestMapping(\"/admin\")\n public String admin() {\n \t//当前用户凭证\n\t\tSeller principal = (Seller)SecurityUtils.getSubject().getPrincipal();\n\t\tSystem.out.println(\"拿取用户凭证\"+principal);\n return \"index管理员\";\n\n }", "@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}", "@Override\n String execute(HttpServletRequest request, HttpServletResponse response) throws LegohusException {\n String email = request.getParameter(\"email\");\n String password = request.getParameter(\"password\");\n User user = LogicFacade.login(email, password);\n HttpSession session = request.getSession();\n session.setAttribute(\"user\", user);\n \n return \"WEB-INF/\" + user.getRole() + \"page\";\n }", "public void testRun() throws Exception {\r\n SeleniumTestBase mySeleniumTestBase = new SeleniumTestBase(selenium);\r\n mySeleniumTestBase.loginToUI(\"admin\", \"admin\");\r\n }", "public void clickAdminTab() throws Exception {\n\t\twdriver.findElement(By.xpath(locators.clickAdminTab)).click();\n\n\t}", "public LandingPage loginToAccount(){\n\t\taction.WaitForWebElement(linkLogin)\n\t\t\t .Click(linkLogin);\n\t\treturn this;\n\t}", "private void redirectToLandingPage(){\n\t\tappInjector.getAppService().getLoggedInUser(new SimpleAsyncCallback<UserDo>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(UserDo loggedInUser) {\n\t\t\t\tAppClientFactory.setLoggedInUser(loggedInUser);\n\t\t\t\tUcCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tHomeCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tAppClientFactory.getInjector().getWrapPresenter().get().setLoginData(loggedInUser);\n\t\t\t\tif (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.STUDENT)){\n\t\t\t\t\t\n\t\t\t\t}else if(AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.SHELF)){\n\t\t\t\t\tAppClientFactory.fireEvent(new DisplayNoCollectionEvent());\n\t\t\t\t}else{\n\t\t\t\t\tMap<String, String> params = new HashMap<String,String>();\n\t\t\t\t\tparams.put(\"loginEvent\", \"true\");\n\t\t\t\t\tappInjector.getPlaceManager().revealPlace(PlaceTokens.HOME, params);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void login() {\n\t\tUser user = new User(\"admin\", \"12345678\", Role.ADMIN);\n\t\tuser.setEmail(\"admin@gibmit.ch\");\n\t\t\n\t\tif(user != null) {\n\t\t\tuserBean.setLoggedInUser(user);\n\t\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\t\tHttpServletRequest req = (HttpServletRequest)context.getExternalContext().getRequest();\n\t\t\treq.getSession().setAttribute(ATTR_USER, user);\n\t\t}else{\n\t\t\tkeepDialogOpen();\n\t\t\tdisplayErrorMessageToUser(\"Wrong Username/Password. Try again\");\n\t\t}\n\t\t\n\t}", "public void login(final String login, final String password) {\n AdminLoginPage loginPage = new AdminLoginPage(driver);\n this.dashboardPage = loginPage.open()\n .fillEmail(login)\n .fillPassword(password)\n .submitLogin();\n setCurrentPage(dashboardPage);\n }", "public login() {\n\n initComponents();\n \n usuarios.add(new usuarios(\"claudio\", \"claudioben10\"));\n usuarios.get(0).setAdminOno(true);\n \n }", "public void loginAsAdmin() {\n mAuth.signInWithEmailAndPassword(\"admin@gmail.com\", \"password\")\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (! task.isSuccessful()) {\n alert(\"Firebase\", \"ERROR: Invalid username or password!\");\n return;\n }\n\n authenticationDone = true;\n if (splashTimeoutFinished) {\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(intent);\n }\n }\n });\n }", "public void SwichLogingPageAndSignIn()\r\n {\r\n WaitTime(2000);\r\n driver.navigate().to(\"https://www.n11.com/giris-yap\");\r\n \r\n driver.findElement(By.cssSelector(\"#email\")).sendKeys(\"ercanuca@gmail.com\");\r\n WaitTime(2000);\r\n driver.findElement(By.cssSelector(\"#password\")).sendKeys(\"nacre123456\");\r\n WaitTime(2000);\r\n driver.findElement(By.cssSelector(\"#loginButton\")).click();\r\n \r\n }", "@RequestMapping(value = \"/newlogin\")\r\n\tpublic String dispatchTodefaultEntryPoint() {\r\n\t\tlogger.entry();\r\n\r\n\t\tsaveUserLoginInformation();\r\n\r\n\t\t// String defaultHome = \"redirect:/home\";\r\n\r\n\t\t// if (Utils.isUserInRole(getInternalUserRoles())) {\r\n\t\t//\r\n\t\t// } else {\r\n\t\t// throw new AccessDeniedException(\"User Role not found\");\r\n\t\t// }\r\n\r\n\t\tString homePage = \"forward:/\" + getHomePageByRole();\r\n\r\n\t\tlogger.exit();\r\n\r\n\t\treturn homePage;\r\n\t}", "public void login() throws IOException {\n\t\tApp.setRoot(\"LogIn\");\n\t}", "public loginPage() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "@Given(\"^user launch on dashboard page$\")\r\n\tpublic void user_launch_on_dashboard_page() {\r\n\t\tdashboarpage.validatelandedondashboarpage();\r\n\t}", "public void login(ActionEvent event) throws IOException {\n\t\t//if user is admin, open admin screen\n\t\tif(username.getText().toLowerCase().equals(\"admin\")) {\n\t\t\t//open admin screen\n\t\t\tMain.changeScene(\"/view/admin.fxml\", \"Administrator Dashboard\");\t\t\t\n\t\t}\n\t\t//if user is blank, throw error\n\t\telse if(username.getText().isEmpty()){\n\t\t\tinvalidUserError.setVisible(true);\n\t\t}\n\t\t//otherwise make sure user exists and if they do set current user and change screen, if not throw error.\n\t\telse {\n\t\t\tfor(User user : UserState.getAllUsers()) {\n\t\t\t\tif(user.getUserName().toLowerCase().equals(username.getText().toLowerCase())) {\n\t\t\t\t\tUserState.setCurrentUser(user);\n\t\t\t\t\tMain.changeScene(\"/view/userhome.fxml\", \"User Home\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tinvalidUserError.setVisible(true);\n\t\t\tusername.setText(\"\");\n\t\t}\n\t}", "private void showLogin() {\n \t\tLogin.actionHandleLogin(this);\n \t}", "public void logOutAdministrator() {\n logOutGeneral();\n }", "@GetMapping(\"/admin/home\")\n\tpublic ModelAndView goToAdminHome(){\n\t\t\n\t\tModelAndView modelAndView = new ModelAndView(\"admin/home\");\n\t\tAuthentication auth = SecurityContextHolder.getContext().getAuthentication();\n\t\tUser user = userService.findUserByEmail(auth.getName());\n\t\t\n\t\tmodelAndView.addObject(\"userName\", \"Welcome \" + user.getFirstname() + \" \" + user.getLastname() + \" (\" + user.getEmail() + \")\");\n\t\tmodelAndView.addObject(\"adminMessage\",\"Content Available Only for Users with Admin Role\");\n\t\t\n\t\treturn modelAndView;\n\t}", "@FXML\n\tprivate void handleLogin() {\n\t \n\t\t\t\ttry {\n\t\t\t\t\tmain.showHomePageOverview(username.getText(),password.getText());\n\t\t\t\t} catch (SQLException 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\n\t}", "@Override\n public void onClick(View v) {\n String username = edtUsername.getText().toString();\n String password = edtPassword.getText().toString();\n int usertype = spnUsertype.getSelectedItemPosition();\n\n\n /* CHECK IF FIELDS ARE BLANK */\n if(areFieldsBlank(username, password)) {\n return;\n }\n else {\n /* REDIRECT TO FREELANCE DASHBOARD */\n if (usertype == 0) {\n if (app.isFreelancerExistent(username, password)) {\n Intent launchFreelanceDashboardActivity = new Intent(LoginActivity.this,\n FreelanceDashboardActivity.class);\n\n /* CREATE SESSION */\n session.createLoginSession(username, password, \"Freelancer\");\n\n launchFreelanceDashboardActivity.putExtra(\"F_USERNAME\", username);\n launchFreelanceDashboardActivity.putExtra(\"F_PASSWORD\", password);\n startActivity(launchFreelanceDashboardActivity);\n finish();\n return;\n }\n else {\n Toast.makeText(LoginActivity.this,\n \"ERROR: Please verify freelancer login credentials.\",\n Toast.LENGTH_SHORT).show();\n }\n\n }\n /* REDIRECT TO CLIENT DASHBOARD */\n else if (usertype == 1) {\n if (app.isClientExistent(username, password)) {\n Intent launchClientDashboardActivity = new Intent(LoginActivity.this,\n ClientDashboardActivity.class);\n\n /* CREATE SESSION */\n session.createLoginSession(username, password, \"Client\");\n\n launchClientDashboardActivity.putExtra(\"F_USERNAME\", username);\n launchClientDashboardActivity.putExtra(\"F_PASSWORD\", password);\n startActivity(launchClientDashboardActivity);\n finish();\n return;\n }\n else {\n Toast.makeText(LoginActivity.this,\n \"ERROR: Please verify client login credentials.\",\n Toast.LENGTH_SHORT).show();\n }\n }\n /* REDIRECT TO ADMIN DASHBOARD */\n else if (usertype == 2) {\n // TODO: Verify Account\n Intent launchAdminDashboardActivity = new Intent(LoginActivity.this,\n AdminDashboardActivity.class);\n startActivity(launchAdminDashboardActivity);\n finish();\n return;\n }\n }\n }", "public WebDriver login() {\r\n System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\sa841\\\\Documents\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n //System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\sa841\\\\Documents\\\\chromedriver_win32\\\\phantomjs.exe\");\r\n String URL = \"http://Admin:admin@192.168.1.63:8080/phenotips123/bin/loginsubmit/XWiki/XWikiLogin/\";\r\n ChromeOptions options = new ChromeOptions();\r\n options.addArguments(\"window-size=1024,768\");\r\n DesiredCapabilities capabilities = DesiredCapabilities.chrome();\r\n capabilities.setCapability(ChromeOptions.CAPABILITY, options);\r\n WebDriver driver = new ChromeDriver(capabilities);\r\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n //WebDriver driver = new PhantomJS();\r\n driver.get(URL);\r\n driver.findElement(By.id(\"j_username\")).sendKeys(\"Admin\");\r\n driver.findElement(By.id(\"j_password\")).sendKeys(\"admin\");\r\n driver.findElement(By.className(\"button\")).click();\r\n return driver;\r\n }", "public static void Login() \r\n\t{\n\t\t\r\n\t}", "@Test\t\t\n\tpublic void Login()\t\t\t\t\n\t{\t\t\n\t driver.get(\"https://demo.actitime.com/login.do\");\t\t\t\t\t\n\t driver.findElement(By.id(\"username\")).sendKeys(\"admin\");\t\t\t\t\t\t\t\n\t driver.findElement(By.name(\"pwd\")).sendKeys(\"manager\");\t\t\t\t\t\t\t\n\t driver.findElement(By.xpath(\"//div[.='Login ']\")).click();\t\t\n\t driver.close();\n\t}", "private final static void onLoginAdmin(TextField username, PasswordField password)\n\t{\n\t\tif(ProfileManipulation.findUsername(username.getText()) && !ProfileManipulation.checkLoginStatus(username.getText())){\n\t\t\tif (ProfileManipulation.isVerfied(username.getText())) {\n\t\t\t\tProfileManipulation.updateLoginStatus(username.getText(), true);\n\n\t\t\t\t// Jetzt wird das Profil aufgerufen\n\t\t\t\tPartylize.setUsername(username.getText());\n\n\t\t\t\tProfileManipulation.changePassword(password.getText());\n\n\t\t\t\tPartylize.showMainScene();\n\t\t\t} else {\n\t\t\t\tPartylize.setUsername(username.getText());\n\t\t\t\tPartylize.showVerification();\n\t\t\t}\n\t\t}\n\t\t// Funktionsaufruf Datenbankanbindung -> Erstellen einer Session ID\n\t\t// Funktionsaufruf Profildaten in lokalen Speicher laden - WIP\n\t\telse {\n\t\t\tusername.setText(\"\");\n\t\t\tpassword.setText(\"\");\n\t\t}\n\t}", "public String onClick() {\n final String login = getModel().getLogin();\n final String password = getModel().getPasssword();\n\n //Call Business\n Exception ex2 = null;\n User s = null;\n try {\n s = service.login(login, password);\n } catch (Exception ex) {\n ex2 = ex;\n }\n\n //Model to View\n if (ex2 == null) {\n getModel().setCurrentUser(s);\n return \"list\";\n } else {\n return null;\n }\n }", "public static void ulogujSeKaoAdmin() {\r\n\t\tprikazIProveraSifre(-2, 'a');\r\n\t}", "protected Response login() {\n return login(\"\");\n }", "protected void confirmLogin() {\n String nameString1 = this.adminName.getText();\n String passwordString1 = this.adminPassword.getText();\n UserType userType = (UserType) this.user_type_combobox.getSelectedItem();\n if (\"系统管理员\".equals(userType.getName())) {\n AdminDao adminDao = new AdminDao();\n SystemAdmin admin = adminDao.selectAdmin(nameString1, passwordString1);\n if (admin == null) {\n JOptionPane.showMessageDialog(this, \"用户名或者密码错误!!\");\n return;\n }\n IndexFrame indexFrame = new IndexFrame(userType, admin, passwordString1);\n indexFrame.setVisible(true);\n this.dispose();\n }\n }", "void redirectToLogin();", "private void GoToLogin() {\n\t\tstartActivity(new Intent(this, LoginActivity.class));\r\n\t\tapp.user.sessionID = \"\";\r\n\t\tMassVigUtil.setPreferenceStringData(this, \"SESSIONID\", \"\");\r\n\t}", "public static void index()\n {\n String adminId = session.get(\"logged_in_adminid\"); // to display page to logged-in administrator only\n if (adminId == null)\n {\n Logger.info(\"Donor Location: Administrator not logged-in\");\n Welcome.index();\n }\n else\n {\n Logger.info(\"Displaying geolocations of all donors\");\n render();\n }\n }", "public static void LoginDirector() {\n SuperUI.clearScreen();\n int type = LoginScreen();\n\n try {\n\n Connection conn = ConnectToDatabase();\n if (type == 1) {\n SuperUI.clearScreen();\n Employee.EmployeeLogin();\n// if(employeePosition.equalsIgnoreCase(\"HR Manager\"))\n// {\n// type=4;\n// }\n } else if (type == 2) {\n Customer.CustomerLogin();\n }\n if (type == 3) {\n System.out.println(\"Goodbye\");\n System.exit(0);\n conn.close();\n }\n\n } catch (SQLException excpt) {\n System.out.println(excpt.getMessage());\n\n }\n\n }", "@RequestMapping(value = \"/login\", method = GET)\r\n\tpublic String login() {\r\n\t\treturn \"admin/login\";\r\n\t}", "private void loggedInUser() {\n\t\t\n\t}", "@Override\r\n\tpublic void login() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tif (ConnectionActivity.isNetConnected(AdminLoginActivity.this)) {\r\n\r\n\t\t\t\t\tdoAdminLogin();\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\td.showSingleButtonDialog( AdminLoginActivity.this,\r\n\t\t\t\t\t\t\t\"Please enable your internet connection\");\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n protected void init(VaadinRequest vaadinRequest) {\n\n //setPollInterval(3000);\n\n new Navigator(this, this);\n getNavigator().addView(tLoginView.NAME, tLoginView.class);//\n getNavigator().addView(tMainView.NAME,tMainView.class);\n\n getNavigator().addViewChangeListener(new ViewChangeListener() {\n\n @Override\n public boolean beforeViewChange(ViewChangeEvent event) {\n\n boolean isLoggedIn = getSession().getAttribute(\"user\") != null;\n boolean isLoginView = event.getNewView() instanceof tLoginView;\n\n\n if (!isLoggedIn && !isLoginView) {\n getNavigator().navigateTo(tLoginView.NAME);\n return false;\n } else if (isLoggedIn && isLoginView) {\n return false;\n }\n\n return true;\n }\n\n @Override\n public void afterViewChange(ViewChangeEvent event) {\n\n }\n });\n }", "protected void doAdminLogin() {\n\t\tif (et_pin.getText().toString().trim().equals(\"\")) {\r\n//\t\t\td.dialogShow(v, AdminLoginActivity.this, \"Sorry\",\r\n//\t\t\t\t\t\"Please enter your master pin\");\r\n\t\t\t\r\n\t\t\td.showSingleButtonDialog( AdminLoginActivity.this,\r\n\t\t\t\t\t\"Please enter your master pin\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t} else {\r\n\r\n\t\t\tGlobalVariable.adminMasterPin = et_pin.getText().toString().trim();\r\n\t\t\tIntent i = new Intent(AdminLoginActivity.this,\r\n\t\t\t\t\tAdminConfirmLoginActivity.class);\r\n\t\t\tstartActivity(i);\r\n\t\t\toverridePendingTransition(R.anim.open_translate,\r\n\t\t\t\t\tR.anim.close_translate);\r\n\r\n\t\t}\r\n\t}", "@Then(\"view Dashboard\")\n\tpublic void view_dashboard() {\n\t\taddCust = new addCustomerPage(driver);\n\t\tAssert.assertEquals(\"Dashboard / nopCommerce administration\",addCust.getPageTitle());\n\t}", "@Override\r\n\tpublic void login_interviewer() {\n\t\trender(\"interviewer/login.jsp\");\r\n\t}", "private void loadDashboard() {\n Intent navigationIntent = new Intent(this, DashboardActivity.class);\n navigationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(navigationIntent);\n }", "public static Result index() {\n Skier loggedInSkier = Session.authenticateSession(request().cookie(COOKIE_NAME));\n if(loggedInSkier!=null)\n return redirect(\"/home\");\n else\n return ok(index.render(\"\"));\n }", "private void setDashboard(){\n lblUsername.setText(username);\n if(roles.equals(\"employeer\")){\n jBtnLamar.setText(\"Lihat Pelamar\");\n jBtnKerja.setText(\"Tambah Lowongan\");\n btnLowonganku.setVisible(true);\n }\n \n }", "@RequestMapping(method = RequestMethod.GET)\n\tpublic String get(HttpServletRequest request, Model model) {\n\t\tlogger.trace(\"Admin Home\");\n\t\tif(!request.isUserInRole(AccountPrivilege.VIEW.getName())) {\n\t\t\tmodel.addAttribute(\"error\", \"You do not have access to view the admin pages\");\n\t\t\tLoginForm loginForm = new LoginForm();\n\t\t\tmodel.addAttribute(\"loginForm\", loginForm);\n\t\t\tAccountCreateForm accountCreateForm = new AccountCreateForm();\n\t\t\tmodel.addAttribute(\"accountCreateForm\", accountCreateForm);\n\t\t\treturn \"index\";\n\t\t}\n\t\treturn \"admin/home\";\n\t}", "public LoginPageActions Navigate_LoginPage()\n\t{\n\t\t\n\t\tUIActions.fn_click(HomePageObjects.customerAccount);\n\t\treturn new LoginPageActions();\n\t}", "public void login() {\n\t\tloggedIn = true;\n\t}", "private static void loginForAdmin(String username, String password){\n\n ArrayList<Object> loginData = LogInAndLogOutService.login(username, password);\n boolean logged = (boolean) loginData.get(0);\n boolean freezed = (boolean) loginData.get(1);\n Employee employee = (Employee) loginData.get(2);\n\n if (logged){\n\n System.out.println(\"Sie sind richtig als Herr/Frau \"+ employee.getLastname() + \" \"+ employee.getFirstname() +\" eingelogt.\");\n }else {\n if (freezed){\n\n System.out.println(\"Ihr Konto wurde einfriert. Sie können sie sich nicht einloggen. :(\");\n }else {\n\n System.out.println(\"Falscher Benutzername oder Passwort eingegeben. Versuchen Sie erneut.\");\n }\n }\n }", "@Override\n public void run() {\n if (session.isLoggedIn()) {\n Intent i = new Intent(Splash.this, MainActivity.class);\n startActivity(i);\n finish();\n }\n else if(!session.isLoggedIn()){\n Intent i = new Intent(Splash.this, RepRegistration.class);\n startActivity(i);\n finish();\n }\n }", "protected final void runAsAdmin() {\n authenticationTestingUtil.grantAdminAuthority( this.applicationContext );\n }", "@GetMapping(\"/admin\")\n String dashboard(){\n return \"dashboard\";\n }" ]
[ "0.7545364", "0.75379777", "0.7250026", "0.71446496", "0.6845424", "0.6696702", "0.6521769", "0.64828765", "0.6462984", "0.6367636", "0.6352843", "0.6349233", "0.6305955", "0.6289098", "0.6279516", "0.6273421", "0.62281877", "0.62179494", "0.6195556", "0.6187614", "0.6182456", "0.61740035", "0.6166588", "0.6118787", "0.6118235", "0.6106833", "0.60980284", "0.6091848", "0.6090577", "0.6082648", "0.6069051", "0.6015778", "0.60064167", "0.600461", "0.5992102", "0.5985428", "0.59832036", "0.59711695", "0.59521186", "0.59467024", "0.59467024", "0.59442383", "0.59389305", "0.59224427", "0.5916569", "0.59147966", "0.5905183", "0.59032905", "0.5889832", "0.58846545", "0.58828527", "0.58749545", "0.5867262", "0.585687", "0.58562446", "0.5854268", "0.58466256", "0.5846264", "0.58457965", "0.5843564", "0.58368975", "0.5827459", "0.58229095", "0.58202124", "0.5815846", "0.58152866", "0.5812858", "0.58115625", "0.58099395", "0.58097756", "0.57947445", "0.57904524", "0.5774254", "0.5763358", "0.5759505", "0.5758699", "0.5754806", "0.575025", "0.57425296", "0.5741679", "0.5740731", "0.5735361", "0.57313204", "0.57228464", "0.57134014", "0.57125175", "0.570462", "0.5689761", "0.5679527", "0.5674091", "0.5673351", "0.5671476", "0.56701785", "0.56649154", "0.56644344", "0.56625754", "0.56615084", "0.5654392", "0.5646035", "0.5644813", "0.56397206" ]
0.0
-1
Display the SubOptions available under Reports Option
@Test(priority=2) public void displayReportsOptions() throws InterruptedException { boolean expected=true; boolean actual=filterReturnsList.displayReportsList(); assertEquals(actual, expected); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void showAgendaOptions() {\n System.out.println(new StringJoiner(\"\\n\")\n .add(\"*************************\")\n .add(\"1- View all scheduled RDVs\")\n .add(\"2- Add a new RDV\")\n .add(\"3- Show all RDVs between 2 dates (sorted).\")\n .add(\"4- Show all RDVs of a certain participant between 2 dates.\")\n .add(\"5- Remove an RDV\")\n .add(\"6- Return to the previous menu.\")\n .add(\"*************************\")\n );\n }", "public void printOptions() {\n\t\t\n\t}", "private void displayOptions() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Main System Menu\");\n\t\tSystem.out.println(\"----------------\");\n\t\tSystem.out.println(\"A)dd polling place\");\n\t\tSystem.out.println(\"C)lose the polls\");\n\t\tSystem.out.println(\"R)esults\");\n\t\tSystem.out.println(\"P)er-polling-place results\");\n\t\tSystem.out.println(\"E)liminate lowest candidate\");\n\t\tSystem.out.println(\"?) display this menu of choices again\");\n\t\tSystem.out.println(\"Q)uit\");\n\t\tSystem.out.println();\n\t}", "private void deliverOptions()\n {\n int counter = 0;\n for(Option choice : options){\n counter++;\n System.out.println(\"#\" + counter + \" \" + choice.getText());\n }\n }", "@Test(dataProvider = \"dp\")\n\tpublic void test8_9(String option) {\n\t\tSystem.out.println(\"======================================\");\n\t\tNavBarPage navBar = new NavBarPage(driver);\n\t\tnavBar.clickOnOption(option);\n\t\t\n\t\tList<String> actualValues = driver.findElements(By.cssSelector(\"#mainMenu li.current > ul >li\"))\n\t\t\t\t.stream()\n\t\t\t\t.map(we -> we.getText())\n\t\t\t\t.collect(Collectors.toList());\n\t\t\n\t\tSystem.out.println(\"Suboptions for \"+ option + \" page:\");\n\t\tSystem.out.println(actualValues);\n\t\n\t}", "public void showOptions() {\n\t\tCIVLTable tbl_optionTable = (CIVLTable) getComponentByName(\"tbl_optionTable\");\n\t\tDefaultTableModel optionModel = (DefaultTableModel) tbl_optionTable\n\t\t\t\t.getModel();\n\n\t\tif (optionModel.getRowCount() != 0) {\n\t\t\toptionModel.setRowCount(0);\n\t\t\ttbl_optionTable.clearSelection();\n\t\t\ttbl_optionTable.revalidate();\n\t\t}\n\n\t\tGMCSection section = currConfig.getGmcConfig().getSection(\n\t\t\t\tGMCConfiguration.ANONYMOUS_SECTION);\n\t\tObject[] opts = currConfig.getGmcConfig().getOptions().toArray();\n\t\tCollection<Option> options = currConfig.getGmcConfig().getOptions();\n\t\tIterator<Option> iter_opt = options.iterator();\n\t\tList<Object> vals = new ArrayList<Object>();\n\n\t\twhile (iter_opt.hasNext()) {\n\t\t\tOption curr = iter_opt.next();\n\t\t\tvals.add(section.getValueOrDefault(curr));\n\t\t}\n\n\t\t// Sets all of the default-ize buttons\n\t\tnew ButtonColumn(tbl_optionTable, defaultize, 2);\n\n\t\tfor (int i = 0; i < vals.size(); i++) {\n\t\t\tOption currOpt = (Option) opts[i];\n\t\t\t/*\n\t\t\t * if (currOpt.name().equals(\"sysIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"sysIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t * \n\t\t\t * else if (currOpt.name().equals(\"userIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"userIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t */\n\t\t\t// else {\n\t\t\toptionModel\n\t\t\t\t\t.addRow(new Object[] { currOpt, vals.get(i), \"Default\" });\n\t\t\t// }\n\t\t}\n\t}", "public void showOptions() {\n frame.showOptions();\n }", "public void displayReport()\n\t{\n\t\t//use arrays util to sort the array alphabetically \n\t\tArrays.sort(passengersAndSeats);\n\t\t\n\t\t//Learned about Jlist from this stack overflow: http://stackoverflow.com/questions/10869374/how-can-i-print-an-array-in-joptionpane\n\t\tJOptionPane.showMessageDialog(null, new JList<Object>(passengersAndSeats));\n\t\t\n\t\tpromptExit();\n\t\t\n\t}", "@Override\n\tpublic void showAirlines() {\n\t\tArrayList<Airline> airlines = Singleton.AirlineRegistDao().findAll();\n\t\tairlineOptions = \"\";\n\t\tfor (Airline airline : airlines) {\n\t\t\tairlineOptions += String.format(\"<li role=\\\"presentation\\\"> <a role=\\\"menuitem\\\" tabindex=\\\"-1\\\" href=javascript:void(0)>%s</a> </li>\\n\", airline.getName());\n\n\t\t}\n\t\tSystem.out.println(airlineOptions);\n\t}", "public static void listMainMenuOptions(){\n\t\tSystem.out.println(\"\\nWelcome to Vet Clinic Program. Please choose an option from the list below.\\n\");\n\t\tSystem.out.println(\"1: List all staff.\");\n\t\tSystem.out.println(\"2: List staff by category.\");\n\t\tSystem.out.println(\"3: List admin Staff performing a task.\");\n\t\tSystem.out.println(\"4: Search for a specific member of staff by name.\");\n\t\tSystem.out.println(\"5: List all animals.\");\n\t\tSystem.out.println(\"6: List animals by type.\");\n\t\tSystem.out.println(\"7: Search for a specific animal by name.\");\n\t\tSystem.out.println(\"8: See the Queue to the Veterinary\");\n\t\tSystem.out.println(\"9: Exit\");\n\t}", "private void printMenu() {\n\t\tSystem.out.println(\"Select an option :\\n----------------\");\n\t\tfor (int i = 0, size = OPTIONS.size(); i < size; i++) {\n\t\t\tSystem.out.println(OPTIONS.get(i));\n\t\t}\n\t}", "public static void options(){\n System.out.println(\"Choose from the following options \");\n System.out.println(\"0 Print the options again\");\n System.out.println(\"1 Create Student Records\");\n System.out.println(\"2 Create Teacher Records\");\n System.out.println(\"3 Edit the Records\");\n System.out.println(\"4 Get the Record Count\");\n System.out.println(\"5 Exit\");\n }", "public void searchOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Search by - Title |\");\n System.out.println(\"\\t\\t| [2] Search by - Directors |\");\n System.out.println(\"\\t\\t| [3] Back To Menu |\");\n System.out.println(\"\\t\\t=================================\");\n System.out.print(\"\\t\\t Input the option number : \"); \n }", "public static void Report() {\n\t\tfor (int i = 0; i < array.size(); i++) {\r\n\t\t\tSystem.out.println(array.get(i).getDetails());\t\t\t//Steps through the array and prints the details\r\n\t\t}\r\n\t\tAdmin.menuChoice();\r\n\t}", "private void printOptionsMessage() {\n System.out.println(\"\\n\");\n System.out.print(\"Visible arrays: \");\n if (showArray == true) {\n System.out.println(\"On\");\n } else {\n System.out.println(\"Off\");\n }\n\n System.out.println(\"Selected Algorithms: \");\n if (selected[0] == true) {\n System.out.print(\" MergeSort\");\n }\n if (selected[1] == true) {\n System.out.print(\" QuickSort\");\n }\n if (selected[2] == true) {\n System.out.print(\" HeapSort\");\n }\n\n System.out.println();\n }", "@Override\n\tpublic void setDisplayOptions(int options) {\n\t\t\n\t}", "public static void displaySubTitles()\r\n {\n }", "public synchronized void PrintDisplayList()\t{\n\t\tSystem.out.print(\"\\n\\tCar Model:\"+getModel()+\"\\n\\tBase Price is:\"\n +getBasePrice());\n\t\tfor(OptionSet Temp: opset)\n System.out.print(Temp.DisplayOptionSet());\n }", "void showSublist()\n {\n System.out.println(subs);\n }", "protected void printAllOptions() {\n\t\tOption op = null;\n\t\tfor (int i = 0; i < options.size(); i++) {\n\t\t\top = options.get(i);\n\t\t\tSystem.out.println(i + \". \" + op.getOptionName() + \":Price \"\n\t\t\t\t\t+ String.format(\"%.2f\", op.getPrice()));\n\t\t}\n\t}", "public String showMainCourseMenuOptions(){\n stringBuilder = new StringBuilder();\n int counter = 0;\n for (String key : menuLoader.getMainCourseMenu().keySet()) {\n counter++;\n stringBuilder.append(\" '\" + key + \"',\");\n if (counter%10 == 0){\n stringBuilder.append(\"\\n\");\n }\n }\n return stringBuilder.toString();\n }", "public void action() {\n\t\tfor(int i=0; i<facade.getServiceOptions().getOptionsList().size();i++){\n\t\t\tReader reader= new Reader(facade.getOptionsList().get(i));\n\t\t\treader.print();\n\t\t}\n\t}", "private void callSubMenu() {\n new SubMenu().display();\n }", "public void menuOptions(String type) {\n System.out.println(\"\\n\" + \"To select an option, type what's inside the parenthesis.\");\n System.out.println(\"While in a sub-menu -> (0) Back out of a sub-menu. \\n\");\n System.out.println(\"Main Menu\");\n if (type.equals(\"Attendee\") || type.equals(\"VIP\")) {\n System.out.println(\"(1a) Message, (2a) Contacts, (3a) Signup, (4a) See Attendee Schedule\");\n System.out.println(\"(5a) Get Event Details, (6a) View Conference Schedule, \"+\n \" (p) Export the conference schedule to a PDF\");\n } else if (type.equals(\"Organizer\")) {\n System.out.println(\"(1o) Message, (2o) Contacts, (3o) View Conference Schedule\");\n System.out.println(\"(4o) Modify Events, (5o) Add room, (6o) Create a User account\"+\n \" (p) Export the conference schedule to a PDF\");\n System.out.println(\"(7o) View Current Rooms, (8o) Get Event Details\");\n } else if (type.equals(\"Speaker\")) {\n System.out.println(\"(1s) Message, (2s) Contacts, (3s) See Speaker Schedule\");\n System.out.println(\"(4s) Get Event Details, (5s) View Conference Schedule\"+\n \" (p) Export the conference schedule to a PDF\");\n }\n System.out.println(\"Type Quit to logout\");\n }", "public static void showOptions() {\n System.out.println(new StringJoiner(\"\\n\")\n .add(\"*************************\")\n .add(\"1- The participants' directory.\")\n .add(\"2- The RDVs' agenda.\")\n .add(\"3- Quit the app.\")\n .add(\"*************************\")\n );\n }", "public void printOptions() {\n String indent = \" \";\n System.out.println();\n System.out.println(\"+--------------------------- COMMANDS AND OPTIONS LIST ---------------------------+\");\n\n System.out.println();\n System.out.println(\"******* COMMANDS (scraper.[COMMAND]) *******\");\n System.out.println(\"The following interact with the RegistrationScraper class\");\n System.out.println();\n \n\n System.out.println();\n System.out.println(\"iterateAll() --> Scrape every SDSU department's class and store the data [Recommended before: printDepartmentCourses()]\");\n System.out.println(indent + \"@usage iterateAll()\");\n\n System.out.println();\n System.out.println(\"iterateOne() --> Scrape ONE department's class and store the data [Recommended before: printDepartmentCourses()]\");\n System.out.println(indent + \"@usage iterateOne(\\\"CS\\\")\");\n System.out.println(indent + \"@param department\");\n\n System.out.println();\n System.out.println(\"printDepartmentCourses() --> Display a formatted list of every stored class so far\");\n System.out.println(indent + \"@usage printDepartmentCourses()\");\n\n System.out.println();\n System.out.println(\"printArrListSizes() --> Display the sizes of all the data (to make sure they're all the same length)\");\n System.out.println(indent + \"@usage printArrListSizes()\");\n \n\n System.out.println();\n System.out.println(\"******* OPTIONS (custom.[COMMAND] *******\");\n System.out.println(\"The following interact with the HTML GET method\");\n System.out.println();\n \n\n System.out.println();\n System.out.println(\"setTerm() --> Set the semester term you want to search\");\n System.out.println(indent + \"@usage setTerm(\\\"Summer\\\", \\\"2017\\\")\");\n System.out.println(indent + \"@param season\");\n System.out.println(indent + indent + \"options: Fall, Spring, Winter, Summer\");\n System.out.println(indent + \"@param year\");\n System.out.println(indent + indent + \"options: 2015, 2016, 2017, etc.\");\n\n System.out.println();\n System.out.println(\"setDepartment() --> Set a single department you wish to search (use with iterateOne())\");\n System.out.println(indent + \"@usage setDepartment(\\\"CS\\\")\");\n System.out.println(indent + \"@param department\");\n System.out.println(indent + indent + \"options: AMIND, BIOL, CS, etc.\");\n\n System.out.println();\n System.out.println(\"setInstructor() --> Set the course number you want to return (ex. all \\\"xx-108\\\" classes)\");\n System.out.println(indent + \"@usage setInstructor(\\\"Kraft\\\")\");\n System.out.println(indent + \"@param last name\");\n\n System.out.println();\n System.out.println(\"setCourseNumber() --> Set the course number you want to return (ex. all \\\"xx-108\\\" classes)\");\n System.out.println(indent + \"@usage setCourseNumber(\\\"108\\\")\");\n System.out.println(indent + \"@param number\");\n\n System.out.println();\n System.out.println(\"setCourseNumber() --> Set the course number AND suffic you want to return (ex. all \\\"xx-451A\\\" classes)\");\n System.out.println(indent + \"@usage setTerm(\\\"451\\\", \\\"A\\\")\");\n System.out.println(indent + \"@param number\");\n System.out.println(indent + \"@param suffix\");\n System.out.println(indent + indent + \"options: A, B, C, etc.\");\n\n System.out.println();\n System.out.println(\"setScheduleNumber() --> Set the specific class you want to return\");\n System.out.println(indent + \"@usage setScheduleNumber(\\\"20019\\\")\");\n System.out.println(indent + \"@param number\");\n\n System.out.println();\n System.out.println(\"setUnits() --> Set the specific number of units\");\n System.out.println(indent + \"@usage setUnits(\\\"3\\\")\");\n System.out.println(indent + \"@param units\");\n\n System.out.println();\n System.out.println(\"setLocation() --> Set the facility location of the class\");\n System.out.println(indent + \"@usage setUnits(\\\"GMCS\\\")\");\n System.out.println(indent + \"@param facility\");\n\n System.out.println();\n System.out.println(\"setLocation() --> Set the facility AND room location of the class\");\n System.out.println(indent + \"@usage setUnits(\\\"GMCS\\\", \\\"311\\\")\");\n System.out.println(indent + \"@param facility\");\n System.out.println(indent + \"@param room number\");\n\n System.out.println();\n System.out.println(\"setServiceLearning() --> Toggle the 'Service Learning' option [only show Service Learning classes]\");\n System.out.println(indent + \"@usage setServiceLearning(true)\");\n System.out.println(indent + \"@param true/false\");\n\n System.out.println();\n System.out.println(\"setSpecialTopics() --> Toggle the 'Special Topics' option [only show Special Topics classes]\");\n System.out.println(indent + \"@usage setSpecialTopics(true)\");\n System.out.println(indent + \"@param true/false\");\n\n System.out.println();\n System.out.println(\"setHonors() --> Toggle the 'Honors' option [only show Honors classes]\");\n System.out.println(indent + \"@usage setHonors(true)\");\n System.out.println(indent + \"@param true/false\");\n \n System.out.println();\n System.out.println(\"setDistanceOnline() --> Toggle the 'Distance Online' option [only show Online classes]\");\n System.out.println(indent + \"@usage setDistanceOnline(true)\");\n System.out.println(indent + \"@param true/false\");\n\n System.out.println();\n System.out.println(\"setDistanceHybrid() --> Toggle the 'Distance Hybrid' option [only show Hybrid classes]\");\n System.out.println(indent + \"@usage setDistanceHybrid(true)\");\n System.out.println(indent + \"@param true/false\");\n\n System.out.println();\n System.out.println(\"setEvening() --> Toggle the 'Evening' option [only show Evening classes]\");\n System.out.println(indent + \"@usage setEvening(true)\");\n System.out.println(indent + \"@param true/false\");\n\n System.out.println();\n System.out.println(\"setMeetingType() --> Set your preferred meeting type\");\n System.out.println(indent + \"@usage setMeetingType(\\\"Lecture\\\")\");\n System.out.println(indent + \"@param type\");\n System.out.println(indent + indent + \"@options Activity, Discussion, Labratory, Lecture, \"+\n \"Nontraditional, ROTC, Seminar, Supervised\");\n \n System.out.println();\n System.out.println(\"setGenEd() --> Set the General Education requirements you want to show\");\n System.out.println(indent + \"@usage setGenEd(\\\"IIA2\\\")\");\n System.out.println(indent + \"@param true/false\");\n System.out.println(indent + indent + \"@options see general catalog\");\n\n System.out.println();\n System.out.println(\"setSession() --> Set the Summer Session you want to show\");\n System.out.println(indent + \"@usage setGenEd(\\\"S1\\\")\");\n System.out.println(indent + \"@param session\");\n System.out.println(indent + indent + \"@options S1, S2, T1\");\n\n System.out.println();\n System.out.println(\"+---------------------------------------------------------------------------------+\");\n System.out.println();\n\n }", "static void printGeneralOptions(){\n System.out.println(GeneralInfo.PREFIX_COMMAND_DESCRIPTION + \"NameWeapon/Powerup: read the description of that weapon/powerup\");\n }", "public void viewOptions()\r\n {\r\n SetupScreen setupScreen = new SetupScreen();\r\n pushScreen(setupScreen);\r\n }", "private void displayMenuOptions()\n {\n // display user options menu\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n System.out.println(\"COMMAND OPTIONS:\");\n System.out.println(\"\");\n System.out.println(\" 'on' to force power controller to ON state\");\n System.out.println(\" 'off' to force power controller to OFF state\");\n System.out.println(\" 'status' to see current power controller state\");\n System.out.println(\" 'sunrise' to display sunrise time.\");\n System.out.println(\" 'sunset' to display sunset time.\");\n System.out.println(\" 'next' to display next scheduled event.\");\n System.out.println(\" 'time' to display current time.\");\n System.out.println(\" 'coord' to display longitude and latitude.\");\n System.out.println(\" 'help' to display this menu.\");\n System.out.println(\"\");\n System.out.println(\"PRESS 'CTRL-C' TO TERMINATE\");\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n }", "@FXML\r\n void SelectReport(ActionEvent event) {\r\n \tfor(int i=0;i<refuelings.size();i++)\r\n \t{\r\n \t\tSystem.out.println(\trefuelings.get(i).toString());\r\n \r\n \t}\r\n }", "void printSubgraphs() {\n StringBuilder sb = new StringBuilder();\n for(int sgKey: listOfSolutions.keySet()) {\n HashMap<Integer, Long> soln = listOfSolutions.get(sgKey);\n // inside a soln\n //sb.append(\"S:8:\");\n for(int key: soln.keySet()) {\n sb.append(key + \",\" + soln.get(key) + \";\");\n\n }\n sb.setLength(sb.length() - 1);\n sb.append(\"\\n\");\n }\n System.out.println(\"\\n\" + sb.toString());\n }", "@Override\n\tpublic int getDisplayOptions() {\n\t\treturn 0;\n\t}", "@Override\n public String print() {\n return this.text + \"\\n\" + \"1. \" + this.option1.text + \"\\n\" + \"2. \" + this.option2.text;\n }", "private void displaySubAwardDetails(char functionType) throws CoeusException{\r\n if(subAwardBudget.tblSubAwardBudget.getCellEditor() != null){\r\n subAwardBudget.tblSubAwardBudget.getCellEditor().stopCellEditing();\r\n }\r\n int selectedRow = subAwardBudget.tblSubAwardBudget.getSelectedRow();\r\n if(selectedRow > -1){\r\n BudgetSubAwardBean budgetSubAward = (BudgetSubAwardBean)data.get(selectedRow);\r\n // Sub Award details window will be opened only when organization name is provided\r\n if(budgetSubAward.getOrganizationName() == null || CoeusGuiConstants.EMPTY_STRING.equals(budgetSubAward.getOrganizationName().trim())){\r\n // This validation is fired during save itself\r\n// CoeusOptionPane.showWarningDialog(coeusMessageResources.parseMessageKey(ENTER_ORGANIZATION_NAME));\r\n }else{\r\n Vector vecSubAwardPeriodDetails = budgetSubAward.getSubAwardPeriodDetails();\r\n // Check the sub award has any entry in the database and set it to the form,\r\n // other wise based on the generated periods sub award period collection will be created\r\n if(vecSubAwardPeriodDetails == null || (vecSubAwardPeriodDetails != null && vecSubAwardPeriodDetails.isEmpty())){\r\n vecSubAwardPeriodDetails = new Vector();\r\n Equals eqNull = new Equals(\"acType\", null);\r\n String queryKey = budgetBean.getProposalNumber()+budgetBean.getVersionNumber();\r\n QueryEngine queryEngine = QueryEngine.getInstance();\r\n vecBudgetPeriods = queryEngine.getDetails(queryKey, BudgetPeriodBean.class);\r\n GreaterThan periodGreaterThanOne = new GreaterThan(\"budgetPeriod\",new Integer(1));\r\n CoeusVector vecBudgetDetails = queryEngine.executeQuery(queryKey, BudgetDetailBean.class, periodGreaterThanOne);\r\n if(vecBudgetPeriods != null && !vecBudgetPeriods.isEmpty()){\r\n for(Object budgetPeriodDetails : vecBudgetPeriods){\r\n BudgetPeriodBean budgetPeriodBean = (BudgetPeriodBean)budgetPeriodDetails;\r\n BudgetSubAwardDetailBean subAwardDetailBean = new BudgetSubAwardDetailBean();\r\n subAwardDetailBean.setBudgetPeriod(budgetPeriodBean.getBudgetPeriod());\r\n subAwardDetailBean.setVersionNumber(budgetPeriodBean.getVersionNumber());\r\n subAwardDetailBean.setPeriodStartDate(budgetPeriodBean.getStartDate());\r\n subAwardDetailBean.setPeriodEndDate(budgetPeriodBean.getEndDate());\r\n subAwardDetailBean.setAcType(TypeConstants.INSERT_RECORD);\r\n vecSubAwardPeriodDetails.add(subAwardDetailBean);\r\n }\r\n }\r\n }else if(vecSubAwardPeriodDetails != null && !vecSubAwardPeriodDetails.isEmpty()){\r\n Equals eqNull = new Equals(\"acType\", null);\r\n String queryKey = budgetBean.getProposalNumber()+budgetBean.getVersionNumber();\r\n QueryEngine queryEngine = QueryEngine.getInstance();\r\n vecBudgetPeriods = queryEngine.getDetails(queryKey, BudgetPeriodBean.class);\r\n \r\n if(vecBudgetPeriods!= null && (vecBudgetPeriods.size() != vecSubAwardPeriodDetails.size())){\r\n for(Object periodDetail : vecBudgetPeriods){\r\n BudgetPeriodBean budgetPeriodBean = (BudgetPeriodBean)periodDetail;\r\n int budgetPeriod = budgetPeriodBean.getBudgetPeriod();\r\n boolean hasSubAwardDetails = false;\r\n for(Object subAwardDetail : vecSubAwardPeriodDetails){\r\n BudgetSubAwardDetailBean subAwardDetailBean = (BudgetSubAwardDetailBean)subAwardDetail;\r\n if(budgetPeriod == subAwardDetailBean.getBudgetPeriod()){\r\n hasSubAwardDetails = true;\r\n break;\r\n }\r\n }\r\n if(!hasSubAwardDetails){\r\n BudgetSubAwardDetailBean subAwardDetailBean = new BudgetSubAwardDetailBean();\r\n subAwardDetailBean.setBudgetPeriod(budgetPeriodBean.getBudgetPeriod());\r\n subAwardDetailBean.setVersionNumber(budgetPeriodBean.getVersionNumber());\r\n subAwardDetailBean.setPeriodStartDate(budgetPeriodBean.getStartDate());\r\n subAwardDetailBean.setPeriodEndDate(budgetPeriodBean.getEndDate());\r\n subAwardDetailBean.setAcType(TypeConstants.INSERT_RECORD);\r\n vecSubAwardPeriodDetails.add(subAwardDetailBean);\r\n }\r\n }\r\n }\r\n }\r\n \r\n budgetSubAward.setSubAwardPeriodDetails(vecSubAwardPeriodDetails);\r\n subAwardDetailController = new BudgetSubAwardDetailController(getFunctionType(),budgetSubAward);\r\n subAwardDetailController.setFormData(vecSubAwardPeriodDetails);\r\n subAwardDetailController.display();\r\n }\r\n }\r\n }", "@Test(priority=3)\r\n\tpublic void displaySalesOptions() {\r\n\t\t\r\n\t\tboolean expected=true;\r\n\t\tboolean actual=filterReturnsList.displaySalesList();\r\n\t\tassertEquals(actual, expected);\r\n\t}", "public void Loadata(){ // fill the choice box\n stats.removeAll(stats);\n String seller = \"Seller\";\n String customer = \"Customer\";\n stats.addAll(seller,customer);\n Status.getItems().addAll(stats);\n }", "@DISPID(1610743816) //= 0x60020008. The runtime will prefer the VTID if present\r\n @VTID(15)\r\n int viewOptions();", "private static void viewOptions() {\n\t\tlog.info(\"Enter 0 to Exit.\");\n\t\tlog.info(\"Enter 1 to Login.\");\n\t}", "public static void printSubTableRecipients() {\n System.out.println(\"\\n\\t(I) - Sort by ID\");\n System.out.println(\"\\t(N) - Sort by Number of Donors\");\n System.out.println(\"\\t(B) - Sort by Blood Type\");\n System.out.println(\"\\t(O) - Sort by Organ Needed\");\n System.out.println(\"\\t(Q) - Back to Main Menu\");\n }", "private static void showsExtendAndQueryParameters() {\n\n\t\tQuery<BugReport> queryNoneAssigned = Ebean.createQuery(BugReport.class,\n\t\t\t\"assignedStatusCount\");\n\t\tqueryNoneAssigned.setParameter(\"status\", \"NEW\");\n\t\tqueryNoneAssigned.setParameter(\"count\", 0);\n\t\tqueryNoneAssigned.where().isNotNull(\"assigned.id\");\n\n\t\tList<BugReport> newBugsAssigned = queryNoneAssigned.findList();\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"\");\n\n\t\tfor (BugReport bugReport : newBugsAssigned) {\n\t\t\tInteger userId = bugReport.getAssigned().getId();\n\t\t\tint count = bugReport.getCount();\n\t\t\tString status = bugReport.getStatus().getCode();\n\n\t\t\tSystem.out.println(\" new bugs assigned: \" + count + \" to \" + userId + \" as \" + status);\n\t\t}\n\t}", "public void displayReport() {\n\t\treport = new ReportFrame(fitnessProg);\n\t\treport.buildReport();\n\t\treport.setVisible(true);\n\t}", "@Override\n\tpublic boolean showInList()\n\t{\n\t\treturn true;\n\t}", "public static void displayOptions(Account account) {\n\t\tSystem.out.println(\"\\nOptions:\");\n\t\tSystem.out.println(\"1. Display account details\");\n\t\tSystem.out.println(\"2. Display account balance\");\n\t\tSystem.out.println(\"3. Display monthly interest\");\n\t\tSystem.out.println(\"4. Make a withdrawal\");\n\t\tSystem.out.println(\"5. Make a deposit\");\n\n\t\tif (account instanceof CheckingAccount) {\n\t\t\tSystem.out.println(\"6. Display overdraft limit\");\n\t\t\tSystem.out.println(\"7. Change overdraft limit\");\n\t\t}\n\t\t\n\t\tSystem.out.println(\"0. To exit\");\n\t\tSystem.out.print(\"Select an option (int): \");\n\t}", "@ReactMethod\n public void show(final String reportType, final ReadableArray options) {\n MainThreadHandler.runOnMainThread(new Runnable() {\n @Override\n public void run() {\n final Integer parsedReportType = ArgsRegistry.reportTypes.get(reportType);\n if (parsedReportType == null) return;\n BugReporting.show(parsedReportType);\n setOptions(options);\n }\n });\n }", "private static void printRunOptions(){\n\t\tSystem.out.println(\"Run options:\");\n\t\tSystem.out.println(\" -simple <configFile> <pathToApplication> <synthesis(true/false)>\");\n\t\tSystem.out.println(\" -simpleSpeedup <configFile> <pathToApplication>\");\n\t\tSystem.out.println(\" -sweep <configFile> <pathToApplication> <sweepConfig> <parallelism(integer)> <synthesis(true/false)>\");\n\t\tSystem.out.println(\" -sweepRemote <configFile> <pathToApplication> <sweepConfig> <parallelism(integer)> <synthesis(true/false)> <hostAddress> <hostPort>\");\n\t\tSystem.out.println(\" -synthesize <configFile> <pathToApplication> <methodName> <scheduleCDFG(true/false)>\");\n\t\tSystem.out.println(\" -test <configFile> <pathToApplication>\");\n\t\tSystem.out.println(\" -speedup <configFile> <pathToApplication>\");\n\t\tSystem.out.println(\" -testCGRAVerilog <configFile> <pathToApplication>\");\n\t}", "public void customerAppointmentsReport() {\n StringBuilder sb1 = new StringBuilder();\n StringBuilder sb2 = new StringBuilder();\n StringBuilder sb3 = new StringBuilder();\n reportLabel.setText(\"\");\n reportLabel1.setText(\"\");\n reportLabel2.setText(\"\");\n reportLabel3.setText(\"\");\n reportsList = DBReports.getCustomerAppointments();\n\n reportLabel.setText(\"Customer Appointments By Type and Month Report: \\n\\n\");\n //Appends Month to the customer report\n sb1.append(\"Month:\\n\");\n for (Reports reports : reportsList) {\n sb1.append(reports.getMonthName()).append(\"\\n\");\n }\n reportLabel1.setText(sb1.toString());\n //Appends Type to the customer report\n sb2.append(\"Type:\\n\");\n for (Reports reports : reportsList) {\n sb2.append(reports.getType()).append(\"\\n\");\n }\n reportLabel2.setText(sb2.toString());\n //Appends total count to the customer report\n sb3.append(\"Count:\\n\");\n for (Reports reports : reportsList) {\n sb3.append(reports.getAppointmentCount()).append(\"\\n\");\n }\n reportLabel3.setText(sb3.toString());\n }", "private void printReport() {\n\t\tSystem.out.println(getReport());\n\t}", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n boolean showCheckAll = isShowCheckAllInMenu();\n menu.getItem(MENU_CHECK_ALL - 1).setVisible(showCheckAll);\n menu.getItem(MENU_UNCHECK_ALL - 1).setVisible(showCheckAll);\n\n boolean showReport = isShowReportInMenu();\n menu.getItem(MENU_CHECK_REPORT - 1).setVisible(showReport);\n\n return super.onPrepareOptionsMenu(menu);\n }", "private void setDisplay() {\n\t\tDisplayOpt.add(\"-sd\");\n\t\tDisplayOpt.add(\"/sd\");\n\t\tDisplayOpt.add(\"showdetails\");\n\n\t}", "private void updateSubDsSelectionList(String datasetName) {\r\n for (int x = 0; x < selectDatasetList.getItemCount(); x++) {\r\n String dsName = selectDatasetList.getItemText(x);\r\n if (dsName.contains(\"( SUB DS - \" + datasetName + \" )\")) {\r\n selectSubDatasetList.addItem(dsName);\r\n }\r\n }\r\n if (selectSubDatasetList.getItemCount() > 1) {\r\n selectSubDatasetList.setVisible(true);\r\n }\r\n }", "public static void showParticipantDirectoryOptions() {\n System.out.println(new StringJoiner(\"\\n\")\n .add(\"*************************\")\n .add(\"1- View the list of all participants\")\n .add(\"2- Add a new participant\")\n .add(\"3- Update a participant\")\n .add(\"4- Remove a certain participant\")\n .add(\"5- Remove all participants\")\n .add(\"6- Return to the previous menu.\")\n .add(\"*************************\")\n );\n }", "public void options() {\n\n audio.playSound(LDSound.SMALL_CLICK);\n if (canViewOptions()) {\n Logger.info(\"HUD Presenter: options\");\n uiStateManager.setState(GameUIState.OPTIONS);\n }\n }", "public synchronized StringBuffer SearchAndPrintManager(String OptionSet_Name)\t{\n\t\treturn (opset.get(Search_List(OptionSet_Name)).DisplayOptionSet());\n\t}", "public void printReport(){\n\t\tSystem.out.println(\"This is \" + name + \", UPENN \" + graduationYear);\n\t\tSystem.out.println(\"Their GPA is \" + GPA);\n\t\tString numCoursesString = \"\";\n\t\tif (numCoursesCompleted == 1){\n\t\t\tnumCoursesString=\"course\";\t//if the student has only taken one course, just print course\n\t\t}\n\t\telse{\n\t\t\tnumCoursesString=\"courses\"; //if the student has taken more than one course, print courses when called\n\t\t}\n\t\tSystem.out.println(\"They have taken \" + numCoursesCompleted + \" \" + numCoursesString); \n\t}", "@Override\n public String[] displayMenu() {\n\n PersonalMatchDAO personalMatchDAO = new PersonalMatchDAO();\n personalMatchDAO.listAllPersonalMatches();\n\n String[] str = {selection};\n return str;\n\n }", "@SuppressWarnings(\"rawtypes\")\n\tpublic abstract Enumeration listOptions();", "public static void menuGrouping(String countryName,String actURL,String displaytitle,String overriddentitle) throws IOException {\n\t\t\r\n\t\tSystem.out.println(\"latest_data :actURL \"+actURL);\r\n\t\tSystem.out.println(\"latest_data : displaytitle \"+displaytitle);\r\n\t\tSystem.out.println(\"latest_data : overriddentitle \"+overriddentitle);\r\n\t\tString []arrMenu;\r\n\r\n\t\tarrMenu = actURL.split(\"/\");\r\n\r\n\t\tswitch(arrMenu.length){\r\n\t\tcase 3:\r\n\t\t\tif(conuntryExist)\r\n\t\t\t{ \r\n\t\t\t\tSystem.out.println(\"latest_data : countryName \"+countryName);\r\n\t\t\t\tSystem.out.println(\"Menu: \" + arrMenu[2]);\r\n\t\t\t\twriteInFile(\"Controller.xlsx\",\"Detailed_Report\",countryName,arrMenu[2],\"\",\"\",displaytitle,overriddentitle,actURL);\r\n\t\t\t\t// writeExcel(rowCnt,arrMenu[2],\"\",\"\",actURL);\r\n\t\t\t\tconuntryExist=false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Menu: \" + arrMenu[2]);\r\n\t\t\twriteInFile(\"Controller.xlsx\",\"Detailed_Report\",\"\",arrMenu[2],\"\",\"\",displaytitle,overriddentitle,actURL);\r\n\t\t\t// writeExcel(rowCnt,arrMenu[2],\"\",\"\",actURL);\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"SubMenu: \" + arrMenu[3]);\r\n\t\t\twriteInFile(\"Controller.xlsx\",\"Detailed_Report\",\"\",\"\",arrMenu[3],\"\",displaytitle,overriddentitle,actURL);\r\n\t\t\t// writeExcel(rowCnt,\"\",arrMenu[3],\"\",actURL);\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tSystem.out.println(\"SubMenu_1: \" + arrMenu[4]);\r\n\t\t\twriteInFile(\"Controller.xlsx\",\"Detailed_Report\",\"\",\"\",\"\",arrMenu[4],displaytitle,overriddentitle,actURL);\r\n\t\t\t// writeExcel(rowCnt,\"\",\"\",arrMenu[4],actURL);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Basic Page!\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\r\n\t}", "private void showSpecificOptions (Menu mMenu, LinearLayout llCO) {\n \t\t\n \t\tArrayList<Option> _SpecificOptionList = OptionManager.getSpecificOptionList(mMenu.DB_ID);\n \t\t\n for(int i=0; i<_SpecificOptionList.size(); i++) {\n \t\n \tOption _Option = _SpecificOptionList.get(i);\n \n \tLinearLayout llEachLine = new LinearLayout(this);\n llEachLine.setLayoutParams(new LayoutParams(500,LayoutParams.WRAP_CONTENT));\n llEachLine.setPadding(0, 0, 10, 4);\n llEachLine.setOrientation(LinearLayout.HORIZONTAL);\n llEachLine.setGravity(Gravity.LEFT);\n \n int nCountId = IdManager.getSpecificOptionCountId(i);\n int nDownId = nCountId - 1000;\n int nUpId = nCountId + 1000;\n \n // option name\n \n String strTextTitle = TextFormatter.getText(_Option.NAME_ENG, _Option.NAME_OTH,26);\n \n TextView tvOptionName = new TextView(this);\n tvOptionName.setGravity(Gravity.LEFT|Gravity.CENTER);\n tvOptionName.setText(strTextTitle);\n tvOptionName.setTextSize(14);\n tvOptionName.setTextColor(0xff000000);\n tvOptionName.setHeight(50);\n tvOptionName.setWidth(270);\n \n // option count \n \n TextView tvCount = new TextView(this); \n tvCount.setGravity(Gravity.CENTER);\n tvCount.setId(nCountId);\n tvCount.setText(String.valueOf(\"0\"));\n tvCount.setTextColor(0xff000000);\n tvCount.setWidth(50);\n tvCount.setHeight(30);\n \n ResourceManager.put(nCountId, tvCount);\n ResourceManager.put(tvCount, _Option);\n \n _Option.MENU_RESOURCE_ID = mMenu.RESOURCE_ID;\n \t\n // Button Down\n \n ImageButton btDown = new ImageButton(this);\n btDown.setId(nDownId);\n btDown.setBackgroundDrawable(getResources().getDrawable(R.drawable.down));\n btDown.setLayoutParams(new LayoutParams(60,60));\n btDown.setOnClickListener(new OnClickListener() {\n \t public void onClick(View v) {\n \t \t\n \t \tint nDownId = v.getId();\n \t \tint nCountId = nDownId+1000;\n \t \tint nCount = 0;\n \t \t\n \t \tTextView tvCount = (TextView) ResourceManager.get(nCountId);\n \t \tOption _Option = (Option)ResourceManager.get(tvCount);\n \t \t\n \t\tString strCount = (String) tvCount.getText();\n \t\tnCount = Integer.valueOf(strCount);\n \t \t\n \t \tif(nCount>0) {\n \t\t\t\tnCount -= 1;\n \t \t\ttvCount.setText(String.valueOf(nCount));\n \t \t\t_Option.ORDER_COUNT = nCount;\n \t \t\tOrderManager.setOptionCount(_Option.DB_ID, nCount);\n \t \t}\n \t }\n });\n \n // Button Up\n \n ImageButton btUp = new ImageButton(this);\n btUp.setId(nUpId);\n btUp.setBackgroundDrawable(getResources().getDrawable(R.drawable.up));\n btUp.setLayoutParams(new LayoutParams(60,60));\n btUp.setOnClickListener(new OnClickListener() {\n \t public void onClick(View v) {\n \t \t\n \t \tint nUpId = v.getId();\n \t \tint nCountId = nUpId - 1000;\n \t \tint nCount = 0;\n \t \t\n \t \tTextView tvCount = (TextView) ResourceManager.get(nCountId);\n \t \tOption _Option = (Option)ResourceManager.get(tvCount);\n \t \t\t\n \t\t\tString strCount = (String) tvCount.getText();\n \t\tnCount = Integer.valueOf(strCount);\n \t \tnCount += 1;\n \t \t\n \t \ttvCount.setText(String.valueOf(nCount));\n \t\t_Option.ORDER_COUNT = nCount;\n \t\tOrderManager.setOptionCount(_Option.DB_ID, nCount);\n \t }\n });\n \n llEachLine.addView(tvOptionName);\n llEachLine.addView(tvCount);\n llEachLine.addView(btDown);\n llEachLine.addView(btUp);\n \n llCO.addView(llEachLine);\n }\n \t\t\n \t}", "private void subMenuDisplay(Pane paneToView){\n IngredientsSubMenu.setVisible(false);\n PlannerSubMenuPane.setVisible(false);\n MealSubMenuPane.setVisible(false);\n paneToView.setVisible(true);\n }", "protected void printMenu() {\n System.out.println(\"\\nChoose an option:\");\n }", "public void printFlightOption(int index);", "private void exportDataAsList() {\n\t\t// TODO (BH): This is nearly a copy of the\n\t\t// printCollectedOverviewReport() method and should be cleaned up\n\t\tFileWriter wr = null;\n\t\ttry {\n\t\t\tfinal RapidClubAdminClient app = (RapidClubAdminClient) ApplicationManager.getApplication();\n\t\t\tfinal RapidBeansLocale locale = app.getCurrentLocale();\n\n\t\t\t// determine report output file\n\t\t\tFile overviewFile = null;\n\t\t\tif (app.getSettingsRapidClubAdmin().getReportfolder() != null) {\n\t\t\t\toverviewFile = new File(app.getSettingsRapidClubAdmin().getReportfolder(),\n\t\t\t\t\t\t\"SammeldruckAbrechnungszeitraum_\" + getBillingPeriod().getIdString() + \".txt\");\n\t\t\t} else {\n\t\t\t\toverviewFile = File.createTempFile(\n\t\t\t\t\t\t\"SammeldruckAbrechnungszeitraum_\" + getBillingPeriod().getIdString() + \"_\", \".txt\");\n\t\t\t}\n\n\t\t\tfinal Department[] departments = this.getSelectedDepartmentsWithTrainingsLists();\n\t\t\tfinal List<Department> depList = new ArrayList<Department>();\n\t\t\tfinal Collection<Trainer> trainers = new TreeSet<Trainer>();\n\t\t\tfor (Department dep : departments) {\n\t\t\t\tdepList.add(dep);\n\t\t\t\tfor (Trainer tr : dep.getTrainers()) {\n\t\t\t\t\tif (!trainers.contains(tr)) {\n\t\t\t\t\t\ttrainers.add(tr);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twr = new FileWriter(overviewFile);\n\n\t\t\tfor (Trainer tr : trainers) {\n\t\t\t\tfinal List<Trainer> trs = new ArrayList<Trainer>();\n\t\t\t\ttrs.add(tr);\n\t\t\t\twr.write(Overview2.asString(trs, depList, locale));\n\t\t\t\twr.write(PlatformHelper.getLineFeed());\n\t\t\t\twr.write(PlatformHelper.getLineFeed());\n\t\t\t}\n\n\t\t\t// pop up the evidence report\n\t\t\tif (PlatformHelper.getOsfamily() == OperatingSystemFamily.windows) {\n\t\t\t\tRuntime.getRuntime().exec(\"cmd.exe /C \" + overviewFile.getAbsolutePath());\n\t\t\t} else {\n\t\t\t\tApplicationManager.getApplication()\n\t\t\t\t\t\t.messageInfo(\"Automatic Pop-Up not yet implemented for operating system\\n\\\"\"\n\t\t\t\t\t\t\t\t+ PlatformHelper.getOsName() + \"\\\".\\n\" + \"Please open file\\n\\\"\"\n\t\t\t\t\t\t\t\t+ overviewFile.getAbsolutePath() + \"\\\"\\nyourself.\");\n\t\t\t}\n\n\t\t\tif (this.getBillingPeriod().getDateExportFirst() == null) {\n\t\t\t\tthis.getBillingPeriod().setDateExportFirst(Date.from(Instant.now()));\n\t\t\t\tthis.validateAndUpdateButtons(this.getPropEditor(\"dateExportFirst\"));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tthrow new RapidBeansRuntimeException(e);\n\t\t} finally {\n\t\t\tif (wr != null) {\n\t\t\t\ttry {\n\t\t\t\t\twr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RapidBeansRuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void GetDetailAnalysisText() {\n\t\tMap<Integer, ArrayList<ReportPluDayComboModifier>> combMap = getCombItemMap(this.comb);\n\n\t\tComparatorPluDayItem comparatorPluDayItem = new ComparatorPluDayItem();\n\t\tCollections.sort(reportPluDayItems, comparatorPluDayItem);\n//\t\tList<ReportPluDayItem> cop = new ArrayList<ReportPluDayItem>();\n\t\tint allQty = 0;\n\t\tBigDecimal allAmount = BH.getBD(ParamConst.DOUBLE_ZERO);\n//\t\t\tboolean showMainCategory = true;\n//\t\t\tint mainCategoryId = 0;\n\t\tboolean lastLinePrinted = false;\n//\t\tBigDecimal categoryAmount = BH.getBD(ParamConst.DOUBLE_ZERO);\n//\t\tString name = \"\";\n//\t\tint id = 0;\n\t\tMap<Integer, ReportPluDayItem> map = new HashMap<Integer, ReportPluDayItem>();\n\t\tfor (int j = 0; j < reportPluDayItems.size(); j++) {\n\n\t\t\tReportPluDayItem reportPluDayItem = reportPluDayItems.get(j);\n\t\t\t//ObjectFactory.getInstance().getReportPluDayItem(reportPluDayItem);\n\t\t\tif(map.containsKey(reportPluDayItem.getItemMainCategoryId().intValue())){\n\t\t\t\tReportPluDayItem amountReportPluDayItem = map.get(reportPluDayItem.getItemMainCategoryId().intValue());\n\t\t\t\tBigDecimal amount = BH.add(BH.getBD(amountReportPluDayItem.getItemAmount()), BH.getBD(reportPluDayItem.getItemAmount()), false);\n\t\t\t\tamountReportPluDayItem.setItemAmount(amount.toString());\n\t\t\t}else{\n\t\t\t\tReportPluDayItem rr = new ReportPluDayItem();\n\t\t\t\trr.setItemMainCategoryId(reportPluDayItem.getItemMainCategoryId());\n\t\t\t\trr.setItemMainCategoryName(reportPluDayItem.getItemMainCategoryName());\n\t\t\t\trr.setItemAmount(BH.formatMoney(reportPluDayItem.getItemAmount()));\n\t\t\t\tmap.put(reportPluDayItem.getItemMainCategoryId().intValue(), rr);\n\t\t\t}\n//\t\t\t\tif(mainCategoryId == 0 || mainCategoryId == reportPluDayItem.getItemMainCategoryId().intValue()){\n//\t\t\t\t\tcategoryAmount = BH.add(categoryAmount,\n//\t\t\t\t\t\t\tBH.getBD(reportPluDayItem.getItemAmount()), true);\n//\t\t\t\t\tname = reportPluDayItem.getItemMainCategoryName();\n//\t\t\t\t\tid = reportPluDayItem.getItemMainCategoryId().intValue();\n//\n//\t\t\t\t\tif(mainCategoryId == 0)\n//\t\t\t\t\t\tmainCategoryId = id;\n//\n//\t\t\t\t\tif( j == reportPluDayItems.size() - 1){\n//\t\t\t\t\t\tReportPluDayItem rr = new ReportPluDayItem();\n//\t\t\t\t\t\trr.setItemMainCategoryId(id);\n//\t\t\t\t\t\trr.setItemMainCategoryName(name);\n//\t\t\t\t\t\trr.setItemAmount(categoryAmount.toString());\n//\t\t\t\t\t\tcop.add(rr);\n//\t\t\t\t\t}\n//\t\t\t\t}else{\n//\t\t\t\t\tReportPluDayItem rr = new ReportPluDayItem();\n//\t\t\t\t\trr.setItemMainCategoryId(id);\n//\t\t\t\t\trr.setItemMainCategoryName(name);\n//\t\t\t\t\trr.setItemAmount(categoryAmount.toString());\n//\t\t\t\t\tcop.add(rr);\n//\t\t\t\t\tname = reportPluDayItem.getItemMainCategoryName();\n//\t\t\t\t\tid = reportPluDayItem.getItemMainCategoryId().intValue();\n//\t\t\t\t\tmainCategoryId = id;\n//\t\t\t\t\tcategoryAmount = BH.getBD(ParamConst.DOUBLE_ZERO);\n//\t\t\t\t\tcategoryAmount = BH.add(categoryAmount,\n//\t\t\t\t\t\t\tBH.getBD(reportPluDayItem.getItemAmount()), true);\n//\n//\t\t\t\t}\n\t\t}\n\n\t\tIterator<Map.Entry<Integer, ReportPluDayItem>> entries = map.entrySet().iterator();\n\t\tboolean isFirst = true;\n\t\twhile (entries.hasNext()){\n\t\t\tMap.Entry<Integer, ReportPluDayItem> entry = entries.next();\n\t\t\tif(!isFirst){\n\t\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\t}\n\t\t\tisFirst = false;\n\t\t\tReportPluDayItem amontReportPluDayItem = entry.getValue();\n\t\t\tthis.AddItem(amontReportPluDayItem.getItemMainCategoryName(), \"\", \"\", BH.formatMoney(amontReportPluDayItem.getItemAmount()).toString(), 1);\n\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\tfor (int j = 0; j < reportPluDayItems.size(); j++) {\n\n\t\t\t\tReportPluDayItem reportPluDayItem = reportPluDayItems.get(j);\n\t\t\t\tif (amontReportPluDayItem.getItemMainCategoryId().intValue() == reportPluDayItem.getItemMainCategoryId().intValue()) {\n\t\t\t\t\t// Print comb modifier\n\t\t\t\t\tint itmId = reportPluDayItem.getItemDetailId().intValue();\n\t\t\t\t\tArrayList<ReportPluDayComboModifier> comItems = combMap.get(itmId);\n\t\t\t\t\tif (comItems != null && comItems.size() > 0) {\n\n\t\t\t\t\t\tint mm = 0;\n\t\t\t\t\t\tthis.AddItem(\" \"+reportPluDayItem.getItemName(), BH.formatMoney(reportPluDayItem.getItemPrice()),\n\t\t\t\t\t\t\t\treportPluDayItem.getItemCount().toString(),\n\t\t\t\t\t\t\t\tBH.formatThree(reportPluDayItem.getItemAmount()), 1);\n\t\t\t\t\t\tlastLinePrinted = false;\n\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\t\t\t\tfor (mm = 0; mm < comItems.size(); mm++) {\n\t\t\t\t\t\t\tReportPluDayComboModifier pluModifier = comItems.get(mm);\n\t\t\t\t\t\t\tint count = pluModifier.getModifierCount().intValue() - pluModifier.getVoidModifierCount().intValue() - pluModifier.getBillVoidCount().intValue();\n\t\t\t\t\t\t\tif (count > 0) {\n\t\t\t\t\t\t\t\tBigDecimal modifierAmount = BH.mul(BH.getBD(1.00), BH.getBD(pluModifier.getModifierPrice()), true);\n\t\t\t\t\t\t\t\tBigDecimal modifierPrice = BH.mul(BH.getBD(1.00), BH.getBD(pluModifier.getModifierItemPrice()), true);\n\t\t\t\t\t\t\t\tthis.AddItem(\" (\" + pluModifier.getModifierName() + \")\",\n\t\t\t\t\t\t\t\t\t\t\"(\" + BH.formatThree(modifierPrice.toString()) + \")\", \"(\" + String.valueOf(count) + \")\", \"(\" + BH.formatThree(modifierAmount.toString())+ \")\", 1);\n\t\t\t\t\t\t\t\tlastLinePrinted = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (mm == comItems.size() && mm > 0) {\n\t\t\t\t\t\t\tif (!lastLinePrinted)\n\t\t\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\t\t\t\t\tlastLinePrinted = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthis.AddItem(\" \"+reportPluDayItem.getItemName(), BH.formatMoney(reportPluDayItem.getItemPrice()),\n\t\t\t\t\t\t\t\treportPluDayItem.getItemCount().toString(), \"\" + BH.formatMoney(reportPluDayItem.getItemAmount()), 1);\n\t\t\t\t\t\tlastLinePrinted = false;\n\t\t\t\t\t}\n\t\t\t\t\t//END Comb modifier print\n\t\t\t\t\tallQty += reportPluDayItem.getItemCount();\n\t\t\t\t\tallAmount = BH.add(allAmount,\n\t\t\t\t\t\t\tBH.getBD(reportPluDayItem.getItemAmount()), true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//\t\tfor(ReportPluDayItem category : cop) {\n//\t\t\t\tif(cop.indexOf(category) != 0){\n//\t\t\t\t\tthis.addHortionalLine(this.charSize);\n//\t\t\t\t}\n//\t\t\t\tthis.AddItem(category.getItemMainCategoryName(), \"\", \"\", category.getItemAmount(), 1);\n//\t\t\t\tthis.addHortionalLine(this.charSize);\n//\t\t\t\tfor (int j = 0; j < reportPluDayItems.size(); j++) {\n//\n//\t\t\t\t\tReportPluDayItem reportPluDayItem = reportPluDayItems.get(j);\n////\t\t\t\t\tif (mainCategoryId != reportPluDayItem.getItemMainCategoryId().intValue()) {\n////\t\t\t\t\t\tif (mainCategoryId != 0) {\n////\t\t\t\t\t\t\tif (!lastLinePrinted)\n////\t\t\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n////\t\t\t\t\t\t\tlastLinePrinted = true;\n////\t\t\t\t\t\t}\n////\t\t\t\t\t\tmainCategoryId = reportPluDayItem.getItemMainCategoryId().intValue();\n////\t\t\t\t\t\tshowMainCategory = true;\n////\t\t\t\t\t}\n////\t\t\t\t\tif (showMainCategory) {\n////\t\t\t\t\t\tthis.AddItem(reportPluDayItem.getItemMainCategoryName(), \"\", \"\", \"\", 1);\n////\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n////\t\t\t\t\t\tshowMainCategory = false;\n////\t\t\t\t\t\tlastLinePrinted = true;\n////\t\t\t\t\t}\n//\t\t\t\t\tif (category.getItemMainCategoryId().intValue() == reportPluDayItem.getItemMainCategoryId().intValue()) {\n//\t\t\t\t\t\t//Bob: Print comb modifier\n//\t\t\t\t\t\tint itmId = reportPluDayItem.getItemDetailId().intValue();\n//\t\t\t\t\t\tArrayList<ReportPluDayComboModifier> comItems = combMap.get(itmId);\n//\t\t\t\t\t\tif (comItems != null && comItems.size() > 0) {\n//\n//\t\t\t\t\t\t\tint mm = 0;\n//\t\t\t\t\t\t\tthis.AddItem(\" \"+reportPluDayItem.getItemName(), reportPluDayItem.getItemPrice(),\n//\t\t\t\t\t\t\t\t\treportPluDayItem.getItemCount().toString(),\n//\t\t\t\t\t\t\t\t\treportPluDayItem.getItemAmount(), 1);\n//\t\t\t\t\t\t\tlastLinePrinted = false;\n//\t\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n//\t\t\t\t\t\t\tfor (mm = 0; mm < comItems.size(); mm++) {\n//\t\t\t\t\t\t\t\tReportPluDayComboModifier pluModifier = comItems.get(mm);\n//\t\t\t\t\t\t\t\tint count = pluModifier.getModifierCount().intValue() - pluModifier.getVoidModifierCount().intValue() - pluModifier.getBillVoidCount().intValue();\n//\t\t\t\t\t\t\t\tif (count > 0) {\n//\t\t\t\t\t\t\t\t\tBigDecimal modifierAmount = BH.mul(BH.getBD(1.00), BH.getBD(pluModifier.getModifierPrice()), true);\n//\t\t\t\t\t\t\t\t\tBigDecimal modifierPrice = BH.mul(BH.getBD(1.00), BH.getBD(pluModifier.getModifierItemPrice()), true);\n//\t\t\t\t\t\t\t\t\tthis.AddItem(\" (\" + pluModifier.getModifierName() + \")\",\n//\t\t\t\t\t\t\t\t\t\t\t\"(\" + modifierPrice.toString() + \")\", \"(\" + String.valueOf(count) + \")\", \"(\" + modifierAmount.toString() + \")\", 1);\n//\t\t\t\t\t\t\t\t\tlastLinePrinted = false;\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tif (mm == comItems.size() && mm > 0) {\n//\t\t\t\t\t\t\t\tif (!lastLinePrinted)\n//\t\t\t\t\t\t\t\t\tthis.addHortionalLine(this.charSize);\n//\t\t\t\t\t\t\t\tlastLinePrinted = true;\n//\t\t\t\t\t\t\t}\n//\n//\t\t\t\t\t\t} else {\n//\n//\t\t\t\t\t\t\tthis.AddItem(\" \"+reportPluDayItem.getItemName(), reportPluDayItem.getItemPrice(),\n//\t\t\t\t\t\t\t\t\treportPluDayItem.getItemCount().toString(), \"\" + reportPluDayItem.getItemAmount(), 1);\n//\t\t\t\t\t\t\tlastLinePrinted = false;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t//END Comb modifier print\n//\t\t\t\t\t\tallQty += reportPluDayItem.getItemCount();\n//\t\t\t\t\t\tallAmount = BH.add(allAmount,\n//\t\t\t\t\t\t\t\tBH.getBD(reportPluDayItem.getItemAmount()), true);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n\t\tif (allQty != 0) {\n\t\t\tthis.addHortionalLine(this.charSize);\n\t\t\tthis.AddItem(PrintService.instance.getResources().getString(R.string.total), \"\", allQty + \"\", BH.formatMoney(allAmount.toString()), 1);\n\t\t}\n\n\n\t}", "@Test\n @DisplayName(\"Test Filtering of the Metrics with includedKeyValues and excludedKeyValues of Monitoring Exporter on \"\n + \" sub level.\")\n void testFilterIncludedExcludedKeysComboSubLevel() throws Exception {\n logger.info(\"Testing filtering included and excluded specific app names in the metrics \");\n List<String> checkIncluded = new ArrayList<>();\n checkIncluded.add(\"servletName=\\\"com.oracle.wls.exporter.webapp\");\n List<String> checkExcluded = new ArrayList<>();\n checkExcluded.add(\"servletName=\\\"com.oracle.wls.exporter.webapp.ExporterServlet\\\"\");\n replaceConfigurationWithFilter(RESOURCE_DIR\n + \"/exporter/rest_filter_included_excluded_servlet_name.yaml\",checkIncluded, checkExcluded);\n }", "@Override\n public List<WebElement> getSubMenu() {\n\n final List<WebElement> subMenus = DriverConfig.getDriver().findElements(\n By.xpath(\"//*[@id='submenu']/a\"));\n if (subMenus != null) {\n for (final WebElement webElement : subMenus) {\n DriverConfig.setLogString(\"SubMenu :\" + webElement.getText(), true);\n }\n }\n return subMenus;\n }", "public void addSubpanels() throws Exception {\n\t\tfor(Module relatedModule : ((RecordsModule)parentModule).relatedModulesMany.values()){\n\t\t\tsubpanels.put(relatedModule.moduleNamePlural, ((RecordsModule)relatedModule).getSubpanel());\n\t\t}\n\t}", "public void plannerDisplayComboBoxs(){\n Days dm = weekList.getSelectionModel().getSelectedItem();\n if (dm.isBreakfastSet()){\n //find Recipe set for breakfast in the Days in the comboBox and display it in the comboBox\n Recipe breakfast = findRecipeFromID(dm.getBreakfast().getId(), breakfastCombo);\n breakfastCombo.getSelectionModel().select(breakfast);\n }\n\n if (dm.isLunchSet()){\n //find Recipe set for lunch in the Days in the comboBox and display it in the comboBox\n Recipe lunch = findRecipeFromID(dm.getLunch().getId(), lunchCombo);\n lunchCombo.getSelectionModel().select(lunch);\n }\n\n if (dm.isDinnerSet()){\n //find Recipe set for dinner in the Days in the comboBox and display it in the comboBox\n Recipe dinner = findRecipeFromID(dm.getDinner().getId(), dinnerCombo);\n dinnerCombo.getSelectionModel().select(dinner);\n }\n }", "@Override\n protected void options()\n {\n super.options();\n addOption(Opt.APPLICATION_ID);\n addOption(Opt.SERVER_ID);\n addOption(Opt.CATEGORY);\n addOption(Opt.NAME, \"The name of the label\");\n }", "ListView getShowReportListView();", "private void printSubStatistics(\n PrintStream out, Result result, ReachedSet reached,\n Configuration pConfig) {\n\n Preconditions.checkArgument(result == Result.NOT_YET_STARTED || reached != null);\n\n for (Statistics s : subStats) {\n String name = s.getName();\n if (!Strings.isNullOrEmpty(name)) {\n name = name + \" statistics\";\n out.println(name);\n out.println(Strings.repeat(\"-\", name.length()));\n }\n\n try {\n pConfig.inject(s);\n } catch (InvalidConfigurationException e) {\n logger.logUserException(Level.WARNING, e,\n \"Cannot inject the new configuration into statistics object\");\n } catch (Exception e) {\n // this class cannot be injected because it does not have @Option annotation\n }\n\n try {\n s.printStatistics(out, result, reached);\n } catch (OutOfMemoryError e) {\n logger.logUserException(Level.WARNING, e,\n \"Out of memory while generating statistics and writing output files\");\n }\n\n if (!Strings.isNullOrEmpty(name)) {\n out.println();\n }\n }\n }", "public static void printMenu(BankAgency ag) {\n\t\tSystem.out.println(\"Menu of \" + ag.getAgencyName() + \" (\" + ag.getAgencyLoc() + \")\");\n\t\tSystem.out.println(\"1 - List of the Agency accounts\");\n\t\tSystem.out.println(\"2 - See an account (by its number)\");\n\t\tSystem.out.println(\"3 - Operation on account\");\n\t\tSystem.out.println(\"4 - Account management\");\n\t\tSystem.out.println(\"0 - Quit\");\n\t\tSystem.out.print(\"Choice -> \");\n\t}", "@Override\n\tabstract protected List<String> getOptionsList();", "private void displayMenu() {\r\n System.out.println(\"\\nSelect an option from below:\");\r\n System.out.println(\"\\t1. View current listings\");\r\n System.out.println(\"\\t2. List your vehicle\");\r\n System.out.println(\"\\t3. Remove your listing\");\r\n System.out.println(\"\\t4. Check if you won bid\");\r\n System.out.println(\"\\t5. Save listings file\");\r\n System.out.println(\"\\t6. Exit application\");\r\n\r\n }", "private static void printResponse(GetReportsResponse response) {\n\n for (Report report: response.getReports()) {\n ColumnHeader header = report.getColumnHeader();\n List<String> dimensionHeaders = header.getDimensions();\n List<MetricHeaderEntry> metricHeaders = header.getMetricHeader().getMetricHeaderEntries();\n List<ReportRow> rows = report.getData().getRows();\n\n if (rows == null) {\n System.out.println(\"No data found for \" + VIEW_ID);\n return;\n }\n\n for (ReportRow row: rows) {\n List<String> dimensions = row.getDimensions();\n List<DateRangeValues> metrics = row.getMetrics();\n for (int i = 0; i < dimensionHeaders.size() && i < dimensions.size(); i++) {\n System.out.println(dimensionHeaders.get(i) + \": \" + dimensions.get(i));\n }\n\n for (int j = 0; j < metrics.size(); j++) {\n System.out.print(\"Date Range (\" + j + \"): \");\n DateRangeValues values = metrics.get(j);\n for (int k = 0; k < values.getValues().size() && k < metricHeaders.size(); k++) {\n System.out.println(metricHeaders.get(k).getName() + \": \" + values.getValues().get(k));\n }\n }\n }\n }\n }", "public static void printSubTableDonors() {\n System.out.println(\"\\n\\t(I) - Sort by ID\");\n System.out.println(\"\\t(N) - Sort Number of Recipients\");\n System.out.println(\"\\t(B) - Sort by Blood Type\");\n System.out.println(\"\\t(O) - Sort by Organ Donated\");\n System.out.println(\"\\t(Q) - Back to Main Menu\");\n }", "public static void listMenuOptions(){\n\n System.out.println(\"Please choose an option:\");\n System.out.println(\"(1) Add a task.\");\n System.out.println(\"(2) Remove a task.\");\n System.out.println(\"(3) Update a task.\");\n System.out.println(\"(4) List all tasks.\");\n System.out.println(\"(0) Exit\");\n }", "public void editOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Modify Actors |\");\n System.out.println(\"\\t\\t| [2] Modify Rating |\");\n System.out.println(\"\\t\\t| [3] Modify Actors & Rating |\");\n System.out.println(\"\\t\\t| [4] Back To Menu |\");\n System.out.println(\"\\t\\t===================================\");\n System.out.print(\"\\t\\t Input the option number : \");\n }", "public void contactScheduleReport() {\n reportLabel.setText(\"\");\n reportLabel1.setText(\"\");\n reportLabel2.setText(\"\");\n reportLabel3.setText(\"\");\n reportsList = DBReports.getContactSchedule();\n StringBuilder sb = new StringBuilder();\n sb.append(\"Appointments Schedule By Contact Report: \\n\");\n int id = 0;\n for (Reports r : reportsList) {\n if (r.getContactId() != id) {\n sb.append(\"\\n\" + r.getContactName().toUpperCase() + \"\\n\");\n sb.append(\"Appt. ID: \" + r.getAppointmentId() + \" \\t Title: \" + r.getTitle() + \" \\t Type: \" +\n r.getType() + \" \\t Desc: \" + r.getDescription() + \" \\t Start: \" +\n dateTimeFormatter.format(r.getStart().toLocalDateTime()) + \" \\t End: \" +\n dateTimeFormatter.format(r.getEnd().toLocalDateTime()) + \" \\t Customer ID: \" +\n r.getCustomerId() + \"\\n\");\n id = r.getContactId();\n } else {\n sb.append(\"Appt. ID: \" + r.getAppointmentId() + \" \\t Title: \" + r.getTitle() + \" \\t Type: \" +\n r.getType() + \" \\t Desc: \" + r.getDescription() + \" \\t Start: \" +\n dateTimeFormatter.format(r.getStart().toLocalDateTime()) + \" \\t End: \" +\n dateTimeFormatter.format(r.getEnd().toLocalDateTime()) + \" \\t Customer ID: \" +\n r.getCustomerId() + \"\\n\");\n }\n }\n reportLabel.setText(sb.toString());\n }", "public void validate_GrocerySubOption_NotDisplay() {\n List<WebElement> list = getDriver().findElements(By.name(\"substitution\"));\n Assert.assertTrue(\"=== Grocery Substitution Option Field Not Present!\", list.size() == 0);\n }", "public void showOptions()\n {\n //make the options window visible\n optionsScreen.setVisible(true);\n }", "protected abstract void addMenuOptions();", "public void displayOperations() {\n\n System.out.println(\"\" +\n \"Select Operation for GasPump 2 : \\n\" +\n \"0.) Activate \\n\" +\n \"1.) Start \\n\" +\n \"2.) PayCredit \\n\" +\n \"3.) Reject \\n\" +\n \"4.) PayDebit \\n\" +\n \"5.) Pin \\n\" +\n \"6.) Cancel \\n\" +\n \"7.) Approved \\n\" +\n \"8.) Diesel \\n\" +\n \"9.) Regular \\n\" +\n \"10.) Super \\n\" +\n \"11.) StartPump\\n\" +\n \"12.) PumpGallon\\n\" +\n \"13.) StopPump \\n\" +\n \"14.) FullTank \\n\" +\n \"q.) Quit\\n\");\n }", "protected Component getOptionsPanel() {\n return _options;\n }", "public void displaySelections() {\n List<VendingItem> listOfItems = service.getAllItemsNonZero(); //<-- uses lambda\n view.displaySelections(listOfItems);\n }", "public void menuDisplay() {\n\t\t\n\t\tjava.lang.System.out.println(\"\");\n\t\tjava.lang.System.out.println(\"~~~~~~~~~~~~Display System Menu~~~~~~~~~~~~\");\n\t\tjava.lang.System.out.println(\"**** Enter a Number from the Options Below ****\");\n\t\tjava.lang.System.out.println(\"Choice 1 – Print System Details\\n\" + \n\t\t\t\t\t\t \"Choice 2 - Display System Properties\\n\" +\n\t\t\t\t\t\t \"Choice 3 – Diagnose System\\n\" + \n\t\t\t\t\t\t \"Choice 4 – Set Details\\n\" + \n\t\t\t\t\t\t \"Choice 5 – Quit the program\");\n\t\t\n\t}", "private void showFullMenu() {\n final Menu[] menu = MenuFactory.showMenu();\n System.out.println(\"Food_Id\" + \"\\t\" + \"Food_Name\" + \"\\t\" + \"Price\" + \"\\t\" + \"Prepration_Time\");\n for (final Menu m : menu) {\n System.out.println(m.getFoodId() + \"\\t\" + m.getFoodName() + \"\\t\" + m.getPrice() + \"\\t\" + m.getPreprationTime());\n }\n }", "List<ExamGrSubMeta> getAnswerSheetMeta();", "public void printReport() {\n System.out.println(\"=== Product Report ===\");\n productNames.keySet().forEach(k -> {\n System.out.println(\"Name: \" + k + \"\\t\\tCount: \" + productCountMap.get(productNames.get(k)));\n });\n\n }", "private void showCommonOptions (Menu mMenu, LinearLayout llCO) {\n \t\t\n for(int i=0; i<OptionManager.getCommonOptionSize(); i++) {\n \t\n \tOption _Option = OptionManager.getCommonOption(i);\n \t\n \tLinearLayout llEachLine = new LinearLayout(this);\n\t\t\tllEachLine.setLayoutParams(new LayoutParams(500,LayoutParams.WRAP_CONTENT));\n\t\t\tllEachLine.setPadding(0, 0, 10, 4);\n\t\t\tllEachLine.setOrientation(LinearLayout.HORIZONTAL);\n\t\t\tllEachLine.setGravity(Gravity.LEFT);\n\t\t\t \n\t\t\tint nCountId = IdManager.getCommonOptionCountId(i);\n\t\t\tint nDownId = nCountId - 1000;\n\t\t\tint nUpId = nCountId + 1000;\n\t\t\t \n\t\t\t// option name\n\t\t\t \n\t\t\tString strTextTitle = TextFormatter.getText(_Option.NAME_ENG, _Option.NAME_OTH,26);\n\t\t\t \n\t\t\tTextView tvOptionName = new TextView(this);\n\t\t\ttvOptionName.setGravity(Gravity.LEFT|Gravity.CENTER);\n\t\t\ttvOptionName.setText(strTextTitle);\n\t\t\ttvOptionName.setTextSize(14);\n\t\t\ttvOptionName.setTextColor(0xff000000);\n\t\t\ttvOptionName.setHeight(50);\n\t\t\ttvOptionName.setWidth(270);\n\t\t\t \n\t\t\t// option count \n\t\t\t \n\t\t\tTextView tvCount = new TextView(this); \n\t\t\ttvCount.setGravity(Gravity.CENTER);\n\t\t\ttvCount.setId(nCountId);\n\t\t\ttvCount.setText(String.valueOf(\"0\"));\n\t\t\ttvCount.setTextColor(0xff000000);\n\t\t\ttvCount.setWidth(50);\n\t\t\ttvCount.setHeight(30);\n\t\t\t \n\t\t\t_Option.MENU_RESOURCE_ID = mMenu.RESOURCE_ID;\n\t\t\t \n\t\t\tResourceManager.put(nCountId, tvCount);\n\t\t\tResourceManager.put(tvCount, _Option);\n\t\t\t \n\t\t\t// Button Down\n\t\t\t \n\t\t\tImageButton btDown = new ImageButton(this);\n\t\t\tbtDown.setId(nDownId);\n\t\t\tbtDown.setBackgroundDrawable(getResources().getDrawable(R.drawable.down));\n\t\t\tbtDown.setLayoutParams(new LayoutParams(Property.POPUP_ARROW_IMG_WIDTH,Property.POPUP_ARROW_IMG_HEIGHT));\n\t\t\tbtDown.setOnClickListener(new OnClickListener() {\n\t\t\t\tpublic void onClick(View v) {\n \t \t\n\t\t\t\t\tint nDownId = v.getId();\n \t \tint nCountId = nDownId+1000;\n \t \tint nCount = 0;\n \t \t\n \t \tTextView tvCount = (TextView) ResourceManager.get(nCountId);\n \t \tOption _Option = (Option)ResourceManager.get(tvCount);\n \t \t\n \t\tString strCount = (String) tvCount.getText();\n \t\tnCount = Integer.valueOf(strCount);\n \t \t\n \t \tif(nCount>0) {\n \t\t\t\tnCount -= 1;\n \t \ttvCount.setText(String.valueOf(nCount));\n \t \t_Option.ORDER_COUNT = nCount;\n \t OrderManager.setOptionCount(_Option.DB_ID, nCount);\n \t \t}\n \t }\n });\n \n // Button Up\n \n ImageButton btUp = new ImageButton(this);\n btUp.setId(nUpId);\n btUp.setBackgroundDrawable(getResources().getDrawable(R.drawable.up));\n btUp.setLayoutParams(new LayoutParams(Property.POPUP_ARROW_IMG_WIDTH,Property.POPUP_ARROW_IMG_HEIGHT));\n btUp.setOnClickListener(new OnClickListener() {\n \t public void onClick(View v) {\n \t \t\n \t \tint nUpId = v.getId();\n \t \tint nCountId = nUpId - 1000;\n \t \tint nCount = 0;\n \t \t\n \t \tTextView tvCount = (TextView) ResourceManager.get(nCountId);\n \t \tOption _Option = (Option)ResourceManager.get(tvCount);\t\n \t \t\n \t \tString strCount = (String) tvCount.getText();\n \t\tnCount = Integer.valueOf(strCount);\n \t\t\n \t \tnCount += 1;\n \t \t\n \t \ttvCount.setText(String.valueOf(nCount));\n \t \t_Option.ORDER_COUNT = nCount;\n OrderManager.setOptionCount(_Option.DB_ID, nCount);\n \t }\n });\n \n llEachLine.addView(tvOptionName);\n llEachLine.addView(tvCount);\n llEachLine.addView(btDown);\n llEachLine.addView(btUp);\n \n llCO.addView(llEachLine);\n }\n \t\t\n \t}", "public String[] getReports()\n {\n return null;\n }", "private void showMenuListProspect(){\n File fProspect = new File(\"Propsect_Relance.csv\");\n if(!fProspect.exists()){\n jMenuItem_ShowProspect.setEnabled(false);\n }\n }", "public abstract String[] getOptions();", "private void changeShowSettings(SelectionEvent event) {\r\n //System.out.println(\"Show settings shanged\");\r\n \r\n Set <ShowOption> currentlySelected = event.getAllSelectedItems();\r\n \r\n Set <ShowOption> unselected = new HashSet();\r\n unselected.addAll(previousShowOptions);\r\n unselected.removeAll(currentlySelected);\r\n \r\n Set <ShowOption> newlySelected = new HashSet();\r\n newlySelected.addAll(currentlySelected);\r\n newlySelected.removeAll(previousShowOptions);\r\n \r\n Set <ShowOption> changed = new HashSet();\r\n changed.addAll(newlySelected);\r\n changed.addAll(unselected);\r\n \r\n for (ShowOption showOption : changed) {\r\n showOptions.put(showOption, !showOptions.get(showOption));\r\n } \r\n \r\n \r\n// System.out.println(\"previously selected: \" + previousShowOptions);\r\n// System.out.println(\"unselected: \" + unselected);\r\n// System.out.println(\"newly selected: \" + newlySelected);\r\n //System.out.println(\"changed show options: \" + changed);\r\n \r\n //changeShowStatus(changed);\r\n \r\n // TODO: try with JS feedback\r\n //LoadingIndicator <String> loadingIndicator = new LoadingIndicator(\"Loading 3D views ...\");\r\n //getComponent().getUI().addWindow(loadingIndicator);\r\n sendPlotOptions();\r\n //loadingIndicator.close();\r\n \r\n // the option to show the bar chart is only enabled for the 2D view\r\n if (showOptions.get(ShowOption.THREE_D)) {\r\n showOptionsSelector.setItemEnabledProvider(item -> !item.equals(ShowOption.N));\r\n }\r\n else {\r\n showOptionsSelector.setItemEnabledProvider(item -> true);\r\n }\r\n \r\n previousShowOptions = showOptionsSelector.getValue();\r\n }", "public void showMenu() {\n\t\tSystem.out.println(\"Please, choose one option!\");\n\t\tSystem.out.println(\"[ 1 ] - Highest Company Capital\");\n\t\tSystem.out.println(\"[ 2 ] - Lowest Company Capital\");\n\t\tSystem.out.println(\"[ 3 ] - Best Investor of the Day\");\n\t\tSystem.out.println(\"[ 4 ] - Worst Investor of the Day\");\n\t\tSystem.out.println(\"[ 0 ] - Exit\");\n\t}", "private void actionShowFilters() {\n filterDialog.resetUnfilteredList(Client.reportMap.values());\n filterDialog.show();\n }", "private void cmdExcelReportWidgetSelected() {\n\n\t}", "private void selectIndicatorSubgroups() {\n CardLayout cl = (CardLayout)(m_jCategories.getLayout());\n cl.show(m_jCategories, \"rootcategories\");\n }", "private void displayMenu() {\n\t\tSystem.out.println(\"********Loan Approval System***********\");\n\t\tSystem.out.println(\"\\n\");\n\t\tSystem.out.println(\n\t\t\t\t\"Choose the following options:\\n(l)Load Applicaitons\\n(s)Set the Budget\\n(m)Make a decision\\n(p)Print\\n(u)Update the application\");\n\n\t}", "public void buildSubInterfacesInfo() {\n\t\twriter.writeSubInterfacesInfo();\n\t}", "private void printReport() {\n\t\t\tSystem.out.println(\"Processed \" + this.countItems + \" items:\");\n\t\t\tSystem.out.println(\" * Labels: \" + this.countLabels);\n\t\t\tSystem.out.println(\" * Descriptions: \" + this.countDescriptions);\n\t\t\tSystem.out.println(\" * Aliases: \" + this.countAliases);\n\t\t\tSystem.out.println(\" * Statements: \" + this.countStatements);\n\t\t\tSystem.out.println(\" * Site links: \" + this.countSiteLinks);\n\t\t}" ]
[ "0.58467734", "0.5811623", "0.57073003", "0.5657641", "0.5579992", "0.554593", "0.5539907", "0.5538479", "0.5512047", "0.55039275", "0.54979044", "0.54912066", "0.5471484", "0.5437058", "0.5431047", "0.5430924", "0.54132426", "0.5400842", "0.53996307", "0.53953385", "0.53906465", "0.5376551", "0.5337714", "0.53316814", "0.5324791", "0.5303379", "0.5303177", "0.5271651", "0.5212783", "0.52079874", "0.5192195", "0.51642317", "0.51189154", "0.5113037", "0.50989693", "0.50809246", "0.5065185", "0.5048228", "0.5047609", "0.504123", "0.5027479", "0.5026478", "0.49905956", "0.4987746", "0.49867535", "0.49634674", "0.49594334", "0.49518287", "0.49437878", "0.4937731", "0.49265286", "0.49240768", "0.49198863", "0.49063993", "0.48895812", "0.48883015", "0.48882633", "0.48777938", "0.48763147", "0.4873598", "0.48687828", "0.4866424", "0.4862105", "0.48599842", "0.48590994", "0.48564005", "0.48540595", "0.48473102", "0.48451862", "0.48406574", "0.48393714", "0.48370764", "0.4836356", "0.48332104", "0.48152712", "0.48088697", "0.48062727", "0.48050424", "0.4799537", "0.47987422", "0.47904184", "0.47876468", "0.4786995", "0.477844", "0.47715044", "0.47694755", "0.47679713", "0.47664344", "0.47658116", "0.47644237", "0.47630662", "0.47626844", "0.47532216", "0.47491986", "0.47463977", "0.47459042", "0.47447377", "0.47416982", "0.47396508", "0.473889" ]
0.5787613
2
Display the SubOptions available under Sales Option
@Test(priority=3) public void displaySalesOptions() { boolean expected=true; boolean actual=filterReturnsList.displaySalesList(); assertEquals(actual, expected); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Loadata(){ // fill the choice box\n stats.removeAll(stats);\n String seller = \"Seller\";\n String customer = \"Customer\";\n stats.addAll(seller,customer);\n Status.getItems().addAll(stats);\n }", "public ArrayList<SaleVO> showSale() {\n\t\treturn sale.show();\r\n\t}", "public void displaySelections() {\n List<VendingItem> listOfItems = service.getAllItemsNonZero(); //<-- uses lambda\n view.displaySelections(listOfItems);\n }", "public synchronized void PrintDisplayList()\t{\n\t\tSystem.out.print(\"\\n\\tCar Model:\"+getModel()+\"\\n\\tBase Price is:\"\n +getBasePrice());\n\t\tfor(OptionSet Temp: opset)\n System.out.print(Temp.DisplayOptionSet());\n }", "private void callSubMenu() {\n new SubMenu().display();\n }", "public JCatalogSubgroups(DataLogicSales dlSales) {\n this(dlSales, false, false, 64, 54);\n }", "void showSublist()\n {\n System.out.println(subs);\n }", "public void atualizaListSubEspecialidadeByEspecialidade() {\n if (tbagendamento != null) {\n if (tbagendamento.getIdespecialidade() != null) {\n listTbsubespecialidades = agendamentoLogic.findAllTbsubespecialidadesByTbespecialidade(tbagendamento.getIdespecialidade());\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Nenhuma especialidade não selecionada.\");\n }\n }\n }", "private void updateSubDsSelectionList(String datasetName) {\r\n for (int x = 0; x < selectDatasetList.getItemCount(); x++) {\r\n String dsName = selectDatasetList.getItemText(x);\r\n if (dsName.contains(\"( SUB DS - \" + datasetName + \" )\")) {\r\n selectSubDatasetList.addItem(dsName);\r\n }\r\n }\r\n if (selectSubDatasetList.getItemCount() > 1) {\r\n selectSubDatasetList.setVisible(true);\r\n }\r\n }", "private void printToolListMenu(Shop shop) {\n System.out.println(shop.getInventory());\n }", "protected void printAllOptions() {\n\t\tOption op = null;\n\t\tfor (int i = 0; i < options.size(); i++) {\n\t\t\top = options.get(i);\n\t\t\tSystem.out.println(i + \". \" + op.getOptionName() + \":Price \"\n\t\t\t\t\t+ String.format(\"%.2f\", op.getPrice()));\n\t\t}\n\t}", "public void selectAll() {\n\t\tProductMenu menu = new ProductMenu();\n\t\ttry {\n\t\t\tList<Stock> list = service.selectAll();\n\t\t\tmenu.displayList(list);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void RenderCombo()\r\n\t{\r\n\t\tSystem.out.println(\"Setup\");\r\n\t\tList<ProductionOrder> productionOrders = null;\r\n\t\t\t\t\r\n \ttry {\r\n \t\tproductionOrders = this.getProductionOrderService().findProductionOrders(); \r\n \t\tif(productionOrders==null)\r\n \t\t\tSystem.out.println(\"productoinOrders is null\");\r\n\t \t_productionOrderSelect = null;\r\n\t \t_productionOrderSelect = new GenericSelectModel<ProductionOrder>(productionOrders,ProductionOrder.class,\"FormattedDocNo\",\"id\",_access);\r\n\t \tif(_productionOrderSelect==null){\r\n\t \t\tSystem.out.println(\"Setuprender productionOrderselect is null\");\r\n\t \t}\r\n \t}\r\n \tcatch(Exception e)\r\n \t{\r\n \t\t\r\n \t}\r\n \tfinally {\r\n \t\t\r\n \t}\r\n\t}", "@Test(dataProvider = \"dp\")\n\tpublic void test8_9(String option) {\n\t\tSystem.out.println(\"======================================\");\n\t\tNavBarPage navBar = new NavBarPage(driver);\n\t\tnavBar.clickOnOption(option);\n\t\t\n\t\tList<String> actualValues = driver.findElements(By.cssSelector(\"#mainMenu li.current > ul >li\"))\n\t\t\t\t.stream()\n\t\t\t\t.map(we -> we.getText())\n\t\t\t\t.collect(Collectors.toList());\n\t\t\n\t\tSystem.out.println(\"Suboptions for \"+ option + \" page:\");\n\t\tSystem.out.println(actualValues);\n\t\n\t}", "public static void listMainMenuOptions(){\n\t\tSystem.out.println(\"\\nWelcome to Vet Clinic Program. Please choose an option from the list below.\\n\");\n\t\tSystem.out.println(\"1: List all staff.\");\n\t\tSystem.out.println(\"2: List staff by category.\");\n\t\tSystem.out.println(\"3: List admin Staff performing a task.\");\n\t\tSystem.out.println(\"4: Search for a specific member of staff by name.\");\n\t\tSystem.out.println(\"5: List all animals.\");\n\t\tSystem.out.println(\"6: List animals by type.\");\n\t\tSystem.out.println(\"7: Search for a specific animal by name.\");\n\t\tSystem.out.println(\"8: See the Queue to the Veterinary\");\n\t\tSystem.out.println(\"9: Exit\");\n\t}", "private void deliverOptions()\n {\n int counter = 0;\n for(Option choice : options){\n counter++;\n System.out.println(\"#\" + counter + \" \" + choice.getText());\n }\n }", "@Override\n\tpublic void showAirlines() {\n\t\tArrayList<Airline> airlines = Singleton.AirlineRegistDao().findAll();\n\t\tairlineOptions = \"\";\n\t\tfor (Airline airline : airlines) {\n\t\t\tairlineOptions += String.format(\"<li role=\\\"presentation\\\"> <a role=\\\"menuitem\\\" tabindex=\\\"-1\\\" href=javascript:void(0)>%s</a> </li>\\n\", airline.getName());\n\n\t\t}\n\t\tSystem.out.println(airlineOptions);\n\t}", "@Override\n public String toString() {\n return super.toString() + \", Annual Sales: $\" + this.getAnnualSales();\n }", "public void validate_GrocerySubOption_NotDisplay() {\n List<WebElement> list = getDriver().findElements(By.name(\"substitution\"));\n Assert.assertTrue(\"=== Grocery Substitution Option Field Not Present!\", list.size() == 0);\n }", "public void showOptions() {\n\t\tCIVLTable tbl_optionTable = (CIVLTable) getComponentByName(\"tbl_optionTable\");\n\t\tDefaultTableModel optionModel = (DefaultTableModel) tbl_optionTable\n\t\t\t\t.getModel();\n\n\t\tif (optionModel.getRowCount() != 0) {\n\t\t\toptionModel.setRowCount(0);\n\t\t\ttbl_optionTable.clearSelection();\n\t\t\ttbl_optionTable.revalidate();\n\t\t}\n\n\t\tGMCSection section = currConfig.getGmcConfig().getSection(\n\t\t\t\tGMCConfiguration.ANONYMOUS_SECTION);\n\t\tObject[] opts = currConfig.getGmcConfig().getOptions().toArray();\n\t\tCollection<Option> options = currConfig.getGmcConfig().getOptions();\n\t\tIterator<Option> iter_opt = options.iterator();\n\t\tList<Object> vals = new ArrayList<Object>();\n\n\t\twhile (iter_opt.hasNext()) {\n\t\t\tOption curr = iter_opt.next();\n\t\t\tvals.add(section.getValueOrDefault(curr));\n\t\t}\n\n\t\t// Sets all of the default-ize buttons\n\t\tnew ButtonColumn(tbl_optionTable, defaultize, 2);\n\n\t\tfor (int i = 0; i < vals.size(); i++) {\n\t\t\tOption currOpt = (Option) opts[i];\n\t\t\t/*\n\t\t\t * if (currOpt.name().equals(\"sysIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"sysIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t * \n\t\t\t * else if (currOpt.name().equals(\"userIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"userIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t */\n\t\t\t// else {\n\t\t\toptionModel\n\t\t\t\t\t.addRow(new Object[] { currOpt, vals.get(i), \"Default\" });\n\t\t\t// }\n\t\t}\n\t}", "public void searchOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Search by - Title |\");\n System.out.println(\"\\t\\t| [2] Search by - Directors |\");\n System.out.println(\"\\t\\t| [3] Back To Menu |\");\n System.out.println(\"\\t\\t=================================\");\n System.out.print(\"\\t\\t Input the option number : \"); \n }", "public String getLBR_SubSerie();", "public static void displaySubTitles()\r\n {\n }", "private void displayOptions() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Main System Menu\");\n\t\tSystem.out.println(\"----------------\");\n\t\tSystem.out.println(\"A)dd polling place\");\n\t\tSystem.out.println(\"C)lose the polls\");\n\t\tSystem.out.println(\"R)esults\");\n\t\tSystem.out.println(\"P)er-polling-place results\");\n\t\tSystem.out.println(\"E)liminate lowest candidate\");\n\t\tSystem.out.println(\"?) display this menu of choices again\");\n\t\tSystem.out.println(\"Q)uit\");\n\t\tSystem.out.println();\n\t}", "private void printMenu() {\n\t\tSystem.out.println(\"Select an option :\\n----------------\");\n\t\tfor (int i = 0, size = OPTIONS.size(); i < size; i++) {\n\t\t\tSystem.out.println(OPTIONS.get(i));\n\t\t}\n\t}", "@Override\n public JSONObject getGSTComputationReportSectionCombo(JSONObject requestParams) throws JSONException {\n JSONArray dataJArr = new JSONArray();\n JSONObject sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_1_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_1_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_1_3);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_2_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_3);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_3_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_4);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_4_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_4_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_3);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_4);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_5);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_8);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_9);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_9_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_9_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_10);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_10_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_10_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_1_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_3);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_3_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_3_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_4);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_5);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_6);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_7);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_7_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_7_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_11);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_11_10);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_12);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_13_1);\n dataJArr.put(sectionNameObject);\n return new JSONObject().put(\"data\", dataJArr);\n }", "private static void displayItems()\n {\n System.out.println(\"\\n\\tCurrent List of Products in the Store:\\n\");\n for(Sales s : store)\n System.out.println(s.toString());\n }", "public void selectSomeField() {\n\t\tList<com.service.JpaSelectSpecificColumns.SubOrder> findAllSubOrder = springDataSelectSpecificColumns.findAllSubOrder();\n\t\tfindAllSubOrder.forEach(t -> System.out.println(t));\n\t}", "public static void showAgendaOptions() {\n System.out.println(new StringJoiner(\"\\n\")\n .add(\"*************************\")\n .add(\"1- View all scheduled RDVs\")\n .add(\"2- Add a new RDV\")\n .add(\"3- Show all RDVs between 2 dates (sorted).\")\n .add(\"4- Show all RDVs of a certain participant between 2 dates.\")\n .add(\"5- Remove an RDV\")\n .add(\"6- Return to the previous menu.\")\n .add(\"*************************\")\n );\n }", "private void updateSubtotal() {\n subtotal = entreePrice + drinkPrice + dessertPrice;\n subtotalEdtTxt.setText(String.format(\"$%.2f\", subtotal));\n }", "@Override\n public String toString() {\n return super.toString() + \"\\nTotal sales: \" + this.total_sales;\n }", "void printSubgraphs() {\n StringBuilder sb = new StringBuilder();\n for(int sgKey: listOfSolutions.keySet()) {\n HashMap<Integer, Long> soln = listOfSolutions.get(sgKey);\n // inside a soln\n //sb.append(\"S:8:\");\n for(int key: soln.keySet()) {\n sb.append(key + \",\" + soln.get(key) + \";\");\n\n }\n sb.setLength(sb.length() - 1);\n sb.append(\"\\n\");\n }\n System.out.println(\"\\n\" + sb.toString());\n }", "public String showMainCourseMenuOptions(){\n stringBuilder = new StringBuilder();\n int counter = 0;\n for (String key : menuLoader.getMainCourseMenu().keySet()) {\n counter++;\n stringBuilder.append(\" '\" + key + \"',\");\n if (counter%10 == 0){\n stringBuilder.append(\"\\n\");\n }\n }\n return stringBuilder.toString();\n }", "public void plannerDisplayComboBoxs(){\n Days dm = weekList.getSelectionModel().getSelectedItem();\n if (dm.isBreakfastSet()){\n //find Recipe set for breakfast in the Days in the comboBox and display it in the comboBox\n Recipe breakfast = findRecipeFromID(dm.getBreakfast().getId(), breakfastCombo);\n breakfastCombo.getSelectionModel().select(breakfast);\n }\n\n if (dm.isLunchSet()){\n //find Recipe set for lunch in the Days in the comboBox and display it in the comboBox\n Recipe lunch = findRecipeFromID(dm.getLunch().getId(), lunchCombo);\n lunchCombo.getSelectionModel().select(lunch);\n }\n\n if (dm.isDinnerSet()){\n //find Recipe set for dinner in the Days in the comboBox and display it in the comboBox\n Recipe dinner = findRecipeFromID(dm.getDinner().getId(), dinnerCombo);\n dinnerCombo.getSelectionModel().select(dinner);\n }\n }", "public void showSupplierList(){\n\t\tfor(int i = 0; i<supplierList.size();i++) {\n\t\t\tSystem.out.println(supplierList.get(i).getSupID()+\";\"+\n\t\t\t\t\tsupplierList.get(i).getCompanyName()+\";\"+\n\t\t\t\t\tsupplierList.get(i).getAddress()+\";\"+\n\t\t\t\t\tsupplierList.get(i).getSaleRep());\n\t\t}\n\t}", "@Test\n\tvoid findAllForMySubGroup() {\n\t\tinitSpringSecurityContext(\"mmartin\");\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, \"biz agency\", \"fdoe2\", newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(1, tableItem.getRecordsTotal());\n\t\tAssertions.assertEquals(1, tableItem.getRecordsFiltered());\n\t\tAssertions.assertEquals(1, tableItem.getData().size());\n\n\t\t// Check the users\n\t\tAssertions.assertEquals(\"fdoe2\", tableItem.getData().get(0).getId());\n\t\tAssertions.assertFalse(tableItem.getData().get(0).isCanWrite());\n\t\tAssertions.assertTrue(tableItem.getData().get(0).isCanWriteGroups());\n\n\t\t// Check the groups\n\t\t// \"Biz Agency\" is visible since \"mmartin\" is in the parent group \"\n\t\tAssertions.assertEquals(2, tableItem.getData().get(0).getGroups().size());\n\t\tAssertions.assertEquals(\"Biz Agency\", tableItem.getData().get(0).getGroups().get(0).getName());\n\t\tAssertions.assertTrue(tableItem.getData().get(0).getGroups().get(0).isCanWrite());\n\t\tAssertions.assertEquals(\"DIG RHA\", tableItem.getData().get(0).getGroups().get(1).getName());\n\t\tAssertions.assertFalse(tableItem.getData().get(0).getGroups().get(1).isCanWrite());\n\t}", "public void setLBR_SubSerie (String LBR_SubSerie);", "private void showSpecificOptions (Menu mMenu, LinearLayout llCO) {\n \t\t\n \t\tArrayList<Option> _SpecificOptionList = OptionManager.getSpecificOptionList(mMenu.DB_ID);\n \t\t\n for(int i=0; i<_SpecificOptionList.size(); i++) {\n \t\n \tOption _Option = _SpecificOptionList.get(i);\n \n \tLinearLayout llEachLine = new LinearLayout(this);\n llEachLine.setLayoutParams(new LayoutParams(500,LayoutParams.WRAP_CONTENT));\n llEachLine.setPadding(0, 0, 10, 4);\n llEachLine.setOrientation(LinearLayout.HORIZONTAL);\n llEachLine.setGravity(Gravity.LEFT);\n \n int nCountId = IdManager.getSpecificOptionCountId(i);\n int nDownId = nCountId - 1000;\n int nUpId = nCountId + 1000;\n \n // option name\n \n String strTextTitle = TextFormatter.getText(_Option.NAME_ENG, _Option.NAME_OTH,26);\n \n TextView tvOptionName = new TextView(this);\n tvOptionName.setGravity(Gravity.LEFT|Gravity.CENTER);\n tvOptionName.setText(strTextTitle);\n tvOptionName.setTextSize(14);\n tvOptionName.setTextColor(0xff000000);\n tvOptionName.setHeight(50);\n tvOptionName.setWidth(270);\n \n // option count \n \n TextView tvCount = new TextView(this); \n tvCount.setGravity(Gravity.CENTER);\n tvCount.setId(nCountId);\n tvCount.setText(String.valueOf(\"0\"));\n tvCount.setTextColor(0xff000000);\n tvCount.setWidth(50);\n tvCount.setHeight(30);\n \n ResourceManager.put(nCountId, tvCount);\n ResourceManager.put(tvCount, _Option);\n \n _Option.MENU_RESOURCE_ID = mMenu.RESOURCE_ID;\n \t\n // Button Down\n \n ImageButton btDown = new ImageButton(this);\n btDown.setId(nDownId);\n btDown.setBackgroundDrawable(getResources().getDrawable(R.drawable.down));\n btDown.setLayoutParams(new LayoutParams(60,60));\n btDown.setOnClickListener(new OnClickListener() {\n \t public void onClick(View v) {\n \t \t\n \t \tint nDownId = v.getId();\n \t \tint nCountId = nDownId+1000;\n \t \tint nCount = 0;\n \t \t\n \t \tTextView tvCount = (TextView) ResourceManager.get(nCountId);\n \t \tOption _Option = (Option)ResourceManager.get(tvCount);\n \t \t\n \t\tString strCount = (String) tvCount.getText();\n \t\tnCount = Integer.valueOf(strCount);\n \t \t\n \t \tif(nCount>0) {\n \t\t\t\tnCount -= 1;\n \t \t\ttvCount.setText(String.valueOf(nCount));\n \t \t\t_Option.ORDER_COUNT = nCount;\n \t \t\tOrderManager.setOptionCount(_Option.DB_ID, nCount);\n \t \t}\n \t }\n });\n \n // Button Up\n \n ImageButton btUp = new ImageButton(this);\n btUp.setId(nUpId);\n btUp.setBackgroundDrawable(getResources().getDrawable(R.drawable.up));\n btUp.setLayoutParams(new LayoutParams(60,60));\n btUp.setOnClickListener(new OnClickListener() {\n \t public void onClick(View v) {\n \t \t\n \t \tint nUpId = v.getId();\n \t \tint nCountId = nUpId - 1000;\n \t \tint nCount = 0;\n \t \t\n \t \tTextView tvCount = (TextView) ResourceManager.get(nCountId);\n \t \tOption _Option = (Option)ResourceManager.get(tvCount);\n \t \t\t\n \t\t\tString strCount = (String) tvCount.getText();\n \t\tnCount = Integer.valueOf(strCount);\n \t \tnCount += 1;\n \t \t\n \t \ttvCount.setText(String.valueOf(nCount));\n \t\t_Option.ORDER_COUNT = nCount;\n \t\tOrderManager.setOptionCount(_Option.DB_ID, nCount);\n \t }\n });\n \n llEachLine.addView(tvOptionName);\n llEachLine.addView(tvCount);\n llEachLine.addView(btDown);\n llEachLine.addView(btUp);\n \n llCO.addView(llEachLine);\n }\n \t\t\n \t}", "public void display() {\r\n String kind;\r\n if (profit == true) {\r\n kind = \"profit\";\r\n }\r\n\r\n else kind = \"non-profit\";\r\n System.out.println(name + \" is a \" + kind + \" organization that has\" + \" \" + revenue + \" dollars in revenue\" );\r\n }", "public void updateListEmployeeBySubEspecialidade() {\n if (tbagendamento != null) {\n\n if (tbagendamento.getIdsubespecialidade() != null) {\n listTbfuncionarios = agendamentoLogic.findAllTbfuncionarioBySubEspecialidade(tbagendamento.getIdsubespecialidade());\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Nenhuma sub especialidade não selecionada.\");\n }\n\n }\n }", "public void setSubTotal(double subTotal) {\n\n this.subTotal = subTotal;\n }", "@Override\n\tpublic boolean showInList()\n\t{\n\t\treturn true;\n\t}", "public boolean esSubMenu() {\n\t\tOpcionMenu elemento = getElementoMenuActual();\n\t\tboolean esSubMenu = elemento!=null && elemento instanceof OpcionSubMenu;\n\t\treturn esSubMenu;\n\t}", "static void printGeneralOptions(){\n System.out.println(GeneralInfo.PREFIX_COMMAND_DESCRIPTION + \"NameWeapon/Powerup: read the description of that weapon/powerup\");\n }", "SalesInvoicesType getSalesInvoices();", "private void showFullMenu() {\n final Menu[] menu = MenuFactory.showMenu();\n System.out.println(\"Food_Id\" + \"\\t\" + \"Food_Name\" + \"\\t\" + \"Price\" + \"\\t\" + \"Prepration_Time\");\n for (final Menu m : menu) {\n System.out.println(m.getFoodId() + \"\\t\" + m.getFoodName() + \"\\t\" + m.getPrice() + \"\\t\" + m.getPreprationTime());\n }\n }", "private void printSupplierList(Shop shop) {\n System.out.println(shop.supplierListToString());\n }", "private void selectIndicatorSubgroups() {\n CardLayout cl = (CardLayout)(m_jCategories.getLayout());\n cl.show(m_jCategories, \"rootcategories\");\n }", "public List<Product> getSales() {\n return sales;\n }", "public void setHaveSub(){\n\t\tthis.haveSub = true;\n\t}", "public String getSalesProp() {\n return salesProp;\n }", "public void showMenu() {\n\t\tSystem.out.println(\"Please, choose one option!\");\n\t\tSystem.out.println(\"[ 1 ] - Highest Company Capital\");\n\t\tSystem.out.println(\"[ 2 ] - Lowest Company Capital\");\n\t\tSystem.out.println(\"[ 3 ] - Best Investor of the Day\");\n\t\tSystem.out.println(\"[ 4 ] - Worst Investor of the Day\");\n\t\tSystem.out.println(\"[ 0 ] - Exit\");\n\t}", "public void donutTypeChosen()\n {\n changeSubtotalTextField();\n }", "private static void setSubsystems()\n {\n //Components\n //Talons\n frontLeftTalon.setName(\"DrivetrainSubsystem\", \"FrontLeftDriveTalon\");\n frontRightTalon.setName(\"DrivetrainSubsystem\", \"FrontRightDriveTalon\");\n rearLeftTalon.setName(\"DrivetrainSubsystem\", \"RearLeftDriveTalon\");\n rearRightTalon.setName(\"DrivetrainSubsystem\", \"RearRightDriveTalon\");\n //Sensors\n //navX.setName(\"SensorSubsystem\", \"NavX\");\n System.out.print(pigeon.getAbsoluteCompassHeading());\n \n //Subsystems\n drivetrainSubsystem.setName(\"DrivetrainSubsystem\", \"DrivetrainSubsystem\");\n sensorSubsystem.setName(\"SensorSubsystem\", \"SensorSubsystem\");\n }", "public Sales() {\n\n initComponents();\n //loadSales();\n fillComboTienda();\n fillComboTitulos();\n }", "public void setSubTotal(Float subTotal) {\r\n this.subTotal = subTotal;\r\n }", "private void showFullMenu() {\r\n Menu[] menu = MenuFactory.showMenu();\r\n System.out.println(\"Menu_Id \\t Food_Name \\t Food_Type \\t\\t Calories \\t Food_Amount\");\r\n for (Menu m : menu) {\r\n System.out.println(m.getFoodId() + \"\\t\\t\" + m.getFoodName() + \"\\t\\t\" + m.getFoodType() + \"\\t\\t\\t\" + m.getCalories() + \"\\t\\t\" + m.getFoodAmt());\r\n }\r\n }", "public void menuOptions(String type) {\n System.out.println(\"\\n\" + \"To select an option, type what's inside the parenthesis.\");\n System.out.println(\"While in a sub-menu -> (0) Back out of a sub-menu. \\n\");\n System.out.println(\"Main Menu\");\n if (type.equals(\"Attendee\") || type.equals(\"VIP\")) {\n System.out.println(\"(1a) Message, (2a) Contacts, (3a) Signup, (4a) See Attendee Schedule\");\n System.out.println(\"(5a) Get Event Details, (6a) View Conference Schedule, \"+\n \" (p) Export the conference schedule to a PDF\");\n } else if (type.equals(\"Organizer\")) {\n System.out.println(\"(1o) Message, (2o) Contacts, (3o) View Conference Schedule\");\n System.out.println(\"(4o) Modify Events, (5o) Add room, (6o) Create a User account\"+\n \" (p) Export the conference schedule to a PDF\");\n System.out.println(\"(7o) View Current Rooms, (8o) Get Event Details\");\n } else if (type.equals(\"Speaker\")) {\n System.out.println(\"(1s) Message, (2s) Contacts, (3s) See Speaker Schedule\");\n System.out.println(\"(4s) Get Event Details, (5s) View Conference Schedule\"+\n \" (p) Export the conference schedule to a PDF\");\n }\n System.out.println(\"Type Quit to logout\");\n }", "public void flavorChosen()\n {\n changeSubtotalTextField();\n }", "public void displayProducts() {\r\n\t\tSystem.out.println(\"All Products : \");\r\n\t\tfor(int i=0; i<currentBranchNumber; ++i) \r\n\t\t\tbranchs[i].displayProducts();\r\n\t}", "public boolean getHaveSub() { return haveSub;}", "private void displaySubAwardDetails(char functionType) throws CoeusException{\r\n if(subAwardBudget.tblSubAwardBudget.getCellEditor() != null){\r\n subAwardBudget.tblSubAwardBudget.getCellEditor().stopCellEditing();\r\n }\r\n int selectedRow = subAwardBudget.tblSubAwardBudget.getSelectedRow();\r\n if(selectedRow > -1){\r\n BudgetSubAwardBean budgetSubAward = (BudgetSubAwardBean)data.get(selectedRow);\r\n // Sub Award details window will be opened only when organization name is provided\r\n if(budgetSubAward.getOrganizationName() == null || CoeusGuiConstants.EMPTY_STRING.equals(budgetSubAward.getOrganizationName().trim())){\r\n // This validation is fired during save itself\r\n// CoeusOptionPane.showWarningDialog(coeusMessageResources.parseMessageKey(ENTER_ORGANIZATION_NAME));\r\n }else{\r\n Vector vecSubAwardPeriodDetails = budgetSubAward.getSubAwardPeriodDetails();\r\n // Check the sub award has any entry in the database and set it to the form,\r\n // other wise based on the generated periods sub award period collection will be created\r\n if(vecSubAwardPeriodDetails == null || (vecSubAwardPeriodDetails != null && vecSubAwardPeriodDetails.isEmpty())){\r\n vecSubAwardPeriodDetails = new Vector();\r\n Equals eqNull = new Equals(\"acType\", null);\r\n String queryKey = budgetBean.getProposalNumber()+budgetBean.getVersionNumber();\r\n QueryEngine queryEngine = QueryEngine.getInstance();\r\n vecBudgetPeriods = queryEngine.getDetails(queryKey, BudgetPeriodBean.class);\r\n GreaterThan periodGreaterThanOne = new GreaterThan(\"budgetPeriod\",new Integer(1));\r\n CoeusVector vecBudgetDetails = queryEngine.executeQuery(queryKey, BudgetDetailBean.class, periodGreaterThanOne);\r\n if(vecBudgetPeriods != null && !vecBudgetPeriods.isEmpty()){\r\n for(Object budgetPeriodDetails : vecBudgetPeriods){\r\n BudgetPeriodBean budgetPeriodBean = (BudgetPeriodBean)budgetPeriodDetails;\r\n BudgetSubAwardDetailBean subAwardDetailBean = new BudgetSubAwardDetailBean();\r\n subAwardDetailBean.setBudgetPeriod(budgetPeriodBean.getBudgetPeriod());\r\n subAwardDetailBean.setVersionNumber(budgetPeriodBean.getVersionNumber());\r\n subAwardDetailBean.setPeriodStartDate(budgetPeriodBean.getStartDate());\r\n subAwardDetailBean.setPeriodEndDate(budgetPeriodBean.getEndDate());\r\n subAwardDetailBean.setAcType(TypeConstants.INSERT_RECORD);\r\n vecSubAwardPeriodDetails.add(subAwardDetailBean);\r\n }\r\n }\r\n }else if(vecSubAwardPeriodDetails != null && !vecSubAwardPeriodDetails.isEmpty()){\r\n Equals eqNull = new Equals(\"acType\", null);\r\n String queryKey = budgetBean.getProposalNumber()+budgetBean.getVersionNumber();\r\n QueryEngine queryEngine = QueryEngine.getInstance();\r\n vecBudgetPeriods = queryEngine.getDetails(queryKey, BudgetPeriodBean.class);\r\n \r\n if(vecBudgetPeriods!= null && (vecBudgetPeriods.size() != vecSubAwardPeriodDetails.size())){\r\n for(Object periodDetail : vecBudgetPeriods){\r\n BudgetPeriodBean budgetPeriodBean = (BudgetPeriodBean)periodDetail;\r\n int budgetPeriod = budgetPeriodBean.getBudgetPeriod();\r\n boolean hasSubAwardDetails = false;\r\n for(Object subAwardDetail : vecSubAwardPeriodDetails){\r\n BudgetSubAwardDetailBean subAwardDetailBean = (BudgetSubAwardDetailBean)subAwardDetail;\r\n if(budgetPeriod == subAwardDetailBean.getBudgetPeriod()){\r\n hasSubAwardDetails = true;\r\n break;\r\n }\r\n }\r\n if(!hasSubAwardDetails){\r\n BudgetSubAwardDetailBean subAwardDetailBean = new BudgetSubAwardDetailBean();\r\n subAwardDetailBean.setBudgetPeriod(budgetPeriodBean.getBudgetPeriod());\r\n subAwardDetailBean.setVersionNumber(budgetPeriodBean.getVersionNumber());\r\n subAwardDetailBean.setPeriodStartDate(budgetPeriodBean.getStartDate());\r\n subAwardDetailBean.setPeriodEndDate(budgetPeriodBean.getEndDate());\r\n subAwardDetailBean.setAcType(TypeConstants.INSERT_RECORD);\r\n vecSubAwardPeriodDetails.add(subAwardDetailBean);\r\n }\r\n }\r\n }\r\n }\r\n \r\n budgetSubAward.setSubAwardPeriodDetails(vecSubAwardPeriodDetails);\r\n subAwardDetailController = new BudgetSubAwardDetailController(getFunctionType(),budgetSubAward);\r\n subAwardDetailController.setFormData(vecSubAwardPeriodDetails);\r\n subAwardDetailController.display();\r\n }\r\n }\r\n }", "public void action() {\n\t\tfor(int i=0; i<facade.getServiceOptions().getOptionsList().size();i++){\n\t\t\tReader reader= new Reader(facade.getOptionsList().get(i));\n\t\t\treader.print();\n\t\t}\n\t}", "SelectSubSet createSelectSubSet();", "public void setSales( String showInputDialog )\n\t{\n\n\t}", "public static void options(){\n System.out.println(\"Choose from the following options \");\n System.out.println(\"0 Print the options again\");\n System.out.println(\"1 Create Student Records\");\n System.out.println(\"2 Create Teacher Records\");\n System.out.println(\"3 Edit the Records\");\n System.out.println(\"4 Get the Record Count\");\n System.out.println(\"5 Exit\");\n }", "public String toString()\n {\n DecimalFormat df = new DecimalFormat(\"#.00\");\n String words = getOptionName() + \": $\" + df.format(getOptionPrice()) + \".\";\n return words;\n }", "public boolean isSetLstSubSvrInfo() {\n return this.lstSubSvrInfo != null;\n }", "public void llenarComboSeccion() {\t\t\n\t\tString respuesta = negocio.llenarComboSeccion(\"\");\n\t\tSystem.out.println(respuesta);\t\t\n\t}", "@Override\r\n\tpublic List<ProductOptionVO> selectOptionStockByNameOrBarcodeNum(OrderSearchVO osVO) {\n\t\treturn getSqlSession().selectList(namespace+\".selectOptionStockByNameOrBarcodeNum\", osVO);\r\n\t}", "@Override\n\tpublic int getDisplayOptions() {\n\t\treturn 0;\n\t}", "public void setNumSales(int numSales){\r\n this.sales = numSales;\r\n }", "private void displayMenuOptions()\n {\n // display user options menu\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n System.out.println(\"COMMAND OPTIONS:\");\n System.out.println(\"\");\n System.out.println(\" 'on' to force power controller to ON state\");\n System.out.println(\" 'off' to force power controller to OFF state\");\n System.out.println(\" 'status' to see current power controller state\");\n System.out.println(\" 'sunrise' to display sunrise time.\");\n System.out.println(\" 'sunset' to display sunset time.\");\n System.out.println(\" 'next' to display next scheduled event.\");\n System.out.println(\" 'time' to display current time.\");\n System.out.println(\" 'coord' to display longitude and latitude.\");\n System.out.println(\" 'help' to display this menu.\");\n System.out.println(\"\");\n System.out.println(\"PRESS 'CTRL-C' TO TERMINATE\");\n System.out.println(\"\");\n System.out.println(\"----------------------------------------------------\");\n System.out.println(\"\");\n }", "@Test(priority=5)\r\n\tpublic void displayGroupByListBox() {\r\n\t\t\r\n\t\tboolean expected=true;\r\n\t\tboolean actual=filterReturnsList.displayGroupByListboxOptions();\r\n\t\tassertEquals(actual, expected);\r\n\t}", "Salesman() {\n super();\n super.setType(EMPLOYEE_TYPE);\n this.setAnnualSales(-1);\n }", "public void printOptions() {\n\t\t\n\t}", "public List<Sub> getSubs(){\n\t\t\n\t\treturn null;\n\t}", "@Override\n\tpublic void setDisplayOptions(int options) {\n\t\t\n\t}", "private void subMenuDisplay(Pane paneToView){\n IngredientsSubMenu.setVisible(false);\n PlannerSubMenuPane.setVisible(false);\n MealSubMenuPane.setVisible(false);\n paneToView.setVisible(true);\n }", "public double getSubTotal() {\n\n return subTotal;\n }", "public Option[] SetSitesDropDownData(){\n List<SiteDTO> instDTOList = this.getinventory$GatheringSessionBean().SetSitesDropDownData();\n ArrayList<Option> allOptions = new ArrayList<Option>();\n Option[] allOptionsInArray;\n Option option;\n //Crear opcion titulo\n option = new Option(null,\" -- \"+BundleHelper.getDefaultBundleValue(\"drop_down_default\",getMyLocale())+\" --\");\n allOptions.add(option);\n //Crear todas las opciones del drop down\n for(SiteDTO sDTO : instDTOList){\n option = new Option(sDTO.getSiteId(), sDTO.getDescription().trim());\n allOptions.add(option);\n }\n //Sets the elements in the SingleSelectedOptionList Object\n allOptionsInArray = new Option[allOptions.size()];\n return allOptions.toArray(allOptionsInArray);\n }", "@Override\n public List<WebElement> getSubMenu() {\n\n final List<WebElement> subMenus = DriverConfig.getDriver().findElements(\n By.xpath(\"//*[@id='submenu']/a\"));\n if (subMenus != null) {\n for (final WebElement webElement : subMenus) {\n DriverConfig.setLogString(\"SubMenu :\" + webElement.getText(), true);\n }\n }\n return subMenus;\n }", "public void cargarOpcionesSubMenu() {\n\t\t\n\t\tif(esSubMenu()) {\n\t\t\tOpcionSubMenu subMenu = (OpcionSubMenu) getElementoMenuActual();\n\t\t\tsetElementosMenu(subMenu.getHijos());\n\t\t}\n\t}", "@Override\r\n\t\tpublic String toString() {\r\n\t\t\tswitch(this) {\r\n\t\t\tcase SALES: return \"Sales\";\r\n\t\t\tcase MKTG: return \"Marketing\";\r\n\t\t\tcase HMRS: return \"Human Resources\";\r\n\t\t\tcase FINA: return \"Finance\";\r\n\t\t\tcase INTE: return \"Information Tecnology\";\r\n\t\t\t\tdefault: return \"Unknown Department\"; \r\n\t\t\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}", "public void getSubtotalAndTotal() {\n addTotal();\n System.out.println(\"Subtotal: \" + Math.round((dblTotal) * 100.0) / 100.0);\n System.out.println(\"Tax: \" + Math.round((dblTotal * 0.13) * 100.0) / 100.0);\n System.out.println(\"Total: \" + Math.round((dblTotal * 1.13) * 100.0) / 100.0);\n dblDayEarnings += Math.round((dblTotal * 1.13) * 100.0) / 100.0;\n System.out.println(\"\");\n }", "@Test\n public void getCatalogSalesTest() {\n Integer size = null;\n Integer page = null;\n String order = null;\n // PageResourceCatalogSale response = api.getCatalogSales(size, page, order);\n\n // TODO: test validations\n }", "public ArrayList<PurchaseVO> showPurchase() {\n\t\treturn purchase.show();\r\n\t}", "private void updateSubModeSpinnerTexts() {\n\n }", "public String addSubCategoryListing(SubCategoryItem s){\n\t\tCategoryDAO daoObject = new CategoryDAO();\n\t\treturn daoObject.addSubCategories(s.getSubCategoryName(), s.getCategoryID());\n\t}", "public void showOptions() {\n frame.showOptions();\n }", "public void setPersonnelSubArea(String personnelSubArea);", "public void displayOperations() {\n\n System.out.println(\"\" +\n \"Select Operation for GasPump 2 : \\n\" +\n \"0.) Activate \\n\" +\n \"1.) Start \\n\" +\n \"2.) PayCredit \\n\" +\n \"3.) Reject \\n\" +\n \"4.) PayDebit \\n\" +\n \"5.) Pin \\n\" +\n \"6.) Cancel \\n\" +\n \"7.) Approved \\n\" +\n \"8.) Diesel \\n\" +\n \"9.) Regular \\n\" +\n \"10.) Super \\n\" +\n \"11.) StartPump\\n\" +\n \"12.) PumpGallon\\n\" +\n \"13.) StopPump \\n\" +\n \"14.) FullTank \\n\" +\n \"q.) Quit\\n\");\n }", "public void collection() {\n\t\tif(showCollection) {\n\t\t\tclear_console();\n\t\t\tfor(int i = 1;i<crystalQuantity.length;i++) {\n\t\t\t\tif(crystalQuantity[i]>0) {\n\t\t\t\t\tSystem.out.println(\"T\" + i + \": \" + crystalQuantity[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public String getSubdivision() {\n return subdivision;\n }", "@Override\n public int doEndTag() throws JspException {\n\n // Acquire the select tag we are associated with\n SelectTag selectTag = (SelectTag) pageContext.getAttribute(Constants.SELECT_KEY);\n if (selectTag == null) {\n throw new JspException(messages.getMessage(\"optionsTag.select\"));\n }\n StringBuilder sb = new StringBuilder();\n\n // If a collection was specified, use that mode to render options\n if (collection != null) {\n Iterator collIterator = getIterator(collection, null);\n while (collIterator.hasNext()) {\n\n Object bean = collIterator.next();\n Object value = null;\n Object label = null;\n\n try {\n value = PropertyUtils.getProperty(bean, property);\n if (value == null) {\n value = \"\";\n }\n } catch (IllegalAccessException e) {\n throw new JspException(messages.getMessage(\"getter.access\", property, collection));\n } catch (InvocationTargetException e) {\n Throwable t = e.getTargetException();\n throw new JspException(messages.getMessage(\"getter.result\", property, t.toString()));\n } catch (NoSuchMethodException e) {\n throw new JspException(messages.getMessage(\"getter.method\", property, collection));\n }\n\n try {\n if (labelProperty != null) {\n label = PropertyUtils.getProperty(bean, labelProperty);\n } else {\n label = value;\n }\n if (label == null) {\n label = \"\";\n }\n } catch (IllegalAccessException e) {\n throw new JspException(messages.getMessage(\"getter.access\", labelProperty, collection));\n } catch (InvocationTargetException e) {\n Throwable t = e.getTargetException();\n throw new JspException(messages.getMessage(\"getter.result\", labelProperty, t.toString()));\n } catch (NoSuchMethodException e) {\n throw new JspException(messages.getMessage(\"getter.method\", labelProperty, collection));\n }\n\n String stringValue = value.toString();\n addOption(sb, stringValue, label.toString(), selectTag.isMatched(stringValue));\n\n }\n\n }\n\n // Otherwise, use the separate iterators mode to render options\n else {\n\n // Construct iterators for the values and labels collections\n Iterator valuesIterator = getIterator(name, property);\n Iterator labelsIterator = null;\n if ((labelName == null) && (labelProperty == null)) {\n labelsIterator = getIterator(name, property); // Same coll.\n } else {\n labelsIterator = getIterator(labelName, labelProperty);\n }\n\n // Render the options tags for each element of the values coll.\n while (valuesIterator.hasNext()) {\n String value = valuesIterator.next().toString();\n String label = value;\n if (labelsIterator.hasNext()) {\n label = labelsIterator.next().toString();\n }\n addOption(sb, value, label, selectTag.isMatched(value));\n }\n }\n\n // Render this element to our writer\n ResponseUtils.write(pageContext, sb.toString());\n\n // Evaluate the remainder of this page\n return EVAL_PAGE;\n\n }", "private void showCommonOptions (Menu mMenu, LinearLayout llCO) {\n \t\t\n for(int i=0; i<OptionManager.getCommonOptionSize(); i++) {\n \t\n \tOption _Option = OptionManager.getCommonOption(i);\n \t\n \tLinearLayout llEachLine = new LinearLayout(this);\n\t\t\tllEachLine.setLayoutParams(new LayoutParams(500,LayoutParams.WRAP_CONTENT));\n\t\t\tllEachLine.setPadding(0, 0, 10, 4);\n\t\t\tllEachLine.setOrientation(LinearLayout.HORIZONTAL);\n\t\t\tllEachLine.setGravity(Gravity.LEFT);\n\t\t\t \n\t\t\tint nCountId = IdManager.getCommonOptionCountId(i);\n\t\t\tint nDownId = nCountId - 1000;\n\t\t\tint nUpId = nCountId + 1000;\n\t\t\t \n\t\t\t// option name\n\t\t\t \n\t\t\tString strTextTitle = TextFormatter.getText(_Option.NAME_ENG, _Option.NAME_OTH,26);\n\t\t\t \n\t\t\tTextView tvOptionName = new TextView(this);\n\t\t\ttvOptionName.setGravity(Gravity.LEFT|Gravity.CENTER);\n\t\t\ttvOptionName.setText(strTextTitle);\n\t\t\ttvOptionName.setTextSize(14);\n\t\t\ttvOptionName.setTextColor(0xff000000);\n\t\t\ttvOptionName.setHeight(50);\n\t\t\ttvOptionName.setWidth(270);\n\t\t\t \n\t\t\t// option count \n\t\t\t \n\t\t\tTextView tvCount = new TextView(this); \n\t\t\ttvCount.setGravity(Gravity.CENTER);\n\t\t\ttvCount.setId(nCountId);\n\t\t\ttvCount.setText(String.valueOf(\"0\"));\n\t\t\ttvCount.setTextColor(0xff000000);\n\t\t\ttvCount.setWidth(50);\n\t\t\ttvCount.setHeight(30);\n\t\t\t \n\t\t\t_Option.MENU_RESOURCE_ID = mMenu.RESOURCE_ID;\n\t\t\t \n\t\t\tResourceManager.put(nCountId, tvCount);\n\t\t\tResourceManager.put(tvCount, _Option);\n\t\t\t \n\t\t\t// Button Down\n\t\t\t \n\t\t\tImageButton btDown = new ImageButton(this);\n\t\t\tbtDown.setId(nDownId);\n\t\t\tbtDown.setBackgroundDrawable(getResources().getDrawable(R.drawable.down));\n\t\t\tbtDown.setLayoutParams(new LayoutParams(Property.POPUP_ARROW_IMG_WIDTH,Property.POPUP_ARROW_IMG_HEIGHT));\n\t\t\tbtDown.setOnClickListener(new OnClickListener() {\n\t\t\t\tpublic void onClick(View v) {\n \t \t\n\t\t\t\t\tint nDownId = v.getId();\n \t \tint nCountId = nDownId+1000;\n \t \tint nCount = 0;\n \t \t\n \t \tTextView tvCount = (TextView) ResourceManager.get(nCountId);\n \t \tOption _Option = (Option)ResourceManager.get(tvCount);\n \t \t\n \t\tString strCount = (String) tvCount.getText();\n \t\tnCount = Integer.valueOf(strCount);\n \t \t\n \t \tif(nCount>0) {\n \t\t\t\tnCount -= 1;\n \t \ttvCount.setText(String.valueOf(nCount));\n \t \t_Option.ORDER_COUNT = nCount;\n \t OrderManager.setOptionCount(_Option.DB_ID, nCount);\n \t \t}\n \t }\n });\n \n // Button Up\n \n ImageButton btUp = new ImageButton(this);\n btUp.setId(nUpId);\n btUp.setBackgroundDrawable(getResources().getDrawable(R.drawable.up));\n btUp.setLayoutParams(new LayoutParams(Property.POPUP_ARROW_IMG_WIDTH,Property.POPUP_ARROW_IMG_HEIGHT));\n btUp.setOnClickListener(new OnClickListener() {\n \t public void onClick(View v) {\n \t \t\n \t \tint nUpId = v.getId();\n \t \tint nCountId = nUpId - 1000;\n \t \tint nCount = 0;\n \t \t\n \t \tTextView tvCount = (TextView) ResourceManager.get(nCountId);\n \t \tOption _Option = (Option)ResourceManager.get(tvCount);\t\n \t \t\n \t \tString strCount = (String) tvCount.getText();\n \t\tnCount = Integer.valueOf(strCount);\n \t\t\n \t \tnCount += 1;\n \t \t\n \t \ttvCount.setText(String.valueOf(nCount));\n \t \t_Option.ORDER_COUNT = nCount;\n OrderManager.setOptionCount(_Option.DB_ID, nCount);\n \t }\n });\n \n llEachLine.addView(tvOptionName);\n llEachLine.addView(tvCount);\n llEachLine.addView(btDown);\n llEachLine.addView(btUp);\n \n llCO.addView(llEachLine);\n }\n \t\t\n \t}", "@SuppressWarnings(BookFlowConstants.BOXING)\r\n @Override\r\n public void selectInsurance(final InsuranceDetailsCriteria insuranceDetailsCriteria,\r\n final ExtraOptionsViewData extraOptionsViewData)\r\n {\r\n final BasePackage packageModel = getPackageModel();\r\n final ExtraFacility selectedPackageExtraFacility =\r\n fetchSelectedPackageExtraFacility(insuranceDetailsCriteria.getInsuranceCode(),\r\n packageModel.getId());\r\n final InsuranceContainerViewData insuranceContainerViewData = getInsuranceContainerViewData();\r\n final String defaultCurrencyCode = currencyResolver.getSiteCurrency();\r\n for (final InsuranceViewData insuranceData : insuranceContainerViewData.getInsViewData())\r\n {\r\n if (StringUtils.equalsIgnoreCase(insuranceData.getCode(),\r\n insuranceDetailsCriteria.getInsuranceCode()))\r\n {\r\n insuranceData.setFrmPrice(calculateTotalPriceInsurance(insuranceDetailsCriteria,\r\n selectedPackageExtraFacility));\r\n insuranceData.setCurrencyAppendedFrmPrice(CurrencyUtils\r\n .getCurrencySymbol(defaultCurrencyCode) + insuranceData.getFrmPrice());\r\n insuranceData.setPrice(insuranceData.getCurrencyAppendedFrmPrice());\r\n insuranceData.setPaxComposition(getPaxComposition(insuranceDetailsCriteria\r\n .getSelected().values()));\r\n if (checkInsuranceIsPresent(selectedPackageExtraFacility, insuranceData))\r\n {\r\n final BigDecimal totalCount =\r\n new BigDecimal(insuranceDetailsCriteria.getSelected().values().size());\r\n insuranceData.getExcessWaiverViewData().setPrice(\r\n (totalCount).multiply(\r\n ((InsuranceExtraFacility) selectedPackageExtraFacility)\r\n .getInsuranceExcessWaiver().getPrice().getRate().getAmount()).toString());\r\n insuranceData.getExcessWaiverViewData().setCurrencyAppendedPrice(\r\n CurrencyUtils.getCurrencySymbol(defaultCurrencyCode)\r\n + insuranceData.getExcessWaiverViewData().getPrice());\r\n }\r\n }\r\n }\r\n packageExtraFacilityFacade.populateExtraOptionsAllView(packageModel, extraOptionsViewData);\r\n setEachPassengerPrice(insuranceDetailsCriteria, selectedPackageExtraFacility,\r\n insuranceContainerViewData);\r\n extraOptionsViewData.setInsuranceContainerViewData(insuranceContainerViewData);\r\n }", "public String showSmallMenuOptions(){\n stringBuilder = new StringBuilder();\n menuLoader = new MenuLoader();\n int counter = 0;\n for (String key: menuLoader.getSmallMenu().keySet()) {\n counter++;\n stringBuilder.append(\" '\" + key + \"',\");\n if (counter%10 == 0){\n stringBuilder.append(\"\\n\");\n }\n }\n return stringBuilder.toString();\n }", "public IOptionCategory getTopOptionCategory();", "public static void printSubTableDonors() {\n System.out.println(\"\\n\\t(I) - Sort by ID\");\n System.out.println(\"\\t(N) - Sort Number of Recipients\");\n System.out.println(\"\\t(B) - Sort by Blood Type\");\n System.out.println(\"\\t(O) - Sort by Organ Donated\");\n System.out.println(\"\\t(Q) - Back to Main Menu\");\n }" ]
[ "0.5860457", "0.5512499", "0.550748", "0.5480055", "0.5365833", "0.52769417", "0.5254601", "0.5238511", "0.5207427", "0.5202154", "0.51887894", "0.5158688", "0.5150608", "0.5123659", "0.512", "0.50818515", "0.5053164", "0.50438476", "0.5020788", "0.5017512", "0.50097835", "0.50042236", "0.4999964", "0.4972453", "0.49698198", "0.49630076", "0.49625084", "0.49580783", "0.4957003", "0.49530864", "0.49517456", "0.49472648", "0.49399513", "0.49386537", "0.49126768", "0.4911384", "0.49113104", "0.4901689", "0.48910734", "0.48910108", "0.48843777", "0.48817945", "0.48673064", "0.48642898", "0.48606646", "0.4853387", "0.48482955", "0.484586", "0.48397455", "0.48244607", "0.48205015", "0.48194915", "0.48166442", "0.4811622", "0.48082596", "0.4806651", "0.47942993", "0.47848144", "0.4779432", "0.47773087", "0.47707844", "0.47663364", "0.4757233", "0.4748493", "0.47341135", "0.47270712", "0.47150335", "0.47128716", "0.4707145", "0.4706594", "0.47001103", "0.4696267", "0.46957722", "0.46942583", "0.4691223", "0.4682453", "0.46821815", "0.4680807", "0.4673233", "0.46700597", "0.46674344", "0.46673316", "0.46597525", "0.4655167", "0.4654928", "0.4653066", "0.46482852", "0.4648211", "0.46471256", "0.46424907", "0.464132", "0.46322697", "0.46322015", "0.46283406", "0.46276495", "0.4626065", "0.46260285", "0.4622734", "0.46201658", "0.46150538" ]
0.5848991
1
click on Returns link and navigate to Returns Report page
@Test(priority=4) public void navigateToReturnsPage() { String expectedPageTitle="Returns Report"; String actualPageTitle=filterReturnsList.navigateToReturns(); assertEquals(actualPageTitle, expectedPageTitle); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "HtmlPage clickLink();", "HtmlPage clickSiteLink();", "public void onClick()\n\t\t\t{\n\t\t\t\t((DccdSession)Session.get()).setRedirectPage(SearchResultDownloadPage.class, getPage());\n\t\t\t\tsetResponsePage(new SearchResultDownloadPage((SearchModel) SearchResultsDownloadPanel.this.getDefaultModel(), \n\t\t\t\t\t\t(DccdSearchResultPanel) callingPanel));\n\t\t\t}", "public synchronized void click_lnk_shippingReturn() throws Exception {\n\t\tutils.clickWebElement(driver, shippingReturnLabel(), \"Shipping & Return label not found\");\n\n\t}", "public void onReportClick(){\r\n\t\tmyView.advanceToReport();\r\n\t}", "HtmlPage clickDateLink();", "public void NavigateCheckOut(Reporting report)\n\t{ waitForElementToBeClickable(CheckOut);\n\t\tClick(CheckOut,report);\n\t}", "public void I_Should_click_My_Account_link(){\n\t MyAccountLink.click();\n\t \n}", "private WriteAReviewPage clickOnStartHereButton(){\n click(button_StartHereLocator);\n return new WriteAReviewPage();\n }", "public void setReturnPage(String returnPage) {this.returnPage=returnPage;}", "@When(\"user clicks on Careers link\")\n public void user_clicks_on_careers_link() throws InterruptedException {\n // bu.windowHandling();\n hp.search();\n }", "public HtmlPage clickContentPath();", "public void clickOnReturnRadioButton()\n\t{\n\t\tif(departureRadioButton.isDisplayed())\n\t\t{\n\t\t\twaitForSeconds(5);\n\t\t\treturnFlightRadioButton.click();\n\t\t}\n\t\telse\n\t\t{\n\t\t\twaitForSeconds(10);\n\t\t\tUserdefinedFunctions.scrollusingCordinate();\n\t\t\twaitForSeconds(10);\n\t\t\treturnFlightRadioButton.click();\n\t\t}\n\n\t}", "HtmlPage clickSiteName();", "public ProduceAndFloralPage clickOnProduceandFloralLink() {\n\t\t// Use for loop to make sure link got clicked\n\t\tfor (int i = 0; i <= 2; i++) {\n\t\t\ttry {\n\t\t\t\tproduceAndfloral.click();\n\t\t\t\tbreak;\n\t\t\t} catch (Exception e) {\n\n\t\t\t\te.getMessage();\n\t\t\t}\n\t\t}\n\t\treturn new ProduceAndFloralPage();\n\t}", "public String clickLink(int _index) {\n String item_ = getItems().get(_index).getName();\n return tryRedirectIt(item_);\n// getForms().put(CST_ITEM, item_);\n// Item it_ = data_.getItem(item_);\n// return switchItem(it_);\n }", "public void clickOnFindlocations() {\n\t\tsFunName = \"clickOnFindlocations\";\n\t\tLogger.info(\"Inside : clickOnFindlocations\");\n\t\tLogger.info(sFunName + \" : Verify and Click on Find Locations link\");\n\t\tbStatus = util.explicitlyWaitUntilElementIsPresent(findLlocationsLink);\n\t\tAssert.assertTrue(bStatus, \"Service Search Text field not Found\");\n\t\tfindLlocationsLink.click();\n\t}", "public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}", "public void clickOnEmailLink1InFooter() {\n\t By element =By.xpath(\"//a[text()='CE at VIN' ]\");\n\t scrollIntoView(element);\n\t _normalWait(3000);\n\t waitAndClick(emailLink1InFooter);\n\t }", "public void AdminLink(){\n\t\tAdminLink.click();\n\t}", "private void gotoCompletePage() {\n WebkitUtil.forward(mWebView, AFTER_PRINT_PAGE);\n }", "public static void goTo() {\n\tBrowser.instance.findElement(maintenanceMenu).click();\r\n\tWebElement element = Browser.instance.findElement(By.linkText(\"Tender and Bag Maintenance\"));\r\n Actions action = new Actions(Browser.instance);\r\n action.moveToElement(element).build().perform(); \r\n Browser.instance.findElement(By.linkText(\"Bag Types\")).click();\r\n // WebDriverWait wait = new WebDriverWait(Browser.instance,10);\r\n WebDriverWait wait = new WebDriverWait(Browser.instance,10);\r\n\twait.until(ExpectedConditions.elementToBeClickable(editButton));\r\n//\tBrowser.instance.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS);\r\n}", "public void navigateToPreAdmission_StudentCountReport() throws Exception {\r\n\r\n\t\tclickOnButton(btn_PreAdmission);\r\n\t\tlog(\"Clicked on PreAdmission Button and object is:-\" + btn_PreAdmission.toString());\r\n\r\n\t\tclickOnButton(btn_Preadmission_Reports);\r\n\t\tlog(\"Clicked on PreAdmission Reports and object is:-\" + btn_Preadmission_Reports.toString());\r\n\r\n\t\tclickOnButton(btn_StudentCountReport);\r\n\t\tlog(\"Clicked on Student count report to open page and object is:-\" + btn_StudentCountReport.toString());\r\n\r\n\t}", "public DashBoardPage NavigateToMittICA()\n{\n\tif(Action.IsVisible(Master_Guest_Mitt_ICA_Link))\n\tAction.Click(Master_Guest_Mitt_ICA_Link);\n\telse\n\t\tAction.Click(Master_SignIN_Mitt_ICA_Link);\n\treturn this;\n}", "public void clickloginlink(){\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:- Loginlink should be clicked from Home Page\");\r\n\t\ttry{\r\n\t\t\twaitForElement(locator_split(\"lnkLogin\"));\r\n\t\t\tclick(locator_split(\"lnkLogin\"));\r\n\t\t\twaitForPageToLoad(200);\r\n\t\t\tSystem.out.println(\"Login link clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-Login link is clicked from home page\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Login link is not clicked\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "public void clickDashboardLink() {\n this.action.click(this.dashboardLink);\n }", "public DeliAndBakeryPage clickOnDeliAndBakeryLink() {\n\t\tfor (int i = 0; i <= 2; i++) {\n\t\t\ttry {\n\t\t\t\tdeliAndbakery.click();\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t} catch (Exception e) {\n\n\t\t\t\te.getMessage();\n\t\t\t}\n\t\t}\n\t\treturn new DeliAndBakeryPage();\n\t}", "public void ClickNotesAndMessagesPage() {\r\n\t\tnotesandmessages.click();\r\n\t\t\tLog(\"Clicked the \\\"Notes and Messages\\\" button on the Birthdays page\");\r\n\t}", "public FindLeadsPage clickFindLeads() {\n\t\tclick(eleFindLead);\r\n\t\treturn new FindLeadsPage();\r\n\t}", "@Override\r\n\tpublic void clickOnLoginLink() {\r\n\t\t\r\n\t\tSelenium.click(lnkLogIn());\r\n\t}", "@Override\r\n\tprotected void openPage(PageLocator locator, Object... args) \r\n\t{\n\t\t\r\n\t}", "public void ClickAgentInformationPage() {\r\n\t\tagentinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Agent Information\\\" button on the Birthdays page\");\r\n\t}", "public void clickContinueInAgentPage() throws Exception {\n\n\t\twdriver.findElement(By.xpath(\"//button[@type='submit']\")).click();\n\n\t}", "public void clickOrderHistoryLink()\n\t{\n \telementUtils.performElementClick(wbOrderHistoryLink);\n\t}", "public void gotoDetailSalesOrder() {\n\t}", "public void clickOnServiceLink() {\n Reporter.addStepLog(\"Clicking on service link: \" + _link_service);\n clickOnElement(_link_service);\n log.info(\"Clicking on login link: \" + _link_service);\n }", "public void proceedToLetsGo() {\n\t\tBrowser.click(\"xpath=.//*[@id='DisplayNavigatorBrokerLandingPage']/div/div/div/div/div/div/div/div/div[5]/a/img\");\n\t}", "@Test\n @When(\"I navigate to Market\")\n public void s04_MarketOpen(){\n WebElement marketLink = driver.findElementByLinkText(\"Маркет\");\n marketLink.click();\n System.out.println(\"Step04 PASSED\");\n }", "@Override\r\npublic void afterNavigateTo(String arg0, WebDriver arg1) {\n\tSystem.out.println(\"as\");\r\n}", "public void goToPage(String xPathCustom) { \n seleniumDriver.findElement(By.xpath(xPathCustom)).click();\n }", "@Test\n\tpublic void LocationInventoryDetailReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"Location Inventory Detail Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "public CustDashboardPage clickReturnToCustomerDashboard(ExtentTest extentedReport) throws Exception {\n\t\ttry {\n\t\t\tWaitUtils.waitForElement(driver, btnReturnToCustomerDashboard, 60);\n\t\t\tbtnReturnToCustomerDashboard.click();\n\t\t\tWaitUtils.waitForSpinner(driver);\n\t\t\tLog.message(\"Clicked on ReturnToCustomerDashboard button in get quote page\", driver, extentedReport);\n\t\t\treturn new CustDashboardPage(driver, extentedReport).get();\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\n\t\t\t\t\t\"Unable to click on ReturnToCustomerDashboard Button in get quote page, exception occured : \" + e);\n\t\t}\n\t}", "public void ClickAccount() {\n if (lnkAccount.isDisplayed()) {\n lnkAccount.click();\n }\n else{System.out.println(\"Account link is not displayed\");}\n }", "public String getReturnPage() {return returnPage;}", "@Override\r\n public void afterNavigateTo(final String arg0, final WebDriver arg1) {\n\r\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifySubmitMeterReadingLandingPageLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the link navigations of Submit meter read landing page\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage1()\n\t\t.verifySubmitMeterreadLandingPageNavigationLinks();\n}", "public void ClickToNavigateTo(String ClickToNavigateTo) {\r\n\t\tdriver.findElement(By.xpath(\"//a[@id='SideBarButton' and text()='\" + ClickToNavigateTo + \"']\")).click();\r\n\t\t\tLog(\"Clicked the \\\"'\" + ClickToNavigateTo + \"'\\\" button on the Birthdays page\");\r\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyGasYourdetailsPageNavigationLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Gas Page Navigation Links\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Gas\")\t\t\n\t\t.verifyGasNavigationLinks();\n}", "public void ClickNext() {\r\n\t\tnext.click();\r\n\t\t\tLog(\"Clicked the \\\"Next\\\" button on the Birthdays page\");\r\n\t}", "@When(\"^Click on Compose hyperlink icon$\")\npublic void click_on_Compose_hyperlink_icon() throws Throwable \n{\n\tWebElement p=driver.findElement(By.partialLinkText(\"Compose\"));\n p.click();\n System.out.println(\"Page title after link click : \" + driver.getTitle());\n \n\n\n}", "public EmagHomePage clickonContinueButton()\n {\n continueButton.click();\n return new EmagHomePage(driver);\n }", "public void clickOnContinueAsGuestUserLink()\n \t{\n \t\tproductRequirementsPageLocators.continueAsGuestUserLIink.click();\n\n \t}", "@Then(\"^click on the Login button user nagivate to the next page$\")\r\n\tpublic void click_on_the_Login_button_user_nagivate_to_the_next_page() throws Throwable {\n\t w.submit();\r\n\t}", "public void clickGoToLogin(){\n\t\t\n\t\tgoToLoginBtn.click();\n\t\t\n\t}", "public StatusCodesHomePage clickLinkToCodePage() {\n\t\tgetDriver().findElementDynamic(selectorLinkToCodesPage)\n\t\t\t\t.click();\n\t\treturn new StatusCodesHomePage();\n\t}", "public void clickLink(String link){\n\t\tSystem.out.println(\"CONTROLLER: LINK WAS CLICKED: \" + link);\n\t\tURL url_ = null;\n\t\ttry{\n\t\t\turl_ = new URL(new URL(this.url), link);\n\t\t\tthis.content = BrowsrDocumentValidator.assertIsValidBrowsrDocument(url_);\n\t\t\tthis.url = url_.toString();\n\t\t\tSystem.out.println(\"URL CONTROLLER:\" + this.url);\n\t\t} catch (Exception exception){\n\t\t\tthis.content = new Text(exception.toString());\n\t\t}\n\n\t}", "public void goTo() { // Navigate to home page\n\t\tBrowser.goTo(url);\n\t}", "@Test\n public void clickResourceLink() {\n aboutPage.clickResourceLink();\n }", "public boolean clickMyWebinarsLink(){\n\t\tif(util.clickElementByLinkText(\"My Webinars\")==\"Pass\"){\n\t\t\tSystem.out.println(\"Left Frame >> My Webinar link clicked successfully...............\");\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n \t\t\n \t}", "private void clickOn() {\n\t\tll_returnbtn.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t}", "public WriteAReviewPage goToWriteAReviewPage(){\n return clickOnStartHereButton();\n }", "public AnnuityDetailsTab ClickContinueLinkwithOutFillingOut() throws InterruptedException\n\t{\n\t\tdriver.findElement(By.partialLinkText(\"Continue to Annuity Details\")).click();\n\t\t\n\t\tThread.sleep(1000);\t\n\t\treturn new AnnuityDetailsTab(driver);\n\t\t\n\t}", "public static void goTo() {\n Browser.driver.get(\"https://www.abv.bg/\");\n Browser.driver.manage().window().maximize();\n }", "@Override\r\n\tpublic void afterNavigateTo(String arg0, WebDriver arg1) {\n\t\t\r\n\t}", "@Given(\"^User is navigating to G-mail Login Page$\")\n\tpublic void navigateURL() throws Throwable {\n\t\tSystem.out.println(\"Entered URL\"); \n\t\t\n\t}", "public PDUsPage clickLinkNameforPDUs(String linkName){\n\t\tif(clickLink(linkName, false))\n\t\t\tReporter.reportStep(\"The Value: \"+ linkName +\" under Configuration Item is clicked successfully\", \"SUCCESS\");\n\t\telse\t\n\t\t\tReporter.reportStep(\"The Value: \"+ linkName +\" under Configuration Item could not be clicked\", \"FAILURE\");\n\n\t\treturn new PDUsPage(driver);\n\t}", "public void clickAccountsLink()\n\t{\n \telementUtils.performElementClick(wbAccountsLink);\n\t}", "public void clickLogin() {\r\n\t\tdriver.findElement(SignIn).click();\r\n\t\t//SignIn.click();\r\n\t\t//SignIn.click();\r\n\t\t//return new LoginPage();\r\n\t}", "public boolean onLinkClick() {\n for (int t = 0; t < data.size(); t++) {\n if (data.get(t).getActionLink().isClicked()) {\n Cuenta ref = data.get(t);\n List<Cuenta> newData = new LinkedList<Cuenta>();\n List<Cuenta> createQuery = DAO.createQuery(Cuenta.class, null);\n if (ref.getRef() == null || ref.getRef().equals(\"\")) {\n newData.add(ref);\n } else {\n String[] split = ref.getRef().split(\",\");\n for (String sp : split) {\n for (Cuenta c : createQuery) {\n if (c.getIdCuenta().toString().equals(sp)) {\n newData.add(c);\n }\n }\n }\n }\n UserManager.getContextManager(Integer.parseInt(getContext().getSessionAttribute(\"user\").toString())).getSessionController(UserManager.getContextManager(Integer.parseInt(getContext().getSessionAttribute(\"user\").toString())).actualContext).addVariable(\"page\", new Variable(\"page\", this.getClass(), Class.class), true);\n newContext();\n setTitle(ref.getDescripcion());\n UserManager.getContextManager(Integer.parseInt(getContext().getSessionAttribute(\"user\").toString())).getSessionController(UserManager.getContextManager(Integer.parseInt(getContext().getSessionAttribute(\"user\").toString())).actualContext).addVariable(\"data\", new Variable(\"data\", newData, List.class), true);\n UserManager.getContextManager(Integer.parseInt(getContext().getSessionAttribute(\"user\").toString())).getSessionController(UserManager.getContextManager(Integer.parseInt(getContext().getSessionAttribute(\"user\").toString())).actualContext).addVariable(\"page\", new Variable(\"page\", this.getClass(), Class.class), true);\n setRedirect(TablePage.class);\n return true;\n }\n }\n return true;\n }", "public void clickOnEngagementLink() {\n getLogger().info(\"Click on engagement link\");\n try {\n waitForClickableOfElement(eleEngagementLink, \"Wait for click on engagement link\");\n clickElement(eleEngagementLink, \"Click on engagement\");\n NXGReports.addStep(\"Verify click on engagement link \", LogAs.PASSED, null);\n } catch (Exception ex) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Verify click on engagement link \", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "public void navigateToLoginPage() {\r\n\t\tBrowser.open(PhpTravelsGlobal.PHP_TRAVELS_LOGIN_URL);\r\n\t}", "@Then(\"user clicks submit button\")\n\tpublic void user_clicks_submit_button(){\n\t\t driver.findElement(By.name(\"sub\")).click();\n\t\t driver.findElement(By.xpath(\"//a[@href='addcustomerpage.php']\")).click();\n\t}", "public void ClickAgentContactInformationPage() {\r\n\t\tagentcontactinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Agent Contact Information\\\" button on the Birthdays page\");\r\n\t}", "public KPAUIReimbursementPage clickRequestReimbursementLink(){\n getRequestReimbursementLink().click();\n return new KPAUIReimbursementPage(driver);\n }", "public void setReturnPage(String returnPage) {\r\n\t\tthis.returnPage = returnPage;\r\n\t}", "@When(\"User clicks on Find Details button\")\r\n\tpublic void user_clicks_on_find_details_button() \r\n\t{\n\t driver.findElement(By.xpath(\"//input[@type='submit']\")).click();\r\n\t}", "public void clickOnAccountSettingLink() {\r\n\t\tprint(\"Click on Account Setting Link\");\r\n\t\tlocator = Locator.MyTrader.Account_Setting.value;\r\n\t\tclickOn(locator);\r\n\t}", "public void clickOnProceedToCheckoutButton()\n \t{\n \t\tproductRequirementsPageLocators.clickOnProceedToCheckoutButton.click();\n\n \t}", "public void viewContactDetails() {\n wd.findElement(By.xpath(\"//tr/td[7]/a\")).click();\n }", "@Test\n\tpublic void verifycustomerSupportlink() {\n\t\tKeywords.clickOnElement(PropertiesFile.getLocator(\"Spportlink\")[0],PropertiesFile.getLocator(\"Spportlink\")[1]);\n\t\tSystem.out.println(\"24*7 goCare Support link is Displayed on Header\");\n\t\tConstants.driver.manage().timeouts().implicitlyWait(60,TimeUnit.SECONDS) ;\n\t\tKeywords.terminateBrowser();\n\n\t}", "public void clickReturnSearchSeleniumBook(){\n\t\tList<WebElement> books=d.findElements(By.cssSelector(OR.getProperty(\"listSeleniumbook\")));\n\t\tWebElement SeleniumBook=books.get(0);\n\t\tSeleniumBook.click();\n\t}", "public void myorders() {\n\t\t\t\r\n\t\t\t\r\n\t\tBy my=By.xpath(\"//a[@href='/my/orders/create?form']\");\r\n\t\tWebElement We_my=wt.ElementToBeClickable(my, 20);\r\n\t\tWe_my.click();\r\n\t\t}", "@Override\r\n\tpublic URLModule gotoPage(int page) {\n\t\treturn null;\r\n\t}", "public void clickRegisterLink() {\n $(registerLink).click();\n }", "@Test\n public void clickContactLink() {\n aboutPage.clickContactLink();\n }", "@Then(\"^click on checkout$\")\r\n\tpublic void click_on_checkout() throws Throwable {\n\t\tverbose(\"***********************************************************\");\r\n\t\tAssert.assertTrue(navigate_rsc.checkout());\r\n\t\tverbose(\"***********************************************************\");\r\n\t \r\n\t}", "public Finland_HomePage clickbsrBackBtn() throws Throwable {\r\n\t\ttry {\r\n\t\t\tclickBrowserBackButton();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn new Finland_HomePage();\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n \tUri uri = Uri.parse(\"http://l-sls0483d.research.ltu.se/userdata/notes/\"+param1+\"/notes.html\");\n \t\t\n \t\n \t\tIntent intent = new Intent(Intent.ACTION_VIEW, uri);\n \t\tstartActivity(intent);\n \n }", "public void ClickMyAccount( ){\r\n\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:- My Account Link clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"LoginLogout\"));\r\n\t\t\tclick(locator_split(\"LoginLogout\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- My Account Link clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- My Account Link is not clicked \"+elementProperties.getProperty(\"LoginLogout\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyElectricityYourdetailsPageNavigationLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Electricity Page Navigation Links\");\n\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\t\t\n\t\t.verifyElectricNavigationLinks();\n\t\t\n}", "public String hyperlink1_action() {\n try {\n String primaryid = (String)hyperlink1.getValue();\n getSessionBean1().getProcesseddatasetRowSet().setObject(\n 1, primaryid);\n //dbssearch.Page1.processeddatasetDataProvider.refresh();\n }catch (Exception e) {\n log(\"Exception Raised:\" + e.getMessage());\n }\n return \"case1\";\n }", "@Step\n public void clickContactUsPage(){\n contactusPages.clickContactUsPage();\n }", "@Then(\"^click on Go button$\")\n\tpublic void click_on_Go_button() throws Throwable {\n\t\tdriver.findElement(By.xpath(\"//a[@class='nav-item'][contains(text(),'Blog')]\")).click();\n\t}", "@Override\n\tprotected void openPage(PageLocator arg0, Object... arg1) {\n\t\t\n\t}", "public KPAUIPregnancyPage clickPregnancyServicesLink(){\n getPregnancyServicesLink().click();\n return new KPAUIPregnancyPage(driver);\n }", "@Given(\"I am on the search results page\")\n\t\tpublic void i_am_on_the_search_results_page() {\n\t\t\t//I am on the results page\n\t\t\tdriver.get(ResultsUrl);\n\n\t\t}", "public void clickOnMoreLatesBookLink() {\n\t}", "@Override\r\npublic void afterNavigateForward(WebDriver arg0) {\n\tSystem.out.println(\"as\");\r\n}", "@Given(\"^I am on the Sign in page$\")\n\tpublic void I_am_on_the_Sign_in_page() throws Throwable {\n\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tdriver.findElement(By.linkText(\"Sign in\")).click();\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}" ]
[ "0.72252446", "0.68372786", "0.6506833", "0.6375064", "0.636973", "0.6329468", "0.63105756", "0.62078685", "0.6114694", "0.6042477", "0.60070914", "0.5982613", "0.5928982", "0.5921291", "0.59120363", "0.58886063", "0.58855677", "0.58746153", "0.586276", "0.58429193", "0.583726", "0.5815063", "0.580603", "0.5798423", "0.57951415", "0.579441", "0.5793206", "0.579176", "0.5770276", "0.5767145", "0.5764202", "0.5758063", "0.57224596", "0.57158387", "0.5705259", "0.5701923", "0.5701252", "0.56972903", "0.56941307", "0.5692134", "0.5688243", "0.56697327", "0.566579", "0.566561", "0.56627375", "0.5659166", "0.5658938", "0.56534547", "0.56414425", "0.56379074", "0.5637017", "0.5630928", "0.56299996", "0.5624494", "0.5623834", "0.5621446", "0.56204134", "0.56107175", "0.56062424", "0.56037664", "0.5601695", "0.5598917", "0.55970025", "0.55933946", "0.5592448", "0.5562412", "0.55530924", "0.555253", "0.55466896", "0.5546679", "0.55408293", "0.553649", "0.55303264", "0.55265355", "0.550535", "0.5498464", "0.549651", "0.5495791", "0.54910994", "0.5485069", "0.5481268", "0.5466454", "0.5466228", "0.5465775", "0.546281", "0.5461509", "0.54559946", "0.545491", "0.5450229", "0.544742", "0.5443429", "0.54433244", "0.5437988", "0.54370034", "0.54283035", "0.5428172", "0.5427108", "0.54227275", "0.5420816", "0.5416731" ]
0.7056985
1
Display options available under GroupBy dropdown
@Test(priority=5) public void displayGroupByListBox() { boolean expected=true; boolean actual=filterReturnsList.displayGroupByListboxOptions(); assertEquals(actual, expected); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<OptionBean> populateView(HttpServletRequest request) {\n List<OptionBean> groups = new ArrayList<OptionBean>();\n for (SecurityGroup group : securityManager.getAllGroups()) {\n groups.add(new OptionBean(group.getName(), group.getId()));\n }\n\n Collections.sort(groups);\n request.setAttribute(\"groups\", groups);\n\n return groups;\n }", "public void infoCustomer() { ////AGGIUSTA\n\n CriteriaBuilder cb = em.getCriteriaBuilder();\n\n CriteriaQuery<Customer> cq = cb.createQuery(Customer.class);\n\n Root<Customer> cust = cq.from(Customer.class);\n\n cq.multiselect(cust.get(\"lastName\"), cb.count(cust).alias(\"numero di customer\")).groupBy(cust.get(\"lastName\"));\n\n System.out.print(\"lastName\");\n System.out.println(\"\\t Count\");\n\n /* List<Object[]> list = em.createQuery(cq).getResultList(); \n \nfor(Object[] object : list){ \n System.out.println(object[0] + \" \" + object[1]); \n \n} \n\n em.getTransaction().commit();\n em.close();\n emf.close();\n */\n }", "String findAllAggrGroupByDistinct();", "public void setGroupBy(boolean value) {\n this.groupBy = value;\n }", "io.dstore.values.BooleanValue getGroupByCategory();", "private static void DoGroupBy()\n\t{\n\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAtts.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Str\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Float\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att4\"));\n\n\t\tArrayList<String> groupingAtts = new ArrayList<String>();\n\t\tgroupingAtts.add(\"o_orderdate\");\n\t\tgroupingAtts.add(\"o_orderstatus\");\n\n\t\tHashMap<String, AggFunc> myAggs = new HashMap<String, AggFunc>();\n\t\tmyAggs.put(\"att1\", new AggFunc(\"none\",\n\t\t\t\t\"Str(\\\"status: \\\") + o_orderstatus\"));\n\t\tmyAggs.put(\"att2\", new AggFunc(\"none\", \"Str(\\\"date: \\\") + o_orderdate\"));\n\t\tmyAggs.put(\"att3\", new AggFunc(\"avg\", \"o_totalprice * Int (100)\"));\n\t\tmyAggs.put(\"att4\", new AggFunc(\"sum\", \"Int (1)\"));\n\n\t\t// run the selection operation\n\t\ttry\n\t\t{\n\t\t\tnew Grouping(inAtts, outAtts, groupingAtts, myAggs, \"orders.tbl\", \"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public void setvalues(){\n Connection con= getConnection();\n Statement pst1;\n ResultSet rs1;\n \n try{\n \n String qry1=\"SELECT DISTINCT(`StudentGroup`) FROM `sessions`\";\n \n pst1=con.prepareStatement(qry1);\n rs1=pst1.executeQuery(qry1);\n\n combo_studentGroup.removeAllItems();\n \n while(rs1.next()){\n combo_studentGroup.addItem(rs1.getString(\"StudentGroup\"));\n }\n \n }catch(Exception e){\n JOptionPane.showMessageDialog(null, e);\n }\n \n }", "public void executeGroupByCriteria() {\n Session session = getSession();\n Transaction transaction = session.beginTransaction();\n\n // SELECT name, price\n ProjectionList projectionList = Projections.projectionList();\n projectionList.add(Projections.groupProperty(\"name\"));\n projectionList.add(Projections.property(\"price\"));\n\n // FROM Product p\n Criteria criteria = session.createCriteria(Product.class);\n\n // GROUP BY p.name\n criteria.setProjection(projectionList);\n\n displayObjectsList(criteria.list());\n transaction.commit();\n }", "@SuppressWarnings(\"unchecked\")\n public List getGroupBy() {\n if (_groupBy != null) {\n return Collections.unmodifiableList(_groupBy);\n }\n return Collections.EMPTY_LIST;\n }", "List<SeGroup> selectByExample(SeGroupExample example);", "public void update() {\n if (Globals.prefs.getBoolean(JabRefPreferences.GRAY_OUT_NON_HITS)) {\n panel.getMainTable().getTableModel().updateGroupingState(MainTableDataModel.DisplayOption.FLOAT);\n } else {\n panel.getMainTable().getTableModel().updateGroupingState(MainTableDataModel.DisplayOption.FILTER);\n }\n panel.getMainTable().getTableModel().updateSortOrder();\n panel.getMainTable().getTableModel().updateGroupFilter();\n panel.getMainTable().scrollTo(0);\n\n frame.output(Localization.lang(\"Updated group selection\") + \".\");\n }", "private void setUpGroupBy(){\n\t\tEPPropiedad pro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p2\");\n\t\tpro.setPseudonombre(\"\");\n\t\texpresionesGroupBy.add(pro);\n\t\tpro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p3\");\n\t\tpro.setPseudonombre(\"\");\n\t\texpresionesGroupBy.add(pro);\n\t}", "boolean hasGroupByCategory();", "public static void printGroupByCountryCount(){\n for (CountryGroup group : query.groupByCountry()) {\n System.out.println(\"There are \" + group.people.size() + \" people in \" + group.country);\n }\n }", "public io.dstore.values.BooleanValue.Builder getGroupByCategoryBuilder() {\n \n onChanged();\n return getGroupByCategoryFieldBuilder().getBuilder();\n }", "Boolean groupingEnabled();", "protected void generateGroupBy( SQLQueryModel query, LogicalModel model, List<Selection> selections,\n Map<LogicalTable, String> tableAliases, Map<String, Object> parameters, boolean genAsPreparedStatement,\n DatabaseMeta databaseMeta, String locale ) {\n // Can be moved to selection loop.\n for ( Selection selection : selections ) {\n // Check if the column has any nested aggregation in there like a calculated column : SUM(a)/SUM(b) with no\n // aggregation set.\n //\n if ( !hasFactsInIt( model, selection, parameters, genAsPreparedStatement, databaseMeta, locale ) ) {\n SqlAndTables sqlAndTables =\n getBusinessColumnSQL( model, selection, tableAliases, parameters, genAsPreparedStatement, databaseMeta,\n locale );\n query.addGroupBy( sqlAndTables.getSql(), null );\n }\n }\n }", "private List<Expression<?>> constructGroupBy(CriteriaBuilderImpl cb, AbstractQuery<?> q, Tree groupByDef) {\n \t\tfinal List<Expression<?>> groupBy = Lists.newArrayList();\n \n \t\tfor (int i = 0; i < groupByDef.getChildCount(); i++) {\n \t\t\tgroupBy.add(this.getExpression(cb, q, groupByDef.getChild(i), null));\n \t\t}\n \n \t\treturn groupBy;\n \t}", "private static void showGroups(Service service) {\r\n\t\tList<Group> groupList = service.getGroupList();\r\n\t\tfor(int index=0;index<groupList.size();index++) {\r\n\t\t\tSystem.out.println(groupList.get(index));\r\n\t\t}\r\n\t}", "public void getAllGroups() { \t\n \tCursor groupsCursor = groupDbHelper.getAllGroupEntries();\n \tList<String> groupNames = new ArrayList<String>();\n \tgroupNames.add(\"Create a Group\");\n \t\n \t// If query returns group, display them in Groups Tab\n \t// Might want to add ordering query so that most recent\n \t// spots display first...\n \tif (groupsCursor.getCount() > 0) {\n \t\tgroupsCursor.moveToFirst();\n \t\twhile (!groupsCursor.isAfterLast()) {\n \t\t\tgroupNames.add(groupsCursor.getString(1));\n \t\t\tgroupsCursor.moveToLast();\n \t\t}\n \t\t\n \t}\n \t\n \t// Close cursor\n \tgroupsCursor.close();\n \t\n \t// Temporary - Ad`d Sample Groups to List\n \t//for (String groupname : groupSamples) {\n \t\t//groupNames.add(groupname);\n \t//}\n \t\n \tgroupsview.setAdapter(new ArrayAdapter<String>(this, \n \t\t\t\tandroid.R.layout.simple_list_item_1, groupNames));\n }", "@Override\n public ModelInputDisplayItemType getDisplayItemType() {\n return ModelInputDisplayItemType.GROUP;\n }", "List<Group> getGroups();", "public void displaySelections() {\n List<VendingItem> listOfItems = service.getAllItemsNonZero(); //<-- uses lambda\n view.displaySelections(listOfItems);\n }", "public String getGroupNamesAsString() {\n return String.format(\"%s\", StringUtils.join(getGroupNames(), \", \"));\n }", "public void llenarComboGrado() {\t\n\t\tString respuesta = negocio.llenarComboGrado(\"\");\n\t\tSystem.out.println(respuesta);\t\n\t}", "public abstract Collection getGroups();", "protected void initializeGroups() {\r\n if ((getCriteriaGroup() != null) && (getCriteriaGroup().getItems().isEmpty())) {\r\n getCriteriaGroup().setItems(getCriteriaFields());\r\n }\r\n\r\n if (getResultsGroup() != null) {\r\n if ((getResultsGroup().getItems().isEmpty()) && (getResultFields() != null)) {\r\n getResultsGroup().setItems(getResultFields());\r\n }\r\n\r\n if (getResultsGroup().getCollectionObjectClass() == null) {\r\n getResultsGroup().setCollectionObjectClass(getDataObjectClass());\r\n }\r\n }\r\n\r\n if (getItems().isEmpty()) {\r\n setItems(Arrays.asList(getCriteriaGroup(), getResultsGroup()));\r\n }\r\n }", "static public String[] getSummaryOptions()\r\n\t{\r\n\t\tint count = SummaryTypeEnum.values().length;\r\n\t\tString[] options = new String[count];\r\n\r\n\t\tcount = 0;\r\n\t\tfor (SummaryTypeEnum option: SummaryTypeEnum.values()) {\r\n\t\t\toptions[count++] = option.getRenderString();\r\n\t\t}\r\n\t\treturn options;\r\n\t}", "public static void twoLevelGrouping(){\n\n Map<Integer, Map<String,List<Student>>> studentMap = StudentDataBase.getAllStudents().stream()\n .collect(groupingBy(Student::getGradeLevel,\n groupingBy(student -> student.getGpa()>= 3.8 ? \"OUTSTANDING\" : \"AVERAGE\")));\n\n Stream.of(studentMap).forEach(System.out::println);\n\n }", "public void groupingByMappingExample(){\n Map<String, List<Integer>> result = createPeople()\n .stream()\n .collect(groupingBy(Person::getName, mapping(Person::getAge,toList())));\n print.accept(result);\n }", "@Override\n\tpublic List<BussinessGroupVo> getBussinessGroupList() {\n\t\tList<BussinessGroupVo> bussList=bussinessGroupMapper.selectByParam(null);\n\t\treturn bussList;\n\t}", "Set<Group> getGroups();", "private void collapseAll()\r\n\t{\r\n\t\tint count = listAdapter.getGroupCount();\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t{\r\n\t\t\tmyList.collapseGroup(i);\r\n\t\t}\r\n\t}", "public void listGroup() {\r\n List<Group> groupList = groups;\r\n EventMessage evm = new EventMessage(\r\n EventMessage.EventAction.FIND_MULTIPLE,\r\n EventMessage.EventType.OK,\r\n EventMessage.EventTarget.GROUP,\r\n groupList);\r\n notifyObservers(evm);\r\n }", "GroupOpt getGroup();", "private void createGrpClinicSelection() {\n\n\t}", "@Override\n public void onSelection(SelectionEvent<SuggestOracle.Suggestion> event) {\n String group = ((GroupSuggestOracle.GroupSuggestion) event.getSelectedItem()).getGroup();\n userDto.addGroups(group);\n getView().setUser(getView().getUserName().isEmpty() ? userDto.getName() : getView().getUserName(),\n JsArrays.toList(userDto.getGroupsArray()));\n }", "public void Loadata(){ // fill the choice box\n stats.removeAll(stats);\n String seller = \"Seller\";\n String customer = \"Customer\";\n stats.addAll(seller,customer);\n Status.getItems().addAll(stats);\n }", "public void plannerDisplayComboBoxs(){\n Days dm = weekList.getSelectionModel().getSelectedItem();\n if (dm.isBreakfastSet()){\n //find Recipe set for breakfast in the Days in the comboBox and display it in the comboBox\n Recipe breakfast = findRecipeFromID(dm.getBreakfast().getId(), breakfastCombo);\n breakfastCombo.getSelectionModel().select(breakfast);\n }\n\n if (dm.isLunchSet()){\n //find Recipe set for lunch in the Days in the comboBox and display it in the comboBox\n Recipe lunch = findRecipeFromID(dm.getLunch().getId(), lunchCombo);\n lunchCombo.getSelectionModel().select(lunch);\n }\n\n if (dm.isDinnerSet()){\n //find Recipe set for dinner in the Days in the comboBox and display it in the comboBox\n Recipe dinner = findRecipeFromID(dm.getDinner().getId(), dinnerCombo);\n dinnerCombo.getSelectionModel().select(dinner);\n }\n }", "public boolean isGroupBy() {\n return groupBy;\n }", "@Test\n\tpublic void testLecturaGroupBy(){\n\t\tassertEquals(esquemaEsperado.getExpresionesGroupBy().toString(), esquemaReal.getExpresionesGroupBy().toString());\n\t}", "public void onGroupSelection(){\n getTimeList().clear();\n CycleTimeBean ctb = new CycleTimeBean();\n ctb.setGroupName(groupName);\n ctb.setCatName(catName);\n getTimeList().add(ctb);\n }", "private List<Object> handleAggregates(List<Object> resultSet)\n {\n final Expression[] grouping = compilation.getExprGrouping();\n Comparator<Object> c = new Comparator<>()\n {\n public int compare(Object arg0, Object arg1)\n {\n for (int i=0; i<grouping.length; i++)\n {\n state.put(candidateAlias, arg0);\n Object a = grouping[i].evaluate(evaluator);\n state.put(candidateAlias, arg1);\n Object b = grouping[i].evaluate(evaluator);\n // Put any null values at the end\n if (a == null && b == null)\n {\n return 0;\n }\n else if (a == null)\n {\n return -1;\n }\n else if (b == null)\n {\n return 1;\n }\n else\n {\n int result = ((Comparable)a).compareTo(b);\n if (result != 0)\n {\n return result;\n }\n }\n }\n return 0;\n }\n };\n \n List<List<Object>> groups = new ArrayList<>();\n List<Object> group = new ArrayList<>();\n groups.add(group);\n for (int i=0; i<resultSet.size(); i++)\n {\n if (i > 0)\n {\n if (c.compare(resultSet.get(i-1), resultSet.get(i)) != 0)\n {\n group = new ArrayList<>();\n groups.add(group);\n }\n }\n group.add(resultSet.get(i));\n }\n List<Object> result = new ArrayList<>();\n Expression having = compilation.getExprHaving();\n if (having != null)\n {\n for (int i=0; i<groups.size(); i++)\n {\n if (satisfiesHavingClause(groups.get(i)))\n {\n result.addAll(groups.get(i));\n }\n }\n }\n else\n {\n for (int i = 0; i < groups.size(); i++)\n {\n result.addAll(groups.get(i));\n }\n }\n return result;\n }", "public List<DataGroupInfo> getActiveGroups()\n {\n return New.list(myActiveGroups);\n }", "public void showOptions() {\n\t\tCIVLTable tbl_optionTable = (CIVLTable) getComponentByName(\"tbl_optionTable\");\n\t\tDefaultTableModel optionModel = (DefaultTableModel) tbl_optionTable\n\t\t\t\t.getModel();\n\n\t\tif (optionModel.getRowCount() != 0) {\n\t\t\toptionModel.setRowCount(0);\n\t\t\ttbl_optionTable.clearSelection();\n\t\t\ttbl_optionTable.revalidate();\n\t\t}\n\n\t\tGMCSection section = currConfig.getGmcConfig().getSection(\n\t\t\t\tGMCConfiguration.ANONYMOUS_SECTION);\n\t\tObject[] opts = currConfig.getGmcConfig().getOptions().toArray();\n\t\tCollection<Option> options = currConfig.getGmcConfig().getOptions();\n\t\tIterator<Option> iter_opt = options.iterator();\n\t\tList<Object> vals = new ArrayList<Object>();\n\n\t\twhile (iter_opt.hasNext()) {\n\t\t\tOption curr = iter_opt.next();\n\t\t\tvals.add(section.getValueOrDefault(curr));\n\t\t}\n\n\t\t// Sets all of the default-ize buttons\n\t\tnew ButtonColumn(tbl_optionTable, defaultize, 2);\n\n\t\tfor (int i = 0; i < vals.size(); i++) {\n\t\t\tOption currOpt = (Option) opts[i];\n\t\t\t/*\n\t\t\t * if (currOpt.name().equals(\"sysIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"sysIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t * \n\t\t\t * else if (currOpt.name().equals(\"userIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"userIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t */\n\t\t\t// else {\n\t\t\toptionModel\n\t\t\t\t\t.addRow(new Object[] { currOpt, vals.get(i), \"Default\" });\n\t\t\t// }\n\t\t}\n\t}", "public static void printFilterByCountryGroupByAge() {\n // filter by country, then group by age brackets of 10\n String country = getCountryInput();\n if (country != null) {\n System.out.println(\"In \" + country + \" :\");\n for (AgeGroup group : query.groupByAgeRangeGivenCountry(country)) {\n System.out.println(\"Aged between \" + (int) (group.floor * 10) + \" and \" + (int) (((group.floor * 10) + 9)) + \":\");\n for (Person p : group.people) {\n System.out.println(p.getFirstName() + \" \" + p.getLastName() + \"\");\n }\n }\n } else {\n // if the country is null, then the query was cancelled\n System.out.println(\"Query cancelled\");\n }\n }", "@Test\n public void createSqlQueryWithGroupBySucceed()\n {\n // arrange\n // act\n QuerySpecification querySpecification = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS).groupBy(\"validGroupBy\").createSqlQuery();\n\n // assert\n Helpers.assertJson(querySpecification.toJson(), \"{\\\"query\\\":\\\"select * from enrollments group by validGroupBy\\\"}\");\n }", "@Override\n public Enumeration<Option> listOptions() {\n\n Vector<Option> result = new Vector<Option>();\n\n result.addElement(new Option(\"\\tThe method used to determine best split:\\n\"\n + \"\\t1. Gini; 2. MaxBEPP; 3. SSBEPP\", \"M\", 1, \"-M [1|2|3]\"));\n\n result.addElement(new Option(\n \"\\tThe constant used in the tozero() hueristic\", \"K\", 1,\n \"-K [kBEPPConstant]\"));\n\n result.addElement(new Option(\n \"\\tScales the value of K to the size of the bags\", \"L\", 0, \"-L\"));\n\n result.addElement(new Option(\n \"\\tUse unbiased estimate rather than BEPP, i.e. UEPP.\", \"U\", 0, \"-U\"));\n\n result\n .addElement(new Option(\n \"\\tUses the instances present for the bag counts at each node when splitting,\\n\"\n + \"\\tweighted according to 1 - Ba ^ n, where n is the number of instances\\n\"\n + \"\\tpresent which belong to the bag, and Ba is another parameter (default 0.5)\",\n \"B\", 0, \"-B\"));\n\n result\n .addElement(new Option(\n \"\\tMultiplier for count influence of a bag based on the number of its instances\",\n \"Ba\", 1, \"-Ba [multiplier]\"));\n\n result\n .addElement(new Option(\n \"\\tThe number of randomly selected attributes to split\\n\\t-1: All attributes\\n\\t-2: square root of the total number of attributes\",\n \"A\", 1, \"-A [number of attributes]\"));\n\n result\n .addElement(new Option(\n \"\\tThe number of top scoring attribute splits to randomly pick from\\n\\t-1: All splits (completely random selection)\\n\\t-2: square root of the number of splits\",\n \"An\", 1, \"-An [number of splits]\"));\n\n result.addAll(Collections.list(super.listOptions()));\n\n return result.elements();\n }", "public String getGroupName();", "@Override\r\n\tpublic List<GroupApply> groupAllshowonapproval() {\n\t\treturn this.groupRepository.groupAllshowonapproval();\r\n\t}", "Iterable<String> groups();", "public Selectable getGroupBy(int i) {\n if (_groupBy != null) {\n return (Selectable) (_groupBy.get(i));\n } \n return null;\n }", "protected Set<String> getGroupsSet() {\n return getGroupsList().stream().collect(Collectors.toSet());\n }", "Set<OptionDTO> getAllOptions();", "private void expandAll()\r\n\t{\r\n\t\tint count = listAdapter.getGroupCount();\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t{\r\n\t\t\tmyList.expandGroup(i);\r\n\t\t}\r\n\t}", "public Object[] getGroupList() {\n return grouptabs.keySet().toArray();\n }", "public void printAllGroups() throws IllegalCourseTypeException {\n if (courseType == CourseType.LEC) {\n throw new IllegalCourseTypeException(\n \"Oops, it appears that \" + courseName + \" doesn't have any groups.\"\n );\n }\n\n System.out.println();\n System.out.println(\"+-----------------------------------------------+\");\n System.out.println(\"| Groups in \" + courseName + \" |\");\n System.out.println(\"+----------------+-------------+----------------+\");\n System.out.println(\"| Group Name | Vacancy | Total Size |\");\n System.out.println(\"+----------------+-------------+----------------+\");\n \n for (Map.Entry<String, Integer[]> entry : tutLabGroups.entrySet()) {\n if (entry.getKey().equals(\"_LEC\")) {\n continue;\n }\n System.out.print(\"| \" + entry.getKey() + \" | \");\n System.out.printf(\"%2s\", entry.getValue()[0]);\n System.out.print(\" | \");\n System.out.printf(\"%2s\", entry.getValue()[1]);\n System.out.println(\" |\");\n }\n\n System.out.println(\"+----------------+-------------+----------------+\");\n System.out.println();\n }", "protected SortedSet<Select2OptGroup> getListOfAllInstances(Class<? extends DefinitionsChildId> clazz) throws RepositoryCorruptException {\n Select2DataWithOptGroups data = new Select2DataWithOptGroups();\n\n IRepository repo = RepositoryFactory.getRepository();\n Collection<? extends DefinitionsChildId> instanceIds = repo.getAllElementsReferencingGivenType(clazz, this.id.getQName());\n\n for (DefinitionsChildId instanceId : instanceIds) {\n String groupText = instanceId.getNamespace().getDecoded();\n String text = BackendUtils.getName(instanceId, repo);\n data.add(groupText, instanceId.getQName().toString(), text);\n }\n\n return data.asSortedSet();\n }", "io.dstore.values.BooleanValueOrBuilder getGroupByCategoryOrBuilder();", "java.lang.String getProductGroup();", "@Explain(displayName = \"grouping sets\")\n @Signature\n public List<Long> getListGroupingSets() {\n if (groupingSetsPresent) {\n return listGroupingSets;\n }\n return null;\n }", "public String getListaGrupos () {\n String nomesGruposList = \"\";\n if(this.conversas != null && this.conversas.size() > 0){\n for(int i = 0; i < this.conversas.size(); i++){\n //nomesGruposList += conversas.get(i).nomeGrupo + \" \";\n }\n }\n return nomesGruposList;\n }", "public static void twoLevelGrouping_3(){\n\n Map<String,Set<Student>> nameNoteBooksMap = StudentDataBase.getAllStudents().stream()\n .collect(groupingBy(Student::getName,\n toSet()));// second argument can be of any type of collector\n\n System.out.println(nameNoteBooksMap);\n }", "SelectSubSet createSelectSubSet();", "public boolean isFilterByGroup()\r\n {\r\n return getSemanticObject().getBooleanProperty(swpres_filterByGroup);\r\n }", "public List<SalesOrderAggregatedCreated> selectAll();", "List<UserGroup> selectByExample(UserGroupExample example);", "public java.lang.Object[] getSelectPresentationLabelList();", "@Override\n\tpublic List<vip> selectAll() {\n\t\treturn this.vd.selectAll();\n\t}", "public List <String> getGroups ()\n {\n return groups;\n }", "public LegalValueSet getAdditionalQuestionsGroupChoices() {\n LegalValueSet lvs = new LegalValueSet();\n lvs.addLegalValue(FormLogic.ADDITIONAL_QUESTIONS_GRP_DBS, FormLogic.ADDITIONAL_QUESTIONS_GRP_DBS);\n return lvs;\n }", "private List<Group> showUserGroups(final Long userId) {\r\n \treturn registrationRepository.findByUserId(userId).stream().map(reg -> reg.getGroup()).collect(Collectors.toList());\r\n }", "public void setFilterByGroup(boolean value)\r\n {\r\n getSemanticObject().setBooleanProperty(swpres_filterByGroup, value);\r\n }", "@Override\n public List<Object> getHomeGroupMemberSelectData(\n Map<String, Object> conditionMap) {\n return null;\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Group \" + groupName + \" (\" + shapes.size() + \") \";\n\t}", "public List getTravelGroupList(Map conditions, int pageNo, int pageSize, TravelGroupQueryOrder order, boolean descend);", "public List<Group> indexNonDto() {\n\t\treturn groupRepository.findAll();\n\t}", "public Map<String, List<BenchmarkResultSet>> groupByBenchmark() {\n Map<String, List<BenchmarkResultSet>> groupedResults = new HashMap<>();\n if (getResults()!= null) {\n groupedResults = getResults().stream()\n .collect(Collectors.groupingBy(BenchmarkResultSet::getName));\n }\n return groupedResults;\n }", "@Model\n public Collection<String> choices2Act() {\n return applicationFeatureRepository.packageNamesContainingClasses(ApplicationMemberType.PROPERTY);\n }", "List<CmGroupRelIndustry> selectByExample(CmGroupRelIndustryExample example);", "HashSet<String> displayEmployee();", "private ObjectListDataProvider getObjectListDataProvider() {\n return this.getLdpGrupoFamiliar();\n }", "private void selectIndicatorSubgroups() {\n CardLayout cl = (CardLayout)(m_jCategories.getLayout());\n cl.show(m_jCategories, \"rootcategories\");\n }", "private Vector getGroupItems() {\n return protocol.getGroupItems();\n }", "public void getGroups() {\n String listOfCode = prefs.getString(\"listOfCode\");\n if (!listOfCode.isEmpty()) {\n for (String groupPair : listOfCode.split(\",\"))\n if (!groupPair.isEmpty()) {\n final String nickname = groupPair.substring(0, groupPair.indexOf('|'));\n String code = groupPair.substring(groupPair.indexOf('|') + 1);\n ServerAPI.groupInformation(code, new RequestHandler<Group>() {\n @Override\n public void callback(Group result) {\n if (result == null) {\n return;\n }\n savedGroups.add(new Pair<String, Group>(nickname, result));\n populateListView();\n }\n });\n }\n }\n }", "public io.dstore.values.BooleanValueOrBuilder getGroupByCategoryOrBuilder() {\n return getGroupByCategory();\n }", "@Test\n public void groupByStoreSucceed()\n {\n // arrange\n final String groupByClause = \"validGroupBy\";\n // act\n QuerySpecificationBuilder querySpecificationBuilder = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS).groupBy(groupByClause);\n\n // assert\n assertEquals(groupByClause, Deencapsulation.getField(querySpecificationBuilder, \"groupBy\"));\n }", "List<FormSubmit> selectListByFilter( ResponseFilter filter, Plugin plugin );", "private void loadGroups(){\n ArrayAdapter<String> groupAdaptor = new ArrayAdapter<>(getApplicationContext(),\n android.R.layout.simple_spinner_item, groupsCurrent);\n // Drop down layout style - list view with radio button\n groupAdaptor.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinnerGroups.setAdapter(groupAdaptor);\n }", "public List<Group> selectByGroupByParamMap(Map paramMap) {\n\t\treturn groupMapper.selectByGroupByParamMap(paramMap);\n\t}", "public synchronized StringBuffer SearchAndPrintManager(String OptionSet_Name)\t{\n\t\treturn (opset.get(Search_List(OptionSet_Name)).DisplayOptionSet());\n\t}", "public Set getGroups() { return this.groups; }", "String getLayerButtonGroupOption();", "public void aggregate() {\n\t\tIAggregate selectedAggregation = this.gui.getSelectedAggregation();\n\t\tthis.output(selectedAggregation.aggregate(satelliteList));\n\t}", "Relations getGroupOfRelations();", "public List<String> getGroupNamesList() {\n q = em.createQuery(\"SELECT g.groupName FROM Groups g\");\n setGroupNamesList(q.getResultList());\n return groupNamesList;\n }", "private static List<Element> getXMLGroups(Model model) {\n Set<Group> groups = new TreeSet<>(Comparators.objectsById());\n groups.addAll(model.getGroups(null));\n List<Element> result = new ArrayList<>(groups.size());\n for (Group curGroup : groups) {\n Element groupElement = new Element(\"group\");\n groupElement.setAttribute(\"id\", String.valueOf(curGroup.getId()));\n groupElement.setAttribute(\"name\", curGroup.getName());\n for (TCSObjectReference<?> curRef : curGroup.getMembers()) {\n Element memberElement = new Element(\"member\");\n memberElement.setAttribute(\"name\", curRef.getName());\n groupElement.addContent(memberElement);\n }\n for (Map.Entry<String, String> curEntry\n : curGroup.getProperties().entrySet()) {\n Element propertyElement = new Element(\"property\");\n propertyElement.setAttribute(\"name\", curEntry.getKey());\n propertyElement.setAttribute(\"value\", curEntry.getValue());\n groupElement.addContent(propertyElement);\n }\n result.add(groupElement);\n }\n return result;\n }", "public String getGruposToString(){\n\t\tif(null == grupos){\n\t\t\treturn \"\";\n\t\t}else{\n\t\t\tStringBuilder grupos = new StringBuilder();\n\t\t\tfor (int i = 0; i < this.grupos.size(); i++) {\n\t\t\t\tif(i == (this.grupos.size()-1)){\n\t\t\t\t\tgrupos.append(this.grupos.get(i).getNombreGrupo());\n\t\t\t\t}else{\n\t\t\t\t\tgrupos.append(this.grupos.get(i).getNombreGrupo()).append(\", \");\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn grupos.toString();\n\t\t}\n\t}", "private List<GroupType> extractGroupTypesFromResult(ResultSet resultSet) throws Exception {\n\t\tList<GroupType> result = new ArrayList<GroupType>();\n\t\tlookupService.init();\n\t\n\t\t// process the groups\n\t\t//\n\t\t\n\t\t// extract the main data about the organization\n\t\twhile (resultSet.next()) {\n\t\t\tGroupType groupType = new GroupType();\n\t\t\t\n\t\t\tString groupTypeKey = resultSet.getString(\"group_key\");\n\t\t\tString groupTypeName = resultSet.getString(\"group_type\");\n String groupTypeColor = resultSet.getString(\"group_type_color\");\n long groupTypeId= resultSet.getLong(\"group_type_id\");\n int groupTypeOrderIndex = resultSet.getInt(\"group_type_order_index\");\n String allowedDocTypeIds = resultSet.getString(\"allowed_doc_types\");\n List<DocumentType> allowedDocTypes = new ArrayList<DocumentType>();\n \n // populate the Group entity\n //\n \n // populate group type\n groupType.setId(groupTypeId);\n groupType.setName(groupTypeName);\n groupType.setValue(groupTypeKey);\n groupType.setHexColorCode(groupTypeColor);\n groupType.setOrderIndex(groupTypeOrderIndex);\n \n // populate the allowed doc types for this user\n //\n if(allowedDocTypeIds != null && !allowedDocTypeIds.isEmpty()){\n \tString[] ids = allowedDocTypeIds.split(\",\");\n \tList<DocumentType> allDocTypes = lookupService.getAllDocumentTypes();\n \tfor(int i=0; i< ids.length; i++){\n \t\tlong docTypeId = Long.parseLong(ids[i]);\n \t\tfor(int j=0; j< allDocTypes.size(); j++){\n\t \t\tif(allDocTypes.get(j).getId() == docTypeId){\n\t \t\t\tallowedDocTypes.add(allDocTypes.get(j));\n\t \t\t}\n \t\t}\n \t}\n }\n \n groupType.setAllowedDocTypes(allowedDocTypes);\n \n // add the user to the list\n result.add(groupType);\n }\n\t\treturn result;\n\t}", "private void listCategory() {\r\n \r\n cmbCategoryFilter.removeAllItems();\r\n cmbCategory.removeAllItems();\r\n \r\n cmbCategoryFilter.addItem(\"All\");\r\n for (Category cat : Category.listCategory()) {\r\n cmbCategoryFilter.addItem(cat.getName());\r\n cmbCategory.addItem(cat.getName());\r\n }\r\n \r\n }" ]
[ "0.60907876", "0.5765664", "0.57582635", "0.5719858", "0.56653684", "0.5646971", "0.5603907", "0.55545425", "0.5430156", "0.5397269", "0.53917277", "0.5361282", "0.533112", "0.52881587", "0.5279317", "0.52765834", "0.5263541", "0.5261441", "0.5253861", "0.52532935", "0.5226453", "0.52089787", "0.5206597", "0.5198153", "0.5192759", "0.5181371", "0.51348907", "0.5123132", "0.51190466", "0.5117536", "0.51098055", "0.51004654", "0.50891644", "0.5076935", "0.50731885", "0.50730115", "0.5070863", "0.50579005", "0.50496274", "0.50478023", "0.50418025", "0.5037283", "0.5024561", "0.49917036", "0.49901304", "0.49898988", "0.49737182", "0.49724773", "0.49718502", "0.49691492", "0.4967212", "0.49664092", "0.49642843", "0.4958497", "0.49548817", "0.4950715", "0.49495754", "0.49451554", "0.49419513", "0.49346805", "0.49338493", "0.49280322", "0.4926229", "0.49234498", "0.492223", "0.4913727", "0.49115625", "0.49023274", "0.48985288", "0.48942977", "0.4887525", "0.48855636", "0.48701474", "0.48683703", "0.48659617", "0.48640785", "0.48616678", "0.4856184", "0.48546106", "0.48496848", "0.48468247", "0.48465374", "0.4844525", "0.48424277", "0.48421612", "0.48392776", "0.4837158", "0.48351172", "0.4834387", "0.4832294", "0.483142", "0.48243788", "0.4818907", "0.48160118", "0.47991073", "0.47974005", "0.47933897", "0.4791047", "0.47881666", "0.47867328" ]
0.6263296
0
Filter the results using the option "week"
@Test(priority=6) public void filterReturnsDetails() { String expectedTitle="No. Returns"; String actualTitle=filterReturnsList.filterListbyGroup(); assertEquals(actualTitle, expectedTitle); ScreenShot ss=new ScreenShot(driver); ss.captureScreenShot("TC025"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setWeek(String week) {\r\n this.week = week;\r\n }", "public List<Week> getAllWeeks() { return weekService.getAllWeeks(); }", "boolean getWeek1();", "private List<WeeklyRecord> getWeekly(int year, Month month, String type) throws SQLException {\n\t\tLocalDate from = LocalDate.of(year, month, 1);\n\t\tLocalDate to = LocalDate.of(year, month, month.length(from.isLeapYear()));\n\t\ttry (PreparedStatement statement = conn.prepareStatement(\n\t\t\t\t\"SELECT \\n\" + \n\t\t\t\t\"(CASE WHEN day(Date) < 8 THEN '1' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(DATE) < 15 then '2' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(Date) < 22 then '3' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(Date) < 29 then '4' \\n\" + \n\t\t\t\t\" ELSE '5'\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\"END) as Week, SUM(Amount) From transaction\\n\" + \n\t\t\t\t\"WHERE DATE between ? and ?\\n\" + \n\t\t\t\t\"and type = ?\\n\" + \n\t\t\t\t\"group by Week\")) {\n\t\t\tstatement.setDate(1, Date.valueOf(from));\n\t\t\tstatement.setDate(2, Date.valueOf(to));\n\t\t\tstatement.setString(3, type);\n\t\t\ttry (ResultSet resultSet = statement.executeQuery()) {\n\t\t\t\tArrayList<WeeklyRecord> list = new ArrayList<>();\n\t\t\t\twhile (resultSet.next()) {\t\t\t\n\t\t\t\t\tlist.add(new WeeklyRecord(resultSet.getDouble(2),resultSet.getInt(1)));\t\t\t\n\t\t\t\t}\n\t\t\t\treturn list;\n\t\t\t}\n\t\t}\n\t}", "boolean getWeek3();", "boolean getWeek6();", "boolean getWeek7();", "boolean hasWeek1();", "public void refreshWeek() {\n\t\tthis.showWeek(this.currentMonday);\n\t}", "private void getActivatedWeekdays() {\n }", "boolean getWeek2();", "boolean hasWeek3();", "boolean hasWeek6();", "public TimePickerBuilder setWeekNumbersVisible(Duration step) {\n\t\treturn configure(timePicker -> timePicker.setStep(step));\n\t}", "boolean getWeek5();", "int getWeek();", "public ArrayList<Event> getCalendarEventsByWeek()\n {\n ArrayList<Event> weekListOfEvents = new ArrayList<>();\n\n for(int i = 0; i < events.size(); i++)\n {\n if( (events.get(i).getCalendar().get(Calendar.YEAR) == currentCalendar.get(Calendar.YEAR)) &&\n (events.get(i).getCalendar().get(Calendar.MONTH) == currentCalendar.get(Calendar.MONTH)) &&\n (events.get(i).getCalendar().get(Calendar.WEEK_OF_MONTH) == currentCalendar.get(Calendar.WEEK_OF_MONTH)))\n {\n weekListOfEvents.add(events.get(i));\n }\n }\n return weekListOfEvents;\n }", "boolean hasWeek7();", "boolean hasWeek2();", "public String getWeek() {\r\n return week;\r\n }", "boolean hasWeek5();", "@RequestMapping(value = \"/week/all\", \n\t\t\tmethod = RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<Week>> getAllWeek() {\n\n\t\tResponseEntity<List<Week>> returnEntity;\n\n\t\ttry {\n\t\t\tList<Week> result = businessDelegate.getAllWeeks();\n\n\t\t\tif (result == null) {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\treturnEntity = new ResponseEntity<List<Week>>(HttpStatus.BAD_REQUEST);\n\t\t}\n\t\treturn returnEntity;\n\t}", "public void setWeeklyView(){\n\t\tthis.weeklyView=true;\n\t\tnotifyDataSetChanged();\n\t\tnotifyDataSetInvalidated();\n\t}", "public Builder clearWeek7() {\n bitField0_ = (bitField0_ & ~0x00000040);\n week7_ = false;\n onChanged();\n return this;\n }", "public static void viewWeekSchedule() {\n\t\tWeek w = new Week();\n\t\t\n\t\tprintWeekTitles();\n\t\tint weekID = Utility.askInt(\"\\nSelect week to view: \");\n\t\tw = aweek.get(weekID);\n\t\t\n\t\tviewWeek(w);\n\t\t\n\t}", "public void AllWeekLessonReport(int weeks)\r\n {\r\n for (int i = 0; i < weeks; i++)\r\n {\r\n for (int j = 0; j < daysPerWeek; j++)\r\n {\r\n for (int k = 0; k < totalSlots; k++)\r\n {\r\n LessonClass l = weekArray[(i)].dayArray[j].dayMap.get(roomNtime[k]);\r\n \r\n // if lesson exists, and isnt a parent appointment\r\n if (l != null && l.subject != subjects.PARENT)\r\n {\r\n System.out.println(\"\\n| WEEK: \" + (i+1) + \" | \" + \"DAY: \" + days[j] \r\n + \" | \" + \"TIME: \" + l.time + \"pm | \" + l.room + \" |\");\r\n System.out.println(l.toReport());\r\n }\r\n }\r\n }\r\n }\r\n }", "public void AllWeekAppointmentReport(int weeks)\r\n {\r\n for (int i = 0; i < weeks; i++)\r\n {\r\n for (int j = 0; j < daysPerWeek; j++)\r\n {\r\n for (int k = 0; k < totalSlots; k++)\r\n {\r\n LessonClass a = weekArray[(i)].dayArray[j].dayMap.get(roomNtime[k]);\r\n \r\n // if appointment exists and is parent appointment\r\n if (a != null && a.subject == subjects.PARENT)\r\n {\r\n System.out.println(\"\\n| WEEK: \" + (i+1) + \" | \" + \"DAY: \" + days[j] \r\n + \" | \" + \"TIME: \" + a.time + \"pm | \" + a.room + \" |\");\r\n System.out.println(a.toReport());\r\n System.out.println(\"Visitor offspring ID: \");\r\n \r\n // track if anybody has booked this slot\r\n boolean visitor = false;\r\n \r\n // for each entry in register\r\n for (String s : a.register)\r\n {\r\n if (s != null)\r\n {\r\n System.out.print(s + \"\\n\");\r\n visitor = true;\r\n }\r\n }\r\n // feedback for nobody booked this slot\r\n if (visitor == false)\r\n {\r\n System.out.println(\"No visits booked\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "public Cursor getWeekStatistics(int attribute, int step, String user)\r\n {\n String selectQuery = \"SELECT strftime('%W.%Y',date('now','\" + step * (-7) + \" days')) week , stat_count cnt FROM \" + TABLE_STATS + \" WHERE \" + COLUMN_ATTRIBUTE + \" = \" + attribute + \" AND \" + COLUMN_DATE + \" = trim(strftime('%W.%Y',date('now','\" + step * (-7) + \" days'))) AND \" + COLUMN_USER + \" = '\" + user + \"'\";\r\n SQLiteDatabase db = this.getReadableDatabase();\r\n Cursor cursor = db.rawQuery(selectQuery, null);\r\n return cursor;\r\n }", "boolean getWeek4();", "public Cursor getWeekStatistics(int[] attribute, int step, String user)\r\n {\n String selectQuery = \"SELECT strftime('%W.%Y',date('now','\" + step * (-7) + \" days')) week , stat_count cnt FROM \" + TABLE_STATS + \" WHERE \" + COLUMN_ATTRIBUTE + \" IN \" + Arrays.toString(attribute).replace('[','(').replace(']',')') + \" AND \" + COLUMN_DATE + \" = trim(strftime('%W.%Y',date('now','\" + step * (-7) + \" days'))) AND \" + COLUMN_USER + \" = '\" + user + \"'\";\r\n SQLiteDatabase db = this.getReadableDatabase();\r\n Cursor cursor = db.rawQuery(selectQuery, null);\r\n return cursor;\r\n }", "public Builder clearWeek6() {\n bitField0_ = (bitField0_ & ~0x00000020);\n week6_ = false;\n onChanged();\n return this;\n }", "private List<Object[]> executeWeekQuery(String week, String year) {\n try {\n //Clear all tables\n //################# Declared Harness Data #################### \n Helper.startSession();\n\n String query_str_1 = \"(SELECT \"\n + year + \" as year, \" + week + \" as week, 'Matin' as SHIFT, segment, workplace, harness_part, harness_index, supplier_part_number, harness_type, SUM(qty_read) as total_qty \"\n + \"FROM base_container bc \"\n + \"WHERE EXTRACT(HOUR FROM bc.closed_time) in (6,7,8,9,10,11,12,13) \"\n + \"AND EXTRACT(WEEK FROM bc.closed_time) = \" + week\n + \"AND EXTRACT(YEAR FROM bc.closed_time) = \" + year\n + \"GROUP BY segment, workplace, harness_part, harness_index, supplier_part_number, harness_type)\";\n\n String query_str_2 = \"(SELECT \"\n + year + \" as year, \" + week + \" as week, 'Soir' as SHIFT, segment, workplace, harness_part, harness_index, supplier_part_number, harness_type, SUM(qty_read) as total_qty \"\n + \"FROM base_container bc \"\n + \"WHERE EXTRACT(HOUR FROM bc.closed_time) in (14,15,16,17,18,19,20,21) \"\n + \"AND EXTRACT(WEEK FROM bc.closed_time) = \" + week\n + \"AND EXTRACT(YEAR FROM bc.closed_time) = \" + year\n + \"GROUP BY segment, workplace, harness_part, harness_index, supplier_part_number, harness_type)\";\n\n String query_str_3 = \"(SELECT \"\n + year + \" as year, \" + week + \" as week, 'Nuit' as SHIFT, segment, workplace, harness_part, harness_index, supplier_part_number, harness_type, SUM(qty_read) as total_qty \"\n + \"FROM base_container bc \"\n + \"WHERE EXTRACT(HOUR FROM bc.closed_time) in (22,23,0,1,2,3,4,5) \"\n + \"AND EXTRACT(WEEK FROM bc.closed_time) = \" + week\n + \"AND EXTRACT(YEAR FROM bc.closed_time) = \" + year\n + \"GROUP BY segment, workplace, harness_part, harness_index, supplier_part_number, harness_type)\";\n\n String query_str = \"SELECT * FROM (\"\n + query_str_1 + \" UNION \"\n + query_str_2 + \" UNION \"\n + query_str_3\n + \") results ORDER BY shift, segment, workplace;\";\n\n SQLQuery query = Helper.sess.createSQLQuery(query_str);\n\n this.dataResultList = query.list();\n\n Helper.sess.getTransaction().commit();\n\n return this.dataResultList;\n\n } catch (HibernateException e) {\n if (Helper.sess.getTransaction() != null) {\n Helper.sess.getTransaction().rollback();\n }\n }\n\n return this.dataResultList;\n }", "public Builder clearWeek1() {\n bitField0_ = (bitField0_ & ~0x00000001);\n week1_ = false;\n onChanged();\n return this;\n }", "@Override\r\n public String toString() {\r\n return this.weekName;\r\n }", "public Builder byWeekNo(Collection<Integer> weekNumbers) {\n\t\t\tbyWeekNo.addAll(weekNumbers);\n\t\t\treturn this;\n\t\t}", "boolean hasWeek4();", "com.czht.face.recognition.Czhtdev.Week getWeekday();", "public List<String> getTopSearchKeyWeekly(int number) {\n\t\tString hql = \"select e.keyWords from SearchLog e where e.date > :oneWeekBefore group by e.keyWords order by count(e.id) desc\";\n\n\t\tSession session = getSession();\n\t\tList<String> list = new ArrayList<>();\n\t\ttry {\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.add(Calendar.DATE, -7); // 得到一周前的时间\n\t\t\tDate date = calendar.getTime();\n\t\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t// System.out.println(df.format(date));\n\n\t\t\tQuery query = session.createQuery(hql);\n\t\t\tquery.setMaxResults(number);\n\t\t\tquery.setDate(\"oneWeekBefore\", date);\n\n\t\t\tlist = query.list();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "public static final Function<Date,Date> setWeek(final int value) {\r\n return new Set(Calendar.WEEK_OF_YEAR, value);\r\n }", "public Builder byWeekNo(Integer... weekNumbers) {\n\t\t\treturn byWeekNo(Arrays.asList(weekNumbers));\n\t\t}", "public Builder setWeek7(boolean value) {\n bitField0_ |= 0x00000040;\n week7_ = value;\n onChanged();\n return this;\n }", "public void startWeek()\n\t{\n\t\tsynchronized (date_db_lock) {\t\t\t\n\t\t\tsynchronized (write_student_db_lock) {\n\t\t\t\tclearAllDatabases();\n\t\t\t}\n\t\t}\n\t}", "private void filterResults(String medium) {\r\n\t\tnew HomePageAdverteerder(driver).openExchangePage()\r\n\t\t\t.selectFilterOptions(Filter.MEDIUM, new String[] {medium})\r\n\t\t\t.selectFilterOptions(Filter.FORMAAT_CODE, new String[] {FULL_PAGE})\r\n\t\t\t.applyFilters();\r\n\t}", "public Builder clearWeek2() {\n bitField0_ = (bitField0_ & ~0x00000002);\n week2_ = false;\n onChanged();\n return this;\n }", "@Override\r\n\tpublic List<ITransactionHistoryDto> viewWeekTransaction(String accountNumber) {\r\n\t\tlog.info(\"inside week transaction\");\r\n\t\tLocalDateTime fromDate = LocalDateTime.now().minusWeeks(1L);\r\n\t\tLocalDateTime toDate = LocalDateTime.now();\r\n\r\n\t\tAccount account = accountRepository.findByAccountNumber(accountNumber);\r\n\t\tif (account == null) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.ACCOUNT_NUMBER_NOT_FOUND);\r\n\t\t}\r\n\t\tif (transactionRepository.findAllByAccountAndTransactionDateBetween(account, fromDate, toDate).isEmpty()) {\r\n\t\t\tthrow new CommonException(ExceptionConstants.WEEK_HISTORY_NOT_FOUND);\r\n\t\t}\r\n\t\treturn transactionRepository.findAllByAccountAndTransactionDateBetween(account, fromDate, toDate);\r\n\r\n\t}", "public Builder clearWeek3() {\n bitField0_ = (bitField0_ & ~0x00000004);\n week3_ = false;\n onChanged();\n return this;\n }", "public Builder setWeek1(boolean value) {\n bitField0_ |= 0x00000001;\n week1_ = value;\n onChanged();\n return this;\n }", "public referential.store.v2.WeekPattern.Builder clearMondayTimeRanges() {\n mondayTimeRanges = null;\n fieldSetFlags()[3] = false;\n return this;\n }", "public List<DatabaseStore> getVarValuesForWeek(String variable,\n\t\t\tInteger month, Integer day, Integer year, Integer week_day) {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tString day_str = QUES_KEY_VAR + \"='\" + variable + \"' AND ( (\"\n\t\t\t\t+ QUES_KEY_DAY + \"=\" + day + \" AND \" + QUES_KEY_MONTH + \"=\"\n\t\t\t\t+ month + \" AND \" + QUES_KEY_YEAR + \"=\" + year + \")\";\n\n\t\tSimpleDateFormat year_fmt = new SimpleDateFormat(\"yyyy\", Locale.US);\n\t\tSimpleDateFormat month_fmt = new SimpleDateFormat(\"MM\", Locale.US);\n\t\tSimpleDateFormat day_fmt = new SimpleDateFormat(\"dd\", Locale.US);\n\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tInteger diff = null;\n\t\t\tGregorianCalendar cal = new GregorianCalendar(year, month - 1, day);\n\t\t\tif (week_day < i) {\n\t\t\t\tdiff = i - week_day;\n\t\t\t\tcal.add(Calendar.DAY_OF_YEAR, diff);\n\t\t\t\tDate date = cal.getTime();\n\t\t\t\tint y = Integer.parseInt(year_fmt.format(date));\n\t\t\t\tint m = Integer.parseInt(month_fmt.format(date));\n\t\t\t\tint d = Integer.parseInt(day_fmt.format(date));\n\t\t\t\tday_str = day_str + \" OR (\" + QUES_KEY_DAY + \"=\" + d + \" AND \"\n\t\t\t\t\t\t+ QUES_KEY_MONTH + \"=\" + m + \" AND \" + QUES_KEY_YEAR\n\t\t\t\t\t\t+ \"=\" + y + \")\";\n\t\t\t} else if (week_day > i) {\n\t\t\t\tdiff = week_day - i;\n\t\t\t\tcal.add(Calendar.DAY_OF_YEAR, -1 * diff);\n\t\t\t\tDate date = cal.getTime();\n\t\t\t\tint y = Integer.parseInt(year_fmt.format(date));\n\t\t\t\tint m = Integer.parseInt(month_fmt.format(date));\n\t\t\t\tint d = Integer.parseInt(day_fmt.format(date));\n\t\t\t\tday_str = day_str + \" OR (\" + QUES_KEY_DAY + \"=\" + d + \" AND \"\n\t\t\t\t\t\t+ QUES_KEY_MONTH + \"=\" + m + \" AND \" + QUES_KEY_YEAR\n\t\t\t\t\t\t+ \"=\" + y + \")\";\n\t\t\t}\n\t\t}\n\t\tday_str += \")\";\n\t\tString query = \"SELECT * FROM \" + TABLE_QUES + \" WHERE \" + day_str;\n\t\tCursor cursor = db.rawQuery(query, null);\n\t\tif (cursor.getCount() == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn handleCursor(cursor);\n\t\t}\n\t}", "public Builder setWeek6(boolean value) {\n bitField0_ |= 0x00000020;\n week6_ = value;\n onChanged();\n return this;\n }", "public void clearWeeklyView(){\n\t\tthis.weeklyView=false;\n\t\tnotifyDataSetChanged();\n\t\tnotifyDataSetInvalidated();\n\t}", "public boolean getRunOnWeekends();", "public void setName(String n) {\r\n this.weekName = n;\r\n }", "@Test\n public void week_firstMondayOfMarchInFirstWeek_true() {\n assertTrue(firstWeek.includes(firstMondayOfMarch));\n }", "public boolean isSkipWeek() {\n return skipWeekCont > 1;\n }", "@Override\n\tpublic QueryResult<Map<String, Object>> findWatersGroupingByYear(Integer pageNum, Integer pageSize, Long userId, Integer option) {\n\t\tList<TCsqUserPaymentRecord> records = getWaters(pageNum, pageSize, userId, option);\n\t\tlong total = IdUtil.getTotal();\n\n\t\tList<Map<String, Object>> mapList = getMapList(records);\n\n\t\tQueryResult<Map<String, Object>> queryResult = new QueryResult<>();\n\t\tqueryResult.setResultList(mapList);\n\t\tqueryResult.setTotalCount(total);\n\t\treturn queryResult;\n\t}", "public List<Integer> getByWeekNo() {\n\t\treturn byWeekNo;\n\t}", "public ArrayList<Event> remainingEventsForTheWeek() {\n\t\tArrayList<Event> result = new ArrayList();\n\n\t\tLocalDateTime now = this.now.get();\n\t\tLocalDate today = now.toLocalDate();\n\t\tLocalTime moment = now.toLocalTime();\n\t\tboolean after = false;\n\n\t\tdo {\n\t\t\tTreeSet<Event> todayEvents = this.events.get(today);\n\t\t\tif (todayEvents != null) {\n\t\t\t\t// Events are sorted\n\t\t\t\tfor (Event e: todayEvents) {\n\t\t\t\t\tif (after) {\n\t\t\t\t\t\tresult.add(e);\n\t\t\t\t\t} else if (e.startTime.compareTo(moment) >= 0) {\n\t\t\t\t\t\tresult.add(e);\n\t\t\t\t\t\tafter = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\tafter = true;\n\t\ttoday = today.plusDays(1);\n\t\t// Week ends on Sunday.\n\t\t} while (today.getDayOfWeek() != DayOfWeek.MONDAY);\n\n\t\treturn result;\n\t}", "public WeekPattern() {}", "private void getWeekCalorieData(String accessToken, boolean getGoal) {\r\n ArrayList<String> taskParamsList = new ArrayList<>();\r\n taskParamsList.add(accessToken);\r\n\r\n Calendar startDate = getFirstMondayInWeek(endDate);\r\n\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(getString(R.string.fitbit_date_format));\r\n String formattedStartDate = dateFormat.format(startDate.getTime());\r\n String formattedEndDate = dateFormat.format(endDate.getTime());\r\n\r\n taskParamsList.add(\"https://api.fitbit.com/1/user/-/activities/calories/date/\" +\r\n formattedStartDate + \"/\" + formattedEndDate + \".json\");\r\n\r\n if(getGoal) {\r\n taskParamsList.add(\"https://api.fitbit.com/1/user/-/activities/date/\" +\r\n formattedEndDate + \".json\");\r\n }\r\n\r\n String[] taskParams = new String[taskParamsList.size()];\r\n taskParams = taskParamsList.toArray(taskParams);\r\n\r\n updateRequestCount(taskParams.length - 1);\r\n\r\n new FitbitGetRequestTask(this).execute(taskParams);\r\n }", "DayOfWeek getUserVoteSalaryWeeklyDayOfWeek();", "public static TemporalQuery<Integer> dayOfWeek(){\n return (d) -> d.get(ChronoField.DAY_OF_WEEK);\n }", "boolean hasWeekday();", "@RequestMapping(\"/playerweeksstats\")\n public PlayerWeeksStats playerWeeksStats(@RequestParam(value=\"weeks\", defaultValue=\"1-17\") String weeks,\n @RequestParam(value=\"playerId\", defaultValue=\"0\") String playerId) \n {\n String _weeks[] = weeks.split(\"-\");\n\n PlayerWeeksStats pws = new PlayerWeeksStats();\n Map<String, PlayerWeeksStats.WeekStats> ws_map = new HashMap <String, PlayerWeeksStats.WeekStats>();\n\n PlayerStatObject pso = null;\n for (int i = 0; i < _weeks.length; i++)\n {\n pso = PlayersStats.GetPlayerStatsForSeasonWeek(playerId, \"2017\", _weeks[i]);\n ws_map.put(_weeks[i], CreateWeekStatsFromPlayerStatObject(pso));\n }\n \n if (pso != null)\n {\n pws.setId(pso.getId());\n pws.setGsisPlayerId(pso.getGsIsPlayerId());\n pws.setEsbid(pso.getEsbid());\n pws.setName(pso.getName());\n pws.setWeekStats(ws_map);\n }\n \n return pws;\n }", "public Builder setWeek3(boolean value) {\n bitField0_ |= 0x00000004;\n week3_ = value;\n onChanged();\n return this;\n }", "public Weeks(BigDecimal numUnits) { super(numUnits); }", "private RepeatWeekdays() {}", "public void createWeeklyList(){\n\t\tArrayList<T> days=new ArrayList<T>();\n\t\tArrayList<ArrayList<T>> weeks=new ArrayList<ArrayList<T>> ();\n\t\tList<ArrayList<ArrayList<T>>> years=new ArrayList<ArrayList<ArrayList<T>>> ();\n\t\tif(models.size()!=0) days.add(models.get(models.size()-1));\n\t\telse return;\n\t\tfor(int i=modelNames.size()-2;i>=0;i--){\n\t\t\t//check the new entry\n\t\t\tCalendar pre=DateManager.getCalendar(DateManager.convert2DisplayDate(modelNames.get(i+1)));\n\t\t\tCalendar cur=DateManager.getCalendar(DateManager.convert2DisplayDate(modelNames.get(i)));\n\t\t\tif (pre.get(Calendar.YEAR)==cur.get(Calendar.YEAR)){\n\t\t\t\tif(pre.get(Calendar.WEEK_OF_YEAR)==cur.get(Calendar.WEEK_OF_YEAR)){\n\t\t\t\t\tdays.add(models.get(i));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tweeks.add(days);\n\t\t\t\t\tdays=new ArrayList<T>();\n\t\t\t\t\tdays.add(models.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tweeks.add(days);\n\t\t\t\tyears.add(weeks);\n\t\t\t\tdays=new ArrayList<T>();\n\t\t\t\tdays.add(models.get(i));\n\t\t\t\tweeks=new ArrayList<ArrayList<T>> ();\n\t\t\t}\n\t\t}\n\t\tweeks.add(days);\n\t\tyears.add(weeks);\n\t\tweeklyModels=years;\n\n\t}", "private void projectWeekAnxiety() {\n increaseStat(Stat.ANXIETY, 10);\n }", "private void dayOfWeek(HplsqlParser.Expr_func_paramsContext ctx) {\n Integer v = getPartOfDate(ctx, Calendar.DAY_OF_WEEK);\n if (v != null) {\n evalInt(v);\n }\n else {\n evalNull();\n }\n }", "public static void listWeekends() {\n Set<DayOfWeek> weekEnds = EnumSet.of(DayOfWeek.SATURDAY, DayOfWeek.SUNDAY);\n\n LocalDate currentDate = LocalDate.now();\n int year = currentDate.getYear();\n Month month = currentDate.getMonth();\n int currentDay = currentDate.getDayOfMonth();\n int daysOfMth = currentDate.lengthOfMonth();\n\n IntStream.rangeClosed(currentDay, daysOfMth)\n .mapToObj(day -> LocalDate.of(year, month, day))\n .filter(date -> weekEnds.contains(date.getDayOfWeek()))\n .forEach(JustBook::weekendListings);\n }", "public static void filter() {\n\t\t\n\t\tResult.filter(toggleGroup.getSelectedToggle().getUserData(), ((ComboBox)hbox3.getChildren().get(0)).getValue());\n\t\t\n\t}", "@Override\n\tpublic List<WeeklyData> getWeeklyData(int user_id) {\n\t\treturn mobileDao.getWeeklyData(user_id);\n\t}", "public List<?> weWater_chart2(String search_type_year,String search_type_mw);", "private void refreshWeeklyStats() {\n TextView weekView = findViewById(R.id.weekView);\n weekView.setText(WeeklyStatistics.getWeek());\n\n String userId = Login.getUserId();\n DocumentReference cycleReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.CYCLING);\n DocumentReference runReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.RUNNING);\n DocumentReference walkReference = WeeklyStatistics.getSportWeeklyStat(userId, Sport.WALKING);\n\n setCycleStats(cycleReference);\n setRunStats(runReference);\n setWalkStats(walkReference);\n }", "public Builder setWeek2(boolean value) {\n bitField0_ |= 0x00000002;\n week2_ = value;\n onChanged();\n return this;\n }", "@FXML\r\n void onActionWeek(ActionEvent event) {\r\n\r\n appointmentListType();\r\n\r\n }", "public Builder clearWeek5() {\n bitField0_ = (bitField0_ & ~0x00000010);\n week5_ = false;\n onChanged();\n return this;\n }", "public boolean getWeek7() {\n return week7_;\n }", "@Override\r\n\tpublic int selectMessageWeek() {\n\t\treturn messageMapper.selectMessageWeek();\r\n\t}", "public referential.store.v2.WeekPattern.Builder clearWednesdayTimeRanges() {\n wednesdayTimeRanges = null;\n fieldSetFlags()[5] = false;\n return this;\n }", "public void drawEventsForWeek(){\n WeekController.getController().drawEvents(PersonInfo.getPersonInfo().getEventsForWeek(weekNumber));\n }", "private void flushWeek() {\n\t\tComponent[] days = this.weekPanel.getComponents();\n\t\tComponent[] blocks;\n\t\tint i;\n\t\tfor (Component day : days) {\n\t\t\tblocks = ((Container) day).getComponents();\n\t\t\ti = 1;\n\t\t\tfor (Component unit : blocks) {\n\t\t\t\t((JTimeBlock) unit).flush();\n\t\t\t\tif (((JTimeBlock) unit).getComponentCount() != 0) {\n\t\t\t\t\t((JTimeBlock) unit).removeAll();\n\t\t\t\t}\n\t\t\t\tif (i % BLOCKS_IN_HOUR == 0) {\n\t\t\t\t\t((JTimeBlock) unit).setBorder(BorderFactory\n\t\t\t\t\t\t\t.createMatteBorder(0, 1, 1, 1, Color.LIGHT_GRAY));\n\t\t\t\t} else {\n\t\t\t\t\t((JTimeBlock) unit).setBorder(BorderFactory\n\t\t\t\t\t\t\t.createMatteBorder(0, 1, 0, 1, Color.LIGHT_GRAY));\n\t\t\t\t}\n\t\t\t\ti++;\n\n\t\t\t}\n\t\t}\n\t}", "public static ObservableList<Appointment> getAppoinmentsForWeek(int id) {\n ObservableList<Appointment> appointments = FXCollections.observableArrayList();\n Appointment appointment;\n LocalDate beginWeek = LocalDate.now();\n LocalDate endWeek = LocalDate.now().plusWeeks(1);\n try (Connection conn =DriverManager.getConnection(DB_URL, user, pass);\n Statement statement = conn.createStatement()) {\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM appointment WHERE customerId = '\" + id + \"' AND \" + \n \"start >= '\" + beginWeek + \"' AND start <= '\" + endWeek + \"'\");\n \n while(resultSet.next()) {\n appointment = new Appointment(resultSet.getInt(\"appointmentId\"),resultSet.getInt(\"customerId\"), resultSet.getString(\"title\"),\n resultSet.getString(\"description\"), resultSet.getString(\"location\"),resultSet.getString(\"contact\"),resultSet.getString(\"url\"), \n resultSet.getTimestamp(\"start\"), resultSet.getTimestamp(\"end\"), resultSet.getDate(\"start\"), \n resultSet.getDate(\"end\"),resultSet.getString(\"createdby\"));\n appointments.add(appointment);\n }\n \n statement.close();\n return appointments;\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getMessage());\n return null;\n }\n }", "public void setShowWeekend(boolean b) {\n weekend = b;\n }", "public Builder workweekStarts(DayOfWeek day) {\n\t\t\tworkweekStarts = day;\n\t\t\treturn this;\n\t\t}", "public boolean getWeek1() {\n return week1_;\n }", "public List<String> getWeekSchedule() {\n\t\tList<String> schedule = new ArrayList<String>();\n\t\tfor (DelegatedWork dw: this.delegatedWork) {\n\t\t\tActivity currentActivity = dw.getActivity();\n\t\t\tint totalRegHours = 0;\n\t\t\tfor (RegisteredWork rw: this.registeredWork) {\n\t\t\t\tif (rw.getActivity().equals(currentActivity)) {\n\t\t\t\t\ttotalRegHours += rw.getHalfHoursWorked();\n\t\t\t\t}\n\t\t\t}\n\t\t\ttotalRegHours /= 2;\n\t\t\tschedule.add(currentActivity.getName() + \": \" + totalRegHours + \"/\" + dw.getHalfHoursWorked()/2);\n\t\t}\n\t\treturn schedule;\n\t}", "public static String getWeekCommandFormat(String selectedWeek) {\n String week;\n if ((selectedWeek.toLowerCase().startsWith(DukeConstants.WEEK_FORMAT_KEYWORD_RECESS)\n || selectedWeek.toLowerCase().startsWith(DukeConstants.WEEK_FORMAT_KEYWORD_READING)\n || selectedWeek.toLowerCase().startsWith(DukeConstants.WEEK_FORMAT_KEYWORD_EXAM))\n && selectedWeek.contains(DukeConstants.WEEK_FORMAT_KEYWORD)) {\n selectedWeek = selectedWeek.replace(DukeConstants.WEEK_FORMAT_KEYWORD, DukeConstants.NO_FIELD);\n selectedWeek = selectedWeek.trim();\n week = DukeConstants.SHOW_WEEK_HEADER\n + DukeConstants.BLANK_SPACE\n + selectedWeek.toLowerCase();\n } else {\n week = DukeConstants.SHOW_WEEK_HEADER + selectedWeek.replaceFirst(DukeConstants.WEEK_FORMAT_KEYWORD,\n DukeConstants.NO_FIELD);\n }\n return week;\n }", "public boolean getWeek7() {\n return week7_;\n }", "private Builder() {\n super(referential.store.v2.WeekPattern.SCHEMA$);\n }", "public void getUsersByWeek() throws IOException, SystemException {\n List<UserSubscribeDTO> usersList = planReminderService\n .getUsersByWeeks();\n LOGGER.info(\"userLIst Recievec:\" + usersList);\n shootReminderMails(usersList);\n }", "public boolean getWeek1() {\n return week1_;\n }", "@RequestMapping(value = \"/week/weeknumber/{weeknumber}\", \n\t\t\tmethod = RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<Week>> getWeekByWeekNumber(@PathVariable(\"weeknumber\") int weeknumber) {\n\t\tResponseEntity<List<Week>> returnEntity;\n\n\t\ttry {\n\t\t\tList<Week> result = businessDelegate.getWeekByWeekNumber(weeknumber);\n\n\t\t\tif (result == null) {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\treturnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\treturnEntity = new ResponseEntity<List<Week>>(HttpStatus.BAD_REQUEST);\n\t\t}\n\t\treturn returnEntity;\n\t}", "public static referential.store.v2.WeekPattern.Builder newBuilder() {\n return new referential.store.v2.WeekPattern.Builder();\n }", "public boolean getWeek6() {\n return week6_;\n }", "public static String getWeek(String fullCommand) {\n String week = fullCommand.replaceFirst(DukeConstants.SHOW_WEEK_HEADER, DukeConstants.NO_FIELD);\n week = week.trim();\n if ((week.equals(DukeConstants.WEEK_FORMAT_KEYWORD_RECESS)\n || week.equals(DukeConstants.WEEK_FORMAT_KEYWORD_READING)\n || week.equals(DukeConstants.WEEK_FORMAT_KEYWORD_EXAM))) {\n week = capitalizeWord(week);\n week = week + DukeConstants.BLANK_SPACE + DukeConstants.WEEK_FORMAT_KEYWORD;\n } else {\n week = DukeConstants.WEEK_FORMAT_KEYWORD + DukeConstants.BLANK_SPACE + week;\n }\n return week;\n }", "public referential.store.v2.WeekPattern.Builder clearThursdayTimeRanges() {\n thursdayTimeRanges = null;\n fieldSetFlags()[6] = false;\n return this;\n }", "private static Map<Integer,List<LocalDateTime>> workingHoursForFacilityPerWeek(Facility facility, LocalDateTime now) {\n Map<Integer,List<LocalDateTime>> workingHoursForWeek=new HashMap<>();\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(Constants.WORKING_HOURS_FORMAT);\n LocalTime startTime = LocalTime.parse(facility.getWorkingHours().split(Constants.HOUR_SEPARATOR)[0], formatter);\n LocalTime endTime = LocalTime.parse(facility.getWorkingHours().split(Constants.HOUR_SEPARATOR)[1], formatter);\n int emptySpot= facility.getEmptySpot();\n IntStream.range(0,Constants.WEEK_COUNT).forEach(weekIndex -> {\n now.plusWeeks(1);\n workingHoursForWeek.put(weekIndex, TimeUtil.getWorkingHoursForWeek(startTime, endTime, now).subList(0,emptySpot));\n\n });\n return workingHoursForWeek;\n\n }", "public DateTimeFormatterBuilder appendWeekOfWeekyear(int minDigits) {\r\n return appendDecimal(DateTimeFieldType.weekOfWeekyear(), minDigits, 2);\r\n }", "public static List<Date> getAllDatesInWeek(Date dateInWeek) {\n\t\tList<Date> allWeek = new ArrayList<Date>(7);\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.MONDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.TUESDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.WEDNESDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.THURSDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.FRIDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.SATURDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.SUNDAY));\n\t\treturn allWeek;\n\t}" ]
[ "0.6213057", "0.603004", "0.6024156", "0.59838873", "0.5959821", "0.5898831", "0.58774203", "0.58618915", "0.5821921", "0.58011365", "0.5773385", "0.57475364", "0.5734358", "0.5730257", "0.57281995", "0.56487155", "0.56372696", "0.56298953", "0.55851525", "0.5577134", "0.55741316", "0.55623347", "0.5561413", "0.55575585", "0.55418646", "0.5462603", "0.5459476", "0.54469687", "0.5446122", "0.54448193", "0.54422295", "0.54387885", "0.542041", "0.54139704", "0.5378478", "0.53333735", "0.53038454", "0.52954715", "0.5290351", "0.5289404", "0.52868927", "0.528669", "0.5278283", "0.527535", "0.52678955", "0.52326024", "0.52309775", "0.5228201", "0.522394", "0.52085966", "0.5190432", "0.51550555", "0.51443195", "0.5136395", "0.5132588", "0.5123651", "0.51145315", "0.5092786", "0.50772345", "0.5073644", "0.5069774", "0.50630105", "0.5061832", "0.50474995", "0.50467676", "0.50398296", "0.5037196", "0.5036711", "0.5035238", "0.5031999", "0.5024976", "0.50198793", "0.5014045", "0.5013285", "0.50088465", "0.5007897", "0.49813", "0.4978775", "0.49729714", "0.49719068", "0.49649173", "0.4956804", "0.49514356", "0.4948066", "0.49442294", "0.49400216", "0.493343", "0.49309367", "0.4924312", "0.49149346", "0.4903215", "0.4884934", "0.48836842", "0.48832604", "0.48805422", "0.48715293", "0.48604912", "0.48261666", "0.48207062", "0.48187083", "0.48158056" ]
0.0
-1
This interface promises to keeps track of changes to the board during the game. It facilitates checking if a specific states have been encountered before as well as giving a way to represent all actions taken in a game
public interface I_GameHistory extends PropertyChangeListener { /** * Checks if the current state has been encountered before * @return true if the current game state is equal to an earlier encountered state */ default boolean isRepeatState() { return isRepeatState(FULL_EQUAL); } default boolean isRepeatState(I_GameState state) { return isRepeatState(FULL_EQUAL, state); } /** * Checks if the current state has been encountered before using a list of predicates to compare states with * @param predicate a predicate testing some relation between two states. * @return true if the current game state is equal to an earlier encountered state */ boolean isRepeatState(final BiPredicate<I_GameState, I_GameState> predicate); boolean isRepeatState(final BiPredicate<I_GameState, I_GameState> predicate, I_GameState state); /** * Checks if the current state has been encountered before. * All states that returns true given the predicate being aplied to it as well as the current state are * being returned as a collection. * @return true if the current game state is equal to an earlier encountered state */ default Collection<I_GameState> getRepeatStates() { return getRepeatStates(FULL_EQUAL); } default Collection<I_GameState> getRepeatStates(I_GameState state) { return getRepeatStates(FULL_EQUAL, state); } /** * Checks if the current state has been encountered before using a list of predicate to compare states with. * All states that returns true given the predicate being applied to it as well as the current state are * being returned as a collection. * @param predicate a predicate testing some relation between two states. * @return true if the current game state is equal to an earlier encountered state */ Collection<I_GameState> getRepeatStates(final BiPredicate<I_GameState, I_GameState> predicate); Collection<I_GameState> getRepeatStates(final BiPredicate<I_GameState, I_GameState> predicate, I_GameState state); /** * This predicate returns true only if the two states are actually both referencing the same object. */ BiPredicate<I_GameState, I_GameState> IDENTITY_EQUAL = I_GameHistory::identityEqual; /** * This predicate returns true if the sizes of the lists in the first state are all * equal to the length of the corresponding list in the second state. */ BiPredicate<I_GameState, I_GameState> PILE_SIZE_EQUAL = I_GameHistory::sizeEqual; /** * This predicate returns true only if the content of each list in one state matches exactly the content * of the corresponding lists in the other state. Objects.equals() is used to check equality of the contents. */ BiPredicate<I_GameState, I_GameState> PILE_CONTENT_EQUAL = I_GameHistory::contentEqual; /** * This predicate tests all of the other standard predicates in this interface. * They are tried in a prioritized manor with the least expensive first. * It returns as soon as it can be sure of the result. */ BiPredicate<I_GameState, I_GameState> FULL_EQUAL = IDENTITY_EQUAL.or(PILE_SIZE_EQUAL.and(PILE_CONTENT_EQUAL)); /** * Returns true only if the two states are actually both referencing the same object. * * @param state1 a state to compare * @param state2 the state to compare it to * @return true if the contents of one state all equals the contents of the other state */ private static boolean identityEqual(final I_GameState state1, final I_GameState state2) { if (state1 == state2) return true; return Stream.of(new SimpleEntry<>(state1, state2)) .flatMap( // transform the elements by making a new stream with the transformation to be used pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs // make new pair of the elements of that pile from each state .map(pileID -> new SimpleEntry<>( pair.getKey().get(pileID), pair.getValue().get(pileID) ) ) ) .allMatch(pair -> pair.getKey() == pair.getValue()); } /** * Returns true if the sizes of the lists in the first state are all * equal to the length of the corresponding list in the second state. * * @param state1 a state to compare * @param state2 the state to compare it to * @return true if the contents of one state all equals the contents of the other state */ private static boolean sizeEqual(final I_GameState state1, final I_GameState state2) { //if a state is null there surely must be a mistake somewhere if (state1 == null || state2 == null) throw new NullPointerException("A state cannot be null when comparing"); // make a stream with a data structure containing both states return Stream.of(new SimpleEntry<>(state1, state2)) .flatMap( // transform the elements by making a new stream with the transformation to be used pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs // make new pair of the elements of that pile from each state .map(pileID -> new SimpleEntry<>( pair.getKey().get(pileID), pair.getValue().get(pileID) ) ) ) .map(I_GameHistory::replaceNulls) .allMatch(pair -> pair.getKey().size() == pair.getValue().size()); // check they have equal sizes } /** * Returns true only if the content of each list in one state matches exactly the content * of the corresponding lists in the other state. Objects.equals() is used to check equality of the contents. * * @param state1 a state to compare * @param state2 the state to compare it to * @return true if the contents of one state all equals the contents of the other state */ private static boolean contentEqual(final I_GameState state1, final I_GameState state2) { //if a state is null there surely must be a mistake somewhere if (state1 == null || state2 == null) throw new NullPointerException("A state cannot be null when comparing"); //if ( !sizeEqual(state1, state2) ) return false; return Stream.of(new SimpleImmutableEntry<>(state1, state2)) .flatMap( //map the pair of states to many pairs of piles statePair -> Arrays.stream(E_PileID.values()) .map(pileID -> new SimpleEntry<>( statePair.getKey().get(pileID), statePair.getValue().get(pileID) ) ) ) .map(I_GameHistory::replaceNulls) .flatMap( // map the pairs of piles to many pairs of Optional<I_card>s. listPair -> IntStream //make sure to always traverse the longer list .range(0, Math.max(listPair.getKey().size(), listPair.getValue().size())) .mapToObj(i -> new SimpleEntry<>( getIfExists(listPair.getKey(), i), getIfExists(listPair.getValue(), i)) ) ) // map pairs to booleans by checking that the element in a pair are equal .map(cardPair -> Objects.equals(cardPair.getKey(), cardPair.getValue())) // reduce the many values to one bool by saying all must be true or the statement is false .reduce(true, (e1, e2) -> e1 && e2); } static SimpleEntry<List<I_CardModel>, List<I_CardModel>> replaceNulls(SimpleEntry<List<I_CardModel>, List<I_CardModel>> entry) { var key = entry.getKey(); var value = entry.getValue(); if (key == null) key = List.of(); if (value == null) value = List.of(); return new SimpleEntry<>(key, value); } default <t extends I_GameState> Predicate<t> partiallyApplyPredicate(BiPredicate<t, t> biPred, t arg) { return test -> biPred.test(arg, test); } /** * A convenient to get an optional card from a list that might throw index out of bounds * @param list the list to take an element from * @param index the index of the element * @return empty if element is null or dosen't exist, otherwise the element at index wrapped in {@link Optional} */ private static Optional<I_CardModel> getIfExists(List<I_CardModel> list, int index) { try { return Optional.ofNullable(list.get(index)); } catch (IndexOutOfBoundsException e) { return Optional.empty(); } } //todo might be a good idea to implement a method that checks for the moves that has been tried when in a given state }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void takeTurn(int[][] boardState)\n {\n \n }", "public interface PuzzleState {\r\n\t/**\r\n\t * The puzzle allows for four moves whose names are fixed with an enum type\r\n\t * Operation. Note that MOVERIGHT means that a tile moves to the right and the\r\n\t * slot to its right need to be empty for this to be possible.\r\n\t */\r\n\tpublic enum Operation {\r\n\t\tMOVERIGHT, MOVELEFT, MOVEUP, MOVEDOWN\r\n\t};\r\n\r\n\t/**\r\n\t * Sets or resets PuzzleState object to the initial (final) state of a game with\r\n\t * the given dimension and number of empty slots. The initial state is the same\r\n\t * as the final state. All tiles are ordered from top-left to bottom-right,\r\n\t * empty slots are at the bottom-right. Parent and operation are set to null.\r\n\t * \r\n\t * @param dimension\r\n\t * is the number of tiles per row (or column)\r\n\t * @param numberOfEmptySlots\r\n\t * is a number between 1 and 3\r\n\t */\r\n\tpublic void setToInitialState(int dimension, int numberOfEmptySlots);\r\n\r\n\t/**\r\n\t * Get the value of the tile at the given row and column position. An empty slot\r\n\t * is represented as 0. The row, column index starts at 0. The top-left position\r\n\t * is (0,0).\r\n\t * \r\n\t * @param row\r\n\t * is the row index, range 0,1,..., dimension-1\r\n\t * @param column\r\n\t * is the column index, range 0,1,..., dimension-1\r\n\t * @return value for the tile at the given position, range 0,1,...,dimension^2-1\r\n\t */\r\n\tpublic int getValue(int row, int column);\r\n\r\n\t/**\r\n\t * Get the parent state which is the state from which the current state was\r\n\t * reached. The parent state is useful if one wants to represent that a puzzle\r\n\t * state A moves to puzzle state B with a particular move operation. For this\r\n\t * example B.getParent() returns A. Obtaining A is useful to navigate back on a\r\n\t * path from a current state to a initial state where all tiles are sorted. The\r\n\t * initial state does not have a parent.\r\n\t * \r\n\t * @return a previously stored parent state or null if the state is the initial\r\n\t * state.\r\n\t */\r\n\tpublic PuzzleState getParent();\r\n\r\n\t/**\r\n\t * Retrieves the operation by which this state is reached. The operation is set\r\n\t * when applying move or drag operations. The initial state has no operation.\r\n\t * \r\n\t * @return previously stored Operation or null if there is none.\r\n\t */\r\n\tpublic Operation getOperation();\r\n\r\n\t/**\r\n\t * Get length of the path from initial state to the current state. A path is a\r\n\t * sequence of states that result from a series of move operations that are\r\n\t * sequentially applied to the initial state to get to the current state. The\r\n\t * initial state has a path length of 0, states that are reached with one move\r\n\t * have path length of one and so forth. A drag operation is a GUI short cut and\r\n\t * is internally represented with an equivalent sequence of move operations.\r\n\t * Note that any move operation increases the path length even if the player\r\n\t * gets closer to the solution. So the path length is not the distance between\r\n\t * initial state and current state but the number of puzzle states that are\r\n\t * linked together in a sequence with the getParent() function.\r\n\t * \r\n\t * @return the number of move operations from initial state to this state, the\r\n\t * returned value is greater or equal 0\r\n\t */\r\n\tpublic int getPathLength();\r\n\r\n\t/**\r\n\t * Checks if it is possible to move a tile from the given position in the given\r\n\t * direction. If it is, the method returns a new instance of PuzzleState where\r\n\t * the parent state is set to this object, i.e. the current state before the\r\n\t * move, the operation is set to op and the state is set to the state that\r\n\t * results from the move operation. The operation also sets length of the path\r\n\t * from the initial state to the new state. Note that this length only increases\r\n\t * with move operations regardless of the distance to the initial state. If the\r\n\t * move is not possible, the method returns null.\r\n\t * \r\n\t * @param row\r\n\t * is an index in the range 0,1,..., dimension-1\r\n\t * @param column\r\n\t * is an index in the range 0,1,..., dimension-1\r\n\t * @param op\r\n\t * gives an operation such as move left or move up.\r\n\t * @return new PuzzleState for legal move. For illegal move operation it returns\r\n\t * null.\r\n\t */\r\n\tpublic PuzzleState move(int row, int column, Operation op);\r\n\r\n\t/**\r\n\t * A drag is a short cut for a possible series of move operations. In the GUI,\r\n\t * it results from a drag operations across multiple empty slots. Check if it is\r\n\t * possible to move a tile from the start position to the end position. If start\r\n\t * and end are not adjacent, there must be empty positions in between to make a\r\n\t * sequence of moves possible from start to end. If this is possible, the method\r\n\t * returns a new instance of PuzzleState where the state is set to the state\r\n\t * that results from the sequence of move operations. A number of intermediate\r\n\t * PuzzleStates is created as needed to represent the sequence of move\r\n\t * operations such that one can work backwards from the resulting state towards\r\n\t * the starting state with the getParent() operation. If the move is not\r\n\t * possible, the method returns null. Starting position has coordinates\r\n\t * (startRow,startColumn). Ending position has coordinates (endRow,endColumn).\r\n\t * \r\n\t * @param startRow\r\n\t * is an index in the range 0,1,..., dimension-1\r\n\t * @param startColumn\r\n\t * is an index in the range 0,1,..., dimension-1\r\n\t * @param endRow\r\n\t * is an index in the range 0,1,..., dimension-1\r\n\t * @param endColumn\r\n\t * is an index in the range 0,1,..., dimension-1\r\n\t * @return new PuzzleState for legal sequence of moves, otherwise null.\r\n\t */\r\n\tpublic PuzzleState drag(int startRow, int startColumn, int endRow, int endColumn);\r\n\r\n\t/**\r\n\t * Creates a random path from this state to the newly generated returned state\r\n\t * that has the given length. The states are connected with a number of\r\n\t * intermediate PuzzleStates to represent the path such that one can reverse\r\n\t * from the resulting state backwards to the initial state in a step-by-step\r\n\t * manner with the help of the getParent() method. For state on the sequence,\r\n\t * the getPathLength() method gives the number of steps away from the initial\r\n\t * state. A path that contains cycles should be avoided as this is boring for\r\n\t * the game. The path is generated with the help of a random number generator to\r\n\t * make it irregular and non-deterministic.\r\n\t * \r\n\t * @param pathLength\r\n\t * is a value greater or equal 0, denotes the number of steps from\r\n\t * this state to the returned state\r\n\t * @return state that is reachable with the given number of moves\r\n\t */\r\n\tpublic PuzzleState shuffleBoard(int pathLength);\r\n\r\n\t/**\r\n\t * Tells if the current state has an empty slot at the given position with\r\n\t * coordinates (row, column).\r\n\t * \r\n\t * @param row\r\n\t * is an index in the range 0,1,..., dimension-1\r\n\t * @param column\r\n\t * is an index in the range 0,1,..., dimension-1\r\n\t * @return true if this is an empty slot, false otherwise\r\n\t */\r\n\tpublic boolean isEmpty(int row, int column);\r\n\r\n\t/**\r\n\t * Provides a puzzle state with same settings of tiles as the current state but\r\n\t * where the sequence of parent states is not representing the history how the\r\n\t * game got to the current state but the shortest possible sequence to the\r\n\t * solution (initial) state. The returned puzzle state can be operated just as\r\n\t * any puzzle state and its getParent() method leads to the initial state.\r\n\t * \r\n\t * @return new state object that can substitute the current state and has\r\n\t * shortest possible path to solution (initial) state.\r\n\t */\r\n\tpublic PuzzleState getStateWithShortestPath();\r\n}", "protected abstract int newState();", "public interface IState {\n\n /**\n * Click on button to load a new map from file.\n */\n void btnLoadMap();\n\n /**\n * Click on button to load a new planning from file.\n */\n void btnLoadPlanning();\n\n /**\n * Click on button to compute the best route to make deliveries.\n */\n void btnGenerateRoute();\n\n /**\n * Click on button to cancel a loading action.\n */\n void btnCancel();\n\n /**\n * Click on button to load file.\n *\n * @param file File to load as a map or a planning depending on the state.\n */\n void btnValidateFile(File file);\n\n /**\n * Left click pressed on a delivery.\n */\n void leftClickPressedOnDelivery();\n\n /**\n * Left click released on another delivery.\n *\n * @param sourceDelivery Delivery to switch with target delivery.\n * @param targetDelivery Delivery to switch with sourceDelivery.\n */\n void leftClickReleased(Delivery sourceDelivery, Delivery targetDelivery);\n\n /**\n * Simple click on a delivery.\n *\n * @param delivery The delivery clicked.\n */\n void clickOnDelivery(Delivery delivery);\n\n /**\n * Simple click somewhere else (not a interactive point).\n */\n void clickSomewhereElse();\n\n /**\n * Click on an empty node (not a delivery or warehouse node).\n *\n * @param node The empty node clicked.\n */\n void clickOnEmptyNode(Node node);\n\n /**\n * Click on button to add a new delivery.\n *\n * @param node The node to deliver.\n * @param previousDeliveryNode The node with the previous delivery.\n * @param timeSlot The time slot of the new delivery.\n */\n void btnAddDelivery(Node node, Node previousDeliveryNode, TimeSlot timeSlot);\n\n /**\n * Click on button to remove a delivery.\n *\n * @param delivery The delivery to remove.\n */\n void btnRemoveDelivery(Delivery delivery);\n\n /**\n * Click on a specific node : the warehouse.\n *\n * @param warehouse The warehouse node clicked.\n */\n void clickOnWarehouse(Node warehouse);\n\n /**\n * Click on button to close the current map already loaded.\n */\n void btnCloseMap();\n\n /**\n * Click on button to clear the current planning already loaded.\n */\n void btnClearPlanning();\n\n /**\n * Set the default view for this state (enable/disable buttons ...).\n */\n void initView();\n}", "public static HashSet<gameState> Actions(gameState currentState) {\n\t\t\n\t\tHashSet<gameState> possibleStates = new HashSet<gameState>();\n\t\t\n\t\t\n\t\t// Store which player goes next after this player plays\n\t\tint nextNextUp;\n\t\tif (currentState.getNextUp() == 0) {\n\t\t\tnextNextUp = 1;\n\t\t} else {\n\t\t\tnextNextUp = 0;\n\t\t}\n\t\t\n\t\t// Store corresponding characters for each player\n\t\t// DARK(X) - 0, LIGHT(O) - 1\n\t\tchar myTile;\n\t\tchar opponentTile;\n\t\tif (currentState.getNextUp() == 0) {\n\t\t\tmyTile = 'x';\n\t\t\topponentTile = 'o';\n\t\t} else {\n\t\t\tmyTile = 'o';\n\t\t\topponentTile = 'x';\n\t\t}\n\n\t\t\n\n\t\t// Check the entire board of the state \n\t\tfor (int i = 0; i<boardSize; i++) {\n\t\t\tfor (int j = 0; j<boardSize; j++) {\n\t\t\t\t\n\t\t\t\t// If the tile is my tile\n\t\t\t\tif (currentState.getBoard()[i][j] == '_') {\n\t\t\t\t\t\n\t\t\t\t\tchar[][] moveBoard = createNewBoard(currentState);\n\t\t\t\t\t\n\t\t\t\t\t// Up\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// If it is an opponent tile, then you keep going up until you either my tile (fail) or\n\t\t\t\t\t\t// a blank space (success/move possible)\n\t\t\t\t\t\tif (currentState.getBoard()[i-1][j] == opponentTile) { \n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tfor (int k = i-2; k >= 0; k--) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][j] == myTile) {\n\t\t\t\t\t\t\t\t\tfor (int l = k+1; l<=i;l++) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[l][j] = myTile;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][j] == opponentTile) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Down\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i+1][j] == opponentTile) { \n\t\t\t\t\t\t\t\n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tfor (int k = i+2; k < boardSize; k++) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][j] == myTile) {\n\t\t\t\t\t\t\t\t\tfor (int l = k-1; l>=i;l--) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[l][j] = myTile;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][j] == opponentTile) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Left\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i][j-1] == opponentTile) { \n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tfor (int k = j-2; k >= 0; k--) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[i][k] == myTile) {\n\t\t\t\t\t\t\t\t\tfor (int l = k+1; l<=j;l++) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[i][l] = myTile;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[i][k] == opponentTile) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Right\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i][j+1] == opponentTile) { \n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tfor (int k = j+2; k < boardSize; k++) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[i][k] == myTile) {\n\t\t\t\t\t\t\t\t\tfor (int l = k-1; l>=j;l--) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[i][l] = myTile;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[i][k] == opponentTile) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Up and Left\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i-1][j-1] == opponentTile) { \n\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tint l = j-2;\n\t\t\t\t\t\t\tfor (int k = i-2; k >= 0; k--) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][l] == myTile) {\n\t\t\t\t\t\t\t\t\tint p = l+1;\n\t\t\t\t\t\t\t\t\tfor (int q = k+1; q<=i;q++) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[q][p] = myTile;\n\t\t\t\t\t\t\t\t\t\tp++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][l] == opponentTile) {\n\t\t\t\t\t\t\t\t\tl--;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Up and Right\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i-1][j+1] == opponentTile) { \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tint l = j+2;\n\t\t\t\t\t\t\tfor (int k = i-2; k >= 0; k--) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][l] == myTile) {\n\t\t\t\t\t\t\t\t\tint p = l-1;\n\t\t\t\t\t\t\t\t\tfor (int q = k+1; q<=i;q++) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[q][p] = myTile;\n\t\t\t\t\t\t\t\t\t\tp--;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][l] == opponentTile) {\n\t\t\t\t\t\t\t\t\tl++;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\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} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Down and Left\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i+1][j-1] == opponentTile) { \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tint l = j-2;\n\t\t\t\t\t\t\tfor (int k = i+2; k < boardSize; k++) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][l] == myTile) {\n\t\t\t\t\t\t\t\t\tint p = l+1;\n\t\t\t\t\t\t\t\t\tfor (int q = k-1; q>=i;q--) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[q][p] = myTile;\n\t\t\t\t\t\t\t\t\t\tp++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][l] == opponentTile) {\n\t\t\t\t\t\t\t\t\tl--;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\t// Down and Right\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (currentState.getBoard()[i+1][j+1] == opponentTile) { \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Keep going up until the top is hit\n\t\t\t\t\t\t\tint l = j+2;\n\t\t\t\t\t\t\tfor (int k = i+2; k < boardSize; k++) {\n\t\t\t\t\t\t\t\tif (currentState.getBoard()[k][l] == myTile) {\n\t\t\t\t\t\t\t\t\tint p = l-1;\n\t\t\t\t\t\t\t\t\tfor (int q = k-1; q>=i;q--) {\n\t\t\t\t\t\t\t\t\t\tmoveBoard[q][p] = myTile;\n\t\t\t\t\t\t\t\t\t\tp--;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (currentState.getBoard()[k][l] == opponentTile) {\n\t\t\t\t\t\t\t\t\tl++;\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t\t\n\t\t\t\t\tif (!compareBoards(moveBoard, currentState.getBoard())) {\n\t\t\t\t\t\tgameState move = new gameState(moveBoard, nextNextUp);\t\t\n\t\t\t\t\t\tpossibleStates.add(move);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\n\t\treturn possibleStates;\n\t\t\n\t\t\n\t\t\n\t}", "public interface Board\n{\n /** Value for an invalid move */\n int INVALID_MOVE = -1;\n\n /**\n * Returns the height of this Board.\n *\n * @return the height of this Board\n */\n int getHeight();\n\n /**\n * Returns the width of this Board.\n *\n * @return the width of this Board\n */\n int getWidth();\n\n /**\n * Returns the win condition of this Board.\n *\n * @return the win condition of this Board\n */\n int getWinCondition();\n\n /**\n * Returns the winner based on the current state of the board. Assumes that\n * the board is in a valid state and that there is only one player who has\n * n-in-a-row.\n *\n * @return the winner\n */\n Piece getWinner();\n\n /**\n * Returns the piece in the specified column and row.\n *\n * @param col the column\n * @param row the row\n * @return the Piece at the specified position\n */\n Piece getPieceAt(int col, int row);\n\n /**\n * Returns the current turn. Turns start at 0.\n *\n * @return the current turn\n */\n int getCurrentTurn();\n\n /**\n * Returns the next piece to be played. Turns alternate between Black and\n * Red, starting with Black on the first turn.\n *\n * @return the next piece to be played\n */\n Piece getNextPiece();\n\n /**\n * Plays the next piece in the specified column. Columns start from 0 on the\n * far left and end with (width - 1) on the far right. The next piece is\n * determined by the current turn. The piece will be placed in the lowest\n * empty row in the specified column.\n *\n * @param col the column to play the next piece\n * @throws IllegalMoveException if the column is not a valid column or if\n * the column is full\n */\n void play(int col) throws IllegalMoveException;\n\n /**\n * Undoes the last play on this Board.\n *\n * @throws IllegalStateException if the board is empty (i.e. no plays have\n * been made)\n */\n void undoPlay();\n\n /**\n * Checks if playing a piece in the specified column is valid. A move is\n * valid if the column is greater than or equal to 0 (far left column) and\n * less than the width of this Board (far right column) and the column is\n * not full. This method assumes that the board is in a valid state and only\n * checks if the top row of the column is empty.\n *\n * @param col the column to play the next piece\n * @return true if the move is valid, false otherwise.\n */\n boolean isValidMove(int col);\n\n /**\n * Adds a BoardListener to this Board.\n *\n * @param boardListener the BoardListener being added\n */\n void addBoardListener(BoardListener boardListener);\n\n /**\n * Returns an immutable view of this board.\n *\n * @return an immutable view of this board\n */\n ImmutableBoard getImmutableView();\n}", "public interface AbstractState {\r\n abstract void toNextState(ChessBoard chessBoard,AbstractState state);\r\n}", "public interface GameState {\r\n void init(boolean[][] cells);\r\n\r\n void tick();\r\n\r\n Collection<ICell> getCells();\r\n\r\n boolean isLifeExtinct();\r\n}", "public int gameState() {\n \tboolean check = isCheck(turn);\n \t\n \t//change this code to be some sort of checkmate detection\n \tif(check) {\n \t\t//we need to check whether there is a legal move that puts the king out of check\n \t\t//we need to loop through all pieces of the same color as the turn and make all legal moves\n \t\t//then after each move, check whether the king is still in check\n \t\t\n \t\t//first generate a list of all pieces for the turn color\n \t\tArrayList<Piece> pieces = getPieces(turn);\n \t\t\n \t\tboolean freedom;\n \t\t\n \t\t//now for each piece, check whether moving that piece can get the king out of check\n \t\tfor(int i = 0; i < pieces.size(); i++) {\n \t\t\tfreedom = simulate(pieces.get(i));\n \t\t\tif(freedom) {\n \t \t\tupdateCheckMove(false);\n \t \t\tSystem.out.println(\"Check on \" + turn + \" King!\");\n \t\t\t\treturn 2; //if the king can move, then the game isn't over yet\n \t\t\t}\n \t\t}\n \t\t\n \t\t//the game is over if we reach this far, so we can assume checkmate\n \t\t//resignation logic will probably be specific to Display class\n \t\t\n \t\tupdateCheckMove(true);\n \t\t\n \t\tif(turn == PieceColor.White) return -1; //black win if white king in check and can't move\n \t\tif(turn == PieceColor.Black) return 1;\n \t}\n \t\n \t//if all of these fail, the game isn't over yet\n \treturn 2;\n }", "void notifyBoardChanged(List<Pit> changedPits);", "public interface IState \n{\n\t/**\n\t * Gets the state\n\t * \n\t * @pre none\n\t * @post returns the state as defined in the shared definitions\n\t */\n\tpublic shared.definitions.TurnStatus getState();\n\t\n\t/**\n\t * Advances to the next state in the turn \n\t * \n\t * @pre the player is finished with all required actions in this state\n\t * @post the state is advanced to the next state\n\t * \n\t */\n\tpublic void finishPhase(TurnTracker turn_tracker_pointer, int player_index);\n\t\n\t/**\n\t * Forces this player into the Discarding State\n\t * @throws Exception \n\t * \n\t * @pre the player is in the Waiting or Rolling State\n\t * @post the player is in the Discarding state\n\t */\n\tpublic void forceDiscard(TurnTracker turn_tracker_pointer, int player_index) throws Exception;\n}", "public interface StateMachineListener\n{\n //================| Public Methods |====================================\n \n /**\n * Notification that the state of the game has changed.\n\n * @param oldState \n * @param newState\n */\n void stateChanged( final GameState oldState, final GameState newState );\n}", "public void draftEvent(){\n gameState = GameState.DRAFT;\n currentMessage = \"\" + currentPlayer.getNumTroops();\n currentTerritoriesOfInterest = currentPlayer.getTerritoriesList();\n notifyObservers();\n }", "public void gameOfLife(int[][] board) {\n int m = board.length;\n int n = ( m > 0 ? board[0].length : 0);\n int[] dx = {-1, -1, -1, 0, 1, 1, 1, 0};\n int[] dy = {-1, 0, 1, 1, 1, 0, -1, -1};\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n int cnt = 0;\n /**\n * Count the neighbors with live status.\n */\n for (int k = 0; k < 8; k++) {\n int x = i + dx[k];\n int y = j + dy[k];\n /**\n * Notice using board[x][y] here, not board[i][j]\n * The next state is created by applying the above rules simultaneously to every cell in the current state,\n * so we concern state==1 and state==2(both states indicate live)\n */\n if (x >= 0 && x < m && y >= 0 && y < n && (board[x][y] == 1 || board[x][y] == 2)) {\n cnt++;\n }\n }\n if (board[i][j] == 1 && (cnt < 2 || cnt > 3)) {\n /**\n * From live to dead.\n */\n board[i][j] = 2;\n }\n if (board[i][j] == 0 && cnt == 3) {\n /**\n * From dead to live\n */\n board[i][j] = 3;\n }\n }\n }\n /**\n * Restore state back to 0 and 1.\n */\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n board[i][j] %= 2;\n }\n }\n }", "public void checkPlay(int[][] boardState)\n {\n if(ai)\n {\n takeTurn(boardState);\n }\n }", "public static void stateCheckerboardConvertionTest() {\n\t\tVTicTacToe tempEnvironment = new VTicTacToe();\n\t\tint[] tempTestStates = { 0, 13, 39, 26, 17087 };\n\n\t\tint tempState;\n\t\tint[][] tempCheckerboard;\n\t\tfor (int i = 0; i < tempTestStates.length; i++) {\n\t\t\ttempCheckerboard = tempEnvironment.stateToCheckerboard(tempTestStates[i]);\n\t\t\tSystem.out.println(\"The checkerboard of \" + tempTestStates[i] + \" is: \"\n\t\t\t\t\t+ Arrays.deepToString(tempCheckerboard));\n\t\t\ttempState = tempEnvironment.checkerboardToState(tempCheckerboard);\n\t\t\tSystem.out.println(\"The state ID is \" + tempState);\n\t\t} // Of for i\n\n\t}", "public void getState();", "public void setState(PlayerState newPlayerState) {\n\n this.playerState = newPlayerState;\n\n closeWindows();\n\n\n switch (newPlayerState) {\n\n case CHOOSE_BONUS_TILE:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(false);\n\n setEndTurn(false);\n\n setUseLeader(false);\n\n\n break;\n\n\n case THROWDICES:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(true);\n\n setSkipAction(false);\n\n setEndTurn(false);\n\n setUseLeader(false);\n\n try {\n throwDices();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n break;\n\n\n\n case DOACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(true);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n try {\n yourTurn();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n\n break;\n\n case BONUSACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n try {\n bonusAction();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n break;\n\n\n case CHOOSEACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(true);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n break;\n\n\n case CHOOSEWORKERS:\n case ACTIVATE_PAY_TO_OBTAIN_CARDS:\n case CHOOSE_EFFECT:\n case CHOOSECOST:\n case CHOOSE_COUNCIL_PRIVILEGE:\n case PRAY:\n case WAITING:\n\n noButtonsAble();\n\n setLeaderButtons(false);\n\n setUseLeader(false);\n\n break;\n\n case ENDTURN:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(false);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n break;\n\n case LEADER:\n\n noButtonsAble();\n\n setUseLeader(true);\n break;\n\n\n case SUSPENDED:\n\n noButtonsAble();\n\n setLeaderButtons(false);\n\n setUseLeader(false);\n\n suspendedPane.setVisible(true);\n\n break;\n\n\n }\n\n }", "public interface GameState {\n\n\t/**\n * Method used by a player in order to perform transfer of stones \n * @param pitId the identifier of the pit by which the player will start (the associated pit must belong to him) This is the only method that can change the state \n * @return map {@link Map Map.class} with (pitId,#stones) as entries\n */\n\tpublic Map<Integer, Integer> move(final int pitId);\n\t\n\t/**\n\t * @return the {@link GameStateEnum GameStateEnum.class} that corresponds to {@link GameState GameState.class} concretions\n\t */\n\tpublic GameStateEnum getStateEnum();\n}", "@Test\n public void testRcState() {\n int changeCnt[] = {0};\n DeviceState state[] = {null};\n mRC.getState(deviceState -> {\n changeCnt[0]++;\n state[0] = deviceState;\n });\n\n DeviceStateCore stateCore = mRcCore.getDeviceStateCore();\n\n // check initial state\n assertThat(changeCnt[0], is(1));\n assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.DISCONNECTED),\n causeIs(DeviceState.ConnectionStateCause.NONE), canBeForgotten(false), canBeDisconnected(false),\n canBeConnected(false),\n hasNoConnectors(), hasNoActiveConnector()));\n\n Set<DeviceConnectorCore> connectors = new HashSet<>();\n // add a connector. canBeConnected should switch to true\n connectors.add(DeviceConnectorCore.LOCAL_WIFI);\n stateCore.updateConnectors(connectors).notifyUpdated();\n assertThat(changeCnt[0], is(2));\n assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.DISCONNECTED),\n causeIs(DeviceState.ConnectionStateCause.NONE), canBeForgotten(false), canBeDisconnected(false),\n canBeConnected(true),\n hasConnectors(DeviceConnectorCore.LOCAL_WIFI), hasNoActiveConnector()));\n\n // add another connector\n connectors.add(DeviceConnectorCore.LOCAL_USB);\n stateCore.updateConnectors(connectors).notifyUpdated();\n assertThat(changeCnt[0], is(3));\n assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.DISCONNECTED),\n causeIs(DeviceState.ConnectionStateCause.NONE), canBeForgotten(false), canBeDisconnected(false),\n canBeConnected(true),\n hasConnectors(DeviceConnectorCore.LOCAL_WIFI, DeviceConnectorCore.LOCAL_USB), hasNoActiveConnector()));\n\n // move to connecting, canBeConnected should revert to false\n stateCore.updateConnectionState(DeviceState.ConnectionState.CONNECTING,\n DeviceState.ConnectionStateCause.USER_REQUESTED).notifyUpdated();\n assertThat(changeCnt[0], is(4));\n assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.CONNECTING),\n causeIs(DeviceState.ConnectionStateCause.USER_REQUESTED), canBeForgotten(false),\n canBeDisconnected(false),\n canBeConnected(false), hasConnectors(DeviceConnectorCore.LOCAL_WIFI, DeviceConnectorCore.LOCAL_USB),\n hasNoActiveConnector()));\n\n // move to connected with an active local connector, canBeDisconnected should switch to true\n stateCore.updateConnectionState(DeviceState.ConnectionState.CONNECTED)\n .updateActiveConnector(DeviceConnectorCore.LOCAL_WIFI).notifyUpdated();\n assertThat(changeCnt[0], is(5));\n assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.CONNECTED),\n causeIs(DeviceState.ConnectionStateCause.USER_REQUESTED), canBeForgotten(false),\n canBeDisconnected(true),\n canBeConnected(false), hasConnectors(DeviceConnectorCore.LOCAL_WIFI, DeviceConnectorCore.LOCAL_USB),\n activeConnector(DeviceConnectorCore.LOCAL_WIFI)));\n\n // mark as persisted, canBeForgotten should switch to true\n stateCore.updatePersisted(true).notifyUpdated();\n assertThat(changeCnt[0], is(6));\n assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.CONNECTED),\n causeIs(DeviceState.ConnectionStateCause.USER_REQUESTED), canBeForgotten(true), canBeDisconnected(true),\n canBeConnected(false), hasConnectors(DeviceConnectorCore.LOCAL_WIFI, DeviceConnectorCore.LOCAL_USB),\n activeConnector(DeviceConnectorCore.LOCAL_WIFI)));\n\n // remove all connectors and disconnect\n stateCore.updateConnectors(Collections.emptySet()).updateActiveConnector(null)\n .updateConnectionState(DeviceState.ConnectionState.DISCONNECTED,\n DeviceState.ConnectionStateCause.CONNECTION_LOST).notifyUpdated();\n assertThat(changeCnt[0], is(7));\n assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.DISCONNECTED),\n causeIs(DeviceState.ConnectionStateCause.CONNECTION_LOST), canBeForgotten(true),\n canBeDisconnected(false),\n canBeConnected(false), hasNoConnectors(), hasNoActiveConnector()));\n\n // check state ref does not change when rc is removed\n mRcCore.destroy();\n assertThat(changeCnt[0], is(7));\n }", "public interface IStates {\n\n\t/**\n\t * applyExtraActionPoint. adds extra action point whit the type received by\n\t * parameter\n\t *\n\t * @param extra\n\t * a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.Constants.EXTRA}\n\t * object.\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates applyExtraActionPoint(EXTRA extra);\n\n\t/**\n\t * applyRallyTroops. applies rally troops\n\t *\n\t * @param plusOne\n\t * a boolean.\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates applyRallyTroops(boolean plusOne);\n\n\t/**\n\t * archersAttack. performs archers attack\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates archersAttack();\n\n\t/**\n\t * attack. performs attack\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t * @param name\n\t * a {@link java.lang.String} object.\n\t */\n\tIStates attack(String name);\n\n\t/**\n\t * boilingWaterAttack. performs boiling water attack\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates boilingWaterAttack();\n\n\t/**\n\t * capture. performs capture\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates capture();\n\n\t/**\n\t * checkStatus. check the current status\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates checkStatus();\n\n\t/**\n\t * closeCombatAttack. performs close combat attack\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates closeCombatAttack();\n\n\t/**\n\t * coupure. performs coupure\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates coupure();\n\n\t/**\n\t * <p>\n\t * dont.\n\t * </p>\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates dont();\n\n\t/**\n\t * drawTopCard. draws the card on the top of the deck\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates drawTopCard();\n\n\t/**\n\t * endOfTurn. performs the end of the turn\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates endOfTurn();\n\n\t/**\n\t * extraActionPoint. checks if is possible to add extra action point\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates extraActionPoint();\n\n\t/**\n\t * <p>\n\t * fastMovement.\n\t * </p>\n\t *\n\t * @param up\n\t * a boolean.\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates fastMovement(boolean up);\n\n\t/**\n\t * finish. finishes the game\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates finish();\n\n\t/**\n\t * <p>\n\t * freeMovement.\n\t * </p>\n\t *\n\t * @param up\n\t * a boolean.\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates freeMovement(boolean up);\n\n\t/**\n\t * <p>\n\t * leaveLocation.\n\t * </p>\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates leaveLocation();\n\n\t/**\n\t * playAgain.\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates playAgain();\n\n\t/**\n\t * rallyTroops. performs rally troops\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates rallyTroops();\n\n\t/**\n\t * sabotage. performs sabotage\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates sabotage();\n\n\t/**\n\t * start. starts the game\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates start();\n\n\t/**\n\t * <p>\n\t * StartOfTheTurn.\n\t * </p>\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates StartOfTheTurn();\n\n\t/**\n\t * supplyRaid.\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates supplyRaid();\n\n\t/**\n\t * tunnelMovement. performs tunnel movement\n\t *\n\t * @return a\n\t * {@link com.github.danielpinto8zz6.ninecardsiege.logic.states.IStates}\n\t * object.\n\t */\n\tIStates tunnelMovement();\n}", "private void notifyBoardChanged() {\n if(this.boardChangeListenerList == null || this.boardChangeListenerList.isEmpty()) return;\n\n // yes - there are - create a thread and inform them\n (new Thread(new Runnable() {\n @Override\n public void run() {\n for(LocalBoardChangedListener listener : SchiffeVersenkenImpl.this.boardChangeListenerList) {\n listener.changed();\n }\n }\n })).start();\n }", "public void updateBoard() {\n notifyBoardUpdate(board);\n }", "private void HandleOnMoveStart(Board board, Piece turn){}", "long getStateChange();", "public static String[][] getBoardState() {\n return boardState;\n }", "void stateChanged( final GameState oldState, final GameState newState );", "private void updateState() {\n switch (game.getGameState()) {\n case GAME:\n gamePlay();\n break;\n case ONE:\n lostTurnByOne();\n break;\n case READY:\n readyToPlay();\n break;\n case START:\n startGame();\n break;\n case TURN:\n startTurn();\n break;\n case FINISH:\n finishGame();\n break;\n }\n }", "public interface State {\n /**\n * Does the state its own job\n * @param player which player is in \"the\" state\n */\n void doAction(Player player);\n\n /**\n * Get type of the state\n * @return State name\n */\n String getState();\n}", "public GameState won() {\n if ( (board[0][0] != TileState.BLANK) && (board[0][0] == board[0][1]) && (board[0][0] == board[0][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[1][0] != TileState.BLANK) && (board[1][0] == board[1][1]) && (board[1][0] == board[1][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[2][0] != TileState.BLANK) && (board[2][0] == board[2][1]) && (board[2][0] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][0] != TileState.BLANK) && (board[0][0] == board[1][1]) && (board[0][0] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ( (board[0][2] != TileState.BLANK) && (board[0][2] == board[1][1]) && (board[0][2] == board[2][0])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][0] != TileState.BLANK) && (board[0][0] == board[1][0]) && (board[0][0] == board[2][0])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][1] != TileState.BLANK) && (board[0][1] == board[1][1]) && (board[0][1] == board[2][1])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][2] != TileState.BLANK) && (board[0][2] == board[1][2]) && (board[0][2] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if (movesPlayed == 9)\n return GameState.DRAW;\n return GameState.IN_PROGRESS;\n }", "void onBoardStateChanged(BoardView view);", "public interface GamePlayState {\n\n void drawThreeDestCards(String username, String gameName);\n\n void returnDestCards(String username, String gameName, int destCards);\n\n void drawTrainCardFromDeck(String username, String gameName);\n\n void drawTrainCardFaceUp(String username, String gameName, int index);\n\n void claimRoute(String username, String gameName, int routeID, List<Integer> trainCards);\n\n void claimRoute(String username, String gameName, int routeID, AppCompatActivity context);\n\n}", "@Override\n public void executeState(Controller controller) {\n // controller.getGame().setEndTurn(false);\n\n controller.setUndoCheckFlag(false);\n controller.setGoOn(true);\n controller.getGame().setTargetSelected(null);\n controller.getGame().setTargetInUse(null);\n\n\n controller.getGame().setCurrentPlayer(controller.getNextPlayer(controller.getGame().getCurrentPlayer()));\n controller.saveAll();\n controller.setCanSkip(false);\n Player currentPlayer= controller.getGame().getCurrentPlayer();\n currentPlayer.setHasBeenMoved(false);\n currentPlayer.setHasBuilt(false);\n currentPlayer.setDefeat(false);\n currentPlayer.setInQue(false);\n\n\n Square square [][]=controller.getGame().getField().getSquares();\n\n for(int x=0; x<5;x++)\n for(int y=0; y<5; y++)\n square[x][y].setStart_level(square[x][y].getLevel());\n\n\n for(Worker w: currentPlayer.getWorkers()){\n w.setSquareNotAvailable(null);\n w.setMandatorySquare(null);\n w.resetHystoricPos();\n w.setCanBeMoved(true);\n w.setCanBuild(true);\n }\n\n currentPlayer.getGod().setCantDo(new ArrayList<>());\n\n\n\n }", "public interface GameControllerState {\n}", "@Override\n public void receiveInfo(GameInfo info) {\n\n //only update the state if info is a game state\n if (info instanceof ShogiState) {\n\n // update our state, then display\n this.state = (ShogiState) info;\n this.myPieces = state.getBoard();\n\n if (usingRulesScreen) return;\n if (usingDropsScreen) return;\n if (usingHistoryScreen) return;\n\n\n gui = myActivity.findViewById(R.id.shogiBoard);\n gui.myPieces = this.myPieces;\n\n //finds the player's king\n int kingRow = 0;\n int kingCol = 0;\n for(int i = 0; i < 9; i++){\n for(int j = 0; j < 9; j++){\n if (myPieces[i][j] != null){\n Piece possKing = myPieces[i][j];\n if(possKing.getPlayer() == 0 &&\n possKing.getType() == Piece.PieceType.KING){\n kingRow = i;\n kingCol = j;\n }\n }\n }\n }\n\n //if the king is in check, notify the player\n if(state.determinePlayerInCheck(0, this.myPieces, kingRow, kingCol)){\n new AlertDialog.Builder(getTopView().getContext())\n .setTitle(\"You are in check!\")\n .setMessage(\"Your king is in danger. You should move it.\")\n\n // A null listener allows the button to dismiss the dialog and take no further action.\n .setNegativeButton(\"Ok\", null)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }\n\n\n if (info instanceof IllegalMoveInfo) {\n\n Log.d(\"ShogiHP\", \"illegal move\");\n\n\n\n if (super.getflash()) {\n\n try {\n flashButton();\n } catch (InterruptedException ignored) {\n\n\n }\n }\n\n gui.invalidate();\n }\n\n gui.invalidate();\n\n }\n }", "public Result(BoardState board) {\n this.board = board;\n time = 0;\n }", "@Override\n public boolean detect() {\n QQRobot.checkBoardExists(RGB_MY_SPACE);\n QQRobot.findBoard(RGB_MY_SPACE, CurrentData.REAL.board);\n if (!BoardUtils.isSameBoard(CurrentData.REAL.board, CurrentData.CALCULATED.board)) {\n this.boardChangeDetected++;\n if (this.boardChangeDetected == 3) {\n throw new UnexpectedBoardChangeException(\"找到变动!\");\n }\n }\n return false;\n }", "interface Cnst {\r\n\r\n /////////////////////////////////////////////////////////////\r\n // These constants can be changed to edit the big bang ran //\r\n /////////////////////////////////////////////////////////////\r\n\r\n //full size is eight, scales the size of the board\r\n int scale = 8;\r\n\r\n //numbers of blocks in a row and a column\r\n int blocks = 10;\r\n\r\n //number of colors the game will use, between 2-8 inclusive\r\n int numOfColors = 8;\r\n\r\n //the number of turns you have to win the game\r\n int maxTurns = 25;\r\n\r\n\r\n ////////////////////////////////////////\r\n // Please do not edit these constants //\r\n ////////////////////////////////////////\r\n\r\n //the visible board width, scales with scale\r\n int boardWidth = 70 * scale;\r\n\r\n //the visible board height, scales with scale\r\n int boardHeight = 70 * scale;\r\n\r\n //cell width scales with the board and scale\r\n int cellWidth = boardWidth / blocks;\r\n\r\n //cell height scales with board and scale\r\n int cellHeight = boardHeight / blocks;\r\n\r\n //new constant for text on the board\r\n int textHeight = boardWidth / 12;\r\n\r\n //the 8 colors that can be selected by the user\r\n ArrayList<Color> colorsToChoose =\r\n new ArrayList<Color>(Arrays.asList(\r\n Color.CYAN, Color.PINK, Color.ORANGE,\r\n Color.BLUE, Color.RED, Color.GREEN,\r\n Color.MAGENTA, Color.YELLOW));\r\n}", "@Override\n public void setFinished() {\n if (finished > 0) {\n return;\n }\n\n // A mine has been opened (lose game)\n int openMines = (int) cells.stream().flatMap(Collection::stream)\n .filter(c -> c.isOpen() && c.isMine()).count();\n if (openMines > 0) {\n finished = 2;\n alertListeners(GameChangeType.LOSE);\n return;\n }\n\n // The board has been revealed (win game)\n int openCells = (int) cells.stream().flatMap(Collection::stream)\n .filter(c -> c.isOpen() && !c.isMine() && c.getCellState() != CellState.MINE3).count();\n if (openCells == (dims.getX() * dims.getY() - numMines)) {\n finished = 1;\n alertListeners(GameChangeType.WIN);\n return;\n }\n\n // Nothing so far, not finished\n finished = 0;\n }", "abstract public void updateState();", "protected boolean processSimulCurrentBoardChanged(int gameNumber, String oppName){\n return false;\n }", "private int evaluateState() {\r\n\r\n\t\t// add up score\r\n\t\t//\r\n\t\tint scoreWhite = 0;\r\n\t\tint scoreBlack = 0;\r\n\t\tfor (Piece piece : this.chessGame.getPieces()) {\r\n\t\t\tif(piece.getColor() == Piece.COLOR_BLACK){\r\n\t\t\t\tscoreBlack +=\r\n\t\t\t\t\tgetScoreForPieceType(piece.getType());\r\n\t\t\t\tscoreBlack +=\r\n\t\t\t\t\tgetScoreForPiecePosition(piece.getRow(),piece.getColumn());\r\n\t\t\t}else if( piece.getColor() == Piece.COLOR_WHITE){\r\n\t\t\t\tscoreWhite +=\r\n\t\t\t\t\tgetScoreForPieceType(piece.getType());\r\n\t\t\t\tscoreWhite +=\r\n\t\t\t\t\tgetScoreForPiecePosition(piece.getRow(),piece.getColumn());\r\n\t\t\t}else{\r\n\t\t\t\tthrow new IllegalStateException(\r\n\t\t\t\t\t\t\"unknown piece color found: \"+piece.getColor());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// return evaluation result depending on who's turn it is\r\n\t\tint gameState = this.chessGame.getGameState();\r\n\t\t\r\n\t\tif( gameState == ChessGame.GAME_STATE_BLACK){\r\n\t\t\treturn scoreBlack - scoreWhite;\r\n\t\t\r\n\t\t}else if(gameState == ChessGame.GAME_STATE_WHITE){\r\n\t\t\treturn scoreWhite - scoreBlack;\r\n\t\t\r\n\t\t}else if(gameState == ChessGame.GAME_STATE_END_WHITE_WON\r\n\t\t\t\t|| gameState == ChessGame.GAME_STATE_END_BLACK_WON){\r\n\t\t\treturn Integer.MIN_VALUE + 1;\r\n\t\t\r\n\t\t}else{\r\n\t\t\tthrow new IllegalStateException(\"unknown game state: \"+gameState);\r\n\t\t}\r\n\t}", "private void stateChanged() {\n\t\tfor (Row r : containingRows) {\n\t\t\tr.selectSquare(this);\n\t\t}\n\t}", "public interface Board {\n\n void setupBoard(int gridSize); //create the initial board\n\n String displayShotsTaken(); //return the board to print to screen showing shots taken, not boat location\n\n String displayMyBoard(); //return players board with ships;\n\n boolean takeShot(Point shot); //take a shot against this board\n\n boolean isGameOver(); //check if game is over.\n}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (myBoard.myGame.status != GameStatus.inProgress) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//if starting square is selected\r\n\t\tif (myBoard.selectedSquare!=null) {\r\n\t\t\t//create list of valid moves\r\n\t\t\tArrayList<Move> validMovesList = myBoard.selectedSquare.mySB.validMoves;\r\n\t\t\t//remove highlight from board\r\n\t\t\tint size = validMovesList.size();\r\n\t\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\t\tSquareButton sb = validMovesList.get(i).end.mySB;\r\n\t\t\t\tsb.setBackground(sb.defaultColor);\r\n\t\t\t}\r\n\t\t\t//making sure we do not move to the same square\r\n\t\t\tif (myBoard.selectedSquare!=mySquare) {\r\n\t\t\t\tMove attemptedMove = new Move(myBoard.selectedSquare, mySquare, myBoard.selectedSquare.myPiece.colour);\r\n\t\t\t\tSystem.out.println(\"Attempted move is: \" + attemptedMove);\r\n\t\t\t\t\r\n\t\t\t\t//check if attempted move is valid\r\n\t\t\t\tif(validMovesList.contains(attemptedMove)) {\r\n\t\t\t\t\tMove moveFound = validMovesList.get(validMovesList.indexOf(attemptedMove));\r\n\t\t\t\t\tSystem.out.println(\"Move Found Type: \" + moveFound.moveType);\r\n\t\t\t\t\tmyBoard.performMove(moveFound);\r\n\t\t\t\t\t//check if the move is legal - if so, undo the move\r\n\t\t\t\t\tif (myBoard.isKingThreatened()) {\r\n\t\t\t\t\t\tmyBoard.undoMove(myBoard.moveStack.pop());\r\n\t\t\t\t\t} else { //the player has made a legal move\r\n\t\t\t\t\t\tmyBoard.swapActiveColour();\r\n\t\t\t\t\t\t//determine if we are playing against AI\r\n\t\t\t\t\t\tif (Game.myAILevel != AILevel.off) {\r\n\t\t\t\t\t\t\tmyBoard.myGame.myAI.makeMove();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n//\t\t\t\t\t//debugging\r\n//\t\t\t\t\tSystem.out.println(\"Enemy's List - My active colour was: \" + myBoard.activeColour);\r\n//\t\t\t\t\tArrayList<Square> result = enemyValidSquares();\r\n//\t\t\t\t\tfor (Square s: result) {\r\n//\t\t\t\t\t\ts.mySB.setBackground(Color.ORANGE);\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\tmyBoard.whiteKingSquare.mySB.setBackground(Color.PINK);\r\n//\t\t\t\t\tmyBoard.blackKingSquare.mySB.setBackground(Color.magenta);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n//\t\t\t\t\tshowLists();\r\n\t\t\t\t\t//check if my opponent is checkmated by this move\r\n\t\t\t\t\t//if opponent is in check\r\n\t\t\t\t\tif (myBoard.isKingThreatened()) {\r\n\t\t\t\t\t\t//try every possible move\r\n\t\t\t\t\t\tif (myBoard.isCheckmate()) {\r\n\t\t\t\t\t\t\tColour winningColour = (myBoard.activeColour == Colour.WHITE) ? Colour.BLACK : Colour.WHITE;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(), myBoard.activeColour + \" is checkmated! \\n\" + winningColour + \" wins!\");\r\n\t\t\t\t\t\t\tmyBoard.myGame.status = (winningColour == Colour.WHITE) ? GameStatus.winWhite : GameStatus.winBlack;\r\n\t\t\t\t\t\t\t//turn off all buttons in the east panel\r\n\t\t\t\t\t\t\tfor (Component comp : myBoard.myGame.myBoardHolder.myEastPanel.getComponents()) {\r\n\t\t\t\t\t\t\t\tcomp.setEnabled(false);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tSystem.out.println(\"Checkmate!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n//\t\t\t\t\t//end of debug\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//unselect the square\r\n\t\t\t\t\tmyBoard.selectedSquare = null;\r\n\t\t\t\t\tSystem.out.println(\"Invalid Move\");\r\n\t\t\t\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\t\t\t\tSystem.out.println(validMovesList.get(i));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(myBoard);\r\n\t\t\t}\r\n\t\t\tmyBoard.selectedSquare = null;\r\n\t\t\tif (myBoard.myGame.status == GameStatus.inProgress) myBoard.myGame.myBoardHolder.myEastPanel.getComponent(0).setEnabled(true);\r\n\t\t\t\r\n\t\t}\r\n\t\t//if starting square is not selected\r\n\t\telse {\r\n\t\t\t//debugging\r\n//\t\t\tshowLists();\r\n\t\t\t//end of debug\r\n\t\t\tif ((mySquare.myPiece!=null) && (mySquare.myPiece.colour == myBoard.activeColour)) {\r\n\t\t\t\tmyBoard.selectedSquare = mySquare;\r\n\t\t\t\tSystem.out.println(\"Selected starting square: \" + myBoard.selectedSquare.row + \", \" + myBoard.selectedSquare.col);\r\n\t\t\t\t//generate valid moves\r\n\t\t\t\tvalidMoves = getValidMoves();\r\n\t\t\t\t\r\n\t\t\t\t//highlight valid squares if starting square has not been selected yet\r\n\t\t\t\tint size = validMoves.size();\r\n\t\t\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\t\t\tSquareButton sb = validMoves.get(i).end.mySB;\r\n\t\t\t\t\tsb.setBackground(sb.getBackground().brighter());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmyBoard.myGame.myBoardHolder.myEastPanel.getComponent(0).setEnabled(false);\r\n\t\t}\r\n\t}", "interface GameStateObserver\n{\n enum Status {\n STARTED, FINISHED\n }\n\n /**\n * Method will be call when scores are changed\n * @param scores new scores value\n */\n void onScoresChanged(int scores);\n\n /**\n * Method will be call when player do some move\n */\n void onMove();\n\n /**\n * Method will be call when status of game changes\n */\n void onStatusChanged(Status newStatus);\n\n}", "Object getState();", "private void dealWithState(FindPairLogic.State state) {\n buttons[state.getI()][state.getJ()].setText(Integer.toString(state.getN()));\n buttons[state.getI()][state.getJ()].setDisable(true);\n if (state.hasResult()) {\n if (!state.isSuccess()) {\n isGameEnable.set(false);\n threadPool.schedule(() -> Platform.runLater(() -> {\n buttons[state.getI()][state.getJ()].setText(\"\");\n buttons[state.getI()][state.getJ()].setDisable(false);\n buttons[state.getPreviousI()][state.getPreviousJ()].setText(\"\");\n buttons[state.getPreviousI()][state.getPreviousJ()].setDisable(false);\n isGameEnable.set(true);\n }), 1, TimeUnit.SECONDS);\n }\n }\n if (state.isEndGame()) {\n endGame();\n }\n }", "public GameState() {\n positionToPieceMap = new HashMap<Position, Piece>();\n }", "@Override\n public void waitForAllInBoard() {\n this.lock.lock();\n try {\n // update pilot state\n this.repository.updatePilotState(PilotState.WAIT_FOR_BOARDING);\n\n // wait for all passengers\n while (!this.planeReadyToTakeOff) {\n this.pilotWaitForAllInBoard.await();\n }\n this.planeReadyToTakeOff = false;\n\n // update pilot state\n this.repository.updatePilotState(PilotState.FLYING_FORWARD);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n this.lock.unlock();\n }\n }", "private LogicStatus updateState(Board thing) {\n count(thing);\n CellType curstate = thing.getCellType(x,y);\n\n // is it a terminal?\n if (walls.size() == 3) {\n if (curstate == CellType.NOTTERMINAL) return LogicStatus.CONTRADICTION;\n thing.setCellType(x,y,CellType.TERMINAL);\n return LogicStatus.LOGICED;\n }\n\n // the other states (BEND,STRAIGHT) require two paths.\n if (paths.size() < 2) return LogicStatus.STYMIED;\n\n Iterator<Direction> dit = paths.iterator();\n Direction d1 = dit.next();\n Direction d2 = dit.next();\n\n CellType nextct = d1 == d2.getOpp() ? CellType.STRAIGHT : CellType.BEND;\n\n if (nextct == CellType.STRAIGHT) {\n thing.setCellType(x,y,nextct);\n return LogicStatus.LOGICED;\n }\n\n if (curstate == CellType.NOTBEND) return LogicStatus.CONTRADICTION;\n\n thing.setCellType(x,y,nextct);\n return LogicStatus.LOGICED;\n }", "public void solveGame() {\n\t\tlosingStates = new HashSet<S>();\n\t\t\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tList<Set<S>> uncontrollableSuccessors = new ArrayList<Set<S>>();\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> currentUncontrollableSuccesors;\n\t\tSet<S> currentSet; \n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\tcurrentUncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\t\t\tcurrentSet = new HashSet<S>();\n\t\n\t\t\tif(!relaxAllControllables){\n\t\t\t\tfor(S s: currentUncontrollableSuccesors){\n\t\t\t\t\tif((!relaxOnAssumptions || (!assumptionsStates.contains(s) || assumptionsStates.contains(state))\n\t\t\t\t\t\t\t&& (!relaxSelfLoops || (!s.equals(state)))))\n\t\n\t\t\t\t\t\tcurrentSet.add(s);\n\t\t\t\t}\n\t\t\t}\n\t\t\t uncontrollableSuccessors.add(currentSet);\n\t\t\t isUncontrollable[indexCount] = currentSet.size() > 0;\n\t\t\t indexCount+=1;\n\t\t}\n\n\t\tlosingStates.addAll(game.getStates());\n\t\t\n\t\tSet<S> currentLosingStates;\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t\tcurrentLosingStates\t= new HashSet<S>();\n\t\t\t\n\t\t\t// Handle the pending states\n\t\t\twhile (!losing.isEmpty()) {\n\t\t\t\tS state = losing.poll();\n\n\t\t\t\t\n\t\t\t\tcurrentLosingStates.add(state);\n\n\t\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\t\tfor (S pred : predecessors) {\n\t\t\t\t\tif(losing.contains(pred) || currentLosingStates.contains(pred))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t\t//if(i == -1)\n\t\t\t\t\t\t//continue;\n\t\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tuncontrollableSuccessors.get(i).remove(state);\n\t\t\t\t\t\tif(uncontrollableSuccessors.get(i).isEmpty())\n\t\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlosingStates.retainAll(currentLosingStates);\n\t\t\t\n\t\t}\n\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "public interface ThingState\n{\n\n}", "boolean updateBoard(String currentPlayerTurn, String newBoard);", "@Override\r\n\tpublic void updateState() {\r\n\t\tState<A> result = null;\r\n\t\tif(events.size() > 0){\r\n\t\t\tfor(Event<A> a : events){\r\n\t\t\t\tstate = (result = state.perform(this,a)) == null ? state : result;\r\n\t\t\t}\r\n\t\t\tevents.removeAllElements();\r\n\t\t}\r\n\t\tstate = (result = state.perform(this, null)) == null ? state : result;\r\n\t\trequestInput();\r\n\t\t\r\n\t}", "public abstract void buildMoveData(ChessBoard board);", "public void makeChanges() { \n for(int i = 1; i < 9; i++) {\n for(int j = 1; j < 11; j++) {\n if(!(controller.getBoard().getPiece(i, j) instanceof Forbidden)) {\n Cell[i][j].setBackground(Color.white);\n if(controller.getBoard().getPiece(i,j) != null) {\n if(controller.getPlayer(controller.getTurn()).getColour() != controller.getBoard().getPiece(i,j).getColour()) {\n if(controller.getTurn() == 1) {\n Cell[i][j].setIcon(new ImageIcon(\"pieces\\\\redHidden.png\"));\n Cell[i][j].setEnabled(false);\n } else {\n Cell[i][j].setIcon(new ImageIcon(\"pieces\\\\blueHidden.png\"));\n Cell[i][j].setEnabled(false);\n }\n } else {\n Cell[i][j].setIcon((controller.getBoard().getPiece(i, j).getIcon()));\n Cell[i][j].setEnabled(true);\n }\n if(controller.getBoard().getPiece(i,j) instanceof Trap || controller.getBoard().getPiece(i,j) instanceof Flag) {\n Cell[i][j].removeActionListener(handler);\n Cell[i][j].setEnabled(false);\n }\n } else {\n Cell[i][j].setBackground(Color.white);\n Cell[i][j].setEnabled(false);\n }\n }\n }\n }\n controller.setTurn(); \n }", "public static void main(String[] args) {\n int progressId = 1;\n Map<Integer, Set<Entity>> progressEntities = new HashMap<>();\n Set<Entity> map000entity = new HashSet<>();\n map000entity.add(new Entity(new LocationPair<>(9.5F, 12.5F), Entity.TOWARD_RIGHT, \"Cirno\") {\n int useRefresh = 10;\n int activeTime = 80;\n boolean acting = true;\n\n @Override\n public void onRegisiter() {\n this.setMovingWay(MOVING_FASTER);\n }\n\n @Override\n public void onUnRegisiter() {\n System.out.println(\"Entity was unregisitered.\");\n }\n\n @Override\n public void action() {\n if (acting) {\n if (activeTime >= 0) {\n this.setToward(Entity.TOWARD_RIGHT);\n this.setWonderMoving(Entity.GOTOWARD_RIGHT);\n } else {\n this.setToward(Entity.TOWARD_LEFT);\n this.setWonderMoving(Entity.GOTOWARD_LEFT);\n }\n }\n if (isLastMovingSucceed()) {\n if (++activeTime >= 160) {\n activeTime = -160;\n }\n }\n if (useRefresh > 0) {\n useRefresh--;\n }\n }\n\n @Override\n public void onUse() {\n if (useRefresh == 0) {\n Keyboard.setState(Keyboard.STATE_DIALOG);\n acting = false;\n int moving = this.getMoving();\n int wonderMoving = this.getWonderMoving();\n int toward = this.getToward();\n this.setMoving(Entity.NOTGO);\n this.setWonderMoving(Entity.NOTGO);\n this.facePlayer();\n System.out.println(\"Changed the state of Keyboard.\");\n Case progress = new Case(\"test.entity.prs\", 2, () -> {\n Keyboard.setState(Keyboard.STATE_MOVING);\n acting = true;\n this.setMoving(moving);\n this.setWonderMoving(wonderMoving);\n this.setToward(toward);\n EventManager.getInstance().performedNp(this, 0);\n Resource.regisiterMisc(new Misc() {\n @Override\n public void invoke() {\n if (Resource.getMapId() == 1) {\n this.completed();\n Keyboard.setState(Keyboard.STATE_DIALOG);\n ArrayList<String> str = new ArrayList<>();\n str.add(Localization.query(\"test.misc\"));\n SimpleTalkingDialog std = new SimpleTalkingDialog(str, () -> {\n Keyboard.setState(Keyboard.STATE_MOVING);\n });\n std.init();\n GameFrame.getInstance().regisiterDialog(std);\n System.out.println(\"Invoked misc.\");\n }\n }\n });\n System.out.println(\"Progress ID is now 0.\");\n System.out.println(\"Changed the state of Keyboard.\");\n useRefresh = 40;\n });\n Case hello = new Case(\"test.entity.faq\", 3, () -> {\n ArrayList<String> str = new ArrayList<>();\n str.add(Localization.query(\"test.entity.hello1\"));\n str.add(Localization.query(\"test.entity.hello2\"));\n SimpleTalkingDialog std = new SimpleTalkingDialog(str, () -> {\n Keyboard.setState(Keyboard.STATE_MOVING);\n acting = true;\n this.setMoving(moving);\n this.setWonderMoving(wonderMoving);\n this.setToward(toward);\n useRefresh = 40;\n });\n std.init();\n GameFrame.getInstance().regisiterDialog(std);\n System.out.println(\"Changed the state of Keyboard.\");\n });\n Case back = new Case(\"test.entity.buff\", 4, () -> {\n Keyboard.setState(Keyboard.STATE_MOVING);\n acting = true;\n this.setMoving(moving);\n this.setWonderMoving(wonderMoving);\n this.setToward(toward);\n Resource.getPlayer().addBuff(new SpeedBuff(600, 1.5F));\n System.out.println(\"Changed the state of Keyboard.\");\n useRefresh = 40;\n });\n progress.setRelation(hello, null, hello);\n hello.setRelation(back, progress, back);\n back.setRelation(null, hello, null);\n progress.init();\n hello.init();\n back.init();\n List<Case> cases = new ArrayList<>();\n cases.add(progress);\n cases.add(hello);\n cases.add(back);\n ArrayList<String> strs = new ArrayList<>();\n strs.add(Localization.query(\"test.entity.title\"));\n\t\t\t\t\tTalkingDialog dialog = new TalkingDialog(strs, cases);\n\t\t\t\t\tdialog.init();\n GameFrame.getInstance().regisiterDialog(dialog);\n }\n useRefresh = 10;\n }\n });\n Set<Entity> map002entity = new HashSet<>();\n List<String> greet = new ArrayList<>();\n greet.add(\"test.entity.npc\");\n map002entity.add(new FriendlyNPC(new LocationPair<>(9.5F, 7.5F), Entity.TOWARD_DOWN, \"Sanae\", 3, greet));\n progressEntities.put(0, map000entity);\n progressEntities.put(2, map002entity);\n Map<Integer, Set<Item>> progressItems = new HashMap<>();\n boolean withDefaultProgress = true;\n //*/\n\n\n /*\n int progressId = 0;\n Map<Integer, Set<Entity>> progressEntities = new HashMap<>();\n Map<Integer, Set<Item>> progressItems = new HashMap<>();\n boolean withDefaultProgress = true;\n */\n\n\n try {\n ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(new File(\"resources/object/progress\", \"progress\" + String.format(\"%03d\", progressId) + \".prs\")));\n oos.writeObject(new Progress(progressId, progressEntities, progressItems, withDefaultProgress));\n oos.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "public void testRevealBoard()\r\n {\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"OOOO\",\r\n \"OOO+\");\r\n board.revealBoard();\r\n assertBoard(board, \" \",\r\n \" \",\r\n \" 11\",\r\n \" 1*\");\r\n }", "public void setBoard(Board board){this.board = board;}", "private void updateBigGameBoardForNextMove(){\n changeLetterAndVisuals();\n /*\n This next step is essential to the game:\n The player just chose a position on a smallGameBoard; this position is where he will\n be able to choose on the big board. For example, if player 1 puts an x in the top-left\n corner of a small game, then player 2 should play in the top-left small game (provided\n it is not already won).\n */\n nextGamePosition = chosenButton.getButtonPosition();\n nextGame = getGame(nextGamePosition);\n //If the next game is already won, then the next player can choose anywhere\n if (checkGameWin(nextGame.getLettersOfAllButtons())){\n for (ButtonClass b : allButtons) {\n b.setAvailable(true);\n }\n for(SmallGameBoard game: games){\n if (game.getGameBoardColor() == R.color.blackTransparent){\n game.changeGameColor(R.color.black);\n }\n }\n } else {\n //If next game is not won, then the player must play on the next game board\n setAvailableButtons(nextGamePosition);\n //Sets all boards besides the next game board to half transparent\n for (SmallGameBoard game: games){\n if(game.getGameBoardColor() == R.color.black){\n game.changeGameColor(R.color.blackTransparent);\n }\n }\n nextGame.changeGameColor(R.color.black);\n }\n //For playerVsComputer, this is when the computer makes its move\n if (!activity.getPlayerVsPlayer() && !computerIsMoving){\n computerMove(activity.getDifficulty());\n computerIsMoving = false;\n }\n }", "public void updateState();", "public IGameAlgo.GameState getGameState (GameBoard.GameMove move){\n\t\t/*\n\t\t * If last move made by computer,check if computer wins.\n\t\t */\n\t\tif(this.board[lastMove.getRow()][lastMove.getColumn()]==BoardSigns.COMPUTER.getSign()) {\n\t\t\t if(\n\t\t (board[0][0] == BoardSigns.COMPUTER.getSign() && board[0][1] == BoardSigns.COMPUTER.getSign() && board[0][2] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[1][0] == BoardSigns.COMPUTER.getSign() && board[1][1] == BoardSigns.COMPUTER.getSign() && board[1][2] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[2][0] == BoardSigns.COMPUTER.getSign() && board[2][1] == BoardSigns.COMPUTER.getSign() && board[2][2] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[0][0] == BoardSigns.COMPUTER.getSign() && board[1][0] == BoardSigns.COMPUTER.getSign() && board[2][0] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[0][1] == BoardSigns.COMPUTER.getSign() && board[1][1] == BoardSigns.COMPUTER.getSign() && board[2][1] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[0][2] == BoardSigns.COMPUTER.getSign() && board[1][2] == BoardSigns.COMPUTER.getSign() && board[2][2] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[0][0] == BoardSigns.COMPUTER.getSign() && board[1][1] == BoardSigns.COMPUTER.getSign() && board[2][2] == BoardSigns.COMPUTER.getSign()) ||\n\t\t (board[0][2] == BoardSigns.COMPUTER.getSign() && board[1][1] == BoardSigns.COMPUTER.getSign() && board[2][0] == BoardSigns.COMPUTER.getSign())\n\t\t )\n\t\t\t\t return GameState.PLAYER_LOST;\t\t\t\t\t\t \n\t\t}\n\t\t/*\n\t\t * If last move made by player,check if player wins.\n\t\t */\n\t\telse {\n\t\t\t if(\n\t\t (board[0][0] == BoardSigns.PLAYER.getSign() && board[0][1] == BoardSigns.PLAYER.getSign() && board[0][2] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[1][0] == BoardSigns.PLAYER.getSign() && board[1][1] == BoardSigns.PLAYER.getSign() && board[1][2] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[2][0] == BoardSigns.PLAYER.getSign() && board[2][1] == BoardSigns.PLAYER.getSign() && board[2][2] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[0][0] == BoardSigns.PLAYER.getSign() && board[1][0] == BoardSigns.PLAYER.getSign() && board[2][0] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[0][1] == BoardSigns.PLAYER.getSign() && board[1][1] == BoardSigns.PLAYER.getSign() && board[2][1] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[0][2] == BoardSigns.PLAYER.getSign() && board[1][2] == BoardSigns.PLAYER.getSign() && board[2][2] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[0][0] == BoardSigns.PLAYER.getSign() && board[1][1] == BoardSigns.PLAYER.getSign() && board[2][2] == BoardSigns.PLAYER.getSign()) ||\n\t\t (board[0][2] == BoardSigns.PLAYER.getSign() && board[1][1] == BoardSigns.PLAYER.getSign() && board[2][0] == BoardSigns.PLAYER.getSign())\n\t\t )\n\t\t\t\t return GameState.PLAYER_WON;\t\n\t\t}\n\t\t/*\n\t\t * No one wins,check if in progress or game ends with tie.\n\t\t */\n\t\t\n\t\t //check if exist empty spots. \n\t\t\tfor(int i=0;i<3;i++)\n\t\t\tfor(int j=0;j<3;j++)\n\t\t\t\tif(board[i][j]==TicTacTow.BoardSigns.BLANK.getSign()) \n\t\t\t\t return GameState.IN_PROGRESS;\n\t\t\treturn GameState.TIE;\t\t\t\n\t}", "GameState requestActionGamePiece();", "public interface State {\n public void insertQuarter();\n public void ejectQuarter();\n public void turnCrank();\n public void dispense();\n}", "private void reDrowStatusCard() {\n \t\tint currentInstance= Storage_access.getCurrentProjectInstanceBDDID() ;\n \t\t\n \t\tdispatcher.execute(new GetActivityStateAction(currentInstance), new AsyncCallback<GetActivityStateActionResult>() {\n \n \t\n \n \t\t\t@Override public void onFailure(Throwable arg0) {\n \t\t\t\tSystem.out.println(\"!!!!!!!!!!!!!!!!!!!!!**** failed to get activities status\");\n \n \t\t\t}\n \n \t\t\t@Override public void onSuccess(GetActivityStateActionResult result) {\n \t\t\t\tfor (int i=0; i< Storage_access.getNumberOfCard(); i++) {\n \t\t\t\t\tString card = Storage_access.getCard(i);\n \t\t\t\t\tActivityState_dto a = result.getActivitiesState().get(\"\"+Storage_access.getBddIdCard(card));\n \t\t\t\t\tif (a == null) \n \t\t\t\t\t\tStorage_access.revoveFromSlot(i);\t\n \t\t\t\t\telse \n \t\t\t\t\t\tStorage_access.setSlotCard(i, a.getDay(), a.getPeriod());\t\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t\teventBus.fireEvent( \n \t\t\t\t\t\tnew BoardViewChangedEvent(getView().getCombo_viewChoice1().getSelectedIndex(),\n \t\t\t\t\t\t\t\t\t\t\t\t getView().getCombo_viewChoice2().getSelectedIndex())\n \t\t\t\t\t\t);\n \t\t\t\t//Storage_access.printStorage();\n \t\t\t}\n \n \t\t\t});\n \n \t\t\n \t}", "public void solveGame3() {\n\t\tlosingStates = new HashSet<S>();\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tint[] uncontrollableCount = new int[game.getStates().size()+1];\n\t\tint[] uncontrollableLosingCount = new int[game.getStates().size()+1];\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> uncontrollableSuccesors;\n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\t uncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\n\t\t\t uncontrollableCount[indexCount] = uncontrollableSuccesors.size();\n\t\t\t uncontrollableLosingCount[indexCount] = 0;\n\t\t\t isUncontrollable[indexCount] = game.isUncontrollable(state);\n\t\t\t indexCount+=1;\n\t\t}\n\t\t\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t}\n\n\t\t// Handle the pending states\n\t\twhile (!losing.isEmpty()) {\n\t\t\tS state = losing.poll();\n\n\t\t\t\n\t\t\tlosingStates.add(state);\n\n\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\tfor (S pred : predecessors) {\n\t\t\t\tif(losing.contains(pred) || losingStates.contains(pred))\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t//if(i == -1)\n\t\t\t\t\t//continue;\n\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\tlosing.add(pred);\n\t\t\t\t}else{\n\t\t\t\t\tuncontrollableLosingCount[i]++;\n\t\t\t\t\tif (uncontrollableLosingCount[i] == uncontrollableCount[i])\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "public interface BoardGameBrain {\n\n void init(Board board);\n\n boolean playerHasWon();\n\n boolean draw();\n\n boolean isWinningMinorDiagonal();\n boolean isWinningMajorDiaogonal();\n boolean isWinningRow();\n boolean isWinningColumn();\n}", "private void fireGameBoardChanged() {\n\t\tfor (int i = 0; i < gameBoardListeners.size(); i++) {\n\t\t\tGameBoardListener listener = (GameBoardListener) gameBoardListeners.get(i);\n\t\t\tlistener.gameBoardChanged(this);\n\t\t}\n\t}", "private static void test3x3() {\n MutableBoard simpleBoard = new SimpleBoard(3,3);\n if (!simpleBoard.putPiece(new Move(1, 1))) throw new AssertionError(); // O\n if (!simpleBoard.toString().equals(\"---\\n-O-\\n---\\n\")) throw new AssertionError();\n if (simpleBoard.wins() != Board.PieceType.NONE) throw new AssertionError();\n if (simpleBoard.gameover()) throw new AssertionError();\n // Cannot replace any placed position.\n if (simpleBoard.putPiece(new Move(1, 1))) throw new AssertionError(); // X\n if (!simpleBoard.toString().equals(\"---\\n-O-\\n---\\n\")) throw new AssertionError();\n if (!simpleBoard.putPiece(new Move(0, 1))) throw new AssertionError(); // X\n if (!simpleBoard.toString().equals(\"-X-\\n-O-\\n---\\n\")) throw new AssertionError();\n if (simpleBoard.wins() != Board.PieceType.NONE) throw new AssertionError();\n if (simpleBoard.gameover()) throw new AssertionError();\n // Create a new light draft board.\n Board draftBoard = new LightDraftBoard(simpleBoard, new Move(0, 0), Board.PieceType.CIRCLE);\n if (!draftBoard.toString().equals(\"OX-\\n-O-\\n---\\n\")) throw new AssertionError();\n if (draftBoard.wins() != Board.PieceType.NONE) throw new AssertionError();\n if (draftBoard.gameover()) throw new AssertionError();\n // DraftBoard is immutable.\n draftBoard = new LightDraftBoard(draftBoard, new Move(1, 2), Board.PieceType.CROSS);\n if (!draftBoard.toString().equals(\"OX-\\n-OX\\n---\\n\")) throw new AssertionError();\n if (draftBoard.wins() != Board.PieceType.NONE) throw new AssertionError();\n if (draftBoard.gameover()) throw new AssertionError();\n draftBoard = new LightDraftBoard(draftBoard, new Move(2, 2), Board.PieceType.CIRCLE); // wins\n if (!draftBoard.toString().equals(\"OX-\\n-OX\\n--O\\n\")) throw new AssertionError();\n if (draftBoard.wins() != Board.PieceType.CIRCLE) throw new AssertionError();\n if (!draftBoard.gameover()) throw new AssertionError();\n }", "private static int evalState(GameState state){\n Move m = state.getMove();\n int counter = 0;\n\n // return directly if we encouter win or loss\n if(m.isXWin()){\n return 10000;\n }\n else if(m.isOWin()){\n return -1;\n }\n\n Vector<Integer> points = new Vector<Integer>();\n points.setSize(state.BOARD_SIZE*2+2);\n int player;\n Collections.fill(points, 1);\n int scaling = 4;\n int value = 0;\n\n for(int row = 0; row < state.BOARD_SIZE; row ++){\n for(int col = 0; col < state.BOARD_SIZE; col ++){\n player = state.at(row, col);\n\n // add points to the vector, increase by a factor for every new entry\n if(player == 1){\n points.set(row, points.get(row)*scaling);\n points.add(state.BOARD_SIZE + col, points.get(state.BOARD_SIZE - 1 + col)*scaling);\n\n // if it's in the first diagonal\n if(counter%state.BOARD_SIZE+1 == 0){\n points.add(state.BOARD_SIZE*2, points.get(state.BOARD_SIZE*2)*scaling);\n }\n\n // checking other diagonal\n if(counter%state.BOARD_SIZE-1 == 0 && row+col != 0){\n points.add(state.BOARD_SIZE*2 + 1, points.get(state.BOARD_SIZE*2)*scaling);\n }\n }\n // if an enemy player is encoutered null the value of the row/col\n else if(player == 2){\n points.set(row, 0);\n points.set(state.BOARD_SIZE + col, 0);\n if(counter%state.BOARD_SIZE+1 == 0){\n points.add(state.BOARD_SIZE*2, 0);\n }\n if(counter%state.BOARD_SIZE-1 == 0){\n points.add(state.BOARD_SIZE*2 + 1, 0);\n }\n }\n counter++;\n }\n }\n\n // if we have nulled the point we don't count it for the value of the state\n for(Integer i: points){\n if(i > 1){\n value += i;\n }\n }\n //System.err.println(\"Value: \" + value);\n return value;\n }", "public char[][] getBoardState(){\n\t\treturn board;\n\t}", "public abstract interface Board {\n\n\t/**\n\t * Returns the number of Tiles along a side of the board.\n\t * All boards should be square.\n\t * \n\t * @return int - the size of the board.\n\t */\n\tpublic abstract int getSize();\n\t\n\t/**\n\t * Returns the Tile located at the board location specified by\n\t * the x and y coordinates.\n\t * \n\t * @param x\n\t * @param y\n\t * @return Tile \n\t */\n\tpublic abstract Tile getTileAt(int x, int y);\n\t\n\t/**\n\t * Returns a Set of the Tile neighboring the specific Tile.\n\t * The set should have a size of no fewer than 4 and no more than 6.\n\t * \n\t * @param tile\n\t * @return Set<Tile>\n\t */\n\tpublic abstract Set<Tile> getNeighbors(Tile tile);\n\t\n\t/**\n\t * Sets the boards[x][y] Tile to the PlayerColor specified.\n\t * \n\t * @param move\n\t * @param playerColor\n\t */\n\tpublic abstract void makeMove(Move move, PlayerColor playerColor);\n\t\n\t/**\n\t * This method exists in the Observable class.\n\t * By making any implementor of this interface also extend Observable,\n\t * we can pass around and add observers to anything that implements Board.\n\t */\n\tpublic abstract void addObserver(Observer observer);\n}", "public interface BoardMoveStrategy {\n\n /**\n * Function that checks if there are any moves possible.\n *\n * <p>Iterates through all gems and looks for pairs or two or\n * constructions like \"xox\" where another x could fill in.\n * For each case a different function is called which checks for\n * a valid move.</p>\n *\n * @return returns two jewels in a list to swap if move is possible.\n */\n List<Jewel> getValidMovePair();\n}", "public interface IState {\n int getLevel();\n\n float getClock();\n\n int getLives();\n\n int getCurrentScore();\n\n int getRequiredScore();\n\n boolean isGameOver();\n\n @Override\n String toString();\n}", "public static void gameOfLife(int[][] board) {\n int[] neighbors = {0, 1, -1};\n\n int rows = board.length;\n int cols = board[0].length;\n\n // Iterate through board cell by cell.\n for (int row = 0; row < rows; row++) {\n for (int col = 0; col < cols; col++) {\n\n // For each cell, count the number of live neighbors.\n int liveNeighbors = 0;\n\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n\n if (!(neighbors[i] == 0 && neighbors[j] == 0)) {\n int r = (row + neighbors[i]);\n int c = (col + neighbors[j]);\n\n // Check the validity of the neighboring cell.\n // and whether it was originally a live cell.\n if ((r < rows && r >= 0) && (c < cols && c >= 0) && (Math.abs(board[r][c]) == 1)) {\n liveNeighbors += 1;\n }\n }\n }\n }\n\n // Rule 1 or Rule 3\n if ((board[row][col] == 1) && (liveNeighbors < 2 || liveNeighbors > 3)) {\n // -1 signifies the cell is now dead but originally was live.\n board[row][col] = -1;\n }\n // Rule 4\n if (board[row][col] == 0 && liveNeighbors == 3) {\n // 2 signifies the cell is now live but was originally dead.\n board[row][col] = 2;\n }\n }\n }\n\n // Get the final representation for the newly updated board.\n for (int row = 0; row < rows; row++) {\n for (int col = 0; col < cols; col++) {\n if (board[row][col] > 0) {\n board[row][col] = 1;\n } else {\n board[row][col] = 0;\n }\n }\n }\n }", "public void updateGame(Seed theSeed, int rowSelected, int columnSelected) {\n \n if (hasWon(theSeed, rowSelected, columnSelected)) { // check for win\n currentState = (theSeed == Seed.CROSS) ? GameState.CROSS_WIN : GameState.NOUGHT_WIN;\n \n } else if (isDraw()) { // checks for draw\n currentState = GameState.DRAW;\n }\n // Otherwise, no change to current state (still GameState.PLAYING).\n }", "public interface ControlBoardInterface\n{\n enum Sticks\n {\n THROTTLE,\n TURN,\n }\n \n enum Buttons\n {\n DRIVE_QUICK_TURN,\n DRIVE_SLOW,\n SCISSOR_OFF,\n SCISSOR_SWITCH,\n SCISSOR_SCALE,\n GRABBER_DROP_CUBE,\n HARVESTER_OPEN,\n HARVESTER_CLOSE,\n HARVESTER_EJECT,\n SUPERSTRUCTURE_CARRY_CUBE,\n CLIMBER_TOGGLE,\n GRABBER_FAST_OPEN,\n CAMERA_CHANGE_VIEW,\n CLIMB_IDLE_TEST,\n GRABBER_TRANSPORT,\n GRABBER_GRAB_CUBE_TEST,\n GRABBER_PREPARE_DROP_TEST,\n GRABBER_PREPARE_INTAKE_TEST,\n VISION_CUBE_HARVEST,\n GRABBER_TOGGLE,\n GRABBER_TEMP_TEST\n }\n \n double readStick(Sticks a);\n boolean readButton(Buttons b);\n void checkForTestMode();\n\n}", "@Override\n public Map<String, Object> currentState() {\n\n return new HashMap<>();\n }", "@Test\n public void testStateTransitions2()\n {\n theEngine.start();\n letPlayerWin();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inWonState());\n \n //Player won -> Halted\n theEngine.quit();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inWonState());\n \n //Player won -> Player died\n killPlayerByPlayerMove();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inWonState());\n \n //Undo from player won state\n theEngine.undoLastMove();\n //didn't throw assertion error, so this is fine\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inHaltedState());\n }", "GameState checkState(String guid, String username) throws GameStateException;", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tmainBoard.commitNewValues();\n\t\t\t}", "public abstract void stateChanged(STATE state);", "public char[][] getBoardState(){\n return board;\n }", "private synchronized void teamVictory() {\n \t\tif (state == MatchState.ONVICTORY || state == MatchState.ONCOMPLETE || state == MatchState.ONCANCEL) \n \t\t\treturn;\n \t\tstate = MatchState.ONVICTORY;\n \t\t/// Call the rest after a 2 tick wait to ensure the calling transitionMethods complete before the\n \t\t/// victory conditions start rolling in\n \t\tBukkit.getScheduler().scheduleSyncDelayedTask(plugin, new MatchVictory(this),2L);\n \t}", "public void testIsGameLost()\r\n {\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"O*OO\",\r\n \"OOOO\");\r\n assertEquals(true, board.isGameLost());\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"O+OO\",\r\n \"OOOO\");\r\n assertEquals(false, board.isGameLost());\r\n }", "public ActionState createActionState();", "private void changeState() {\n if (jobs.contains(this.currentFloor)){\n throw new AssertionError(\"Changing state of elevator no \" + ElevatorID + \" on destination floor\");\n }\n\n // empty job set -> going to IDLE state\n if (jobs.size() == 0) {\n this.currentState = IDLE;\n return;\n }\n\n Integer closestFloorDownwards = jobs.floor(this.currentFloor);\n Integer closestFloorUpwards = jobs.ceiling(this.currentFloor);\n\n switch (this.currentState) {\n // if elevator is in idle state then we need to go to the closest job possible\n case IDLE -> {\n Integer closestFloor =\n findClosestFloor(this.currentFloor, closestFloorUpwards, closestFloorDownwards);\n\n if (closestFloor < this.currentFloor) {\n this.currentState = DOWN;\n } else {\n this.currentState = UP;\n }\n }\n case DOWN -> {\n if (closestFloorDownwards != null) { // if there exists a predecessor in `jobs`\n this.currentState = DOWN; // let's continue going down\n } else {\n this.currentState = UP; // otherwise we need to go up\n }\n }\n case UP -> {\n if (closestFloorUpwards != null) { // if there exists a successor in `jobs`\n this.currentState = UP; // let's continue going up\n } else {\n this.currentState = DOWN; // otherwise we need to go down\n }\n }\n }\n }", "public GameState getState(){\n\t\tGameState State=new GameState(this.points, this.currentBoard.getState());\n\t\t\n\t\treturn State;\n\t}", "public void runStateMachine() {\n switch(m_currentState) {\n case PoweringUpState:\n if (this.doPowerUpStuff()) {\n this.setRobotState(RobotState.InitializingDataState);\n }\n break;\n case InitializingDataState:\n\n if (this.initializeData()) {\n // Load some commands for our robot.\n // We could definitely load these from a different file.\n System.out.println(\"-------- Populating Command Queue --------\");\n m_robotQueue.addCommand(new MoveToLocationXY(1.0, 2.0, 2.0));\n m_robotQueue.addCommand(new MoveToLocationXY(-1.0, -2.0, 1.0));\n m_robotQueue.addCommand(new RotateDegrees(180.0, 22.5));\n\n System.out.println(\"\\n-------- Entering Main Robot State --------\");\n this.setRobotState(RobotState.IdleWaitingForCommandState);\n }\n break;\n case IdleWaitingForCommandState:\n if (m_robotQueue.isCommandPending()) {\n\n m_currentCommand = m_robotQueue.getNextCommand();\n\n // m_currentCommand is a generic Object. Let's see what it actually is...\n String commandName = m_currentCommand.getClass().toString();\n System.out.println(\"* Got new command. Processing: \" + commandName);\n\n // Change robot state depending on the type of command we found.\n switch (commandName) {\n // NOTE: This \"class xyz\" text compare is kind of weird,\n // We could probably find a better way.\n case \"class commands.MoveToLocationXY\":\n this.setRobotState(RobotState.MovingToLocationState);\n break;\n case \"class commands.RotateDegrees\":\n this.setRobotState(RobotState.RotatingState);\n break;\n default:\n System.out.println(\"Unrecognized command \" + commandName);\n }\n System.out.println();\n\n } else if (m_currentCommand != null) {\n m_currentCommand = null; // Doing nothing. Clear current command.\n }\n break;\n case MovingToLocationState:\n MoveToLocationXY moveCmd = (MoveToLocationXY) m_currentCommand;\n try {\n if (moveCmd.runUntilComplete()) {\n // Done moving, process next item in command queue\n this.setRobotState(RobotState.IdleWaitingForCommandState);\n }\n } catch (InterruptedException e) { // for Thread.sleep - demo only\n e.printStackTrace();\n }\n break;\n case RotatingState:\n RotateDegrees rotateCmd = (RotateDegrees) m_currentCommand; // Cast to correct type.\n try {\n if (rotateCmd.runUntilComplete()) {\n // Done moving, process next item in command queue\n this.setRobotState(RobotState.IdleWaitingForCommandState);\n }\n } catch (InterruptedException e) { // for Thread.sleep - demo only\n e.printStackTrace();\n }\n break;\n case SearchingForTargetsState:\n // TODO - implement SearchTarget demo behavior\n break;\n }\n }", "@Override\n public WorkflowStep fail() {\n this.boardChangeDetected = 0;\n QQTetris.calculationThread.cancel();\n return INITIAL_BOARD.execute(false);\n }", "State(int[][] startBoardState, int [][] goalBoardState){\n this.currentBoardState = startBoardState;\n this.goalBoardState = goalBoardState;\n this.g_cost = 0;\n this.parentState = null;\n }", "private void updateState() {\n\t while(!isGoodState()) {\n\t\t updateStateOnce();\n\t }\n }", "public GameState(){\n this.gameResults = \"\";\n initVars();\n this.theme = DEFAULT_THEME;\n this.board = new Board(DEFAULT_BOARD);\n createSetOfPlayers(DEFAULT_PLAYERS, DEFAULT_AUTOPLAYER, DEFAULT_AUTOMODE);\n }", "public void handleGameStateChange(GameState s) {\n if (s.isGameOver()) {\n state.setText(s.toString().toUpperCase());\n moveHistory.add(s.toString());\n //Alerts user that game has ended.\n Alert gameInfo = new Alert(AlertType.INFORMATION);\n gameInfo.setTitle(\"Interactive Chess\");\n gameInfo.setHeaderText(\"Game Over\");\n gameInfo.setContentText(s.toString() + \"!\");\n gameInfo.showAndWait();\n //Second Alert informing user game has resetted to new player game\n Alert gameNew = new Alert(AlertType.INFORMATION);\n gameNew.setTitle(\"Interactive Chess\");\n gameNew.setHeaderText(null);\n gameNew.setContentText(\"New default game mode (Player Game) will \"\n + \"now start. Check the \\\"Game\\\" Menu for more game options\");\n gameNew.showAndWait();\n\n //Update UI and code\n tType.setText(\"Player Match\");\n playerGameMenuItem.setSelected(true);\n reset(new ChessController());\n }\n }", "public interface RoboticState {\r\n\t\r\n\tpublic void walk();\r\n\tpublic void cook();\r\n\tpublic void off();\r\n\r\n}", "public interface IGameBoard {\r\n int getNumRows();\r\n int getNumColumns();\r\n int getNumToWin();\r\n void placeToken(char p, int c);\r\n boolean checkHorizWin(int r, int c, char p);\r\n boolean checkVertWin(int r, int c, char p);\r\n boolean checkDiagWin(int r, int c, char p);\r\n char whatsAtPos(int r, int c);\r\n\r\n /**\r\n * @pre c > 0, c <= number of columns\r\n * @param c is the column the user selected on the most recent turn\r\n * @return true if the top of the column is free\r\n */\r\n default boolean checkIfFree(int c){ // this function checks the top of each row\r\n if (whatsAtPos(getNumRows()-1, c) == ' ') // if the top of the row is blank, return true (because there is space in the column)\r\n return true;\r\n else\r\n return false;\r\n }\r\n\r\n /**\r\n * @pre c > 0, c <= number of columns\r\n * @param c is the column the user selected on the most recent turn\r\n * @return true if either player won horizontally, vertically, or diagonally\r\n */\r\n default boolean checkForWin(int c){ // this function checks for a win horizontally, vertically, and diagonally\r\n int row = 0;\r\n// for(int i = 0; i < getNumRows(); i++) { // this loop finds the last placed token in the last column chosen (COUNTING UP)\r\n// if (whatsAtPos(i, c) == ' ') {\r\n// row = i - 1;\r\n// break;\r\n// }\r\n// }\r\n for(int i = getNumRows()-1; i >= 0; i--){ // this loop finds the last placed token in the last column chosen (COUNTING DOWN)\r\n if(whatsAtPos(i, c) != ' '){\r\n row = i;\r\n break;\r\n }\r\n }\r\n char player = whatsAtPos(row, c); // set temporary variable player to the last placed token\r\n\r\n if(checkHorizWin(row, c, player)){ // check for win horizontally\r\n return true;\r\n }\r\n if(checkVertWin(row, c, player)){ // check for win vertically\r\n return true;\r\n }\r\n else if(checkDiagWin(row, c, player)){ // check for win diagonally\r\n return true;\r\n }\r\n else{return false;} // return false if none of these are true\r\n }\r\n\r\n /**\r\n * @pre whatsAtPos == 'X', 'O', or ' '\r\n * @return true if board is full\r\n */\r\n default boolean checkTie() { // this function checks for a tie (if the board is full)\r\n int count = 0;\r\n for(int c = 0; c < getNumColumns(); c++) { // check the top of each column\r\n if (!checkIfFree(c)){ // if it is full, increment count\r\n count++;\r\n }\r\n }\r\n if(count == getNumColumns()){ // if count reaches the number of columns, all columns are full; it's tie\r\n return true; // return true\r\n }\r\n else{return false;} // if any columns are not full, then it is not a tie\r\n }\r\n}", "public interface EntranceMachineState {\n\n String insertCoin(EntranceMachine entranceMachine);\n\n String pass(EntranceMachine entranceMachine);\n}", "public boolean move(int x, int y, CheckersBoard board) {\n if (whiteTurn == true && team == Constants.TeamId.team1Id) {\n return false;\n }\n if (whiteTurn == false && team == Constants.TeamId.team2Id) {\n return false;\n }\n /**\n * then change the x - y coords of the piece\n * update the UI to remove the highlighted squares then move the piece\n * if chess and shared square you take a piece\n * if checkers you jumped them you take the piece\n * return new x - y components\n *\n * if this is too high up in the tree you can override this implementation or update it\n * to fit specific pieces if its not working for some reason\n */\n if (possible(x, y, gameBoard)) {\n int changex = this.getX()-x;\n int changey = this.getY()-y;\n CheckersPiece temp = gameBoard.boardPositions[getX()][getY()];\n gameBoard.boardPositions[getX()][getY()] = null;\n gameBoard.boardPositions[x][y] = temp;\n if (gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2] != null) {\n System.out.println(\"Here\");\n if (gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2].team != this.team) {\n gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2].imageView.setVisibility(View.GONE);\n gameBoard.boardPositions[(this.getX() + x)/2][(this.getY() + y)/2] = null;\n }\n }\n this.setX(x);\n this.setY(y);/*\n if (Math.abs(changex) == 2) {\n gameBoard.boardPositions[x + (changex/2)][y + (changey/2)] = null;\n if (team == Constants.TeamId.team1Id) {\n board.numPieces1--;\n } else if (team == Constants.TeamId.team2Id) {\n board.numPieces0--;\n }\n }*/\n\n gameBoard.boardPositions[x][y].imageView.setX(142*x);\n gameBoard.boardPositions[x][y].imageView.setY(142*y);\n // flips after move is\n whiteTurn = !whiteTurn;\n gameBoard.startTimer();\n }\n //setUpUI(gameBoard);\n if (getY() == 7 && team == Constants.TeamId.team2Id) {\n board.crown(this);\n }\n if (getY() == 0 && team == Constants.TeamId.team1Id) {\n board.crown(this);\n }\n return possible(x, y, gameBoard);\n }", "private void computeExternalState(InternalState newState) {\n if (internalState != newState) {\n switch (internalState) {\n case BUILD:\n Preconditions.checkState(newState == InternalState.PROBE_IN || newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROBE_IN:\n Preconditions.checkState(newState == InternalState.PROBE_PIVOT_AND_OUT ||\n newState == InternalState.PROJECT_NON_MATCHES ||\n newState == InternalState.REPLAY ||\n newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROBE_OUT:\n case PROBE_PIVOT_AND_OUT:\n Preconditions.checkState(newState == InternalState.PROBE_IN ||\n newState == InternalState.PROBE_OUT ||\n newState == InternalState.PROBE_PIVOT_AND_OUT ||\n newState == InternalState.PROJECT_NON_MATCHES ||\n newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROJECT_NON_MATCHES:\n Preconditions.checkState(newState == InternalState.REPLAY || newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case REPLAY:\n Preconditions.checkState(newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n }\n internalState = newState;\n }\n computeExternalState();\n }" ]
[ "0.6344088", "0.6282174", "0.6279204", "0.6205396", "0.6186173", "0.613159", "0.61276186", "0.59826386", "0.5957856", "0.59487873", "0.5915864", "0.58965355", "0.5876549", "0.58732396", "0.58673036", "0.5813026", "0.5790974", "0.5783066", "0.5782927", "0.5758043", "0.5748339", "0.5746956", "0.57206565", "0.5696261", "0.56869775", "0.56848216", "0.56716275", "0.56621075", "0.5629659", "0.5629188", "0.5625803", "0.5623667", "0.5615922", "0.56146944", "0.55981636", "0.55934316", "0.5584933", "0.55803263", "0.5576269", "0.5558853", "0.55414104", "0.55368966", "0.55318564", "0.55297554", "0.5527944", "0.55257237", "0.5524971", "0.55200994", "0.55072045", "0.55024296", "0.5500394", "0.547298", "0.5472112", "0.5466489", "0.5458631", "0.54562986", "0.54372776", "0.543607", "0.5431506", "0.54303855", "0.5427399", "0.542682", "0.5424289", "0.5423274", "0.5416183", "0.54077053", "0.5407389", "0.54046595", "0.5401426", "0.5393974", "0.53922904", "0.5388538", "0.53857225", "0.53853697", "0.5384747", "0.5379157", "0.53790885", "0.5373354", "0.5366227", "0.5365661", "0.53655535", "0.5360893", "0.5357547", "0.5355888", "0.5353601", "0.5351293", "0.5350296", "0.53488517", "0.5340688", "0.53406686", "0.5338773", "0.53379923", "0.5334188", "0.5331695", "0.53294104", "0.5328345", "0.5327614", "0.5326974", "0.53245693", "0.53181654" ]
0.5836699
15
Checks if the current state has been encountered before
default boolean isRepeatState() { return isRepeatState(FULL_EQUAL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkState() {\r\n\t\tswitch (this.stepPanel.getStep()) {\r\n\t\tcase StepPanel.STEP_HOST_GRAPH:\r\n\t\t\tcheckHostGraphAndNextStep();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_STOP_GRAPH:\r\n\t\t\tcheckStopGraphAndNextStep();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_CRITICAL_PAIRS:\r\n\t\t\tcheckPairsAndNextStep();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_FINISH:\r\n\t\t\tcheckIfReadyToParse();\r\n\t\t\tquitDialog();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public boolean nextState() {\n\t\treturn false;\n\t}", "public void checkState() {\r\n\t\tout.println(state);\r\n\t\tif(getEnergy() < 80 && getOthers() > 5) {\r\n\t\t\tstate = 1;\r\n\t\t\tturnLeft(getHeading() % 90);\r\n\t\t\tahead(moveAmount);\r\n\t\t}\r\n\t\telse if(getEnergy() < 80 && getOthers() < 5) {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\t\r\n\t}", "public boolean willNotBeResurrected() {\n return state == State.FRESH || state == State.ERROR;\n }", "private boolean hasUniqueState()\n {\n return (getExternalArcState() == getMiddleArcState() && getExternalArcState() == getInternalArcState() && getExternalArcState() == getCircleState());\n }", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "@Override\n public boolean callCheck() {\n return last == null;\n }", "public boolean isInError()\r\n {\r\n return myCurrentState.equals(State.ERROR);\r\n }", "public synchronized void check() {\n if (stack == null) {\n stack = Thread.currentThread().getStackTrace();\n } else {\n IllegalStateException ex =\n new IllegalStateException(\"This is the stack of the previous call\");\n ex.setStackTrace(stack);\n throw ex;\n }\n }", "public boolean isSetState()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(STATE$8) != 0;\r\n }\r\n }", "void beforeState();", "protected void checkState()\n {\n if (getParentNode() != null)\n {\n throw new IllegalStateException(\n \"Node cannot be modified when added to a parent!\");\n }\n }", "boolean goalState() {\n\t\treturn (numbersLeft == 0);\n\t}", "boolean hasHasState();", "public boolean isStartState() {\r\n\t\treturn flow.getStartState() == this;\r\n\t}", "@java.lang.Override\n public boolean hasStateInfo() {\n return stateInfo_ != null;\n }", "private void checkStateChange() {\n\t\tif(previousState == null){\n\t\t\tpreviousState = getOrientation();\n\t\t}\n\t\telse{\n\t\t\tif(previousState != getOrientation()){\n\t\t\t\tif(isTurningLeft){\n\t\t\t\t\tisTurningLeft = false;\n\t\t\t\t}\n\t\t\t\tif(isTurningRight){\n\t\t\t\t\tisTurningRight = false;\n\t\t\t\t}\n\t\t\t\tpreviousState = getOrientation();\n\t\t\t}\n\t\t}\n\t}", "public boolean isStateKnown(){\n\t\treturn (state != null);\n\t}", "@Override\r\n\t\tpublic boolean hasPrevious() {\n\t\t\treturn false;\r\n\t\t}", "@Override\r\n public boolean hasPrevious() {\r\n if (previous.data == null) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean hasPrevious() {\n\t\t\t\treturn false;\r\n\t\t\t}", "public boolean checkIn(){\n return state.checkIn();\n }", "public void checkInside() {\n checkInsideDone = false;\n }", "public boolean checkLastNodeStatus()\r\n {\r\n return visitedNodes.isEmpty();\r\n }", "@Override\n\tpublic boolean getState() {\n\t\treturn true;\n\t}", "@SuppressWarnings(\"SameReturnValue\")\n public boolean checkInvariant() {\n if (layerList.isEmpty()) {\n throw new IllegalStateException(\"no layer in \" + getName());\n }\n if (activeLayer == null) {\n throw new IllegalStateException(\"no active layer in \" + getName());\n }\n if (!layerList.contains(activeLayer)) {\n throw new IllegalStateException(\"active layer (\" + activeLayer.getName() + \") not in list (\" + layerList.toString() + \")\");\n }\n return true;\n }", "private boolean isStateFullyDetermined() {\n switch (hasSubstance) {\n case No:\n case Unknown:\n return false;\n case Yes:\n // if already established has substance, continue checking only until\n // reach threshold\n return (substanceMin <= 0) ? true : substanceCnt >= substanceMin;\n }\n throw new ShouldNotHappenException();\n }", "@Override\r\n public boolean hasPrevious() {\n return returned.prev != header;\r\n }", "public boolean hasBeenVisited() {\n\t\treturn visited; // Replace with your code\n\t}", "boolean hasCurrentStateTime();", "public boolean hasState() {\n return fieldSetFlags()[3];\n }", "public boolean hasState() {\n return fieldSetFlags()[3];\n }", "protected void assertBackToState() {\n\t\tassertTrue(recorder.recorded(EC.TLC_BACK_TO_STATE));\n\t\tfinal List<Object> loop = recorder.getRecords(EC.TLC_BACK_TO_STATE);\n\t\tassertTrue(loop.size() > 0);\n\t}", "abstract protected void _checkState() throws IllegalStateException;", "public boolean hasPrevious()\n {\n // TODO: implement this method\n return false;\n }", "boolean isDrawState()\n\t{\n\t\treturn !state.contains(0);\n\t}", "private void checkPreviousSquare(){\n\t\t\n\t\tif(!frontIsClear()){\n\t\t\tfaceBackwards();\n\t\t\tmove();\n\t\t\tif(!beepersPresent()){\n\t\t\t\tfaceBackwards();\n\t\t\t\tmove();\n\t\t\t\tputBeeper();\n\t\t\t} else {\n\t\t\t\tfaceBackwards();\n\t\t\t\tmove();\n\t\t\t}\n\t\t}\n\t}", "public boolean hasStackFrameChanged() {\n\t\treturn lineNumber != oldLineNumber;\n\t}", "private boolean checkMovePrevious(PositionTracker tracker) {\n\t\t \n\t\t if(tracker.getExactRow() == 0) { //initiate if statement\n\t\t\t if(tracker.getExactColumn() == 0) //initiate if statement\n\t\t\t\t return false; //returns the value false\n\t\t }\n\t\t \n\t\t return true; //returns the boolean value true\n\t }", "@Override\n public boolean hasPrevious()\n {\n if(left == null)\n {\n return false;\n }\n else\n {\n return true;\n }\n }", "public boolean isCurrentState() {\n return currentState;\n }", "protected void checkState() {\n\t\tboolean valid = true;\n\t\tinvalidFieldEditor = null;\n\t\t// The state can only be set to true if all\n\t\t// field editors contain a valid value. So we must check them all\n\t\tif (fields != null) {\n\t\t\tint size = fields.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tFieldEditor editor = fields.get(i);\n\t\t\t\tvalid = valid && editor.isValid();\n\t\t\t\tif (!valid) {\n\t\t\t\t\tinvalidFieldEditor = editor;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsetValid(valid);\n\t}", "synchronized boolean resetWasUsed() {\n\n boolean result = lastValue != currValue;\n\n lastValue = currValue;\n\n return result;\n }", "private boolean canUndo() {\n return !frozen && !past.isEmpty();\n }", "private boolean checkNext(){\n boolean ret = this.hasNext;\n if ((this.allStatesIterator.hasNext()) || (this.allSubsetsIterator.hasNext()) || (this.allTransitionsIterator.hasNext())){\n hasNext = true;\n return hasNext;\n }\n hasNext = false;\n return ret;\n }", "public boolean canUndo() {\n return statePointer > 0;\n }", "@Override\n public boolean checkCurrentStates(final CurrentStateOutput currentStateOutput,\n final String resourceName, final Partition partition, StateModelDefinition stateModelDef) {\n if (!stateModelDef.isSingleTopStateModel()) {\n return true;\n }\n // TODO: Cache top state count in the ResourceControllerDataProvider and avoid repeated counting\n // TODO: here. It would be premature to do it now. But with more use case, we can improve the\n // TODO: ResourceControllerDataProvider to calculate by default.\n if (currentStateOutput.getCurrentStateMap(resourceName, partition).values().stream()\n .filter(state -> state.equals(stateModelDef.getTopState())).count() > 1) {\n return false;\n }\n return true;\n }", "protected abstract List breakOutOfStateStack();", "public boolean hasPreviousElement() {\n return false;\n }", "@Override\n\tpublic boolean isStartingState(State state, MaxNode maxNode) {\n\t\treturn false;\n\t}", "void check_game_state() {\n // Game over\n if (lives <= 0){ // No lives left\n end_game();\n }\n for (Alien alien : aliens){ // Aliens reached bottom of screen\n if (alien.y_position + alien.alien_height >= ship.y_position) {\n end_game();\n break;\n }\n }\n\n // Empty board\n if (aliens.isEmpty()) { // All aliens defeated\n if (level < 3) { // Level up\n level_up();\n alien_setup();\n }\n else { // Victory\n end_game();\n }\n }\n }", "public boolean isInCheck() {\n\t\treturn false;\n\t}", "boolean hasEntered() {\n return entered;\n }", "@Override\r\n\tpublic boolean isCurrent() {\n\t\treturn false;\r\n\t}", "public boolean isUndoPossible() {\n return (roundsHistory.size() > 1);\n }", "public boolean isSetState() {\n return this.state != null;\n }", "public boolean isSetState() {\n return this.state != null;\n }", "public boolean isSet() {\n return !this.stack.isEmpty();\n }", "private void updateState() {\n\t while(!isGoodState()) {\n\t\t updateStateOnce();\n\t }\n }", "public boolean hasPreviousSet() { \n return (firstIndexOfCurrentSet > firstIndex);\n }", "@Override\r\n\tpublic boolean checkIfOnTraineeship() {\n\t\treturn false;\r\n\t}", "public boolean hasPrevious() {\n return position > 0;\n }", "boolean hasStateChange();", "public boolean isSetState()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(STATE$14) != null;\r\n }\r\n }", "@Override\r\n\tpublic boolean isVisited() {\n\t\treturn false;\r\n\t}", "private void checkCloseStatus() throws IllegalStateException {\n checkState(!closed, \"The algorithm is already closed\");\n }", "@CheckReturnValue\n public boolean hasPrevious() {\n return offset > 0;\n }", "private boolean checkCurrentIterator(Iterator<Integer> iter) {\n return iter != null;\n }", "@java.lang.Override\n public boolean hasCurrentAction() {\n return currentAction_ != null;\n }", "public boolean getState( ) { return state; }", "private void checkMatch() {\r\n if ( undoStack.size() == 2 &&\r\n undoStack.get( 0 ).getNumber() ==\r\n undoStack.get( 1 ).getNumber() ) {\r\n pop();\r\n pop();\r\n }\r\n }", "@SuppressWarnings(\"resource\")\n\tpublic synchronized void advance() {\n\t\t/*\n\t\t * Do not advance the state machine if it is still valid. This is a convenience to application code\n\t\t * that can now try to advance the state machine redundantly without it getting costly.\n\t\t * \n\t\t * Here we have to be careful. We cannot just read valid() flag as that would create reactive dependency\n\t\t * that would be invalidated a few lines below when the valid() flag is set to true.\n\t\t * Such immediate invalidation would force another controlling (outer) reactive computation to run immediately after the current one ends.\n\t\t * While such overhead is common in reactive code and it is usually acceptable, it can be very wasteful here in some important use cases,\n\t\t * for example in ReactiveLazy where it would double compute cost of all reactive computations that read new/changed ReactiveLazy.\n\t\t *\n\t\t * We cannot just check for non-null trigger either as that would make the check completely non-reactive.\n\t\t * The controlling (outer) computation wouldn't run again when the state is invalidated and advancement would stop forever.\n\t\t *\n\t\t * Instead of creating dependency on the full valid() flag, we will reactively depend only on trigger state.\n\t\t * The difference is that trigger state only tracks validity of the last controlled (inner) computation\n\t\t * while the valid() flag tracks all current and future state of the whole reactive state machine.\n\t\t * Trigger state can change only in one direction from not fired to fired while valid() changes both ways.\n\t\t * This reduction in the scope of the dependency is sufficient to avoid redundant reactive computations\n\t\t * while keeping the dependency wide enough to ensure the state machine appears to be fully reactive.\n\t\t * \n\t\t * Trigger itself is of course non-reactive, because it is a low-level reactive primitive.\n\t\t * So how do we depend on its state? We will read valid() flag but only after we have already set it to true.\n\t\t * This breaks the basic principle of reactive programming that dependencies are recorded before reads,\n\t\t * but it is safe here, because it is equivalent to a scenario, in which another thread advances the state machine\n\t\t * and the current thread executed shortly afterwards, reads the valid() flag (which is true), and returns without advancing.\n\t\t * \n\t\t * This solution is so efficient that a lot of code can just blindly advance all the time without ever checking valid().\n\t\t * This may be actually more performant thanks to the reduced dependency optimization.\n\t\t */\n\t\tif (trigger != null) {\n\t\t\t/*\n\t\t\t * If the trigger is non-null, then valid() is true and we can just return without advancing.\n\t\t\t * We will record dependency on valid() to ensure that the controlling (outer) computation\n\t\t\t * tries to advance the state machine again when valid() becomes false.\n\t\t\t */\n\t\t\tvalid.get();\n\t\t\treturn;\n\t\t}\n\t\tReactiveScope scope = OwnerTrace.of(new ReactiveScope())\n\t\t\t.parent(this)\n\t\t\t.target();\n\t\tif (pins != null)\n\t\t\tscope.pins(pins);\n\t\tpins = null;\n\t\ttry (CloseableScope computation = scope.enter()) {\n\t\t\tReactiveValue<T> value = ReactiveValue.capture(supplier);\n\t\t\t/*\n\t\t\t * We will be sending two invalidations to the controlling reactive computation.\n\t\t\t * We will first discourage redundant advancement by setting valid() to true.\n\t\t\t * Only then we set the output. This prevents unnecessary attempts to advance the state machine.\n\t\t\t */\n\t\t\tvalid.set(true);\n\t\t\toutput.value(value);\n\t\t}\n\t\t/*\n\t\t * As mentioned above, we will create dependency on valid() to ensure the controlling (outer) computation\n\t\t * tries to advance again when the current state is invalidated, i.e. when valid() is set to false.\n\t\t * We have to do this after setting valid() to true above to avoid immediately invalidating current computation.\n\t\t * We also have to do it before arming the trigger, because trigger could fire immediately (inline)\n\t\t * and such firing involves setting valid() to false, by which time the dependency on valid() must already exist.\n\t\t * We have to be additionally careful not to create the dependency inside the controlled (inner) computation.\n\t\t */\n\t\tvalid.get();\n\t\tif (scope.blocked())\n\t\t\tpins = scope.pins();\n\t\ttrigger = OwnerTrace\n\t\t\t.of(new ReactiveTrigger()\n\t\t\t\t.callback(this::invalidate))\n\t\t\t.parent(this)\n\t\t\t.target();\n\t\t/*\n\t\t * Arming the trigger can cause it to fire immediately.\n\t\t * We don't worry about that, because our invalidation callback is very fast and non-conflicting.\n\t\t */\n\t\ttrigger.arm(scope.versions());\n\t}", "public boolean checkExplosiveState () { return isExploding;}", "public boolean hasPrevious() {\n\t\t\treturn previousPosition < vector.size();\n\t\t}", "private static boolean isStackEmpty(SessionState state)\n\t{\n\t\tStack operations_stack = (Stack) state.getAttribute(STATE_SUSPENDED_OPERATIONS_STACK);\n\t\tif(operations_stack == null)\n\t\t{\n\t\t\toperations_stack = new Stack();\n\t\t\tstate.setAttribute(STATE_SUSPENDED_OPERATIONS_STACK, operations_stack);\n\t\t}\n\t\treturn operations_stack.isEmpty();\n\t}", "protected void checkInitialized() {\n \tcheckState(this.breeder!=null && this.threads!=null, \"Local state was not correctly set after being deserialized.\");\n }", "void check(){\n if(!data.up.isEmpty()){\r\n if(data.floor == data.up.get(0)){\r\n data.up.remove(0);\r\n data.state = 0;\r\n data.statePrv = 1;\r\n data.isMoving = false;\r\n }\r\n }\r\n if(!data.down.isEmpty()){\r\n if(data.floor == data.down.get(0)){\r\n data.down.remove(0);\r\n data.state = 0;\r\n data.statePrv = -1;\r\n data.isMoving = false;\r\n }\r\n }\r\n }", "private boolean inGameInvariant(){\n if (owner != null && troops >= 1)\n return true;\n else\n throw new IllegalStateException(\"A Territory is left without a Master or Troops\");\n }", "private boolean alreadyStarted() {\n\t\treturn this.buffer.length() > 0;\n\t}", "private void verifyActive() {\n if (!active) {\n throw new IllegalStateException(\"Container is no longer active for loading\");\n }\n }", "private boolean isConsideredFresh() {\n \t\treturn this.isNew || this.area.getPolygon() == null;\n \t}", "public void hasLost() {\n\t\tthis.hasLost = true;\n\t}", "public boolean undo(){\n\t\tif(!(undoStack.isEmpty())){\n\t\t\tSystem.out.println(\"Undoing one move...\");\n\t\t\tredoStack.push(undoStack.pop());\n\t\t\tthis.setState(undoStack.pop());\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Undo is not available\");\n\t\t\treturn false;\n\t\t}\n\t}", "protected boolean anyMovesLeft() {\r\n return super.anyMovesLeft();\r\n }", "public boolean hasPrevious() {\n\t\tif(prevIndex > -1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isNeedsAlert() {\n return current.needsAlert();\n }", "public boolean isFirst() {\n\t\treturn (prev == null);\n\t}", "private boolean checkGameState() {\n\t\tint numberOfPlayers = this.manSys.lockedNavmap.size();\n\t\tfor (int i = 0; i < numberOfPlayers; i++) {\n\t\t\tif (!snakesList.get(i).isDestroyed()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean checkGameOver() {\n return ((posIniPiece[piece.getKind()] == piece.getPos(0)) && iteration > 0);\n }", "public boolean hasPrevious() {\r\n \treturn index > 0; \r\n }", "public boolean wasJustPressed() {\n\t\treturn (mNow && (!mLast));\n\t}", "boolean hasLastAction();", "public boolean onFirstMove() {\n\t\treturn (PawnMoveInformation.NOT_MOVED_YET == this.info);\n\t}", "public boolean hasPreviousInSet() {\n return (hasPrevious() &&\n (indexOfCurrentElement - 1 >= firstIndexOfCurrentSet) &&\n (indexOfCurrentElement - 1 < firstIndexOfCurrentSet + quantity));\n }" ]
[ "0.69217736", "0.68918973", "0.66341704", "0.6586717", "0.6508029", "0.6494741", "0.6494741", "0.6494741", "0.6494741", "0.6494741", "0.6494741", "0.6494741", "0.6494741", "0.6432158", "0.63995826", "0.6360266", "0.6325066", "0.6253609", "0.62463564", "0.6233031", "0.6207457", "0.6192137", "0.6184695", "0.61602736", "0.6151453", "0.61073977", "0.609223", "0.6060456", "0.6058784", "0.6050695", "0.6043888", "0.60248065", "0.6021153", "0.6018824", "0.60119647", "0.60094374", "0.6006898", "0.60051614", "0.60051614", "0.60049754", "0.59776896", "0.5976912", "0.59650564", "0.59253377", "0.5915153", "0.58900785", "0.5885549", "0.5880874", "0.5877698", "0.5877178", "0.5874412", "0.5866963", "0.5863883", "0.58395195", "0.58375835", "0.5836418", "0.58307767", "0.58248204", "0.58230996", "0.5819503", "0.5816443", "0.5812409", "0.579995", "0.579995", "0.5791945", "0.5778405", "0.57742506", "0.5761916", "0.5760511", "0.5757327", "0.5743463", "0.57395715", "0.5734378", "0.57316905", "0.5729066", "0.57275903", "0.5724026", "0.5723008", "0.5722693", "0.5722278", "0.57173955", "0.57147306", "0.5710657", "0.5702675", "0.5695151", "0.5691293", "0.56894916", "0.5688035", "0.5684452", "0.5684391", "0.56822765", "0.5666383", "0.56609577", "0.5658594", "0.56583005", "0.5657098", "0.56538635", "0.5653697", "0.5641477", "0.56380904", "0.5635325" ]
0.0
-1
Checks if the current state has been encountered before using a list of predicates to compare states with
boolean isRepeatState(final BiPredicate<I_GameState, I_GameState> predicate);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkIfAlreadyIsState(ArrayList<ArrayList<Integer>> states, ArrayList<Integer> state){\n boolean res=true;\n Collections.sort(state);\n\n for (int i = 0 ; i < states.size();i++){\n ArrayList<Integer> currState = states.get(i);\n\n if(currState.size() != state.size())\n continue;\n else{\n Collections.sort(currState);\n\n if(state.equals(currState)){\n res = false;\n break;\n }\n }\n }\n\n return res;\n }", "private Collection<ReplayState<C>> executeEnabledMismatches(ReplayState<C> state, Collection<Transition> transitions) {\r\n\t\tCollection<ReplayState<C>> states = new ArrayList<ReplayState<C>>();\r\n\t\tif (!state.trace.isEmpty()) {\r\n\t\t\tfor (Transition transition : transitions) {\r\n\t\t\t\tif (transition.isInvisible() || !map.containsKey(transition)) {\r\n\t\t\t\t} else if (!map.get(transition).equals(state.trace.get(0))) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine new marking.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tMarking newMarking;\r\n\t\t\t\t\t\tsynchronized (semantics) {\r\n\t\t\t\t\t\t\tsemantics.setCurrentState(state.marking);\r\n\t\t\t\t\t\t\tsemantics.executeExecutableTransition(transition);\r\n\t\t\t\t\t\t\tnewMarking = semantics.getCurrentState();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine new cost.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tC newCost = addOperator.add(state.cost, ReplayAction.INSERT_ENABLED_MISMATCH, transition, null);\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Add new state.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\taddState(states, state, newMarking, transition, newCost, state.trace);\r\n\t\t\t\t\t} catch (IllegalTransitionException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn states;\r\n\t}", "private Collection<? extends AbstractState> getFollowStates(AutomatonState state, List<AbstractState> otherElements, CFAEdge edge, boolean failOnUnknownMatch) throws CPATransferException {\n Preconditions.checkArgument(!(state instanceof AutomatonUnknownState));\n if (state == cpa.getBottomState()) {\n //return Collections.singleton(state);\n return Collections.emptySet();\n }\n\n if (state.getInternalState().getTransitions().isEmpty()) {\n // shortcut\n return Collections.singleton(state);\n }\n\n Collection<AbstractState> lSuccessors = new HashSet<AbstractState>(2);\n AutomatonExpressionArguments exprArgs = new AutomatonExpressionArguments(state.getVars(), otherElements, edge, logger);\n boolean edgeMatched = false;\n boolean nonDetState = state.getInternalState().isNonDetState();\n\n // these transitions cannot be evaluated until last, because they might have sideeffects on other CPAs (dont want to execute them twice)\n // the transitionVariables have to be cached (produced during the match operation)\n // the list holds a Transition and the TransitionVariables generated during its match\n List<Pair<AutomatonTransition, Map<Integer, String>>> transitionsToBeTaken = new ArrayList<Pair<AutomatonTransition, Map<Integer, String>>>(2);\n\n for (AutomatonTransition t : state.getInternalState().getTransitions()) {\n exprArgs.clearTransitionVariables();\n\n matchTime.start();\n ResultValue<Boolean> match = t.match(exprArgs);\n matchTime.stop();\n if (match.canNotEvaluate()) {\n if (failOnUnknownMatch) {\n throw new CPATransferException(\"Automaton transition condition could not be evaluated: \" + match.getFailureMessage());\n }\n // if one transition cannot be evaluated the evaluation must be postponed until enough information is available\n return Collections.singleton(new AutomatonUnknownState(state));\n } else {\n if (match.getValue()) {\n edgeMatched = true;\n assertionsTime.start();\n ResultValue<Boolean> assertionsHold = t.assertionsHold(exprArgs);\n assertionsTime.stop();\n\n if (assertionsHold.canNotEvaluate()) {\n if (failOnUnknownMatch) {\n throw new CPATransferException(\"Automaton transition assertions could not be evaluated: \" + assertionsHold.getFailureMessage());\n }\n // cannot yet be evaluated\n return Collections.singleton(new AutomatonUnknownState(state));\n\n } else if (assertionsHold.getValue()) {\n if (!t.canExecuteActionsOn(exprArgs)) {\n if (failOnUnknownMatch) {\n throw new CPATransferException(\"Automaton transition action could not be executed\");\n }\n // cannot yet execute, goto UnknownState\n return Collections.singleton(new AutomatonUnknownState(state));\n }\n\n // delay execution as described above\n Map<Integer, String> transitionVariables = ImmutableMap.copyOf(exprArgs.getTransitionVariables());\n transitionsToBeTaken.add(Pair.of(t, transitionVariables));\n\n } else {\n // matching transitions, but unfulfilled assertions: goto error state\n AutomatonState errorState = AutomatonState.automatonStateFactory(Collections.<String, AutomatonVariable>emptyMap(), AutomatonInternalState.ERROR, cpa);\n logger.log(Level.INFO, \"Automaton going to ErrorState on edge \\\"\" + edge.getDescription() + \"\\\"\");\n lSuccessors.add(errorState);\n }\n\n if (!nonDetState) {\n // not a nondet State, break on the first matching edge\n break;\n }\n }\n // do nothing if the edge did not match\n }\n }\n\n if (edgeMatched) {\n // execute Transitions\n for (Pair<AutomatonTransition, Map<Integer, String>> pair : transitionsToBeTaken) {\n // this transition will be taken. copy the variables\n AutomatonTransition t = pair.getFirst();\n Map<Integer, String> transitionVariables = pair.getSecond();\n actionTime.start();\n Map<String, AutomatonVariable> newVars = deepCloneVars(state.getVars());\n exprArgs.setAutomatonVariables(newVars);\n exprArgs.putTransitionVariables(transitionVariables);\n t.executeActions(exprArgs);\n actionTime.stop();\n AutomatonState lSuccessor = AutomatonState.automatonStateFactory(newVars, t.getFollowState(), cpa);\n //if (!(lSuccessor instanceof AutomatonState.BOTTOM)) {\n lSuccessors.add(lSuccessor);\n //} // else add nothing\n }\n return lSuccessors;\n } else {\n // stay in same state, no transitions to be executed here (no transition matched)\n return Collections.singleton(state);\n }\n }", "@Test\n public void allTrue() {\n assertTrue(getPredicateInstance(true, true).evaluate(getTestValue()),\n \"multiple true predicates evaluated to false\");\n assertTrue(getPredicateInstance(true, true, true).evaluate(getTestValue()),\n \"multiple true predicates evaluated to false\");\n }", "public boolean compareTo(SLR1_automat.State state);", "private boolean contain(Estado state, List<Estado> states) {\n\t\tfor (Estado valid : states) {\n\t\t\tif (valid.getValue() == state.getValue()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public void updateState(){\n\t\t\n\t\t\n\t\t\n\t\tArrayList<String> toAdd = new ArrayList<String>();\n\t\tArrayList<String> toRemove = new ArrayList<String>();\n\n\t\tthis.lastAdded.clear();\n\t\tthis.lastFulfilled.clear();\n\t\tthis.lastViolated.clear();\n\t\t\n\t\ttry {\n\n\t\t\tdo{\n\t\t\t\ttoAdd.clear();\n\t\t\t\ttoRemove.clear();\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iActive = reasoner.findall(\"xactive(A,Fa,Fm,Fd,Fr,Timeout)&not(as(A,Fa,Fm,Fd,Fr,Timeout))\");\n\t\t\t\twhile(iActive.hasNext()){\n\t\t\t\t\tUnifier un = iActive.next();\n\t\t\t\t\ttoAdd.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+ adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastAdded.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+ adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iViol = reasoner.findall(\"xviol(A,Fa,Fm,Fd,Fr,Timeout)&not(vs(A,Fa,Fm,Fd,Fr,Timeout))\");\n\t\t\t\twhile(iViol.hasNext()){\n\t\t\t\t\tUnifier un = iViol.next();\n\t\t\t\t\ttoAdd.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastViolated.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iDeactF = reasoner.findall(\"xdeact_f(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iDeactF.hasNext()){\n\t\t\t\t\tUnifier un = iDeactF.next();\n\t\t\t\t\ttoAdd.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString()+\",\"+un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastFulfilled.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iDeactR = reasoner.findall(\"xdeact_r(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iDeactR.hasNext()){\n\t\t\t\t\tUnifier un = iDeactR.next();\n\t\t\t\t\ttoAdd.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastFulfilled.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iFailed = reasoner.findall(\"xfailed(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iFailed.hasNext()){\n\t\t\t\t\tUnifier un = iFailed.next();\n\t\t\t\t\ttoAdd.add(\"fs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//norms deactivated (fulfilled) whose maintenance condition does not hold can be removed.\n\t\t\t\t//if they are not removed, new instances of the same norm are not activated\n\t\t\t\tIterator<Unifier> iDeactivated_to_remove = reasoner.findall(\"ds(A,Fa,Fm,Fd,Fr,Timeout)&not(Fm)\");\n\t\t\t\twhile(iDeactivated_to_remove.hasNext()){\n\t\t\t\t\tUnifier un = iDeactivated_to_remove.next();\n\t\t\t\t\ttoRemove.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\tfor(String s:toAdd){\n\t\t\t\t\treasoner.assertValue(s);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(String s:toRemove){\n\t\t\t\t\treasoner.retract(s);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(toAdd.size()>0|toRemove.size()>0);\t\t\t\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "@ParameterizedTest\n @ValueSource(booleans = { true, false })\n public void testRunConditionalWorkflowSuccessPreviousResponse(Boolean predicateTest) {\n StepWorkflow.ConditionalBuilder<Integer, Integer> andSometimesConditional = successfulBuilderOfSupplierDataOne.andSometimes(subStepSupplierDataTwo);\n StepWorkflow.Builder<Object> butOnlyIfBuilder = andSometimesConditional.butOnlyIf(new Object(), ignored -> predicateTest);\n assertEquals(subStepSupplierDataOne, butOnlyIfBuilder.start.step);\n assertNotNull(butOnlyIfBuilder.start.next);\n assertEquals(butOnlyIfBuilder.start.next.step, butOnlyIfBuilder.end.step);\n assertNull(butOnlyIfBuilder.end.next);\n\n // Create and validate then() Builder\n StepWorkflow.Builder<Integer> thenBuilder = butOnlyIfBuilder.then(subStepSupplierDataThree);\n assertEquals(subStepSupplierDataOne, thenBuilder.start.step);\n assertNotNull(thenBuilder.start.next);\n assertEquals(subStepSupplierDataOne, thenBuilder.start.step);\n assertEquals(subStepSupplierDataThree, thenBuilder.end.step);\n assertNotNull(thenBuilder.start.next.step);\n assertNull(thenBuilder.end.next);\n\n // Run and validate build()\n StepWorkflow<Integer> buildStepWorkflow = thenBuilder.build();\n assertEquals(thenBuilder.start, buildStepWorkflow.start);\n assertEquals(thenBuilder.end, buildStepWorkflow.end);\n\n // Call run() and validate return StepWorkflowResponse\n StepWorkflowResponse<Integer> response = buildStepWorkflow.run();\n assertTrue(response.wasSuccessful());\n assertEquals(DATA_THREE, response.getData());\n assertNull(response.getException());\n }", "private boolean containState(String state) {\r\n for (int i = 0; i < this.visitedList.size(); i++) {\r\n if (state.equals(this.visitedList.get(i))) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "private final List<State> PreE(List<State> y) {\r\n // {s \b S | exists s\u0001, (s � s\u0001 and s\u0001 \b Y )}\r\n List<State> states = new ArrayList<State>();\r\n //List<Transition> transitions = new ArrayList<Transition>();\r\n for (State sourceState : this._kripke.States) {\r\n for (State destState : y) {\r\n Transition myTransition = new Transition(sourceState, destState);\r\n \tfor(Transition transition : this._kripke.Transitions)\r\n \t{\r\n \t\tif (transition.FromState.equals(myTransition.FromState) &&\r\n \t\t\t\ttransition.ToState.equals(myTransition.ToState)) {\r\n \t\t\tif (!states.contains(sourceState)) {\r\n states.add(sourceState);\r\n }\r\n \t} \r\n \r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n return states;\r\n }", "@Override\n\t\tpublic boolean goalTest() {\n\t\t\tfor (int i = 0; i < k; i++) {\n\t\t\t\tif (state[i] != xGoals[i] || state[i + k] != yGoals[i]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "private boolean allTrue(CompositeTrue predicate) {\n if (kids.isEmpty()) {\n return false;\n }\n\n Iterator<E> i = kids.iterator();\n while (i.hasNext()) {\n E future = i.next();\n if (!predicate.isTrue(future)) {\n return false;\n }\n }\n return true;\n }", "@Override\n\tpublic boolean addToFrontier(PuzzleState aState) {\n\t\t\n\t\tif(Searched.contains(aState)) {\n\t\t\treturn false;\n\t\t}\n\t\telse if (Frontier.contains(aState)) {\n\t\t\tfor(PuzzleState n : Frontier) {\n\t\t\t\tif(n.getEvaluationFunction() <= aState.getEvaluationFunction())\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tFrontier.add(aState);\n\t\treturn true;\n\t}", "public MoveEvaluation alreadyDetermined(IGameState state) {\n\t\tNode<Pair> node = list.head();\n\t\t\n\t\twhile (node != null) {\n\t\t\tPair p = node.value();\n\t\t\tif (state.equivalent(p.state)) {\n\t\t\t\treturn p.move;\n\t\t\t}\n\t\t\t\n\t\t\tnode = node.next();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "private Collection<ReplayState<C>> executeEnabledMatches(ReplayState<C> state, Collection<Transition> transitions) {\r\n\t\tCollection<ReplayState<C>> states = new ArrayList<ReplayState<C>>();\r\n\t\tif (!state.trace.isEmpty()) {\r\n\t\t\tfor (Transition transition : transitions) {\r\n\t\t\t\tif (transition.isInvisible() || !map.containsKey(transition)) {\r\n\t\t\t\t} else if (map.get(transition).equals(state.trace.get(0))) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine new marking.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tMarking newMarking;\r\n\t\t\t\t\t\tsynchronized (semantics) {\r\n\t\t\t\t\t\t\tsemantics.setCurrentState(state.marking);\r\n\t\t\t\t\t\t\tsemantics.executeExecutableTransition(transition);\r\n\t\t\t\t\t\t\tnewMarking = semantics.getCurrentState();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine new cost.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tC newCost = addOperator.add(state.cost, ReplayAction.INSERT_ENABLED_MATCH, transition,\r\n\t\t\t\t\t\t\t\tstate.trace.get(0));\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine new trace.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tList<? extends Object> newTrace = getTail(state.trace);\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Add new state.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\taddState(states, state, newMarking, transition, newCost, newTrace);\r\n\t\t\t\t\t} catch (IllegalTransitionException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn states;\r\n\t}", "public boolean dependenciesInState(ResourceState ... expectedDepStates) throws DependencyException {\n\t\tfor (DependencyElement depEl : dependencies) {\n\t\t\tif (depEl.resource == null) {\n\t\t\t\tthrow new DependencyException(\"Could not locate ResourceMetadata for \" + depEl);\n\t\t\t}\n\t\t\t\n\t\t\tboolean found = false;\n\t\t\tfor (int i = 0; i < expectedDepStates.length; i++) {\n\t\t\t\tif (depEl.resource.getState().isEquivalent(expectedDepStates[i])) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\tlog.info(depEl + \" is in state [\" + depEl.resource.getState() + \"], expected [\" + Arrays.asList(expectedDepStates) + \"]\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public void checkWhichIsChosen(){\n // reset all initial set up\n moodListAfterFilter.clear();\n deleteFile(\"filter.sav\");\n flag = 0;\n // key of reason and moos state which is entered by user\n enteredMyReason = myReasonEditText.getText().toString();\n enteredFoReason = foReasonEditText.getText().toString();\n selectedMyMoodState = myEmotionalStateSpinner.getSelectedItem().toString();\n selectedFoMoodState = foEmotionalStateSpinner.getSelectedItem().toString();\n // if Myself Mood state is selected, then jump to its filter function\n if(selectedMyMoodState != null && !selectedMyMoodState.isEmpty()){\n filterByMyMoodState(selectedMyMoodState);\n flag ++;\n }\n // if Following Mood state is selected, then jump to its filter function\n if(selectedFoMoodState != null && !selectedFoMoodState.isEmpty()){\n filterByFoMoodState(selectedFoMoodState);\n flag ++;\n }\n // if Myself most recent week is selected, then jump to its filter function\n if (myMostRecentWeekCheckbox.isChecked()){\n filterByMyMostRece();\n flag ++;\n }\n // if Following most recent week is selected, then jump to its filter function\n if (foMostRecentWeekCheckbox.isChecked()){\n filterByFoMostRece();\n flag ++;\n }\n // if Myself display all is selected, then jump to its filter function\n if (myDisplayAllCheckbox.isChecked()){\n filterByMyDisplayAll();\n flag ++;\n }\n // if Following display all is selected, then jump to its filter function\n if (foDisplayAllCheckbox.isChecked()){\n filterByFoDisplayAll();\n flag ++;\n }\n // if Myself key of reason is entered, then jump to its filter function\n if(enteredMyReason != null && !enteredMyReason.isEmpty()){\n filterByMyReason(enteredMyReason);\n flag ++;\n }\n // if Following key of reason is entered, then jump to its filter function\n if(enteredFoReason != null && !enteredFoReason.isEmpty()){\n filterByFoReason(enteredFoReason);\n flag ++;\n }\n }", "protected boolean lastStateOnPathIsNew(PrioritizedSearchNode psn) {\n\n\tPrioritizedSearchNode cmpNode = (PrioritizedSearchNode) psn.backPointer;\n\n\twhile (cmpNode != null) {\n\t if (psn.equals(cmpNode)) {\n\t\treturn false;\n\t }\n\t cmpNode = (PrioritizedSearchNode) cmpNode.backPointer;\n\t}\n\n\treturn true;\n }", "public boolean removeDeadTransitions() throws Exception{\n \tArrayList<Integer> st=new ArrayList<Integer>(getStates());//st fixes some arbitrary order of states\n \tboolean [][] canReach=buildConnectionMatrix(st);\n\n \t//collect reachable states\n \tStack<Integer> worklist=new Stack<Integer>();\n \tHashSet<Integer> reachableStates=new HashSet<Integer> ();\n \tfor(String var:pointers.keySet())\n \t\tworklist.push(st.indexOf(pointers.get(var)));\n \twhile(!worklist.empty()){\n \t\tint cur=worklist.pop();\n \t\treachableStates.add(st.get(cur));\n \t\tfor(int i=0;i<st.size();i++)\n \t\t\tif(canReach[cur][i]&&!worklist.contains(i)&&!reachableStates.contains(st.get(i)))\n \t\t\t\tworklist.push(i);\n \t}\n \t//remove unreachable states\n \tboolean hasUnreachableNonReferenceStates=false;//might still be a useless state\n \tfor(TreeAutomaton ta:lt){\n \tHashSet<Integer> toRemove=new HashSet<Integer>();\n \t\tfor(int s:ta.getStates())\n \t\t\tif(!reachableStates.contains(s)){\n \t\t\t\ttoRemove.add(s);\n \t\t\t}\n \tfor(int s:toRemove){\n\t\t\t\tif(!ta.isReferenceTo(s, NULL)&&!ta.isReferenceTo(s, UNDEF)&&ta.referenceTo(s)==-1)\n\t\t\t\t\thasUnreachableNonReferenceStates=true;\n \t\t\tta.removeState(s);\n \t}\n \t}\n \treturn hasUnreachableNonReferenceStates;\n }", "public static boolean checkIfStateExist(List<State> currentStates, String stateName) {\n List<State> filtredList = currentStates.stream().filter(state -> state.getStateName().equals(stateName)).collect(Collectors.toList());\n if (filtredList.size() != 0)\n return false;\n else\n return true;\n }", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "private boolean checkNext(){\n boolean ret = this.hasNext;\n if ((this.allStatesIterator.hasNext()) || (this.allSubsetsIterator.hasNext()) || (this.allTransitionsIterator.hasNext())){\n hasNext = true;\n return hasNext;\n }\n hasNext = false;\n return ret;\n }", "private void checkState() {\r\n\t\tswitch (this.stepPanel.getStep()) {\r\n\t\tcase StepPanel.STEP_HOST_GRAPH:\r\n\t\t\tcheckHostGraphAndNextStep();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_STOP_GRAPH:\r\n\t\t\tcheckStopGraphAndNextStep();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_CRITICAL_PAIRS:\r\n\t\t\tcheckPairsAndNextStep();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_FINISH:\r\n\t\t\tcheckIfReadyToParse();\r\n\t\t\tquitDialog();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void minimize() {\n D = new boolean[states.length][states.length];\r\n S = new ArrayList<ArrayList<HashSet<Point>>>(); // lol\r\n\r\n //noinspection ForLoopReplaceableByForEach\r\n for (int i = 0; i < states.length; i++) {\r\n ArrayList<HashSet<Point>> innerList = new ArrayList<HashSet<Point>>();\r\n\r\n //noinspection ForLoopReplaceableByForEach\r\n for (int j = 0; j < states.length; j++) {\r\n Arrays.fill(D[i], false);\r\n innerList.add(new HashSet<Point>());\r\n }\r\n S.add(innerList);\r\n }\r\n\r\n // 2. states with different acceptances are distinguishable\r\n for (int i = 0; i < states.length; i++) {\r\n for (int j = i + 1; j < states.length; j++) {\r\n if (acceptStates.contains(i) != acceptStates.contains(j)) {\r\n D[i][j] = true;\r\n }\r\n }\r\n }\r\n\r\n // 3. mark as possibly indistinguishable, enforce distinguishability\r\n for (int i = 0; i < states.length; i++) {\r\n for (int j = i + 1; j < states.length; j++) {\r\n // only pairs that are as of yet indistinguishable\r\n if (D[i][j]) {\r\n continue;\r\n }\r\n\r\n DFAState qi = states[i];\r\n DFAState qj = states[j];\r\n\r\n // one of the things being compared is unreachable\r\n if (qi == null || qj == null) {\r\n continue;\r\n }\r\n\r\n // helps emulate \"for any\"\r\n boolean distinguished = false;\r\n for (int k = 0; k < qi.transitions.size(); k++) {\r\n int m = qi.transitions.get(k);\r\n int n = qj.transitions.get(k);\r\n\r\n // if on the same letter, qm and qn move to distinguishable states\r\n if (D[m][n] || D[n][m]) {\r\n dist(i, j);\r\n distinguished = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!distinguished) {\r\n // qm and qn are indistinguishable\r\n for (int k = 0; k < qi.transitions.size(); k++) {\r\n int m = qi.transitions.get(k);\r\n int n = qj.transitions.get(k);\r\n\r\n if (m < n && !(i == m && j == n)) {\r\n S.get(m).get(n).add(new Point(i, j));\r\n } else if (m > n && !(i == n && j == m)) {\r\n S.get(n).get(m).add(new Point(i, j));\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n mergeStates();\r\n }", "@Override\n protected Collection<BDDState> preCheck(BDDState pState, VariableTrackingPrecision pPrecision) {\n if (pPrecision.isEmpty()) {\n return Collections.singleton(pState);\n }\n // the path is not fulfilled\n if (pState.getRegion().isFalse()) {\n return ImmutableList.of();\n }\n return null;\n }", "private final boolean AreListStatesEqual(List<State> list1, List<State> list2) {\r\n if ((list1.size() != list2.size())) {\r\n return false;\r\n }\r\n \r\n for (State state : list1) {\r\n if (!list2.contains(state)) {\r\n return false;\r\n }\r\n \r\n }\r\n \r\n return true;\r\n }", "public boolean canHandleString(String s){\n\t\tArrayList<State> curStates=new ArrayList<State>(startStates);\n\t\tboolean ret=false;\n\t\t//System.err.println(\"Begin Processing \"+s);//+\" with:\\n\"+curStates);\n\n\t\t\tfor(char c :s.toCharArray()){\n\t\t\t\t//copy into new array so we aren't messing with original\n\t\t\t\tArrayList<Integer> addStateIdxs = new ArrayList<Integer>();\n\t\t\t\tArrayList<Integer> removeStateIdxs = new ArrayList<Integer>();\n\t\t\t\t\n\t\t\t\t//Step 1: check all curStates for char\n\t\t\t\tfor(int i=0;i<curStates.size();i++){\n\t\t\t\t\t//Step 1.1: if curStates[i] can move to a new state,\n\t\t\t\t\tArrayList<Integer> goesTo=curStates.get(i).goesTo(\"\"+c);\n\t\t\t\t\tif(goesTo!=null && goesTo.size()>0){\n\t\t\t\t\t\t//1.1.1: add to removeStateIdxs\n\t\t\t\t\t\tremoveStateIdxs.add(i);\n\t\t\t\t\t\t//1.1.2: append to newStateIdxs\n\t\t\t\t\t\taddStateIdxs.addAll(curStates.get(i).goesTo(\"\"+c));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//1.1.3: add to removeStateIdxs if we can't go anywhere\n\t\t\t\t\t\tremoveStateIdxs.add(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tCollections.sort(removeStateIdxs);\n\t\t\t\t//Step 2: remove currentStates[removeStateIdxs]\n\t\t\t\tfor(int i=removeStateIdxs.size()-1;i>=0;i--){\n\t\t\t\t\tif(curStates. get(i)!=null)\n\t\t\t\t\t\tcurStates.remove(i);\n\t\t\t\t}\n\t\t\t\t//Step 3: append addStateIdxs to curState\n\t\t\t\tfor(int i:addStateIdxs){\n//\t\t\t\t\tif(theStates.get(i)!=null)\n\t\t\t\t\t\tcurStates.add(theStates.get(i));\n\t\t\t\t}\n\n\t\t\t\t//System.err.println(\"at \"+c+\": \"+curStates);\n\t\t\t}\n\t\t\t\n\t\t\tfor(State S:curStates){\n\t\t\t\tif(S.getAccept()){\n\t\t\t\t\tret=true;\n\t\t\t\t\t//System.out.println(\"ACCEPTS!\");\n\t\t\t\t}\n\t\t\t}\n//\t\t\tSystem.out.println((ret?\"ACCEPTS!\":\"REJECTS!\"));\n\t\t\n\t\treturn ret;\n\t}", "private Collection<ReplayState<C>> executeDisabledMismatches(ReplayState<C> state,\r\n\t\t\tCollection<Transition> transitions) {\r\n\t\tCollection<ReplayState<C>> states = new ArrayList<ReplayState<C>>();\r\n\t\tif (!state.trace.isEmpty()) {\r\n\t\t\tfor (Transition transition : transitions) {\r\n\t\t\t\tif (transition.isInvisible() || !map.containsKey(transition)) {\r\n\t\t\t\t} else if (!map.get(transition).equals(state.trace.get(0))) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Enable the disabled transition by adding sufficient\r\n\t\t\t\t\t\t * tokens in its preset places.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tMarking preMarking = new Marking(state.marking);\r\n\t\t\t\t\t\tCollection<PetrinetEdge<? extends PetrinetNode, ? extends PetrinetNode>> edges = transition\r\n\t\t\t\t\t\t\t\t.getGraph().getInEdges(transition);\r\n\t\t\t\t\t\tfor (PetrinetEdge<? extends PetrinetNode, ? extends PetrinetNode> e : edges) {\r\n\t\t\t\t\t\t\tif (e instanceof Arc) {\r\n\t\t\t\t\t\t\t\tArc arc = (Arc) e;\r\n\t\t\t\t\t\t\t\tif (arc.getWeight() > state.marking.occurrences(arc.getSource())) {\r\n\t\t\t\t\t\t\t\t\tpreMarking.add((Place) arc.getSource(), arc.getWeight()\r\n\t\t\t\t\t\t\t\t\t\t\t- state.marking.occurrences(arc.getSource()));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine the new marking.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tMarking newMarking;\r\n\t\t\t\t\t\tsynchronized (semantics) {\r\n\t\t\t\t\t\t\tsemantics.setCurrentState(preMarking);\r\n\t\t\t\t\t\t\tsemantics.executeExecutableTransition(transition);\r\n\t\t\t\t\t\t\tnewMarking = semantics.getCurrentState();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine the new cost.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tC newCost = addOperator\r\n\t\t\t\t\t\t\t\t.add(state.cost, ReplayAction.INSERT_DISABLED_MISMATCH, transition, null);\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Add new state.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\taddState(states, state, newMarking, transition, newCost, state.trace);\r\n\t\t\t\t\t} catch (IllegalTransitionException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn states;\r\n\t}", "public boolean referencesInState(ResourceState ... expectedRefStates) throws DependencyException {\n\t\tfor (DependencyElement refEl : references) {\n\t\t\tif (refEl.resource == null) {\n\t\t\t\tthrow new DependencyException(\"Could not locate ResourceMetadata for \" + refEl);\n\t\t\t}\n\t\t\t\n\t\t\tboolean found = false;\n\t\t\tfor (int i = 0; i < expectedRefStates.length; i++) {\n\t\t\t\tif (refEl.resource.getState().isEquivalent(expectedRefStates[i])) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\tlog.info(refEl + \" is in state [\" + refEl.resource.getState() + \"], expected [\" + Arrays.asList(expectedRefStates) + \"]\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "void beforeState();", "private boolean doLeftPop(final S nonTerminal, final Predicate<S> letterPredicate) {\n if(!slp.containsProduction(nonTerminal) || slp.getAxioms().contains(nonTerminal)) {\n return false;\n }\n P production = getProduction(nonTerminal);\n S head = production.getRight().findFirst(s -> !s.isEmpty()).get();\n return letterPredicate.test(head) && !production.getRight().isEmpty();\n }", "private void ensureConditionContinuity( )\n {\n /* If the operators are not valid, then do not move the conditions */\n if ( checkOperators() )\n {\n /*\n * When Left Hand Side, Operator and Right Hand Side for a Condition\n * are empty then infer the default value, i.e., set Operator to\n * CVL_WF_OPRSImpl.EQUAL. Left Hand Side and Right Hand Side will continue\n * to remain empty.\n */\n defaultForEmptyConditions();\n\n int liCount = 0;\n int liNumber = 0 ;\n int liCurrentRow = 0;\n Data loNewData = null ;\n Data loOldData = null ;\n\n /* Cycle through the conditions. Make sure the conditions in front */\n /* of current condition are not blank, if so, move current condition up */\n\n for (liCount = 2; liCount < 6; liCount++ )\n {\n liNumber = liCount ;\n while (liNumber > 1)\n {\n liCurrentRow = liCount - ( liNumber - 1 );\n if (getAND_COND_LHS(liCurrentRow) == null)\n {\n /*\n * copy old condition to new condition, or condition 2 to 1 ...\n * first get data from new left hand side, and get data from\n * old left hand side, and copy new to old. Repeat for right\n * hand side , operator and Condition Type.\n */\n\n loNewData = getData(\"AND_COND_LHS_\" + liCount ) ;\n loOldData = getData(\"AND_COND_LHS_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_RHS_\" + liCount ) ;\n loOldData = getData(\"AND_COND_RHS_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_RHS_FLD_\" + liCount ) ;\n loOldData = getData(\"AND_COND_RHS_FLD_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_OPR_\" + liCount ) ;\n loOldData = getData(\"AND_COND_OPR_\" + liCurrentRow ) ;\n loOldData.setbyte(loNewData.getbyte() );\n loNewData = getData(\"AND_COND_TYP_\" + liCount ) ;\n loOldData = getData(\"AND_COND_TYP_\" + liCurrentRow ) ;\n loOldData.setint(loNewData.getint() );\n /*\n * reset the old condition back to null ,operator to default 3\n * and Condition type to 1 (i.e. Actual Value)\n */\n loNewData = getData(\"AND_COND_LHS_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_RHS_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_RHS_FLD_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_OPR_\" + liCount ) ;\n loNewData.setbyte((byte)3);\n loNewData = getData(\"AND_COND_TYP_\" + liCount ) ;\n loNewData.setint(CVL_WF_COND_TYPImpl.ACTUAL_VAL);\n\n } /* end if (getAND_COND_LHS(liCurrentRow) == null) */\n\n liNumber-- ;\n\n } /* end while (liNumber > 1) */\n } /* end for (liCount = 2; liCount < 6; liCount++ ) */\n } /* end if ( checkOperators() ) */\n }", "protected void stateChanged(final SpacecraftState state) {\n final AbsoluteDate date = state.getDate();\n final boolean forward = date.durationFrom(getStartDate()) >= 0.0;\n for (final DoubleArrayDictionary.Entry changed : state.getAdditionalStatesValues().getData()) {\n final TimeSpanMap<double[]> tsm = unmanagedStates.get(changed.getKey());\n if (tsm != null) {\n // this is an unmanaged state\n if (forward) {\n tsm.addValidAfter(changed.getValue(), date, false);\n } else {\n tsm.addValidBefore(changed.getValue(), date, false);\n }\n }\n }\n }", "private State assertState(State... states)\r\n\t{\r\n\t\tfor (State state : states)\r\n\t\t{\r\n\t\t\tif (this.state == state) return this.state;\r\n\t\t}\r\n\r\n\t\tthrow new IllegalStateException(this.state.toString());\r\n\t}", "private void goPredicate() {\n\t\t\n\t\tSurinamBananas sb = new SurinamBananas();\n\t\t\n\t\tCardboardBox<Musa,Integer> cb = sb.boxSupplier.get();\n\t\t\n\t\t// 3 bananas\n\t\tcb.add(new Basjoo()); // cb.add(new Basjoo()); cb.add(new Basjoo());\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > predIsEmpty = (c) -> c.size() == 0;\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > predLessThan3 = (c) -> c.size() < 3;\n\t\tPredicate< CardboardBox<Musa,Integer> > predMoreThan2 = (c) -> c.size() > 2;\n\t\tPredicate< CardboardBox<Musa,Integer> > predMoreThan6 = (c) -> c.size() > 6;\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > notEmptyAndMoreThan2 = predIsEmpty.negate().and(predMoreThan2);\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > lessThanThreeOrMoreThan6 = (predIsEmpty.negate().and(predLessThan3)) .or(predIsEmpty.negate().and(predMoreThan6) );\n\t\t\n\t\t//System.out.println( \"notEmptyAndMoreThan2: \" + notEmptyAndMoreThan2.test(cb) );\n\t\tSystem.out.println( \"lessThanThreeOrMoreThan6: \" + lessThanThreeOrMoreThan6.test(cb) );\n\t\t\n\t}", "boolean hasConditionList();", "private List<State> substitueStateSketch(State oldState, Set<Node> components) {\n\n// long start = System.currentTimeMillis();\n\n List<State> ret = new ArrayList<>();\n\n for (Node sk : components) {\n\n State newState = new State(oldState);\n VariableNode v = newState.pp.findSelectedVar();\n v.sketch = sk;\n\n if (sk instanceof NullaryTerminalNode) {\n\n NullaryTerminalNode n = (NullaryTerminalNode) sk;\n\n if (v.parent != null && !(v.parent instanceof RepSketchNode)) {\n if (((OperatorNode) v.parent).operatorName.equals(\"notcc\")) {\n if (n.sym.name.equals(\"<any>\")) continue;\n } else if (((OperatorNode) v.parent).operatorName.equals(\"not\")) {\n newState.cost += Main.NOT_TERMINAL_PATTERN;\n }\n }\n\n newState.pp.numNullaryTerminals++;\n } else if (sk instanceof OperatorNode) {\n if (((OperatorNode) sk).special) newState.cost += Main.SPECIAL_REPEATATLEAST_1;\n\n String opName = ((OperatorNode) sk).operatorName;\n\n if (v.parent != null && !(v.parent instanceof RepSketchNode)) {\n if (((OperatorNode) v.parent).operatorName.equals(\"not\")) {\n if (!(opName.equals(\"startwith\") || opName.equals(\"endwith\") || opName.equals(\"contain\"))) {\n newState.cost += Main.NOT_NOT_CONTAIN_SW_EW_PATTERN;\n }\n }\n }\n } else {\n\n // do not continue if we are trying to replace argument of notcc with a op node\n if (v.parent != null && !(v.parent instanceof RepSketchNode)) {\n if (((OperatorNode) v.parent).operatorName.equals(\"notcc\")) {\n continue;\n }\n }\n }\n\n newState.pp.numOperatorSketch++; // TODO: it might be a problem if we have a rf sketch such as concat(v:contain(v:?{<num>}))\n newState.pp.deselectVar();\n if (evalApprox(newState)) ret.add(newState);\n\n }\n\n return ret;\n\n }", "private boolean checkAllMapsTo(\n Set<BooleanFormula> from,\n SSAMap startSSA,\n Set<BooleanFormula> to,\n SSAMap finishSSA,\n BooleanFormula transition\n ) throws SolverException, InterruptedException {\n return solver.isUnsat(bfmgr.and(\n fmgr.instantiate(bfmgr.and(from), startSSA),\n transition,\n fmgr.instantiate(bfmgr.not(bfmgr.and(to)), finishSSA)\n ));\n }", "private boolean isLegalState(int[] state){\n int[] stateOtherSide = new int[3];\n stateOtherSide[0] = totalMissionaries - state[0];\n stateOtherSide[1] = totalCannibals - state[1];\n stateOtherSide[2] = state[2]==0 ? 1 : 0;\n\n if((state[0] < state[1]) && state[0] >0 || (stateOtherSide[0] < stateOtherSide[1]) && stateOtherSide[0] > 0) {\n return false;\n }else{\n return true;\n }\n }", "public boolean legalMove(ArrayList<Point2D> inputMove,ArrayList<Object> Gamestate){\n FooHistory currentGameState = (FooHistory) Gamestate.get(0);\n ArrayList<Point2D> player1moves= currentGameState.getCurrentState().get(0);\n ArrayList<Point2D> player2moves= currentGameState.getCurrentState().get(1);\n //System.out.println(\"Player1 moves in FooRules: \"+ player1moves);\n \n if(inputMove.size()==1){\n for(ArrayList<Point2D> array: currentGameState.getCurrentState()){\n for(Point2D point:array){\n if(inputMove.get(0).getX()==point.getX() && inputMove.get(0).getY()==point.getY()){\n System.out.println(\"Ilegal Move\");\n return false;\n }\n }\n }\n return true;\n }\n else{//Deals with moving a piece to take pieces\n if(adjacent(inputMove.get(0),inputMove.get(1))){//Makes sure the two input moves are adjacent\n if(currentGameState.getTurnCount()%2==1){ //Player 1's turn\n for(Point2D point:player2moves){\n if(point.getX()==inputMove.get(1).getX() && point.getY()==inputMove.get(1).getY()){\n return true;\n }\n }\n }\n if(currentGameState.getTurnCount()%2==0){//Player 2's turn\n for(Point2D point:player1moves){\n if(point.getX()==inputMove.get(1).getX() && point.getY()==inputMove.get(1).getY()){\n return true;\n }\n }\n }\n }\n System.out.println(\"Ilegal Move\"); \n return false; \n }\n \n }", "private boolean keepEvaluating(Stack<Operator> pOperatorStack, Operator pOperator) {\n if (pOperatorStack.isEmpty()) {\n return false;\n } else {\n return pOperatorStack.peek().stackPrecedence() >= pOperator.precedence();\n }\n }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "private void computeExternalState(InternalState newState) {\n if (internalState != newState) {\n switch (internalState) {\n case BUILD:\n Preconditions.checkState(newState == InternalState.PROBE_IN || newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROBE_IN:\n Preconditions.checkState(newState == InternalState.PROBE_PIVOT_AND_OUT ||\n newState == InternalState.PROJECT_NON_MATCHES ||\n newState == InternalState.REPLAY ||\n newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROBE_OUT:\n case PROBE_PIVOT_AND_OUT:\n Preconditions.checkState(newState == InternalState.PROBE_IN ||\n newState == InternalState.PROBE_OUT ||\n newState == InternalState.PROBE_PIVOT_AND_OUT ||\n newState == InternalState.PROJECT_NON_MATCHES ||\n newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROJECT_NON_MATCHES:\n Preconditions.checkState(newState == InternalState.REPLAY || newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case REPLAY:\n Preconditions.checkState(newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n }\n internalState = newState;\n }\n computeExternalState();\n }", "@Override\n\tpublic boolean setUp(Action action) {\n\t\tif (action == null)\n\t\t\treturn false;\n\t\t\n\t\t// ACTIONS THAT LEAD TO THIS STATE\n\t\tif (action.ID == StateActionRegistry.A.GO)\n\t\t{\n\t\t\tGo g = (Go) action;\n\t\t\tif (g.owner == null || (g.loc == null && g.locationOf == null))\n\t\t\t\t\treturn false;\n\t\t\towner = g.owner;\n\t\t\tif (g.loc != null)\n\t\t\t{\n\t\t\t\tloc = g.loc;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlocationOf = g.locationOf;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t\n\t\t// ACTIONS WHOSE PRECOND INCLUDES THIS STATE\n\t\tif (action.ID == StateActionRegistry.A.TAKE)\n\t\t{\n\t\t\tTake t = (Take) action;\n\t\t\tif (t.owner == null || t.taken == null)\n\t\t\t\treturn false;\n\t\t\towner = t.owner;\n\t\t\tlocationOf = t.taken;\n\t\t\treturn true;\n\t\t} else if (action.ID == StateActionRegistry.A.STEAL)\n\t\t{\n\t\t\t\n\t\t\tSteal s = (Steal) action;\n\t\t\tif (s.owner == null || s.stolen == null)\n\t\t\t\treturn false;\n\t\t\towner = s.owner;\n\t\t\tlocationOf = s.stolen;\n\t\t\treturn true;\n\t\t} else if (action.ID == StateActionRegistry.A.ASKTO)\n\t\t{\n\t\t\tAskTo a = (AskTo) action;\n\t\t\tif (a.asker == null || a.askee == null)\n\t\t\t\treturn false;\n\t\t\towner = a.asker;\n\t\t\tlocationOf = a.askee;\n\t\t\treturn true;\n\t\t} else if (action.ID == StateActionRegistry.A.GIVE)\n\t\t{\n\t\t\tGive g = (Give) action;\n\t\t\tif (g.giver == null || g.givee == null || g.obj == null || g.obj.owner != g.giver)\n\t\t\t\treturn false;\n\t\t\towner = g.giver;\n\t\t\tlocationOf = g.givee;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}", "@Override\n public boolean checkCurrentStates(final CurrentStateOutput currentStateOutput,\n final String resourceName, final Partition partition, StateModelDefinition stateModelDef) {\n if (!stateModelDef.isSingleTopStateModel()) {\n return true;\n }\n // TODO: Cache top state count in the ResourceControllerDataProvider and avoid repeated counting\n // TODO: here. It would be premature to do it now. But with more use case, we can improve the\n // TODO: ResourceControllerDataProvider to calculate by default.\n if (currentStateOutput.getCurrentStateMap(resourceName, partition).values().stream()\n .filter(state -> state.equals(stateModelDef.getTopState())).count() > 1) {\n return false;\n }\n return true;\n }", "@Test\n public void testStateTransitions1()\n { \n assertTrue(theEngine.inStartingState());\n \n //Starting -> Halted\n theEngine.quit();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inStartingState());\n\n //Starting -> Player died\n killPlayerByPlayerMove();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inStartingState());\n \n //Starting -> Player won\n letPlayerWin();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inStartingState());\n \n theEngine.start();\n theEngine.quit();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inHaltedState());\n \n //Halted -> Starting\n //impossible through code\n\n //Halted -> Player died\n killPlayerByPlayerMove();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inHaltedState());\n\n //Halted -> Player won\n letPlayerWin();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inHaltedState());\n\n theEngine.start();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inPlayingState());\n \n //Playing -> Starting\n //impossible by code\n \n killPlayerByPlayerMove();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inDiedState());\n \n //Player died -> Halted\n theEngine.quit();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inDiedState());\n \n //Player died -> Player won\n letPlayerWin();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inDiedState());\n \n //Undo from player died state\n theEngine.undoLastMove();\n //this didn't throw assertion error, so this is fine\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inHaltedState());\n }", "private void isFiltersSatisfied() {\n Filter[] filters = rule.getFilters();\n for (int i = 0; i < filters.length; i++) {\n linkedList.add(filters[i]);\n }\n recursiveFiltering(linkedList.peek().filter.split(\":\"),null);\n }", "@Override\n\tpublic boolean CheckFacts(){\n\t\tqueries.add( query );\n\t\t\n\t\t// while there are still queries to be proven\n\t\twhile ( queries.size() > 0 )\n\t\t{\n\t\t\t// take the first query off of queries to be checked \n\t\t\tString currentQuery = queries.remove(0);\n\n\t\t\t// add it to the list of queries that will be used to output (if true)\n\t\t\toutputFacts.add( currentQuery );\n\n\t\t\t// Compare currentQuery with every fact in Facts:\n\t\t\t// if it matches a fact then the current loop can end\n\t\t\tif( ! CompareToFacts( currentQuery ) )\n\t\t\t{\n\t\t\t\t// if not, compare currentQuery with every entailed literal\n\t\t\t\t// if it matches, add the literal(s) from the left\n\t\t\t\t// of the entailment onto queries\n\t\t\t\tif( ! CompareToClauses( currentQuery ) )\n\t\t\t\t{\n\t\t\t\t\t// if currentQuery still didn’t find a match then \n\t\t\t\t\t// the search has failed \n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// when queries is empty, it means there are no more queries to prove,\n\t\t// so the search was a success\n\t\treturn true;\n\t}", "List<State> findStatesBetweenOrders( int nOrder1, int nOrder2, int nIdWorkflow );", "boolean hasHasState();", "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 }", "private void evaluationLogic() {\n // setup for logic:\n // if distToClosestEstimate[i][0] is smaller than threshold, we have a Tp\n // if distToClosestEstimate[i][0] is larger than threshold, we have a Fn\n // all estimatedFeatures that are not assigned Tp are therefore Fp\n for (int i = 0; i < groundTruthInstant.size(); ++i) {\n if (distToClosestEstimate[i][0] < truePositiveThreshold) {\n ++truePositiveCount;\n int assignedEstimatedFeature = (int) distToClosestEstimate[i][1];\n assignedEstimatedFeatures[assignedEstimatedFeature] = true;\n } else\n ++falseNegativeCount;\n }\n for (int i = 0; i < estimatedInstant.size(); ++i)\n if (!assignedEstimatedFeatures[i])\n ++falsePositiveCount;\n }", "public void checkState() {\r\n\t\tout.println(state);\r\n\t\tif(getEnergy() < 80 && getOthers() > 5) {\r\n\t\t\tstate = 1;\r\n\t\t\tturnLeft(getHeading() % 90);\r\n\t\t\tahead(moveAmount);\r\n\t\t}\r\n\t\telse if(getEnergy() < 80 && getOthers() < 5) {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\t\r\n\t}", "private boolean hasUniqueState()\n {\n return (getExternalArcState() == getMiddleArcState() && getExternalArcState() == getInternalArcState() && getExternalArcState() == getCircleState());\n }", "public static boolean containsExactlyTaskStates(Task task, TaskState... expectedStates) {\n if (expectedStates.length == 0) {\n return false;\n }\n\n TaskState taskState = task.getStatus().getState();\n List<TaskStatus> statusHistory = task.getStatusHistory();\n if (expectedStates.length == 1 && statusHistory.isEmpty()) {\n return taskState == expectedStates[0];\n }\n\n // For non-single state values, we have to eliminate possible duplicates.\n Set<TaskState> expectedPreviousStates = CollectionsExt.asSet(expectedStates);\n Set<TaskState> taskStates = statusHistory.stream().map(ExecutableStatus::getState).collect(Collectors.toSet());\n taskStates.add(taskState);\n\n return expectedPreviousStates.equals(taskStates);\n }", "protected void evaluateConditions()\n {\n ensureConditionContinuity() ;\n checkComponentList() ;\n\n for ( int liCondCtr = 1 ; liCondCtr <= 5 ; liCondCtr++ )\n {\n checkCondition( liCondCtr ) ;\n } /* end for */\n\n }", "public boolean isStateActive(State state) {\n\t\tswitch (state) {\n\t\t\tcase mainRegion_State1 :\n\t\t\t\treturn stateVector[0] == State.mainRegion_State1;\n\t\t\tcase mainRegion_State2 :\n\t\t\t\treturn stateVector[0].ordinal() >= State.mainRegion_State2.ordinal()\n\t\t\t\t\t\t&& stateVector[0].ordinal() <= State.mainRegion_State2__region0_State5.ordinal();\n\t\t\tcase mainRegion_State2__region0_a :\n\t\t\t\treturn stateVector[0] == State.mainRegion_State2__region0_a;\n\t\t\tcase mainRegion_State2__region0_State4 :\n\t\t\t\treturn stateVector[0].ordinal() >= State.mainRegion_State2__region0_State4.ordinal() && stateVector[0]\n\t\t\t\t\t\t.ordinal() <= State.mainRegion_State2__region0_State4__region0_State7__region0_State9.ordinal();\n\t\t\tcase mainRegion_State2__region0_State4__region0_State6 :\n\t\t\t\treturn stateVector[0] == State.mainRegion_State2__region0_State4__region0_State6;\n\t\t\tcase mainRegion_State2__region0_State4__region0_State7 :\n\t\t\t\treturn stateVector[0].ordinal() >= State.mainRegion_State2__region0_State4__region0_State7.ordinal()\n\t\t\t\t\t\t&& stateVector[0]\n\t\t\t\t\t\t\t\t.ordinal() <= State.mainRegion_State2__region0_State4__region0_State7__region0_State9\n\t\t\t\t\t\t\t\t\t\t.ordinal();\n\t\t\tcase mainRegion_State2__region0_State4__region0_State7__region0_State8 :\n\t\t\t\treturn stateVector[0] == State.mainRegion_State2__region0_State4__region0_State7__region0_State8;\n\t\t\tcase mainRegion_State2__region0_State4__region0_State7__region0_State9 :\n\t\t\t\treturn stateVector[0] == State.mainRegion_State2__region0_State4__region0_State7__region0_State9;\n\t\t\tcase mainRegion_State2__region0_State5 :\n\t\t\t\treturn stateVector[0] == State.mainRegion_State2__region0_State5;\n\t\t\tdefault :\n\t\t\t\treturn false;\n\t\t}\n\t}", "private Collection<ReplayState<C>> executeDisabledMatches(ReplayState<C> state, Collection<Transition> transitions) {\r\n\t\tCollection<ReplayState<C>> states = new ArrayList<ReplayState<C>>();\r\n\t\tif (!state.trace.isEmpty()) {\r\n\t\t\tfor (Transition transition : transitions) {\r\n\t\t\t\tif (transition.isInvisible() || !map.containsKey(transition)) {\r\n\t\t\t\t} else if (map.get(transition).equals(state.trace.get(0))) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Enable the disabled transition by adding sufficient\r\n\t\t\t\t\t\t * tokens in its preset places.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tMarking preMarking = new Marking(state.marking);\r\n\t\t\t\t\t\tCollection<PetrinetEdge<? extends PetrinetNode, ? extends PetrinetNode>> edges = transition\r\n\t\t\t\t\t\t\t\t.getGraph().getInEdges(transition);\r\n\t\t\t\t\t\tfor (PetrinetEdge<? extends PetrinetNode, ? extends PetrinetNode> e : edges) {\r\n\t\t\t\t\t\t\tif (e instanceof Arc) {\r\n\t\t\t\t\t\t\t\tArc arc = (Arc) e;\r\n\t\t\t\t\t\t\t\tif (arc.getWeight() > state.marking.occurrences(arc.getSource())) {\r\n\t\t\t\t\t\t\t\t\tpreMarking.add((Place) arc.getSource(), arc.getWeight()\r\n\t\t\t\t\t\t\t\t\t\t\t- state.marking.occurrences(arc.getSource()));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine the new marking.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tMarking newMarking;\r\n\t\t\t\t\t\tsynchronized (semantics) {\r\n\t\t\t\t\t\t\tsemantics.setCurrentState(preMarking);\r\n\t\t\t\t\t\t\tsemantics.executeExecutableTransition(transition);\r\n\t\t\t\t\t\t\tnewMarking = semantics.getCurrentState();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine the new cost.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tC newCost = addOperator.add(state.cost, ReplayAction.INSERT_DISABLED_MATCH, transition,\r\n\t\t\t\t\t\t\t\tstate.trace.get(0));\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine the new trace.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tList<? extends Object> newTrace = getTail(state.trace);\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Add new state.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\taddState(states, state, newMarking, transition, newCost, newTrace);\r\n\t\t\t\t\t} catch (IllegalTransitionException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn states;\r\n\t}", "public boolean updateState(Landscape scape) {\n\t\tboolean[] emptyElevators = new boolean[this.elevators.length];\n\t\tint emptyCount = 0;\n\t\t\n\t\t\n\t\t\t\t\n\t\t// this finds out which elevators are in which state and what direction they are traveling in so that\n\t\t// we can only act on ones that are in similar situations\n\t\tfor( int i = 0 ; i < this.elevators.length ; i++){\n\t\t\t// empty and has no target floor\n\t\t\tif( this.elevators[i].isEmpty() ){\n\t\t\t\temptyElevators[i] = true;\n\t\t\t\temptyCount++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\temptyElevators[i] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( ElevatorBank.strategy == ElevatorBank.STRATEGY.GROUP_3){\n\t\t\temptyRule2(emptyElevators, emptyCount);\n\t\t}\n\t\telse{\n\t\t\temptyRule(emptyElevators, emptyCount);\n\t\t}\n\t\t// never dies\n\t\treturn true;\n\t}", "private Collection<ReplayState<C>> executeInvisible(ReplayState<C> state, Collection<Transition> transitions) {\r\n\t\tCollection<ReplayState<C>> states = new ArrayList<ReplayState<C>>();\r\n\t\tfor (Transition transition : transitions) {\r\n\t\t\tif (transition.isInvisible() || !map.containsKey(transition)) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Determine new marking.\r\n\t\t\t\t\t */\r\n\t\t\t\t\tMarking newMarking;\r\n\t\t\t\t\tsynchronized (semantics) {\r\n\t\t\t\t\t\tsemantics.setCurrentState(state.marking);\r\n\t\t\t\t\t\tsemantics.executeExecutableTransition(transition);\r\n\t\t\t\t\t\tnewMarking = semantics.getCurrentState();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Determine new cost.\r\n\t\t\t\t\t */\r\n\t\t\t\t\tC newCost = addOperator.add(state.cost, ReplayAction.INSERT_ENABLED_INVISIBLE, transition, null);\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Add new state.\r\n\t\t\t\t\t */\r\n\t\t\t\t\taddState(states, state, newMarking, transition, newCost, state.trace);\r\n\t\t\t\t} catch (IllegalTransitionException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn states;\r\n\t}", "boolean containsObjectFlowState(ObjectFlowState objectFlowState);", "@Test\n public void trueAndFalseCombined() {\n assertFalse(getPredicateInstance(false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(false, null, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n }", "boolean testAnyLeft(Tester t) {\n return t.checkExpect(this.mt.anyLeft(), false) && t.checkExpect(this.los3.anyLeft(), true)\n && t.checkExpect(this.lob1.anyLeft(), true);\n }", "@Override\n public void enterCondition(FSMParser.ConditionContext ctx) {\n if (ctx.var() != null && ((Var) findComp(ctx.var().NAME().getText())).isInput() &&\n ((Var) findComp(ctx.var().NAME().getText())).getBitSize() < 2) {\n Var inputflag = (Var) findComp(ctx.var().NAME().getText());\n FSMParser.Next_stateContext context = (FSMParser.Next_stateContext) ctx.getParent();\n int nextState = Integer.parseInt(\n context.STATENUMBER().getText().substring(6, context.STATENUMBER().getText().length()));\n\n //checking to see if true or false\n if (Integer.parseInt(ctx.expression().integer().opp.getText()) == 1) {\n this.conditions.get(0).put(inputflag, nextState);\n if (!this.conditionsOrder.contains(inputflag))\n this.conditionsOrder.add(inputflag);\n } else if (Integer.parseInt(ctx.expression().integer().opp.getText()) == 0) {\n this.conditions.get(1).put(inputflag, nextState);\n if (!this.conditionsOrder.contains(inputflag))\n this.conditionsOrder.add(inputflag);\n }\n return;\n\n }\n //finding the 2 components that are compaired\n VerilogComp compare1;\n VerilogComp compare2;\n if (ctx.register() != null) {\n compare1 = findComp(ctx.register().NAME().getText());\n\n } else {\n compare1 = findComp(ctx.var().NAME().getText());\n }\n\n if (ctx.expression().var() != null) {\n compare2 = findComp(ctx.expression().var().NAME().getText());\n } else if (ctx.expression().integer() != null) {\n int temp = Integer.parseInt(ctx.expression().integer().getText());\n FixedNumber tempfixed = new FixedNumber(temp, compare1.getBitSize());\n compare2 = tempfixed;\n this.comps.add(tempfixed);\n\n } else {\n compare2 = findComp(ctx.expression().register().NAME().getText());\n }\n\n // if the opp type is not equals, append the equals ctx number, as we do not want to make\n // another flag if the equals flag exists\n int ctx_opp = (ctx.opp.getType()==19)?16:ctx.opp.getType();\n String text = compare1.getName().substring(0, 1) + compare2.getName().substring(0, 1) + ctx_opp;\n FSMParser.Next_stateContext context = (FSMParser.Next_stateContext) ctx.getParent();\n int nextState = Integer.parseInt(\n context.STATENUMBER().getText().substring(6, context.STATENUMBER().getText().length()));\n\n //if there is no flag for this condition, make a variable and give it to conditionsTrue map\n if (findComp(\"flag_\" + text) == null) {\n\n\n Var output = new Var(\"flag_\" + text,\n 1, false, true, false);\n if (!(this.compInputs.containsKey(compare1.getName() + \"|\" + compare2.getName()))) {\n this.compInputs.put(compare1.getName() + \"|\" + compare2.getName(), new Var[3]);\n }\n\n Var[] flags = this.compInputs.get(compare1.getName() + \"|\" + compare2.getName());\n\n\n // finding the type of condition based on token Num\n //equals and not equals\n if (ctx.opp.getType() == 16 || ctx.opp.getType() == 19) {\n flags[1] = output;\n if (ctx.opp.getType() == 16) {\n this.conditions.get(0).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n } else {\n this.conditions.get(1).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n }\n //greatethan\n } else if (ctx.opp.getType() == 17) {\n flags[2] = output;\n this.conditions.get(0).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n\n //less than\n } else if (ctx.opp.getType() == 18) {\n flags[0] = output;\n this.conditions.get(0).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n }\n this.comps.add(output);\n\n\n //if equals flag exists but creating a not equals flag\n } else if (!this.conditions.get(0).containsKey(findComp(\"flag_\" + text)) && ctx.opp.getType() == 17) {\n this.conditions.get(1).put((Var) findComp(\"flag_\" + text), nextState);\n this.conditionsOrder.add((Var) findComp(\"flag_\" + text));\n } else {\n Var output = (Var) findComp(\"flag_\" + text);\n if (ctx.opp.getType() == 19) {\n this.conditions.get(1).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n } else if (ctx.opp.getType() == 16 || ctx.opp.getType() == 17\n || ctx.opp.getType() == 18) {\n this.conditions.get(0).put(output, nextState);\n if (!this.conditionsOrder.contains(output))\n this.conditionsOrder.add(output);\n }\n }\n\n }", "private static boolean validState(String state) {\n\t\tfor (String goodState : validStates) {\n\t\t\tif (goodState.equalsIgnoreCase(state)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public String newRuleFirstCondition(Situation threeSituationsAgo)\n {\n String firstPredicate;\n //---------------\n firstPredicate = \"ninguno\";\n\n if(\n (threeSituationsAgo.puzzle[0][0] == 1) &&\n (threeSituationsAgo.puzzle[0][1] == 2) &&\n (threeSituationsAgo.puzzle[0][2] == 3) &&\n (threeSituationsAgo.puzzle[0][3] == 4) &&\n (threeSituationsAgo.puzzle[1][0] == 5) &&\n (threeSituationsAgo.puzzle[1][1] == 6) &&\n (threeSituationsAgo.puzzle[1][2] == 7) &&\n (threeSituationsAgo.puzzle[1][3] == 8) &&\n (threeSituationsAgo.puzzle[2][0] == 9) &&\n (threeSituationsAgo.puzzle[3][0] == 13)\n )\n {\n firstPredicate = \"dosLineasYColumna\";\n }//end if\n else\n {\n if(\n (threeSituationsAgo.puzzle[0][0] == 1) &&\n (threeSituationsAgo.puzzle[0][1] == 2) &&\n (threeSituationsAgo.puzzle[0][2] == 3) &&\n (threeSituationsAgo.puzzle[0][3] == 4) &&\n (threeSituationsAgo.puzzle[1][0] == 5) &&\n (threeSituationsAgo.puzzle[1][1] == 6) &&\n (threeSituationsAgo.puzzle[1][2] == 7) &&\n (threeSituationsAgo.puzzle[1][3] == 8)\n )\n {\n firstPredicate = \"dosLineasListas\";\n }//end if\n else\n {\n if(\n (threeSituationsAgo.puzzle[0][0] == 1) &&\n (threeSituationsAgo.puzzle[0][1] == 2) &&\n (threeSituationsAgo.puzzle[0][2] == 3) &&\n (threeSituationsAgo.puzzle[0][3] == 4)\n )\n {\n firstPredicate = \"primeraLineaLista\";\n }//end if\n }//end else\n }//end else\n\n return firstPredicate;\n }", "Collection<I_GameState> getRepeatStates(final BiPredicate<I_GameState, I_GameState> predicate);", "List<State> findStatesAfterOrder( int nOrder, int nIdWorkflow );", "public static boolean condenseConditionals(List<Op03SimpleStatement> statements) {\n boolean effect = false;\n for (int x = 0; x < statements.size(); ++x) {\n boolean retry;\n do {\n retry = false;\n Op03SimpleStatement op03SimpleStatement = statements.get(x);\n // If successful, this statement will be nopped out, and the next one will be\n // the combination of the two.\n Statement inner = op03SimpleStatement.getStatement();\n if (!(inner instanceof IfStatement)) continue;\n Op03SimpleStatement fallThrough = op03SimpleStatement.getTargets().get(0);\n Op03SimpleStatement taken = op03SimpleStatement.getTargets().get(1);\n Statement fallthroughInner = fallThrough.getStatement();\n Statement takenInner = taken.getStatement();\n // Is the taken path just jumping straight over the non taken?\n boolean takenJumpBy1 = (x < statements.size() - 2) && statements.get(x+2) == taken;\n\n if (fallthroughInner instanceof IfStatement) {\n Op03SimpleStatement sndIf = fallThrough;\n Op03SimpleStatement sndTaken = sndIf.getTargets().get(1);\n Op03SimpleStatement sndFallThrough = sndIf.getTargets().get(0);\n\n retry = condenseIfs(op03SimpleStatement, sndIf, taken, sndTaken, sndFallThrough, false);\n\n// if (if2.condenseWithPriorIfStatement(if1, false)) {\n// retry = true;\n// }\n } else if (fallthroughInner.getClass() == GotoStatement.class && takenJumpBy1 && takenInner instanceof IfStatement) {\n // If it's not an if statement, we might have to negate a jump - i.e.\n // if (c1) a1\n // goto a2\n // a1 : if (c2) goto a2\n // a3\n //\n // is (of course) equivalent to\n // if (!c1 || c2) goto a2\n\n Op03SimpleStatement negatedTaken = fallThrough.getTargets().get(0);\n Op03SimpleStatement sndIf = statements.get(x+2);\n Op03SimpleStatement sndTaken = sndIf.getTargets().get(1);\n Op03SimpleStatement sndFallThrough = sndIf.getTargets().get(0);\n\n retry = condenseIfs(op03SimpleStatement, sndIf, negatedTaken, sndTaken, sndFallThrough, true);\n\n// IfStatement if1 = (IfStatement)inner;\n// IfStatement if2 = (IfStatement)takenInner;\n// if (if2.condenseWithPriorIfStatement(if1, true)) {\n// retry = true;\n// }\n }\n\n if (retry) {\n effect = true;\n do {\n x--;\n } while (statements.get(x).isAgreedNop() && x > 0);\n }\n } while (retry);\n }\n return effect;\n }", "public static ComposablePredicate<Pseudostate> validateHistoryVertices(final DiagnosticChain diagnostics, final Map<Object, Object> context) {\n return new ComposablePredicate<Pseudostate>() {\n public boolean apply(Pseudostate s) {\n return s.validateHistoryVertices(diagnostics, context);\n }\n };\n }", "private boolean stateIs(int stateValue) {\n\tboolean inState = _stateIs(stateValue);\n\tif (stateValue == INSERVICE_STATE && !inState) {\n\t if (fileArrived(true) || fileArrived(false)) {\n \n if (logger.isLoggable(Level.FINE)){\n logger.fine(\"JACC Policy Provider: file arrived transition to inService: \" +\n \" state: \" + (this.state == OPEN_STATE ? \"open \" : \"deleted \") +\n CONTEXT_ID);\n }\n \n\t\t// initialize(!open,!remove,fromFile) \n initialize(false,false,true);\n\t }\n\t inState = _stateIs(INSERVICE_STATE);\n\t} \n \n\treturn inState;\n }", "@Override\n\tpublic IPredicate intersection(final IPredicate state1, final IPredicate state2) {\n\n\t\tfinal Set<HcPredicateSymbol> state1PredSymbols = new HashSet<>();\n\t\tstate1PredSymbols.addAll(((HCPredicate) state1).getHcPredicateSymbols());\n//\t\tassert state1PredSymbols.size() == 1 : \"what does this mean??\";\n\n//\t\tfinal Term conjoinedFormula = mSimplifier.getSimplifiedTerm(\n//\t\t\t\tSmtUtils.and(mBackendSmtSolverScript.getScript(), state1.getFormula(), state2.getFormula()));\n\t\tfinal IPredicate conjoinedPred = mPredicateFactory.and(state1, state2);\n\n\t\tif (mPredicateFactory.isDontCare(conjoinedPred)) {\n\t\t\treturn mPredicateFactory.newPredicate(state1PredSymbols, conjoinedPred.getFormula(),\n\t\t\t\tCollections.emptyList());\n//\t\t\treturn conjoinedPred;\n\t\t}\n\n\t\tfinal Term conjoinedFormula = new CommuhashNormalForm(mServices, mMgdScript.getScript())\n\t\t\t\t.transform(conjoinedPred.getFormula());\n\n//\t\tfinal Set<IPredicate> ps = new HashSet<>();\n//\t\tps.add(state1);\n//\t\tps.add(state2);\n\n\t\treturn mPredicateFactory.newPredicate(state1PredSymbols, conjoinedFormula,\n\t\t\t\tArrays.asList(state1.getFormula().getFreeVars()));\n\t}", "public static ComposablePredicate<Pseudostate> validateTransitionsIncoming(final DiagnosticChain diagnostics, final Map<Object, Object> context) {\n return new ComposablePredicate<Pseudostate>() {\n public boolean apply(Pseudostate s) {\n return s.validateTransitionsIncoming(diagnostics, context);\n }\n };\n }", "public final boolean IsSatisfy() {\r\n List<State> states = this.SAT(this._expression);\r\n for(State state : states)\r\n \t{\r\n \t\tif (state.StateName.equals(this._state.StateName)) {\r\n \t\t\treturn true;\r\n \t} \r\n \r\n }\r\n return false;\r\n }", "private void calculateStatesStatesPruning(int iNode1, int iNode2, int iNode3) {\n\t\t// prepare the stack\n\t\tm_nOperation[m_nTopOfStack] = OPERATION_SS;\n\t\tif (m_fPartials[m_iCurrentPartials[iNode1]][iNode1] != null && m_fPartials[m_iCurrentPartials[iNode2]][iNode2] != null) {\n\t\t\t// for handling ambiguities\n\t\t\tm_nOperation[m_nTopOfStack] = OPERATION_PP;\n\t\t}\n\t\t\n\t\tm_nNode1[m_nTopOfStack] = iNode1;\n\t\tm_nNode2[m_nTopOfStack] = iNode2;\n\t\tm_nNode3[m_nTopOfStack] = iNode3;\n\t\tm_nTopOfStack++;\n\t}", "@Test\n public void testHasPrevious_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n boolean expResult = false;\n boolean result = instance.hasPrevious();\n\n assertEquals(expResult, result);\n }", "public void solveGame4() {\n\t\tlosingStates = new HashSet<S>();\n\t\t\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tList<Set<S>> uncontrollableSuccessors = new ArrayList<Set<S>>();\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> currentUncontrollableSuccesors;\n\t\tSet<S> currentSet; \n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\tcurrentUncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\t\t\tcurrentSet = new HashSet<S>();\n\t\t\tfor(S s: currentUncontrollableSuccesors){\n\t\t\t\tif((!relaxOnAssumptions || (!assumptionsStates.contains(s) || assumptionsStates.contains(state))\n\t\t\t\t\t\t&& (!relaxSelfLoops || (!s.equals(state)))))\n\t\t\t\t\tcurrentSet.add(s);\n\t\t\t}\n\t\t\t uncontrollableSuccessors.add(currentSet);\n\t\t\t isUncontrollable[indexCount] = currentSet.size() > 0;\n\t\t\t indexCount+=1;\n\t\t}\n\t\t\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t}\n\n\t\t// Handle the pending states\n\t\twhile (!losing.isEmpty()) {\n\t\t\tS state = losing.poll();\n\n\t\t\t\n\t\t\tlosingStates.add(state);\n\n\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\tfor (S pred : predecessors) {\n\t\t\t\tif(losing.contains(pred) || losingStates.contains(pred))\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t//if(i == -1)\n\t\t\t\t\t//continue;\n\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\tlosing.add(pred);\n\t\t\t\t}else{\n\t\t\t\t\tuncontrollableSuccessors.get(i).remove(state);\n\t\t\t\t\tif(uncontrollableSuccessors.get(i).isEmpty())\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "private List<MetricalLpcfgMetricalModelState> getAllFirstStepBranches() {\n\t\tList<MetricalLpcfgMetricalModelState> newStates = new ArrayList<MetricalLpcfgMetricalModelState>();\n\t\t\n\t\tlong lastTime = notesToCheck.peek().getOffsetTime();\n\t\tlong lastBeatTime = beatState.getBeats().get(beatState.getBeats().size() - 1).getTime();\n\t\t\n\t\t// No notes have finished yet, we must still wait\n\t\tif (lastBeatTime < lastTime) {\n\t\t\tnewStates.add(this);\n\t\t\treturn newStates;\n\t\t}\n\t\t\n\t\t// A note has finished, add measure hypotheses\n\t\tfor (int subBeatLength = 1; subBeatLength <= 1; subBeatLength++) {\n\t\t\t\n\t\t\tfor (Measure measure : grammar.getMeasures()) {\n\t\t\t\t\n\t\t\t\tint subBeatsPerMeasure = measure.getBeatsPerMeasure() * measure.getSubBeatsPerBeat();\n\t\t\t\tfor (int anacrusisLength = 0; anacrusisLength < subBeatsPerMeasure; anacrusisLength++) {\n\t\t\t\t\t\n\t\t\t\t\tMetricalLpcfgMetricalModelState newState =\n\t\t\t\t\t\t\tnew MetricalLpcfgMetricalModelState(this, grammar, measure, subBeatLength, anacrusisLength);\n\t\t\t\t\tnewState.updateMatchType();\n\t\t\t\t\t\n\t\t\t\t\t// This hypothesis could match the first note\n\t\t\t\t\tif (!newState.isWrong()) {\n\t\t\t\t\t\tnewStates.add(newState);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Main.VERBOSE) {\n\t\t\t\t\t\t\tSystem.out.println(\"Adding \" + newState);\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\treturn newStates;\n\t}", "public boolean gameStateCheck(GameState inputGameState)\r\n\t{\r\n\t\tboolean isGameStateSatisfy = true;\r\n\t\t\r\n\t\t\r\n\t\tArrayList<String> tempListCharacter = inputGameState.getListStringCharacter();\r\n\t\tArrayList<String> tempListLocation = inputGameState.getListStringLocation();\r\n\t\tArrayList<String> tempListRelationship = inputGameState.getListStringRelationship();\r\n\t\t\r\n\t\t//COMMENT 6-12-2018 This is comment out since All Item are now in either Character or in Location\r\n\t\t//ArrayList<String> tempListItem = inputGameState.getListStringItem();\r\n\r\n\t\t\r\n\t\t// IF even one of the conditions isn't met, it will set the return value to false;\r\n\t\t/////////////////////////////////////\r\n\t\tboolean isContainCharater = containCharacter(tempListCharacter);\r\n\t\tif(!isContainCharater)\r\n\t\t{\r\n\t\t\tisGameStateSatisfy = false;\r\n\t\t}\r\n\t\t\r\n\t\tboolean isContainLocation = containLocation(tempListLocation);\r\n\t\tif(!isContainLocation)\r\n\t\t{\r\n\t\t\tisGameStateSatisfy = false;\r\n\t\t}\r\n\t\t\r\n\t\t// OBSOLETE >> now All item must be in character's inventory or on Location ONLY\r\n\t\t// AKA >> even to check if item exist, must do through check character & Location\r\n\t\t/*\r\n\t\tboolean isContainItem = ;\r\n\t\tif(!isContainItem)\r\n\t\t{\r\n\t\t\tisGameStateSatisfy = false;\r\n\t\t}\r\n\t\t\r\n\t\tboolean isContainRelationship = ;\r\n\t\tif(!isContainRelationship)\r\n\t\t{\r\n\t\t\tisGameStateSatisfy = false;\r\n\t\t}\r\n\t\t*/\r\n\t\t////////////////////////////////////\r\n\t\t\r\n\t\t\r\n\t\treturn isGameStateSatisfy;\r\n\t}", "@Override\n\t\tpublic boolean isSatisfiedBy(LinkedList<T> state, int i) {\n\t\t\tT t = state.get(i);\n\t\t\tif (t instanceof StateToken) {\n//\t\t\t\tif (!chordNotes.contains(((StateToken<PitchToken>)state.get(i)).token.normalizedPitch%12)) {\n//\t\t\t\t\tSystem.out.println(\"StateToken \" + state.get(i) + \" didn't satisfy \" + this);\n//\t\t\t\t}\n\t\t\t\treturn chordNotes.contains(((StateToken<PitchToken>)state.get(i)).token.normalizedPitch%12);\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn chordNotes.contains(((PitchToken)state.get(i)).normalizedPitch%12);\n\t\t}", "public void solveGame() {\n\t\tlosingStates = new HashSet<S>();\n\t\t\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tList<Set<S>> uncontrollableSuccessors = new ArrayList<Set<S>>();\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> currentUncontrollableSuccesors;\n\t\tSet<S> currentSet; \n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\tcurrentUncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\t\t\tcurrentSet = new HashSet<S>();\n\t\n\t\t\tif(!relaxAllControllables){\n\t\t\t\tfor(S s: currentUncontrollableSuccesors){\n\t\t\t\t\tif((!relaxOnAssumptions || (!assumptionsStates.contains(s) || assumptionsStates.contains(state))\n\t\t\t\t\t\t\t&& (!relaxSelfLoops || (!s.equals(state)))))\n\t\n\t\t\t\t\t\tcurrentSet.add(s);\n\t\t\t\t}\n\t\t\t}\n\t\t\t uncontrollableSuccessors.add(currentSet);\n\t\t\t isUncontrollable[indexCount] = currentSet.size() > 0;\n\t\t\t indexCount+=1;\n\t\t}\n\n\t\tlosingStates.addAll(game.getStates());\n\t\t\n\t\tSet<S> currentLosingStates;\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t\tcurrentLosingStates\t= new HashSet<S>();\n\t\t\t\n\t\t\t// Handle the pending states\n\t\t\twhile (!losing.isEmpty()) {\n\t\t\t\tS state = losing.poll();\n\n\t\t\t\t\n\t\t\t\tcurrentLosingStates.add(state);\n\n\t\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\t\tfor (S pred : predecessors) {\n\t\t\t\t\tif(losing.contains(pred) || currentLosingStates.contains(pred))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t\t//if(i == -1)\n\t\t\t\t\t\t//continue;\n\t\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tuncontrollableSuccessors.get(i).remove(state);\n\t\t\t\t\t\tif(uncontrollableSuccessors.get(i).isEmpty())\n\t\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlosingStates.retainAll(currentLosingStates);\n\t\t\t\n\t\t}\n\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "private static void optimizeAwayTrueAndFalse(Map<GdlSentence, ExternalizedStateComponent> components, Map<GdlSentence, ExternalizedStateComponent> negations, ExternalizedStateComponent trueComponent, ExternalizedStateComponent falseComponent) throws InterruptedException {\n\t while(hasNonessentialChildren(trueComponent) || hasNonessentialChildren(falseComponent)) {\n\t \tConcurrencyUtils.checkForInterruption();\n optimizeAwayTrue(components, negations, null, trueComponent, falseComponent);\n optimizeAwayFalse(components, negations, null, trueComponent, falseComponent);\n }\n\t}", "static boolean test(List<Condition> conditions) {\n return true; // REPLACE WITH SOLUTION \n }", "private BDD reachableStates(BDD i, BDD t, BDD x, Map<Integer, Integer> renaming){\n\t\tSystem.out.println(\"\\n\" + \"[*] Computing reachable states\" + \"\\n\");\n\n\t\tBDD result = this.factory.makeZero();\n\t\tBDD rCopy = null;\n\n\t\tint counter = 1;\n\t\tdo{\n\n\t\t\tSystem.out.println(\" - iteration K = \" + counter++);\n\n\t\t\tif(rCopy != null)\n\t\t\t\trCopy.free();\n\n\t\t\trCopy = result;\t\n\n\t\t\tBDD and = t.and(result);\t\t\t\n\t\t\tBDD exist = and.exist(x);\n\t\t\tand.free();\n\n\t\t\tBDD replace = exist.replace(renaming);\n\t\t\tresult = i.or(replace);\n\n\t\t\treplace.free();\n\n\t\t}while(!result.isEquivalentTo(rCopy));\n\n\t\trCopy.free();\n\n\t\tSystem.out.println(\"\\n\" + \"[*] Done computing reachable states\" + \"\\n\");\n\n\t\treturn result;\n\t}", "public void execute(State state) {\n List possiblyRelevantObjectsList;\n //TODO machine learning - for now, no possibilities are relevant\n List relevantObjectsList = new ArrayList();\n state.setStateValue(relevantObjects, relevantObjectsList);\n }", "public void solveGame5() {\n\t\tlosingStates = new HashSet<S>();\n\t\t\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tList<Set<S>> uncontrollableSuccessors = new ArrayList<Set<S>>();\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> currentUncontrollableSuccesors;\n\t\tSet<S> currentSet; \n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\tcurrentUncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\t\t\tcurrentSet = new HashSet<S>();\n\t\t\tfor(S s: currentUncontrollableSuccesors){\n\t\t\t\tif((!relaxOnAssumptions || (!assumptionsStates.contains(s) || assumptionsStates.contains(state))\n\t\t\t\t\t\t&& (!relaxSelfLoops || (!s.equals(state)))))\n\t\t\t\t\tcurrentSet.add(s);\n\t\t\t}\n\t\t\t uncontrollableSuccessors.add(currentSet);\n\t\t\t isUncontrollable[indexCount] = currentSet.size() > 0;\n\t\t\t indexCount+=1;\n\t\t}\n\n\t\tlosingStates.addAll(game.getStates());\n\t\t\n\t\tSet<S> currentLosingStates;\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t\tcurrentLosingStates\t= new HashSet<S>();\n\t\t\t\n\t\t\t// Handle the pending states\n\t\t\twhile (!losing.isEmpty()) {\n\t\t\t\tS state = losing.poll();\n\n\t\t\t\t\n\t\t\t\tcurrentLosingStates.add(state);\n\n\t\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\t\tfor (S pred : predecessors) {\n\t\t\t\t\tif(losing.contains(pred) || currentLosingStates.contains(pred))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t\t//if(i == -1)\n\t\t\t\t\t\t//continue;\n\t\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tuncontrollableSuccessors.get(i).remove(state);\n\t\t\t\t\t\tif(uncontrollableSuccessors.get(i).isEmpty())\n\t\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlosingStates.retainAll(currentLosingStates);\n\t\t\t\n\t\t}\n\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "public boolean hasPreviousSet() { \n return (firstIndexOfCurrentSet > firstIndex);\n }", "private void assertNoMissingParallelEvents(List<FlowNode> heads) {\n DepthFirstScanner allScan = new DepthFirstScanner();\n TestVisitor visit = new TestVisitor();\n ForkScanner forkScan = new ForkScanner();\n\n // First look for parallel branch start events\n List<FlowNode> matches = allScan.filteredNodes(heads, FlowScanningUtils.hasActionPredicate(ThreadNameAction.class));\n forkScan.setup(heads);\n forkScan.visitSimpleChunks(visit, new LabelledChunkFinder());\n Set<String> callIds =\n visit.filteredCallsByType(TestVisitor.CallType.PARALLEL_BRANCH_START).stream()\n .map(CALL_TO_NODE_ID)\n .collect(Collectors.toSet());\n for (String id : matches.stream().map(NODE_TO_ID).collect(Collectors.toList())) {\n if (!callIds.contains(id)) {\n Assert.fail(\"Parallel Branch start node without an appropriate parallelBranchStart callback: \"+id);\n }\n }\n\n // Look for parallel starts & ends all being matched\n matches = allScan.filteredNodes(heads, input ->\n input instanceof StepStartNode\n && ((StepStartNode) input).getDescriptor() instanceof ParallelStep.DescriptorImpl\n && input.getPersistentAction(ThreadNameAction.class) == null);\n List<FlowNode> parallelEnds = allScan.filteredNodes(heads, input ->\n input instanceof StepEndNode\n && ((StepEndNode) input).getDescriptor() instanceof ParallelStep.DescriptorImpl\n && ((StepEndNode) input).getStartNode().getPersistentAction(ThreadNameAction.class) == null);\n visit.reset();\n forkScan.setup(heads);\n forkScan.visitSimpleChunks(visit, new LabelledChunkFinder());\n\n // Parallel starts checked\n callIds =\n visit.filteredCallsByType(TestVisitor.CallType.PARALLEL_START).stream()\n .map(CALL_TO_NODE_ID)\n .collect(Collectors.toSet());\n for (String id : matches.stream().map(NODE_TO_ID).collect(Collectors.toList())) {\n if (!callIds.contains(id)) {\n Assert.fail(\"Parallel start node without an appropriate parallelStart callback: \"+id);\n }\n }\n\n // Parallel ends checked\n callIds =\n visit.filteredCallsByType(TestVisitor.CallType.PARALLEL_END).stream()\n .map(CALL_TO_NODE_ID)\n .collect(Collectors.toSet());\n for (String id : parallelEnds.stream().map(NODE_TO_ID).collect(Collectors.toList())) {\n if (!callIds.contains(id)) {\n Assert.fail(\"Parallel END node without an appropriate parallelEnd callback: \"+id);\n }\n }\n\n // Parallel Ends should be handled by the checks that blocks are balanced.\n }", "private boolean scanPreconditions()\n\t\t{\n\t\t\tboolean statusChanged = false;\n\t\t\t\n\t\t\t//Conditional activity\n\t\t\tif(TravelToCustomer.precondition(this) == true)\n\t\t\t{\n\t\t\t\tTravelToCustomer act = new TravelToCustomer(this);\n\t\t\t\tact.startingEvent();\n\t\t\t\tscheduleActivity(act);\n\t\t\t\tstatusChanged = true;\n\t\t\t\t//System.out.println(\"Started Travel to Customer. \");\n\t\t\t}\n\t\t\t\n\t\t\tif(TakingLunch.precondition(this) == true)\n\t\t\t{\n\t\t\t\tTakingLunch act = new TakingLunch(this);\n\t\t\t\tact.startingEvent();\n\t\t\t\tscheduleActivity(act);\n\t\t\t\tstatusChanged = true;\n\t\t\t\t//System.out.println(\"Started Take Lunch. \");\n\t\t\t}\n\t\t\t\n\t\t\t// Do not change the status if already true\n\t\t\tif(statusChanged) scanInterruptPreconditions();\n\t\t\telse statusChanged = scanInterruptPreconditions();\n\t\t\treturn(statusChanged);\n\t\t}", "public interface I_GameHistory extends PropertyChangeListener {\n\n /**\n * Checks if the current state has been encountered before\n * @return true if the current game state is equal to an earlier encountered state\n */\n default boolean isRepeatState() {\n return isRepeatState(FULL_EQUAL);\n }\n\n default boolean isRepeatState(I_GameState state) {\n return isRepeatState(FULL_EQUAL, state);\n }\n\n /**\n * Checks if the current state has been encountered before using a list of predicates to compare states with\n * @param predicate a predicate testing some relation between two states.\n * @return true if the current game state is equal to an earlier encountered state\n */\n boolean isRepeatState(final BiPredicate<I_GameState, I_GameState> predicate);\n\n boolean isRepeatState(final BiPredicate<I_GameState, I_GameState> predicate, I_GameState state);\n /**\n * Checks if the current state has been encountered before.\n * All states that returns true given the predicate being aplied to it as well as the current state are\n * being returned as a collection.\n * @return true if the current game state is equal to an earlier encountered state\n */\n default Collection<I_GameState> getRepeatStates() {\n return getRepeatStates(FULL_EQUAL);\n }\n\n default Collection<I_GameState> getRepeatStates(I_GameState state) {\n return getRepeatStates(FULL_EQUAL, state);\n }\n\n /**\n * Checks if the current state has been encountered before using a list of predicate to compare states with.\n * All states that returns true given the predicate being applied to it as well as the current state are\n * being returned as a collection.\n * @param predicate a predicate testing some relation between two states.\n * @return true if the current game state is equal to an earlier encountered state\n */\n Collection<I_GameState> getRepeatStates(final BiPredicate<I_GameState, I_GameState> predicate);\n\n Collection<I_GameState> getRepeatStates(final BiPredicate<I_GameState, I_GameState> predicate, I_GameState state);\n\n /**\n * This predicate returns true only if the two states are actually both referencing the same object.\n */\n BiPredicate<I_GameState, I_GameState> IDENTITY_EQUAL = I_GameHistory::identityEqual;\n\n /**\n * This predicate returns true if the sizes of the lists in the first state are all\n * equal to the length of the corresponding list in the second state.\n */\n BiPredicate<I_GameState, I_GameState> PILE_SIZE_EQUAL = I_GameHistory::sizeEqual;\n\n /**\n * This predicate returns true only if the content of each list in one state matches exactly the content\n * of the corresponding lists in the other state. Objects.equals() is used to check equality of the contents.\n */\n BiPredicate<I_GameState, I_GameState> PILE_CONTENT_EQUAL = I_GameHistory::contentEqual;\n\n /**\n * This predicate tests all of the other standard predicates in this interface.\n * They are tried in a prioritized manor with the least expensive first.\n * It returns as soon as it can be sure of the result.\n */\n BiPredicate<I_GameState, I_GameState> FULL_EQUAL = IDENTITY_EQUAL.or(PILE_SIZE_EQUAL.and(PILE_CONTENT_EQUAL));\n\n /**\n * Returns true only if the two states are actually both referencing the same object.\n *\n * @param state1 a state to compare\n * @param state2 the state to compare it to\n * @return true if the contents of one state all equals the contents of the other state\n */\n private static boolean identityEqual(final I_GameState state1, final I_GameState state2) {\n if (state1 == state2)\n return true;\n\n return Stream.of(new SimpleEntry<>(state1, state2))\n .flatMap( // transform the elements by making a new stream with the transformation to be used\n pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs\n // make new pair of the elements of that pile from each state\n .map(pileID -> new SimpleEntry<>(\n pair.getKey().get(pileID),\n pair.getValue().get(pileID)\n )\n )\n )\n .allMatch(pair -> pair.getKey() == pair.getValue());\n }\n\n /**\n * Returns true if the sizes of the lists in the first state are all\n * equal to the length of the corresponding list in the second state.\n *\n * @param state1 a state to compare\n * @param state2 the state to compare it to\n * @return true if the contents of one state all equals the contents of the other state\n */\n private static boolean sizeEqual(final I_GameState state1, final I_GameState state2) {\n //if a state is null there surely must be a mistake somewhere\n if (state1 == null || state2 == null) throw new NullPointerException(\"A state cannot be null when comparing\");\n\n // make a stream with a data structure containing both states\n return Stream.of(new SimpleEntry<>(state1, state2))\n .flatMap( // transform the elements by making a new stream with the transformation to be used\n pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs\n // make new pair of the elements of that pile from each state\n .map(pileID -> new SimpleEntry<>(\n pair.getKey().get(pileID),\n pair.getValue().get(pileID)\n )\n )\n )\n .map(I_GameHistory::replaceNulls)\n .allMatch(pair -> pair.getKey().size() == pair.getValue().size()); // check they have equal sizes\n }\n\n /**\n * Returns true only if the content of each list in one state matches exactly the content\n * of the corresponding lists in the other state. Objects.equals() is used to check equality of the contents.\n *\n * @param state1 a state to compare\n * @param state2 the state to compare it to\n * @return true if the contents of one state all equals the contents of the other state\n */\n private static boolean contentEqual(final I_GameState state1, final I_GameState state2) {\n //if a state is null there surely must be a mistake somewhere\n if (state1 == null || state2 == null) throw new NullPointerException(\"A state cannot be null when comparing\");\n //if ( !sizeEqual(state1, state2) ) return false;\n\n return Stream.of(new SimpleImmutableEntry<>(state1, state2))\n .flatMap( //map the pair of states to many pairs of piles\n statePair -> Arrays.stream(E_PileID.values())\n .map(pileID -> new SimpleEntry<>(\n statePair.getKey().get(pileID),\n statePair.getValue().get(pileID)\n )\n )\n )\n .map(I_GameHistory::replaceNulls)\n .flatMap( // map the pairs of piles to many pairs of Optional<I_card>s.\n listPair -> IntStream //make sure to always traverse the longer list\n .range(0, Math.max(listPair.getKey().size(), listPair.getValue().size()))\n .mapToObj(i -> new SimpleEntry<>(\n getIfExists(listPair.getKey(), i),\n getIfExists(listPair.getValue(), i))\n )\n )\n // map pairs to booleans by checking that the element in a pair are equal\n .map(cardPair -> Objects.equals(cardPair.getKey(), cardPair.getValue()))\n // reduce the many values to one bool by saying all must be true or the statement is false\n .reduce(true, (e1, e2) -> e1 && e2);\n }\n\n static SimpleEntry<List<I_CardModel>, List<I_CardModel>> replaceNulls(SimpleEntry<List<I_CardModel>, List<I_CardModel>> entry) {\n var key = entry.getKey();\n var value = entry.getValue();\n if (key == null)\n key = List.of();\n if (value == null)\n value = List.of();\n\n return new SimpleEntry<>(key, value);\n }\n\n default <t extends I_GameState> Predicate<t> partiallyApplyPredicate(BiPredicate<t, t> biPred, t arg) {\n return test -> biPred.test(arg, test);\n }\n\n /**\n * A convenient to get an optional card from a list that might throw index out of bounds\n * @param list the list to take an element from\n * @param index the index of the element\n * @return empty if element is null or dosen't exist, otherwise the element at index wrapped in {@link Optional}\n */\n private static Optional<I_CardModel> getIfExists(List<I_CardModel> list, int index) {\n try {\n return Optional.ofNullable(list.get(index));\n } catch (IndexOutOfBoundsException e) {\n return Optional.empty();\n }\n }\n\n //todo might be a good idea to implement a method that checks for the moves that has been tried when in a given state\n}", "public boolean hasPreviousInSet() {\n return (hasPrevious() &&\n (indexOfCurrentElement - 1 >= firstIndexOfCurrentSet) &&\n (indexOfCurrentElement - 1 < firstIndexOfCurrentSet + quantity));\n }", "private boolean isStateFullyDetermined() {\n switch (hasSubstance) {\n case No:\n case Unknown:\n return false;\n case Yes:\n // if already established has substance, continue checking only until\n // reach threshold\n return (substanceMin <= 0) ? true : substanceCnt >= substanceMin;\n }\n throw new ShouldNotHappenException();\n }", "@VisibleForTesting\n boolean tryChangeState(int[] requestedStates, boolean userInitiated) {\n HashMap<Integer, HashSet<Integer>> table =\n userInitiated ? ValidUserInitiatedStateChanges : ValidTaskInitiatedStateChanges;\n\n synchronized (syncObject) {\n for (int newState : requestedStates) {\n HashSet<Integer> validStates = table.get(getInternalState());\n if (validStates != null && validStates.contains(newState)) {\n currentState = newState;\n switch (currentState) {\n case INTERNAL_STATE_QUEUED:\n StorageTaskManager.getInstance().ensureRegistered(this);\n onQueued();\n break;\n case INTERNAL_STATE_IN_PROGRESS:\n onProgress();\n break;\n case INTERNAL_STATE_PAUSED:\n onPaused();\n break;\n case INTERNAL_STATE_FAILURE:\n onFailure();\n break;\n case INTERNAL_STATE_SUCCESS:\n onSuccess();\n break;\n case INTERNAL_STATE_CANCELED:\n onCanceled();\n break;\n default: // fall out\n }\n successManager.onInternalStateChanged();\n failureManager.onInternalStateChanged();\n cancelManager.onInternalStateChanged();\n completeListener.onInternalStateChanged();\n pausedManager.onInternalStateChanged();\n progressManager.onInternalStateChanged();\n\n if (Log.isLoggable(TAG, Log.DEBUG)) {\n Log.d(\n TAG,\n \"changed internal state to: \"\n + getStateString(newState)\n + \" isUser: \"\n + userInitiated\n + \" from state:\"\n + getStateString(currentState));\n }\n\n return true;\n }\n }\n\n Log.w(\n TAG,\n \"unable to change internal state to: \"\n + getStateString(requestedStates)\n + \" isUser: \"\n + userInitiated\n + \" from state:\"\n + getStateString(currentState));\n\n return false;\n }\n }" ]
[ "0.60015035", "0.5552526", "0.5546471", "0.5394547", "0.53622895", "0.530194", "0.5295812", "0.5293275", "0.5285399", "0.5279147", "0.52711725", "0.5218621", "0.51797336", "0.51791304", "0.51693386", "0.51661587", "0.5152352", "0.5125801", "0.51255345", "0.51237327", "0.5066269", "0.5066269", "0.5066269", "0.5066269", "0.5066269", "0.5066269", "0.5066269", "0.5066269", "0.50409615", "0.50134385", "0.50081676", "0.49997884", "0.4967898", "0.49676925", "0.49663118", "0.49655938", "0.49605075", "0.49558482", "0.49461618", "0.49416488", "0.4941157", "0.49257064", "0.4917427", "0.49167272", "0.48657435", "0.48632243", "0.48624346", "0.4860116", "0.4846664", "0.4843956", "0.4837999", "0.4834996", "0.48338357", "0.48327982", "0.48242688", "0.4816585", "0.4813421", "0.4806723", "0.47914422", "0.47872102", "0.47825068", "0.47743177", "0.47708064", "0.47661278", "0.4742174", "0.47317228", "0.4726276", "0.4724939", "0.47246802", "0.4722674", "0.4704565", "0.47031564", "0.46975192", "0.46971044", "0.4693823", "0.4692666", "0.46796313", "0.46779123", "0.46756366", "0.46710527", "0.46695635", "0.46688858", "0.46663845", "0.4665765", "0.4656224", "0.4647044", "0.46331343", "0.46314788", "0.46311066", "0.4629655", "0.46228364", "0.46104223", "0.4607692", "0.4606563", "0.46039072", "0.45962492", "0.45951852", "0.45923796", "0.45895493", "0.4588006" ]
0.5816289
1
Checks if the current state has been encountered before. All states that returns true given the predicate being aplied to it as well as the current state are being returned as a collection.
default Collection<I_GameState> getRepeatStates() { return getRepeatStates(FULL_EQUAL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkNext(){\n boolean ret = this.hasNext;\n if ((this.allStatesIterator.hasNext()) || (this.allSubsetsIterator.hasNext()) || (this.allTransitionsIterator.hasNext())){\n hasNext = true;\n return hasNext;\n }\n hasNext = false;\n return ret;\n }", "public Iterator reachable() {\n Set s = SortedArraySet.FACTORY.makeSet(HashCodeComparator.INSTANCE);\n s.add(IdentityHashCodeWrapper.create(this));\n this.reachable(s);\n return new FilterIterator(s.iterator(), filter);\n }", "boolean scavenge()\r\n/* 462: */ {\r\n/* 463:493 */ if (scavengeSome()) {\r\n/* 464:494 */ return true;\r\n/* 465: */ }\r\n/* 466:498 */ this.prev = null;\r\n/* 467:499 */ this.cursor = this.head;\r\n/* 468:500 */ return false;\r\n/* 469: */ }", "public boolean hasNext() {\n\t\tchecked = true;\n\t\tif (firstcall) {\n\t\t\tfirstcall = false;\n\t\t\tsolution = solver.findSolution(ProblemState.RESTORE);\n\t\t\tif (solution == null)\n\t\t\t\treturn false;\n\t\t\treturn true;\n\t\t}\n\t\treturn solver.hasNext();\n\t}", "private Collection<? extends AbstractState> getFollowStates(AutomatonState state, List<AbstractState> otherElements, CFAEdge edge, boolean failOnUnknownMatch) throws CPATransferException {\n Preconditions.checkArgument(!(state instanceof AutomatonUnknownState));\n if (state == cpa.getBottomState()) {\n //return Collections.singleton(state);\n return Collections.emptySet();\n }\n\n if (state.getInternalState().getTransitions().isEmpty()) {\n // shortcut\n return Collections.singleton(state);\n }\n\n Collection<AbstractState> lSuccessors = new HashSet<AbstractState>(2);\n AutomatonExpressionArguments exprArgs = new AutomatonExpressionArguments(state.getVars(), otherElements, edge, logger);\n boolean edgeMatched = false;\n boolean nonDetState = state.getInternalState().isNonDetState();\n\n // these transitions cannot be evaluated until last, because they might have sideeffects on other CPAs (dont want to execute them twice)\n // the transitionVariables have to be cached (produced during the match operation)\n // the list holds a Transition and the TransitionVariables generated during its match\n List<Pair<AutomatonTransition, Map<Integer, String>>> transitionsToBeTaken = new ArrayList<Pair<AutomatonTransition, Map<Integer, String>>>(2);\n\n for (AutomatonTransition t : state.getInternalState().getTransitions()) {\n exprArgs.clearTransitionVariables();\n\n matchTime.start();\n ResultValue<Boolean> match = t.match(exprArgs);\n matchTime.stop();\n if (match.canNotEvaluate()) {\n if (failOnUnknownMatch) {\n throw new CPATransferException(\"Automaton transition condition could not be evaluated: \" + match.getFailureMessage());\n }\n // if one transition cannot be evaluated the evaluation must be postponed until enough information is available\n return Collections.singleton(new AutomatonUnknownState(state));\n } else {\n if (match.getValue()) {\n edgeMatched = true;\n assertionsTime.start();\n ResultValue<Boolean> assertionsHold = t.assertionsHold(exprArgs);\n assertionsTime.stop();\n\n if (assertionsHold.canNotEvaluate()) {\n if (failOnUnknownMatch) {\n throw new CPATransferException(\"Automaton transition assertions could not be evaluated: \" + assertionsHold.getFailureMessage());\n }\n // cannot yet be evaluated\n return Collections.singleton(new AutomatonUnknownState(state));\n\n } else if (assertionsHold.getValue()) {\n if (!t.canExecuteActionsOn(exprArgs)) {\n if (failOnUnknownMatch) {\n throw new CPATransferException(\"Automaton transition action could not be executed\");\n }\n // cannot yet execute, goto UnknownState\n return Collections.singleton(new AutomatonUnknownState(state));\n }\n\n // delay execution as described above\n Map<Integer, String> transitionVariables = ImmutableMap.copyOf(exprArgs.getTransitionVariables());\n transitionsToBeTaken.add(Pair.of(t, transitionVariables));\n\n } else {\n // matching transitions, but unfulfilled assertions: goto error state\n AutomatonState errorState = AutomatonState.automatonStateFactory(Collections.<String, AutomatonVariable>emptyMap(), AutomatonInternalState.ERROR, cpa);\n logger.log(Level.INFO, \"Automaton going to ErrorState on edge \\\"\" + edge.getDescription() + \"\\\"\");\n lSuccessors.add(errorState);\n }\n\n if (!nonDetState) {\n // not a nondet State, break on the first matching edge\n break;\n }\n }\n // do nothing if the edge did not match\n }\n }\n\n if (edgeMatched) {\n // execute Transitions\n for (Pair<AutomatonTransition, Map<Integer, String>> pair : transitionsToBeTaken) {\n // this transition will be taken. copy the variables\n AutomatonTransition t = pair.getFirst();\n Map<Integer, String> transitionVariables = pair.getSecond();\n actionTime.start();\n Map<String, AutomatonVariable> newVars = deepCloneVars(state.getVars());\n exprArgs.setAutomatonVariables(newVars);\n exprArgs.putTransitionVariables(transitionVariables);\n t.executeActions(exprArgs);\n actionTime.stop();\n AutomatonState lSuccessor = AutomatonState.automatonStateFactory(newVars, t.getFollowState(), cpa);\n //if (!(lSuccessor instanceof AutomatonState.BOTTOM)) {\n lSuccessors.add(lSuccessor);\n //} // else add nothing\n }\n return lSuccessors;\n } else {\n // stay in same state, no transitions to be executed here (no transition matched)\n return Collections.singleton(state);\n }\n }", "public boolean hasPreviousSet() { \n return (firstIndexOfCurrentSet > firstIndex);\n }", "protected PuzzleState popFrontier()\r\n\t{\n\t\tPuzzleState thisState = Frontier.pop();\r\n\t\t// Add it to the list of searched states, so that it isn't searched again\r\n\t\tSearched.add(thisState);\r\n\t\t\r\n\t\treturn thisState;\r\n\t}", "@Override\n protected Collection<BDDState> preCheck(BDDState pState, VariableTrackingPrecision pPrecision) {\n if (pPrecision.isEmpty()) {\n return Collections.singleton(pState);\n }\n // the path is not fulfilled\n if (pState.getRegion().isFalse()) {\n return ImmutableList.of();\n }\n return null;\n }", "Collection<I_GameState> getRepeatStates(final BiPredicate<I_GameState, I_GameState> predicate);", "Collection<? extends String> getHasState();", "@Override\n public Set<AbstractState> asCollection() {\n return unmodifiableReached;\n }", "@Override\n\tpublic boolean addToFrontier(PuzzleState aState) {\n\t\t\n\t\tif(Searched.contains(aState)) {\n\t\t\treturn false;\n\t\t}\n\t\telse if (Frontier.contains(aState)) {\n\t\t\tfor(PuzzleState n : Frontier) {\n\t\t\t\tif(n.getEvaluationFunction() <= aState.getEvaluationFunction())\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tFrontier.add(aState);\n\t\treturn true;\n\t}", "public boolean hasPreviousInSet() {\n return (hasPrevious() &&\n (indexOfCurrentElement - 1 >= firstIndexOfCurrentSet) &&\n (indexOfCurrentElement - 1 < firstIndexOfCurrentSet + quantity));\n }", "public MoveEvaluation alreadyDetermined(IGameState state) {\n\t\tNode<Pair> node = list.head();\n\t\t\n\t\twhile (node != null) {\n\t\t\tPair p = node.value();\n\t\t\tif (state.equivalent(p.state)) {\n\t\t\t\treturn p.move;\n\t\t\t}\n\t\t\t\n\t\t\tnode = node.next();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "@Override\n public boolean hasNext() {\n setCurrent();\n return current != null;\n }", "private boolean allTrue(CompositeTrue predicate) {\n if (kids.isEmpty()) {\n return false;\n }\n\n Iterator<E> i = kids.iterator();\n while (i.hasNext()) {\n E future = i.next();\n if (!predicate.isTrue(future)) {\n return false;\n }\n }\n return true;\n }", "private Set<Integer> getStatesFromWichReachableAccepting(LabelledTransitionSystem ret) {\n\t\tMap<Integer, Set<Integer>> reversedReachable = this.computeInverseTransitionRelation(ret);\n\n\t\tSet<Integer> reachable = new HashSet<>();\n\n\t\tlogger.debug(\"Accepting states: \" + ret.getAccepting());\n\t\tSet<Integer> current = ret.getAccepting();\n\n\t\tboolean[] visited = new boolean[ret.getStates().length];\n\n\t\twhile (!current.isEmpty()) {\n\t\t\tInteger evaluated = current.iterator().next();\n\t\t\tcurrent.remove(evaluated);\n\t\t\tif (!visited[evaluated]) {\n\t\t\t\tvisited[evaluated] = true;\n\t\t\t\treachable.add(evaluated);\n\t\t\t\tSet<Integer> prev = new HashSet<>(reversedReachable.get(evaluated));\n\t\t\t\tcurrent.addAll(prev);\n\t\t\t}\n\t\t}\n\n\t\treturn reachable;\n\t}", "@Override\r\n\tpublic Set<NFAState> eClosure(NFAState s) {\r\n\t\tSet<NFAState> l = new HashSet<>();\r\n\t\treturn depthFirstSearch(l, s);\r\n\t}", "@Override\n public StateContents<Boolean> isEmpty() {\n final List<StateContents<Boolean>> futures = new ArrayList<>(sources.size());\n for (CombiningValueStateInternal<InputT, AccumT, OutputT> source : sources) {\n futures.add(source.isEmpty());\n }\n\n // But defer the actual reads until later.\n return new StateContents<Boolean>() {\n @Override\n public Boolean read() {\n for (StateContents<Boolean> future : futures) {\n if (!future.read()) {\n return false;\n }\n }\n return true;\n }\n };\n }", "protected abstract List breakOutOfStateStack();", "private List<MetricalLpcfgMetricalModelState> getAllFirstStepBranches() {\n\t\tList<MetricalLpcfgMetricalModelState> newStates = new ArrayList<MetricalLpcfgMetricalModelState>();\n\t\t\n\t\tlong lastTime = notesToCheck.peek().getOffsetTime();\n\t\tlong lastBeatTime = beatState.getBeats().get(beatState.getBeats().size() - 1).getTime();\n\t\t\n\t\t// No notes have finished yet, we must still wait\n\t\tif (lastBeatTime < lastTime) {\n\t\t\tnewStates.add(this);\n\t\t\treturn newStates;\n\t\t}\n\t\t\n\t\t// A note has finished, add measure hypotheses\n\t\tfor (int subBeatLength = 1; subBeatLength <= 1; subBeatLength++) {\n\t\t\t\n\t\t\tfor (Measure measure : grammar.getMeasures()) {\n\t\t\t\t\n\t\t\t\tint subBeatsPerMeasure = measure.getBeatsPerMeasure() * measure.getSubBeatsPerBeat();\n\t\t\t\tfor (int anacrusisLength = 0; anacrusisLength < subBeatsPerMeasure; anacrusisLength++) {\n\t\t\t\t\t\n\t\t\t\t\tMetricalLpcfgMetricalModelState newState =\n\t\t\t\t\t\t\tnew MetricalLpcfgMetricalModelState(this, grammar, measure, subBeatLength, anacrusisLength);\n\t\t\t\t\tnewState.updateMatchType();\n\t\t\t\t\t\n\t\t\t\t\t// This hypothesis could match the first note\n\t\t\t\t\tif (!newState.isWrong()) {\n\t\t\t\t\t\tnewStates.add(newState);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Main.VERBOSE) {\n\t\t\t\t\t\t\tSystem.out.println(\"Adding \" + newState);\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\treturn newStates;\n\t}", "private final List<State> PreE(List<State> y) {\r\n // {s \b S | exists s\u0001, (s � s\u0001 and s\u0001 \b Y )}\r\n List<State> states = new ArrayList<State>();\r\n //List<Transition> transitions = new ArrayList<Transition>();\r\n for (State sourceState : this._kripke.States) {\r\n for (State destState : y) {\r\n Transition myTransition = new Transition(sourceState, destState);\r\n \tfor(Transition transition : this._kripke.Transitions)\r\n \t{\r\n \t\tif (transition.FromState.equals(myTransition.FromState) &&\r\n \t\t\t\ttransition.ToState.equals(myTransition.ToState)) {\r\n \t\t\tif (!states.contains(sourceState)) {\r\n states.add(sourceState);\r\n }\r\n \t} \r\n \r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n return states;\r\n }", "@Override\n public boolean hasNext() {\n return null != current;\n }", "public HashSet<State> statesReachableOn(State from, Character on) {\n \t\tHashSet<State> reachable = new HashSet<State>();\n \t\tIterator<Transition> iter = from.getTransitions().iterator();\n \t\twhile (iter.hasNext()) {\n \t\t\tTransition t = iter.next();\n \n \t\t\t// Do they want the epsilon transitions?\n \t\t\tboolean equals = false;\n \t\t\tif (on == null)\n \t\t\t\tequals = on == t.c;\n \t\t\telse\n \t\t\t\tequals = on.equals(t.c);\n \n \t\t\t// Add all matching transitions\n \t\t\t// Skip if already added to prevent loops\n \t\t\tif (equals && !reachable.contains(t.to)) {\n \t\t\t\t// Add this state\n \t\t\t\treachable.add(t.to);\n \n \t\t\t\t// Recurse and add all reachable from this state (epsilon transitions)\n \t\t\t\treachable.addAll(statesReachableFrom(t.to));\n \t\t\t}\n \t\t}\n \n \t\treturn reachable;\n \t}", "public Collection<ReplayState<C>> expandNode(ReplayState<C> state, Progress progress,\r\n\t\t\tCollection<ReplayState<C>> unmodifiableResultCollection) {\r\n\t\tCollection<ReplayState<C>> states = new LinkedList<ReplayState<C>>();\r\n\t\t/*\r\n\t\t * Check whether the caller considers this state to be a final state.\r\n\t\t * Note that this may depend on the marking and on the trace.\r\n\t\t */\r\n\t\tif (settings.isFinal(state.marking, state.trace)) {\r\n\t\t\t/*\r\n\t\t\t * State corresponds to final state, check whether costs are better\r\n\t\t\t * than best so far.\r\n\t\t\t */\r\n\t\t\tif (state.cost.compareTo(bestState.cost) < 0) {\r\n\t\t\t\t/*\r\n\t\t\t\t * Found a new best trace.\r\n\t\t\t\t */\r\n\t\t\t\tsynchronized (bestState) {\r\n\t\t\t\t\tbestState = state;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t/*\r\n\t\t\t * 1. Check the enabled transitions.\r\n\t\t\t */\r\n\t\t\tCollection<Transition> enabledTransitions;\r\n\t\t\tsynchronized (semantics) {\r\n\t\t\t\tsemantics.setCurrentState(state.marking);\r\n\t\t\t\tenabledTransitions = semantics.getExecutableTransitions();\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t * For every allowed action: expand this state with this action.\r\n\t\t\t */\r\n\t\t\tif (settings.isAllowed(ReplayAction.INSERT_ENABLED_MATCH)) {\r\n\t\t\t\tstates.addAll(executeEnabledMatches(state, enabledTransitions));\r\n\t\t\t}\r\n\t\t\tif (settings.isAllowed(ReplayAction.INSERT_ENABLED_INVISIBLE)) {\r\n\t\t\t\tstates.addAll(executeInvisible(state, enabledTransitions));\r\n\t\t\t}\r\n\t\t\tif (settings.isAllowed(ReplayAction.REMOVE_HEAD)) {\r\n\t\t\t\tstates.addAll(skipHead(state));\r\n\t\t\t}\r\n\t\t\tif (settings.isAllowed(ReplayAction.INSERT_ENABLED_MISMATCH)) {\r\n\t\t\t\tstates.addAll(executeEnabledMismatches(state, enabledTransitions));\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t * 2. Check the disabled transitions.\r\n\t\t\t */\r\n\t\t\tCollection<Transition> disabledTransitions = new HashSet<Transition>(net.getTransitions());\r\n\t\t\tdisabledTransitions.removeAll(enabledTransitions);\r\n\r\n\t\t\t/*\r\n\t\t\t * For every allowed action: expand this state with this action.\r\n\t\t\t */\r\n\t\t\tif (settings.isAllowed(ReplayAction.INSERT_DISABLED_MATCH)) {\r\n\t\t\t\tstates.addAll(executeDisabledMatches(state, disabledTransitions));\r\n\t\t\t}\r\n\t\t\tif (settings.isAllowed(ReplayAction.INSERT_DISABLED_MISMATCH)) {\r\n\t\t\t\tstates.addAll(executeDisabledMismatches(state, disabledTransitions));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn states;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\t\tprivate State<T> createFirstMandatoryStateOfLoop(final State<T> sinkState) {\n\n\t\t\tfinal IterativeCondition<T> currentFilterFunction = (IterativeCondition<T>) currentPattern.getCondition();\n\t\t\tfinal State<T> firstState = createNormalState();\n\n\t\t\tfirstState.addTake(sinkState, currentFilterFunction);\n\t\t\tfinal IterativeCondition<T> ignoreCondition = getIgnoreCondition(currentPattern);\n\t\t\tif (ignoreCondition != null) {\n\t\t\t\tfirstState.addIgnore(ignoreCondition);\n\t\t\t}\n\t\t\treturn firstState;\n\t\t}", "private Collection<ReplayState<C>> skipHead(ReplayState<C> state) {\r\n\t\tCollection<ReplayState<C>> states = new ArrayList<ReplayState<C>>();\r\n\t\tif (!state.trace.isEmpty()) {\r\n\t\t\t/*\r\n\t\t\t * Determine new cost.\r\n\t\t\t */\r\n\t\t\tC newCost = addOperator.add(state.cost, ReplayAction.REMOVE_HEAD, null, state.trace.get(0));\r\n\t\t\t/*\r\n\t\t\t * Determine new trace.\r\n\t\t\t */\r\n\t\t\tList<? extends Object> newTrace = getTail(state.trace);\r\n\t\t\t/*\r\n\t\t\t * Add new state.\r\n\t\t\t */\r\n\t\t\taddState(states, state, state.marking, null, newCost, newTrace);\r\n\t\t}\r\n\t\treturn states;\r\n\t}", "@Override\n\t\tpublic boolean hasNext() {\t\t\t\n\t\t\treturn current != null;\n\t\t}", "public List<Pair> getStatesSeenSoFar() {\n\t\treturn list;\n\t}", "public boolean nextState() {\n\t\treturn false;\n\t}", "@Override\n public Flux<Employee> checkStatus() {\n return Flux.defer(() -> Flux.fromIterable(employees.getEmployees()));\n }", "@Override\n\tpublic Set<NFAState> eClosure(NFAState s) {\n\t\tSet<NFAState> visited = new TreeSet<NFAState>();\n\t\t//invoke recursive helper\n\t\tvisited = eClosureHelper(s, visited);\n\t\t\n\t\treturn visited;\n\t}", "boolean getCollFirstFlag();", "boolean hasFiltered() {\n return filtered;\n }", "private void clearPreviouslyVisitedAfterReturnish(Visitable returnish) {\n\t\tSet<IdentifiableElement> retain = new HashSet<>();\n\t\tSet<IdentifiableElement> visitedNamed = dequeOfVisitedNamed.peek();\n\t\treturnish.accept(new Visitor() {\n\n\t\t\tint level = 0;\n\n\t\t\tVisitable entranceLevel1;\n\n\t\t\t@Override\n\t\t\tpublic void enter(Visitable segment) {\n\t\t\t\tif (entranceLevel1 == null && segment instanceof TypedSubtree) {\n\t\t\t\t\tentranceLevel1 = segment;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (entranceLevel1 != null) {\n\t\t\t\t\t++level;\n\t\t\t\t}\n\n\t\t\t\t// Only collect things exactly one level into the list of returned items\n\t\t\t\tif (level == 1 && segment instanceof IdentifiableElement identifiableElement) {\n\t\t\t\t\tretain.add(identifiableElement);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void leave(Visitable segment) {\n\n\t\t\t\tif (entranceLevel1 != null) {\n\t\t\t\t\tlevel = Math.max(0, level - 1);\n\t\t\t\t\tif (segment == entranceLevel1) {\n\t\t\t\t\t\tentranceLevel1 = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tretain.addAll(Optional.ofNullable(implicitScope.peek()).orElseGet(Set::of));\n\t\tif (visitedNamed != null) {\n\t\t\tvisitedNamed.retainAll(retain);\n\t\t}\n\t}", "boolean goalState() {\n\t\treturn (numbersLeft == 0);\n\t}", "public boolean hasBeenVisited() {\n\t\treturn visited; // Replace with your code\n\t}", "public boolean first() {\n initialize();\n return next();\n }", "protected State<T> popOpenList(){\r\n\t\tevaluatedNodes++;\r\n\t\treturn openList.poll();\r\n\t}", "protected Object entryInitialFlow() {\n\t\treturn emptySet.clone();\n\t}", "public Rule_in_State get_unprocessed_rule();", "public boolean hasNext() {\n return !left_nodes.isEmpty(); // DON'T FORGET TO MODIFY THE RETURN IF NEED BE\r\n\t\t}", "private boolean doLeftPop(final S nonTerminal, final Predicate<S> letterPredicate) {\n if(!slp.containsProduction(nonTerminal) || slp.getAxioms().contains(nonTerminal)) {\n return false;\n }\n P production = getProduction(nonTerminal);\n S head = production.getRight().findFirst(s -> !s.isEmpty()).get();\n return letterPredicate.test(head) && !production.getRight().isEmpty();\n }", "public boolean previous() {\n boolean result = true;\n try {\n element = iterator.previous();\n } catch(NoSuchElementException ex) {\n result = false;\n }\n return result;\n }", "public static Set<ARGState> getOnePathToARGStateForSimpleProperty(ARGState source, ARGState destination) {\n Set<Integer> seenElements = new HashSet<Integer>();\n ARGState currentARGState = source;\n seenElements.add(source.getStateId());\n List<ARGState> path = new ArrayList<ARGState>();\n path.add(currentARGState);\n // Set<ARGState> result = new HashSet<ARGState>();\n while (currentARGState.getStateId() != destination.getStateId()) {\n boolean end = true;\n if (!currentARGState.getChildren().isEmpty()) {\n Iterator<ARGState> children = currentARGState.getChildren().iterator();\n ARGState childrenElement ;\n do {\n childrenElement = children.next();\n if (!seenElements.contains(childrenElement.getStateId())) {\n path.add(childrenElement);\n currentARGState=childrenElement;\n seenElements.add(childrenElement.getStateId());\n end = false;\n break;\n }\n } while(children.hasNext());\n if(end){\n path.remove(path.size()-1);\n if(path.size()!=0){\n currentARGState=path.get(path.size()-1);\n seenElements.add(currentARGState.getStateId());\n }\n else\n break;\n }\n\n }\n else{\n path.remove(path.size()-1);\n if(path.size()!=0){\n currentARGState=path.get(path.size()-1);\n seenElements.add(currentARGState.getStateId());\n }\n else\n break;\n }\n }\n if(currentARGState.getStateId() != destination.getStateId())\n return null;\n if(!destination.getChildren().contains(source))\n return null;\n System.out.println(\"path.size=\"+path.size());\n Iterator<ARGState> it=path.iterator();\n for(int i=0;i<path.size()-1;i++){\n ARGState pre=path.get(i);\n ARGState suc=path.get(i+1);\n CFAEdge edge=pre.getEdgeToChild(suc);\n if(edge.getRawStatement().equals(\"BLANKEDGE\")){\n pre.getChildren().remove(suc);\n suc.getParents().remove(pre);\n AbstractStates.extractLocation(pre).getLeavingEdge().remove(edge);\n AbstractStates.extractLocation(suc).getEnteringEdges().remove(edge);\n }\n }\n return new HashSet<ARGState>(path);\n }", "@Override\n\t\tpublic boolean hasNext() {\n\t\t\treturn (!stack.isEmpty() || localRoot!=null);\n\t\t}", "public boolean WasVisited() { return _visited; }", "public boolean checkIn(){\n return state.checkIn();\n }", "boolean isRepeatState(final BiPredicate<I_GameState, I_GameState> predicate);", "protected HashSet getNotTraversable(){\n tester.removeTraversedComponents();\n return tester.traversableComponents;\n }", "@Override\r\n\t\tpublic boolean hasNext() {\n\t\t\treturn current!=null;\r\n\t\t}", "@Override\n\t@SuppressWarnings(\"unchecked\")\n\tprotected final void processWhenUpdated(Node node) {\n\t\tboolean first = false;\n\t\tif (!this.safeCurrentSCCNodes.contains(node)) {\n\t\t\tfirst = true;\n\t\t\t// Don't add the node to this set unless its OUT has been populated.\n\t\t}\n\t\tNodeInfo nodeInfo = node.getInfo();\n\t\tCollection<Node> predecessors;\n\t\tpredecessors = nodeInfo.getCFGInfo().getInterProceduralLeafPredecessors();\n\t\tF oldIN = (F) nodeInfo.getIN(analysisName);\n\t\tboolean propagateFurther = false;\n\t\tF newIN;\n\t\tif (oldIN == null) {\n\t\t\t// First processing ever of this node!\n\t\t\tpropagateFurther = true;\n\t\t\tnewIN = (predecessors.isEmpty()) ? newIN = this.getEntryFact() : this.getTop();\n\t\t} else if (first) {\n\t\t\t// First processing in the first round of update.\n\t\t\tnewIN = (predecessors.isEmpty()) ? newIN = this.getEntryFact() : this.getTop();\n\t\t} else {\n\t\t\tnewIN = oldIN; // Use the same object.\n\t\t}\n\n\t\tboolean inChanged = false;\n\t\tif (this.analysisName == AnalysisName.CROSSCALL_PREDICATE_ANALYSIS && node instanceof PostCallNode) {\n\t\t\t// A small hack here.\n\t\t\tPostCallNode postNode = (PostCallNode) node;\n\t\t\tList<FunctionDefinition> funcDef = postNode.getParent().getInfo().getCalledDefinitions();\n\t\t\tif (funcDef.isEmpty() || funcDef.stream().noneMatch(f -> this.functionWithBarrier.contains(f))) {\n\t\t\t\tpredecessors = new HashSet<>();\n\t\t\t\tpredecessors.add(postNode.getParent().getPreCallNode());\n\t\t\t}\n\t\t}\n\t\tboolean anyPredMissed = false;\n\t\tfor (Node predNode : predecessors) {\n\t\t\t/*\n\t\t\t * Ignore a predecessor if:\n\t\t\t * (i) it lies within the SCC, AND\n\t\t\t * (ii) it has not been processed yet.\n\t\t\t */\n\t\t\tSCC predSCC = predNode.getInfo().getCFGInfo().getSCC();\n\t\t\tif (predSCC != null) {\n\t\t\t\t// If null, then pred clearly belongs to some other SCC.\n\t\t\t\tif (node.getInfo().getCFGInfo().getSCC() == predSCC) {\n\t\t\t\t\t// Predecessor lies within the SCC.\n\t\t\t\t\tif (!this.safeCurrentSCCNodes.contains(predNode)) {\n\t\t\t\t\t\tanyPredMissed = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tF predOUT = (F) predNode.getInfo().getOUT(analysisName);\n\t\t\tif (predOUT == null) {\n\t\t\t\t/*\n\t\t\t\t * Here, we do not mark anyPredMissed, as this node would be\n\t\t\t\t * marked for processing whenever the predecessor has been\n\t\t\t\t * processed for the first time. Check the setting of\n\t\t\t\t * propagateFurther above.\n\t\t\t\t */\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tF edgeOUT = this.edgeTransferFunction(predOUT, predNode, node);\n\t\t\tinChanged |= newIN.merge(edgeOUT, null);\n\t\t}\n\n\t\tif (node instanceof PostCallNode) {\n\t\t\tPreCallNode preNode = ((CallStatement) node.getParent()).getPreCallNode();\n\t\t\tSCC preSCC = preNode.getInfo().getCFGInfo().getSCC();\n\t\t\tboolean doNotProcess = false;\n\t\t\tif (preSCC != null) {\n\t\t\t\t// If null, then pred clearly belongs to some other SCC.\n\t\t\t\tif (node.getInfo().getCFGInfo().getSCC() == preSCC) {\n\t\t\t\t\t// Predecessor lies within the SCC.\n\t\t\t\t\tif (!this.safeCurrentSCCNodes.contains(preNode)) {\n\t\t\t\t\t\tanyPredMissed = true;\n\t\t\t\t\t\tdoNotProcess = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!doNotProcess) {\n\t\t\t\tinChanged |= processPostCallNodesIN((PostCallNode) node, newIN);\n\t\t\t}\n\n\t\t}\n\t\tif (anyPredMissed) {\n\t\t\tthis.underApproximated.add(node);\n\t\t} else {\n\t\t\tthis.underApproximated.remove(node);\n\t\t}\n\t\tnodeInfo.setIN(analysisName, newIN);\n\n\t\t// Step 2: Apply the flow-function on IN, to obtain the OUT.\n\t\tF newOUT;\n\t\tnewOUT = node.accept(this, newIN);\n\t\tnodeInfo.setOUT(analysisName, newOUT);\n\t\tthis.safeCurrentSCCNodes.add(node); // Mark a node as processed only after its OUT has been \"purified\".\n\n\t\t// Step 3: Process the successors.\n\t\tpropagateFurther |= inChanged;\n\t\tif (propagateFurther) {\n\t\t\tthis.globalWorkList.addAll(nodeInfo.getCFGInfo().getInterProceduralLeafSuccessors());\n\t\t\tif (node instanceof PreCallNode) {\n\t\t\t\tPreCallNode pre = (PreCallNode) node;\n\t\t\t\tthis.globalWorkList.add(pre.getParent().getPostCallNode());\n\t\t\t}\n\t\t\t// If we are adding successors of a BeginNode of a FunctionDefinition, we should\n\t\t\t// add all the ParameterDeclarations.\n\t\t\tif (node instanceof BeginNode && node.getParent() instanceof FunctionDefinition) {\n\t\t\t\tFunctionDefinition func = (FunctionDefinition) node.getParent();\n\t\t\t\tfor (ParameterDeclaration paramDecl : func.getInfo().getCFGInfo().getParameterDeclarationList()) {\n\t\t\t\t\tthis.globalWorkList.add(paramDecl);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private boolean hasNext(){\n return current !=null;\n\n }", "private boolean checkIfAlreadyIsState(ArrayList<ArrayList<Integer>> states, ArrayList<Integer> state){\n boolean res=true;\n Collections.sort(state);\n\n for (int i = 0 ; i < states.size();i++){\n ArrayList<Integer> currState = states.get(i);\n\n if(currState.size() != state.size())\n continue;\n else{\n Collections.sort(currState);\n\n if(state.equals(currState)){\n res = false;\n break;\n }\n }\n }\n\n return res;\n }", "@Override\r\n\tpublic boolean isVisited() {\n\t\treturn false;\r\n\t}", "public boolean getState( ) { return state; }", "public List<Set<SDGNode>> firstPass() {\n Object[] edges = icfg.edgeSet().toArray();\n\n // first, temporarily remove all edges but CF and CALL\n for (int i = 0; i < edges.length; i++) {\n SDGEdge e = (SDGEdge) edges[i];\n if (e.getKind() != SDGEdge.Kind.CONTROL_FLOW\n && e.getKind() != SDGEdge.Kind.CALL) {\n\n buffer.addFirst(e);\n icfg.removeEdge(e);\n }\n }\n\n // then compute SCCs\n StrongConnectivityInspector<SDGNode, SDGEdge> sci = new StrongConnectivityInspector<SDGNode, SDGEdge>(icfg);\n List<Set<SDGNode>> erg = sci.stronglyConnectedSets();\n\n // put return edges back\n for (SDGEdge e : buffer) {\n icfg.addEdge(e);\n }\n buffer.clear();\n\n return erg;\n }", "public boolean isSetBefore() {\n return this.before != null;\n }", "boolean hasNext() {\n return !next.isSentinel();\n }", "public HashSet<State> statesReachableFrom(State from) {\n \t\treturn statesReachableOn(from, null);\n \t\t//\t\tHashSet<State> reachable = new HashSet<State>();\n \t\t//\t\tIterator<Transition> iter = from.getTransitions().iterator();\n \t\t//\t\twhile (iter.hasNext()) {\n \t\t//\t\t\tTransition t = iter.next();\n \t\t//\t\t\t\n \t\t//\t\t\t// Add all empty transitions\n \t\t//\t\t\t// Skip if already added to prevent loops\n \t\t//\t\t\tif (t.isEmptyTransition() && !reachable.contains(t.to)) {\n \t\t//\t\t\t\t// Add this state\n \t\t//\t\t\t\treachable.add(t.to);\n \t\t//\t\t\t\t\n \t\t//\t\t\t\t// Recurse and add all reachable from this state\n \t\t//\t\t\t\treachable.addAll(statesReachableFrom(t.to));\n \t\t//\t\t\t}\n \t\t//\t\t}\n \t\t//\t\t\n \t\t//\t\treturn reachable;\n \t}", "@Override\n public boolean hasNext() {\n boolean result = false;\n if (checkCurrentIterator(this.currentIterator) && this.currentIterator.hasNext()) {\n return true;\n } else if (it.hasNext()) {\n this.currentIterator = getIterator(it);\n return this.hasNext();\n }\n return result;\n\n }", "public boolean hasPlayedBefore ( ) {\n\t\treturn extract ( handle -> handle.hasPlayedBefore ( ) );\n\t}", "@Override\n public boolean hasNext() {\n return currentIterator != null;\n }", "public boolean hasNext() {\n\t\tif (stack.empty()) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tIterator<MenuComponent> iterator = stack.peek();\n\t\t\tif (!iterator.hasNext()) {\n\t\t\t\tstack.pop();\n\t\t\t\treturn hasNext();\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}", "public void updateState(){\n\t\t\n\t\t\n\t\t\n\t\tArrayList<String> toAdd = new ArrayList<String>();\n\t\tArrayList<String> toRemove = new ArrayList<String>();\n\n\t\tthis.lastAdded.clear();\n\t\tthis.lastFulfilled.clear();\n\t\tthis.lastViolated.clear();\n\t\t\n\t\ttry {\n\n\t\t\tdo{\n\t\t\t\ttoAdd.clear();\n\t\t\t\ttoRemove.clear();\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iActive = reasoner.findall(\"xactive(A,Fa,Fm,Fd,Fr,Timeout)&not(as(A,Fa,Fm,Fd,Fr,Timeout))\");\n\t\t\t\twhile(iActive.hasNext()){\n\t\t\t\t\tUnifier un = iActive.next();\n\t\t\t\t\ttoAdd.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+ adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastAdded.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+ adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iViol = reasoner.findall(\"xviol(A,Fa,Fm,Fd,Fr,Timeout)&not(vs(A,Fa,Fm,Fd,Fr,Timeout))\");\n\t\t\t\twhile(iViol.hasNext()){\n\t\t\t\t\tUnifier un = iViol.next();\n\t\t\t\t\ttoAdd.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastViolated.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iDeactF = reasoner.findall(\"xdeact_f(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iDeactF.hasNext()){\n\t\t\t\t\tUnifier un = iDeactF.next();\n\t\t\t\t\ttoAdd.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString()+\",\"+un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastFulfilled.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iDeactR = reasoner.findall(\"xdeact_r(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iDeactR.hasNext()){\n\t\t\t\t\tUnifier un = iDeactR.next();\n\t\t\t\t\ttoAdd.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastFulfilled.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iFailed = reasoner.findall(\"xfailed(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iFailed.hasNext()){\n\t\t\t\t\tUnifier un = iFailed.next();\n\t\t\t\t\ttoAdd.add(\"fs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//norms deactivated (fulfilled) whose maintenance condition does not hold can be removed.\n\t\t\t\t//if they are not removed, new instances of the same norm are not activated\n\t\t\t\tIterator<Unifier> iDeactivated_to_remove = reasoner.findall(\"ds(A,Fa,Fm,Fd,Fr,Timeout)&not(Fm)\");\n\t\t\t\twhile(iDeactivated_to_remove.hasNext()){\n\t\t\t\t\tUnifier un = iDeactivated_to_remove.next();\n\t\t\t\t\ttoRemove.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\tfor(String s:toAdd){\n\t\t\t\t\treasoner.assertValue(s);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(String s:toRemove){\n\t\t\t\t\treasoner.retract(s);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(toAdd.size()>0|toRemove.size()>0);\t\t\t\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "public boolean getVisited()\n {\n return visited;\n }", "public\t\tMiPart\t\tgetPrevious()\n\t\t{\n\t\tMiPart obj = iterator.getPrevious();\n\t\twhile ((obj == null) || ((filter != null) && ((obj = filter.accept(obj)) == null)))\n\t\t\t{\n\t\t\tif (!hasLayers)\n\t\t\t\treturn(null);\n\t\t\tif (!iterateThroughAllLayers)\n\t\t\t\treturn(null);\n\t\t\tMiContainerIterator iter = getPreviousIterator();\n\t\t\tif (iter == null)\n\t\t\t\treturn(null);\n\t\t\titerator = iter;\n\t\t\tobj = iterator.getPrevious();\n\t\t\t}\n\t\treturn(obj);\n\t\t}", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "@Override\n\tpublic boolean hasNext() {\n\t return current != null;\n\t}", "@Override\n \t\tpublic boolean isEmpty() {\n \t\t\treturn (state != null && state.getChildrenCount(currentPage) == 0);\n \t\t}", "@Override\n\tpublic boolean getState() {\n\t\treturn true;\n\t}", "public void skip(){\n if (!this.hasNext()) return;\n \n this.checkNext();\n \n if (!this.allStatesIterator.hasNext()){\n this.allStatesIterator = new IntegerIterator(1);\n this.allStatesIterator.skip();\n \n if(!this.allSubsetsIterator.hasNext()){\n this.allSubsetsIterator = new SubsetIterator(this.numberOfStates);\n this.currentFinalStatesIds = this.allSubsetsIterator.next();\n this.currentTransitions = this.allTransitionsIterator.next();\n }\n else{\n this.currentFinalStatesIds = this.allSubsetsIterator.next();\n }\n }\n else{\n this.currentInitialStateId = this.allStatesIterator.next();\n }\n }", "@Override\r\n\tpublic boolean hasPredecessor() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean isAllHit() {\r\n\t\treturn priorityElements.isEmpty();\r\n\t}", "public boolean reducible() {\n if (dfsTree.back.isEmpty()) {\n return true;\n }\n int size = controlFlow.transitions.length;\n boolean[] loopEnters = dfsTree.loopEnters;\n TIntHashSet[] cycleIncomings = new TIntHashSet[size];\n // really this may be array, since dfs already ensures no duplicates\n TIntArrayList[] nonCycleIncomings = new TIntArrayList[size];\n int[] collapsedTo = new int[size];\n int[] queue = new int[size];\n int top;\n for (int i = 0; i < size; i++) {\n if (loopEnters[i]) {\n cycleIncomings[i] = new TIntHashSet();\n }\n nonCycleIncomings[i] = new TIntArrayList();\n collapsedTo[i] = i;\n }\n\n // from whom back connections\n for (Edge edge : dfsTree.back) {\n cycleIncomings[edge.to].add(edge.from);\n }\n // from whom ordinary connections\n for (Edge edge : dfsTree.nonBack) {\n nonCycleIncomings[edge.to].add(edge.from);\n }\n\n for (int w = size - 1; w >= 0 ; w--) {\n top = 0;\n // NB - it is modified later!\n TIntHashSet p = cycleIncomings[w];\n if (p == null) {\n continue;\n }\n TIntIterator iter = p.iterator();\n while (iter.hasNext()) {\n queue[top++] = iter.next();\n }\n\n while (top > 0) {\n int x = queue[--top];\n TIntArrayList incoming = nonCycleIncomings[x];\n for (int i = 0; i < incoming.size(); i++) {\n int y1 = collapsedTo[incoming.getQuick(i)];\n if (!dfsTree.isDescendant(y1, w)) {\n return false;\n }\n if (y1 != w && p.add(y1)) {\n queue[top++] = y1;\n }\n }\n }\n\n iter = p.iterator();\n while (iter.hasNext()) {\n collapsedTo[iter.next()] = w;\n }\n }\n\n return true;\n }", "public boolean willNotBeResurrected() {\n return state == State.FRESH || state == State.ERROR;\n }", "public State hillClimbing(){\r\n\t\tState currentState = start;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tArrayList<State> successors = currentState.generateNeighbours(currentState);\r\n\t\t\tStatesGenerated= StatesGenerated + successors.size();\r\n\t\t\t\r\n\t\t\tState nextState = null;\r\n\t\t\t\r\n\t\t\tfor(int i=0; i<successors.size(); i++){\r\n\t\t\t\tif(successors.get(i).compareTo(currentState) < 0){\r\n\t\t\t\t\tnextState = successors.get(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(nextState==null)\r\n\t\t\t\treturn currentState;\r\n\t\t\t\r\n\t\t\tcurrentState = nextState;\r\n\t\t}\r\n\t}", "@Test\n public void testHasPrevious_Start() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 3, 4, 5));\n\n ListIterator<Integer> instance = baseList.listIterator();\n boolean expResult = false;\n boolean result = instance.hasPrevious();\n\n assertEquals(expResult, result);\n }", "public void solveGame() {\n\t\tlosingStates = new HashSet<S>();\n\t\t\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tList<Set<S>> uncontrollableSuccessors = new ArrayList<Set<S>>();\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> currentUncontrollableSuccesors;\n\t\tSet<S> currentSet; \n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\tcurrentUncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\t\t\tcurrentSet = new HashSet<S>();\n\t\n\t\t\tif(!relaxAllControllables){\n\t\t\t\tfor(S s: currentUncontrollableSuccesors){\n\t\t\t\t\tif((!relaxOnAssumptions || (!assumptionsStates.contains(s) || assumptionsStates.contains(state))\n\t\t\t\t\t\t\t&& (!relaxSelfLoops || (!s.equals(state)))))\n\t\n\t\t\t\t\t\tcurrentSet.add(s);\n\t\t\t\t}\n\t\t\t}\n\t\t\t uncontrollableSuccessors.add(currentSet);\n\t\t\t isUncontrollable[indexCount] = currentSet.size() > 0;\n\t\t\t indexCount+=1;\n\t\t}\n\n\t\tlosingStates.addAll(game.getStates());\n\t\t\n\t\tSet<S> currentLosingStates;\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t\tcurrentLosingStates\t= new HashSet<S>();\n\t\t\t\n\t\t\t// Handle the pending states\n\t\t\twhile (!losing.isEmpty()) {\n\t\t\t\tS state = losing.poll();\n\n\t\t\t\t\n\t\t\t\tcurrentLosingStates.add(state);\n\n\t\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\t\tfor (S pred : predecessors) {\n\t\t\t\t\tif(losing.contains(pred) || currentLosingStates.contains(pred))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t\t//if(i == -1)\n\t\t\t\t\t\t//continue;\n\t\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tuncontrollableSuccessors.get(i).remove(state);\n\t\t\t\t\t\tif(uncontrollableSuccessors.get(i).isEmpty())\n\t\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlosingStates.retainAll(currentLosingStates);\n\t\t\t\n\t\t}\n\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "private boolean isCollStatusPending(final Specimen objSpecimen)\r\n\t{\r\n\t\treturn objSpecimen.getCollectionStatus() == null || !Constants.COLLECTION_STATUS_COLLECTED.equals(objSpecimen.getCollectionStatus());\r\n\t}", "public boolean isVisited(){\n return visited;\n }", "List<State> getListStateByFilter( StateFilter filter );", "public Set<String> getNeverVisited() {\n Set<String> neverVisited = new TreeSet<String>();\n this.getNeverVisited(this, neverVisited, null);\n return neverVisited;\n }", "public boolean hasNext() {\n\t\treturn this.onAction.hasNext() || this.offAction.hasNext();\t\t\n\t}", "public boolean hasNext() {\r\n \r\n return now != null;\r\n }", "public boolean addToFrontier(PuzzleState aState)\r\n\t{\n\t\tif(Searched.contains(aState) || Frontier.contains(aState))\r\n\t\t{\r\n\t\t\t// Discard this duplicate.\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Else put this item on the end of the queue;\r\n\t\t\tFrontier.addLast(aState);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "@Override\n\tprotected boolean isStoppingConditionReached() {\n\t\t\n\t\tboolean flag = iteration > maxIteration || \n\t\t\t\tlocalSearchTime > maxLocalSearchTime || \n\t\t\t\t!isUpdate;\n\t\tisUpdate = false ;\n\t\treturn flag ;\n\t}", "private StatusEnum stepInternal()\n {\n if (initialStep)\n {\n this.tail = map.getStart();\n this.openSet.push(map.getStart());\n initialStep = false;\n }\n\n if (status != StatusEnum.RUNNING)\n return status;\n\n cursor = openSet.pop(); // Pull the cursor off the open set min-heap\n if (cursor == null)\n {\n // The open set was empty, so although we have not reached the goal, there are no more points to investigate\n return StatusEnum.COMPLETED_NOT_FOUND;\n }\n\n while (closedSet.contains(cursor) || !map.isTraversable(cursor))\n {\n // The cursor is in the closed set (meaning it was already investigated) or the cursor point is non traversable on the map\n cursor = openSet.pop();\n if (cursor == null)\n {\n return StatusEnum.COMPLETED_NOT_FOUND;\n }\n }\n\n // The goal has been reached, the path is complete\n if (cursor.equals(map.getGoal()))\n {\n tail = cursor; // Set the member tail to be used in the reconstruction done in getPath()\n return StatusEnum.COMPLETED_FOUND;\n }\n\n // Add the cursor point to the closed set\n closedSet.add(cursor);\n\n // Get the list of neighboring points\n List<WeightedPoint> neighbors = neighborSelector.getNeighbors(map, cursor, heuristic);\n\n // Link the neighbors to the cursor (for backtracking the path when the goal is reached) and calculate their weight\n for (WeightedPoint wp : neighbors)\n {\n if (map.isTraversable(wp.getRow(), wp.getCol()) && !closedSet.contains(wp))\n {\n wp.setFromCost(cursor.getFromCost() + heuristic.distance(cursor, wp));\n\n if (dijkstra)\n {\n wp.setToCost(0);\n }\n else\n {\n wp.setToCost(heuristic.distance(wp, map.getGoal()));\n }\n wp.setPrev(cursor);\n }\n }\n\n if (shuffle)\n {\n // Shuffle the neighbors to randomize the order of testing nodes with the same cost value\n Collections.shuffle( neighbors );\n }\n Collections.sort( neighbors );\n\n // Put the neighbors on the open set\n for (WeightedPoint wp : neighbors)\n {\n if (!openSet.contains(wp))\n openSet.push(wp);\n }\n\n return StatusEnum.RUNNING;\n }", "boolean doFilter() { return false; }", "@Override\n public boolean callCheck() {\n return last == null;\n }", "public boolean hasNext() { return (current != null && current.item != null); }", "public boolean hasNextInSet() {\n return (hasNext() &&\n (indexOfCurrentElement + 1 < firstIndexOfCurrentSet + quantity) &&\n (indexOfCurrentElement + 1 >= firstIndexOfCurrentSet)); \n }", "private boolean hasNext() {\n\t\treturn iterator != null;\n\t}" ]
[ "0.5679753", "0.5658178", "0.5602214", "0.5496625", "0.5406949", "0.53947765", "0.5393356", "0.53814393", "0.53363264", "0.5302364", "0.5248589", "0.52425283", "0.52425146", "0.52033144", "0.51834184", "0.5180066", "0.51609313", "0.51596516", "0.5087054", "0.5071161", "0.5063511", "0.5059928", "0.5056315", "0.5047311", "0.5040239", "0.50401115", "0.50050974", "0.49986494", "0.49803233", "0.49788377", "0.49570614", "0.49537635", "0.4950668", "0.49448887", "0.49409798", "0.49346477", "0.49121517", "0.48882025", "0.48874763", "0.48827165", "0.4877616", "0.4875499", "0.48745775", "0.48745108", "0.4867584", "0.48672506", "0.48666874", "0.48602965", "0.48545676", "0.4846051", "0.4844197", "0.48303837", "0.48290598", "0.48271284", "0.48172584", "0.4815528", "0.4811885", "0.48081937", "0.4805907", "0.479567", "0.4791304", "0.47878078", "0.47780132", "0.47732112", "0.4772696", "0.4769011", "0.4763978", "0.47552645", "0.47552645", "0.47552645", "0.47552645", "0.47552645", "0.47552645", "0.47552645", "0.47552645", "0.47504753", "0.4748963", "0.47484884", "0.4742457", "0.47397396", "0.47382486", "0.473687", "0.47330478", "0.47291216", "0.4724019", "0.47216734", "0.4717179", "0.47131392", "0.47129816", "0.47091016", "0.47046325", "0.47009918", "0.4699621", "0.46934986", "0.4690358", "0.46885386", "0.46838516", "0.46835306", "0.46816748", "0.4680792" ]
0.48407912
51
Checks if the current state has been encountered before using a list of predicate to compare states with. All states that returns true given the predicate being applied to it as well as the current state are being returned as a collection.
Collection<I_GameState> getRepeatStates(final BiPredicate<I_GameState, I_GameState> predicate);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Collection<? extends AbstractState> getFollowStates(AutomatonState state, List<AbstractState> otherElements, CFAEdge edge, boolean failOnUnknownMatch) throws CPATransferException {\n Preconditions.checkArgument(!(state instanceof AutomatonUnknownState));\n if (state == cpa.getBottomState()) {\n //return Collections.singleton(state);\n return Collections.emptySet();\n }\n\n if (state.getInternalState().getTransitions().isEmpty()) {\n // shortcut\n return Collections.singleton(state);\n }\n\n Collection<AbstractState> lSuccessors = new HashSet<AbstractState>(2);\n AutomatonExpressionArguments exprArgs = new AutomatonExpressionArguments(state.getVars(), otherElements, edge, logger);\n boolean edgeMatched = false;\n boolean nonDetState = state.getInternalState().isNonDetState();\n\n // these transitions cannot be evaluated until last, because they might have sideeffects on other CPAs (dont want to execute them twice)\n // the transitionVariables have to be cached (produced during the match operation)\n // the list holds a Transition and the TransitionVariables generated during its match\n List<Pair<AutomatonTransition, Map<Integer, String>>> transitionsToBeTaken = new ArrayList<Pair<AutomatonTransition, Map<Integer, String>>>(2);\n\n for (AutomatonTransition t : state.getInternalState().getTransitions()) {\n exprArgs.clearTransitionVariables();\n\n matchTime.start();\n ResultValue<Boolean> match = t.match(exprArgs);\n matchTime.stop();\n if (match.canNotEvaluate()) {\n if (failOnUnknownMatch) {\n throw new CPATransferException(\"Automaton transition condition could not be evaluated: \" + match.getFailureMessage());\n }\n // if one transition cannot be evaluated the evaluation must be postponed until enough information is available\n return Collections.singleton(new AutomatonUnknownState(state));\n } else {\n if (match.getValue()) {\n edgeMatched = true;\n assertionsTime.start();\n ResultValue<Boolean> assertionsHold = t.assertionsHold(exprArgs);\n assertionsTime.stop();\n\n if (assertionsHold.canNotEvaluate()) {\n if (failOnUnknownMatch) {\n throw new CPATransferException(\"Automaton transition assertions could not be evaluated: \" + assertionsHold.getFailureMessage());\n }\n // cannot yet be evaluated\n return Collections.singleton(new AutomatonUnknownState(state));\n\n } else if (assertionsHold.getValue()) {\n if (!t.canExecuteActionsOn(exprArgs)) {\n if (failOnUnknownMatch) {\n throw new CPATransferException(\"Automaton transition action could not be executed\");\n }\n // cannot yet execute, goto UnknownState\n return Collections.singleton(new AutomatonUnknownState(state));\n }\n\n // delay execution as described above\n Map<Integer, String> transitionVariables = ImmutableMap.copyOf(exprArgs.getTransitionVariables());\n transitionsToBeTaken.add(Pair.of(t, transitionVariables));\n\n } else {\n // matching transitions, but unfulfilled assertions: goto error state\n AutomatonState errorState = AutomatonState.automatonStateFactory(Collections.<String, AutomatonVariable>emptyMap(), AutomatonInternalState.ERROR, cpa);\n logger.log(Level.INFO, \"Automaton going to ErrorState on edge \\\"\" + edge.getDescription() + \"\\\"\");\n lSuccessors.add(errorState);\n }\n\n if (!nonDetState) {\n // not a nondet State, break on the first matching edge\n break;\n }\n }\n // do nothing if the edge did not match\n }\n }\n\n if (edgeMatched) {\n // execute Transitions\n for (Pair<AutomatonTransition, Map<Integer, String>> pair : transitionsToBeTaken) {\n // this transition will be taken. copy the variables\n AutomatonTransition t = pair.getFirst();\n Map<Integer, String> transitionVariables = pair.getSecond();\n actionTime.start();\n Map<String, AutomatonVariable> newVars = deepCloneVars(state.getVars());\n exprArgs.setAutomatonVariables(newVars);\n exprArgs.putTransitionVariables(transitionVariables);\n t.executeActions(exprArgs);\n actionTime.stop();\n AutomatonState lSuccessor = AutomatonState.automatonStateFactory(newVars, t.getFollowState(), cpa);\n //if (!(lSuccessor instanceof AutomatonState.BOTTOM)) {\n lSuccessors.add(lSuccessor);\n //} // else add nothing\n }\n return lSuccessors;\n } else {\n // stay in same state, no transitions to be executed here (no transition matched)\n return Collections.singleton(state);\n }\n }", "private boolean allTrue(CompositeTrue predicate) {\n if (kids.isEmpty()) {\n return false;\n }\n\n Iterator<E> i = kids.iterator();\n while (i.hasNext()) {\n E future = i.next();\n if (!predicate.isTrue(future)) {\n return false;\n }\n }\n return true;\n }", "private final List<State> PreE(List<State> y) {\r\n // {s \b S | exists s\u0001, (s � s\u0001 and s\u0001 \b Y )}\r\n List<State> states = new ArrayList<State>();\r\n //List<Transition> transitions = new ArrayList<Transition>();\r\n for (State sourceState : this._kripke.States) {\r\n for (State destState : y) {\r\n Transition myTransition = new Transition(sourceState, destState);\r\n \tfor(Transition transition : this._kripke.Transitions)\r\n \t{\r\n \t\tif (transition.FromState.equals(myTransition.FromState) &&\r\n \t\t\t\ttransition.ToState.equals(myTransition.ToState)) {\r\n \t\t\tif (!states.contains(sourceState)) {\r\n states.add(sourceState);\r\n }\r\n \t} \r\n \r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n return states;\r\n }", "boolean isRepeatState(final BiPredicate<I_GameState, I_GameState> predicate);", "@Test\n public void allTrue() {\n assertTrue(getPredicateInstance(true, true).evaluate(getTestValue()),\n \"multiple true predicates evaluated to false\");\n assertTrue(getPredicateInstance(true, true, true).evaluate(getTestValue()),\n \"multiple true predicates evaluated to false\");\n }", "@Override\n protected Collection<BDDState> preCheck(BDDState pState, VariableTrackingPrecision pPrecision) {\n if (pPrecision.isEmpty()) {\n return Collections.singleton(pState);\n }\n // the path is not fulfilled\n if (pState.getRegion().isFalse()) {\n return ImmutableList.of();\n }\n return null;\n }", "private Set<Integer> getStatesFromWichReachableAccepting(LabelledTransitionSystem ret) {\n\t\tMap<Integer, Set<Integer>> reversedReachable = this.computeInverseTransitionRelation(ret);\n\n\t\tSet<Integer> reachable = new HashSet<>();\n\n\t\tlogger.debug(\"Accepting states: \" + ret.getAccepting());\n\t\tSet<Integer> current = ret.getAccepting();\n\n\t\tboolean[] visited = new boolean[ret.getStates().length];\n\n\t\twhile (!current.isEmpty()) {\n\t\t\tInteger evaluated = current.iterator().next();\n\t\t\tcurrent.remove(evaluated);\n\t\t\tif (!visited[evaluated]) {\n\t\t\t\tvisited[evaluated] = true;\n\t\t\t\treachable.add(evaluated);\n\t\t\t\tSet<Integer> prev = new HashSet<>(reversedReachable.get(evaluated));\n\t\t\t\tcurrent.addAll(prev);\n\t\t\t}\n\t\t}\n\n\t\treturn reachable;\n\t}", "private boolean checkIfAlreadyIsState(ArrayList<ArrayList<Integer>> states, ArrayList<Integer> state){\n boolean res=true;\n Collections.sort(state);\n\n for (int i = 0 ; i < states.size();i++){\n ArrayList<Integer> currState = states.get(i);\n\n if(currState.size() != state.size())\n continue;\n else{\n Collections.sort(currState);\n\n if(state.equals(currState)){\n res = false;\n break;\n }\n }\n }\n\n return res;\n }", "@ParameterizedTest\n @ValueSource(booleans = { true, false })\n public void testRunConditionalWorkflowSuccessPreviousResponse(Boolean predicateTest) {\n StepWorkflow.ConditionalBuilder<Integer, Integer> andSometimesConditional = successfulBuilderOfSupplierDataOne.andSometimes(subStepSupplierDataTwo);\n StepWorkflow.Builder<Object> butOnlyIfBuilder = andSometimesConditional.butOnlyIf(new Object(), ignored -> predicateTest);\n assertEquals(subStepSupplierDataOne, butOnlyIfBuilder.start.step);\n assertNotNull(butOnlyIfBuilder.start.next);\n assertEquals(butOnlyIfBuilder.start.next.step, butOnlyIfBuilder.end.step);\n assertNull(butOnlyIfBuilder.end.next);\n\n // Create and validate then() Builder\n StepWorkflow.Builder<Integer> thenBuilder = butOnlyIfBuilder.then(subStepSupplierDataThree);\n assertEquals(subStepSupplierDataOne, thenBuilder.start.step);\n assertNotNull(thenBuilder.start.next);\n assertEquals(subStepSupplierDataOne, thenBuilder.start.step);\n assertEquals(subStepSupplierDataThree, thenBuilder.end.step);\n assertNotNull(thenBuilder.start.next.step);\n assertNull(thenBuilder.end.next);\n\n // Run and validate build()\n StepWorkflow<Integer> buildStepWorkflow = thenBuilder.build();\n assertEquals(thenBuilder.start, buildStepWorkflow.start);\n assertEquals(thenBuilder.end, buildStepWorkflow.end);\n\n // Call run() and validate return StepWorkflowResponse\n StepWorkflowResponse<Integer> response = buildStepWorkflow.run();\n assertTrue(response.wasSuccessful());\n assertEquals(DATA_THREE, response.getData());\n assertNull(response.getException());\n }", "Collection<? extends String> getHasState();", "private boolean checkNext(){\n boolean ret = this.hasNext;\n if ((this.allStatesIterator.hasNext()) || (this.allSubsetsIterator.hasNext()) || (this.allTransitionsIterator.hasNext())){\n hasNext = true;\n return hasNext;\n }\n hasNext = false;\n return ret;\n }", "default boolean every( Predicate<V> predicate ) {\n if ( ((Tensor<V>)this).isVirtual() ) return predicate.test( this.item() );\n return stream().allMatch(predicate);\n }", "public MoveEvaluation alreadyDetermined(IGameState state) {\n\t\tNode<Pair> node = list.head();\n\t\t\n\t\twhile (node != null) {\n\t\t\tPair p = node.value();\n\t\t\tif (state.equivalent(p.state)) {\n\t\t\t\treturn p.move;\n\t\t\t}\n\t\t\t\n\t\t\tnode = node.next();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "private Collection<ReplayState<C>> executeEnabledMismatches(ReplayState<C> state, Collection<Transition> transitions) {\r\n\t\tCollection<ReplayState<C>> states = new ArrayList<ReplayState<C>>();\r\n\t\tif (!state.trace.isEmpty()) {\r\n\t\t\tfor (Transition transition : transitions) {\r\n\t\t\t\tif (transition.isInvisible() || !map.containsKey(transition)) {\r\n\t\t\t\t} else if (!map.get(transition).equals(state.trace.get(0))) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine new marking.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tMarking newMarking;\r\n\t\t\t\t\t\tsynchronized (semantics) {\r\n\t\t\t\t\t\t\tsemantics.setCurrentState(state.marking);\r\n\t\t\t\t\t\t\tsemantics.executeExecutableTransition(transition);\r\n\t\t\t\t\t\t\tnewMarking = semantics.getCurrentState();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine new cost.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tC newCost = addOperator.add(state.cost, ReplayAction.INSERT_ENABLED_MISMATCH, transition, null);\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Add new state.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\taddState(states, state, newMarking, transition, newCost, state.trace);\r\n\t\t\t\t\t} catch (IllegalTransitionException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn states;\r\n\t}", "private void goPredicate() {\n\t\t\n\t\tSurinamBananas sb = new SurinamBananas();\n\t\t\n\t\tCardboardBox<Musa,Integer> cb = sb.boxSupplier.get();\n\t\t\n\t\t// 3 bananas\n\t\tcb.add(new Basjoo()); // cb.add(new Basjoo()); cb.add(new Basjoo());\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > predIsEmpty = (c) -> c.size() == 0;\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > predLessThan3 = (c) -> c.size() < 3;\n\t\tPredicate< CardboardBox<Musa,Integer> > predMoreThan2 = (c) -> c.size() > 2;\n\t\tPredicate< CardboardBox<Musa,Integer> > predMoreThan6 = (c) -> c.size() > 6;\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > notEmptyAndMoreThan2 = predIsEmpty.negate().and(predMoreThan2);\n\t\t\n\t\tPredicate< CardboardBox<Musa,Integer> > lessThanThreeOrMoreThan6 = (predIsEmpty.negate().and(predLessThan3)) .or(predIsEmpty.negate().and(predMoreThan6) );\n\t\t\n\t\t//System.out.println( \"notEmptyAndMoreThan2: \" + notEmptyAndMoreThan2.test(cb) );\n\t\tSystem.out.println( \"lessThanThreeOrMoreThan6: \" + lessThanThreeOrMoreThan6.test(cb) );\n\t\t\n\t}", "List<State> getListStateByFilter( StateFilter filter );", "private Collection<ReplayState<C>> executeEnabledMatches(ReplayState<C> state, Collection<Transition> transitions) {\r\n\t\tCollection<ReplayState<C>> states = new ArrayList<ReplayState<C>>();\r\n\t\tif (!state.trace.isEmpty()) {\r\n\t\t\tfor (Transition transition : transitions) {\r\n\t\t\t\tif (transition.isInvisible() || !map.containsKey(transition)) {\r\n\t\t\t\t} else if (map.get(transition).equals(state.trace.get(0))) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine new marking.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tMarking newMarking;\r\n\t\t\t\t\t\tsynchronized (semantics) {\r\n\t\t\t\t\t\t\tsemantics.setCurrentState(state.marking);\r\n\t\t\t\t\t\t\tsemantics.executeExecutableTransition(transition);\r\n\t\t\t\t\t\t\tnewMarking = semantics.getCurrentState();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine new cost.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tC newCost = addOperator.add(state.cost, ReplayAction.INSERT_ENABLED_MATCH, transition,\r\n\t\t\t\t\t\t\t\tstate.trace.get(0));\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine new trace.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tList<? extends Object> newTrace = getTail(state.trace);\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Add new state.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\taddState(states, state, newMarking, transition, newCost, newTrace);\r\n\t\t\t\t\t} catch (IllegalTransitionException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn states;\r\n\t}", "@Nonnull\r\n\tpublic static <T> Observable<Boolean> all(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\t@Nonnull final Func1<? super T, Boolean> predicate) {\r\n\t\treturn new Containment.All<T>(source, predicate);\r\n\t}", "public Iterator reachable() {\n Set s = SortedArraySet.FACTORY.makeSet(HashCodeComparator.INSTANCE);\n s.add(IdentityHashCodeWrapper.create(this));\n this.reachable(s);\n return new FilterIterator(s.iterator(), filter);\n }", "@Override\n\tpublic boolean addToFrontier(PuzzleState aState) {\n\t\t\n\t\tif(Searched.contains(aState)) {\n\t\t\treturn false;\n\t\t}\n\t\telse if (Frontier.contains(aState)) {\n\t\t\tfor(PuzzleState n : Frontier) {\n\t\t\t\tif(n.getEvaluationFunction() <= aState.getEvaluationFunction())\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tFrontier.add(aState);\n\t\treturn true;\n\t}", "public HashSet<State> statesReachableOn(State from, Character on) {\n \t\tHashSet<State> reachable = new HashSet<State>();\n \t\tIterator<Transition> iter = from.getTransitions().iterator();\n \t\twhile (iter.hasNext()) {\n \t\t\tTransition t = iter.next();\n \n \t\t\t// Do they want the epsilon transitions?\n \t\t\tboolean equals = false;\n \t\t\tif (on == null)\n \t\t\t\tequals = on == t.c;\n \t\t\telse\n \t\t\t\tequals = on.equals(t.c);\n \n \t\t\t// Add all matching transitions\n \t\t\t// Skip if already added to prevent loops\n \t\t\tif (equals && !reachable.contains(t.to)) {\n \t\t\t\t// Add this state\n \t\t\t\treachable.add(t.to);\n \n \t\t\t\t// Recurse and add all reachable from this state (epsilon transitions)\n \t\t\t\treachable.addAll(statesReachableFrom(t.to));\n \t\t\t}\n \t\t}\n \n \t\treturn reachable;\n \t}", "private List<MetricalLpcfgMetricalModelState> getAllFirstStepBranches() {\n\t\tList<MetricalLpcfgMetricalModelState> newStates = new ArrayList<MetricalLpcfgMetricalModelState>();\n\t\t\n\t\tlong lastTime = notesToCheck.peek().getOffsetTime();\n\t\tlong lastBeatTime = beatState.getBeats().get(beatState.getBeats().size() - 1).getTime();\n\t\t\n\t\t// No notes have finished yet, we must still wait\n\t\tif (lastBeatTime < lastTime) {\n\t\t\tnewStates.add(this);\n\t\t\treturn newStates;\n\t\t}\n\t\t\n\t\t// A note has finished, add measure hypotheses\n\t\tfor (int subBeatLength = 1; subBeatLength <= 1; subBeatLength++) {\n\t\t\t\n\t\t\tfor (Measure measure : grammar.getMeasures()) {\n\t\t\t\t\n\t\t\t\tint subBeatsPerMeasure = measure.getBeatsPerMeasure() * measure.getSubBeatsPerBeat();\n\t\t\t\tfor (int anacrusisLength = 0; anacrusisLength < subBeatsPerMeasure; anacrusisLength++) {\n\t\t\t\t\t\n\t\t\t\t\tMetricalLpcfgMetricalModelState newState =\n\t\t\t\t\t\t\tnew MetricalLpcfgMetricalModelState(this, grammar, measure, subBeatLength, anacrusisLength);\n\t\t\t\t\tnewState.updateMatchType();\n\t\t\t\t\t\n\t\t\t\t\t// This hypothesis could match the first note\n\t\t\t\t\tif (!newState.isWrong()) {\n\t\t\t\t\t\tnewStates.add(newState);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Main.VERBOSE) {\n\t\t\t\t\t\t\tSystem.out.println(\"Adding \" + newState);\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\treturn newStates;\n\t}", "public ElementList getPredicate() {\r\n return predicate;\r\n }", "@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 interface I_GameHistory extends PropertyChangeListener {\n\n /**\n * Checks if the current state has been encountered before\n * @return true if the current game state is equal to an earlier encountered state\n */\n default boolean isRepeatState() {\n return isRepeatState(FULL_EQUAL);\n }\n\n default boolean isRepeatState(I_GameState state) {\n return isRepeatState(FULL_EQUAL, state);\n }\n\n /**\n * Checks if the current state has been encountered before using a list of predicates to compare states with\n * @param predicate a predicate testing some relation between two states.\n * @return true if the current game state is equal to an earlier encountered state\n */\n boolean isRepeatState(final BiPredicate<I_GameState, I_GameState> predicate);\n\n boolean isRepeatState(final BiPredicate<I_GameState, I_GameState> predicate, I_GameState state);\n /**\n * Checks if the current state has been encountered before.\n * All states that returns true given the predicate being aplied to it as well as the current state are\n * being returned as a collection.\n * @return true if the current game state is equal to an earlier encountered state\n */\n default Collection<I_GameState> getRepeatStates() {\n return getRepeatStates(FULL_EQUAL);\n }\n\n default Collection<I_GameState> getRepeatStates(I_GameState state) {\n return getRepeatStates(FULL_EQUAL, state);\n }\n\n /**\n * Checks if the current state has been encountered before using a list of predicate to compare states with.\n * All states that returns true given the predicate being applied to it as well as the current state are\n * being returned as a collection.\n * @param predicate a predicate testing some relation between two states.\n * @return true if the current game state is equal to an earlier encountered state\n */\n Collection<I_GameState> getRepeatStates(final BiPredicate<I_GameState, I_GameState> predicate);\n\n Collection<I_GameState> getRepeatStates(final BiPredicate<I_GameState, I_GameState> predicate, I_GameState state);\n\n /**\n * This predicate returns true only if the two states are actually both referencing the same object.\n */\n BiPredicate<I_GameState, I_GameState> IDENTITY_EQUAL = I_GameHistory::identityEqual;\n\n /**\n * This predicate returns true if the sizes of the lists in the first state are all\n * equal to the length of the corresponding list in the second state.\n */\n BiPredicate<I_GameState, I_GameState> PILE_SIZE_EQUAL = I_GameHistory::sizeEqual;\n\n /**\n * This predicate returns true only if the content of each list in one state matches exactly the content\n * of the corresponding lists in the other state. Objects.equals() is used to check equality of the contents.\n */\n BiPredicate<I_GameState, I_GameState> PILE_CONTENT_EQUAL = I_GameHistory::contentEqual;\n\n /**\n * This predicate tests all of the other standard predicates in this interface.\n * They are tried in a prioritized manor with the least expensive first.\n * It returns as soon as it can be sure of the result.\n */\n BiPredicate<I_GameState, I_GameState> FULL_EQUAL = IDENTITY_EQUAL.or(PILE_SIZE_EQUAL.and(PILE_CONTENT_EQUAL));\n\n /**\n * Returns true only if the two states are actually both referencing the same object.\n *\n * @param state1 a state to compare\n * @param state2 the state to compare it to\n * @return true if the contents of one state all equals the contents of the other state\n */\n private static boolean identityEqual(final I_GameState state1, final I_GameState state2) {\n if (state1 == state2)\n return true;\n\n return Stream.of(new SimpleEntry<>(state1, state2))\n .flatMap( // transform the elements by making a new stream with the transformation to be used\n pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs\n // make new pair of the elements of that pile from each state\n .map(pileID -> new SimpleEntry<>(\n pair.getKey().get(pileID),\n pair.getValue().get(pileID)\n )\n )\n )\n .allMatch(pair -> pair.getKey() == pair.getValue());\n }\n\n /**\n * Returns true if the sizes of the lists in the first state are all\n * equal to the length of the corresponding list in the second state.\n *\n * @param state1 a state to compare\n * @param state2 the state to compare it to\n * @return true if the contents of one state all equals the contents of the other state\n */\n private static boolean sizeEqual(final I_GameState state1, final I_GameState state2) {\n //if a state is null there surely must be a mistake somewhere\n if (state1 == null || state2 == null) throw new NullPointerException(\"A state cannot be null when comparing\");\n\n // make a stream with a data structure containing both states\n return Stream.of(new SimpleEntry<>(state1, state2))\n .flatMap( // transform the elements by making a new stream with the transformation to be used\n pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs\n // make new pair of the elements of that pile from each state\n .map(pileID -> new SimpleEntry<>(\n pair.getKey().get(pileID),\n pair.getValue().get(pileID)\n )\n )\n )\n .map(I_GameHistory::replaceNulls)\n .allMatch(pair -> pair.getKey().size() == pair.getValue().size()); // check they have equal sizes\n }\n\n /**\n * Returns true only if the content of each list in one state matches exactly the content\n * of the corresponding lists in the other state. Objects.equals() is used to check equality of the contents.\n *\n * @param state1 a state to compare\n * @param state2 the state to compare it to\n * @return true if the contents of one state all equals the contents of the other state\n */\n private static boolean contentEqual(final I_GameState state1, final I_GameState state2) {\n //if a state is null there surely must be a mistake somewhere\n if (state1 == null || state2 == null) throw new NullPointerException(\"A state cannot be null when comparing\");\n //if ( !sizeEqual(state1, state2) ) return false;\n\n return Stream.of(new SimpleImmutableEntry<>(state1, state2))\n .flatMap( //map the pair of states to many pairs of piles\n statePair -> Arrays.stream(E_PileID.values())\n .map(pileID -> new SimpleEntry<>(\n statePair.getKey().get(pileID),\n statePair.getValue().get(pileID)\n )\n )\n )\n .map(I_GameHistory::replaceNulls)\n .flatMap( // map the pairs of piles to many pairs of Optional<I_card>s.\n listPair -> IntStream //make sure to always traverse the longer list\n .range(0, Math.max(listPair.getKey().size(), listPair.getValue().size()))\n .mapToObj(i -> new SimpleEntry<>(\n getIfExists(listPair.getKey(), i),\n getIfExists(listPair.getValue(), i))\n )\n )\n // map pairs to booleans by checking that the element in a pair are equal\n .map(cardPair -> Objects.equals(cardPair.getKey(), cardPair.getValue()))\n // reduce the many values to one bool by saying all must be true or the statement is false\n .reduce(true, (e1, e2) -> e1 && e2);\n }\n\n static SimpleEntry<List<I_CardModel>, List<I_CardModel>> replaceNulls(SimpleEntry<List<I_CardModel>, List<I_CardModel>> entry) {\n var key = entry.getKey();\n var value = entry.getValue();\n if (key == null)\n key = List.of();\n if (value == null)\n value = List.of();\n\n return new SimpleEntry<>(key, value);\n }\n\n default <t extends I_GameState> Predicate<t> partiallyApplyPredicate(BiPredicate<t, t> biPred, t arg) {\n return test -> biPred.test(arg, test);\n }\n\n /**\n * A convenient to get an optional card from a list that might throw index out of bounds\n * @param list the list to take an element from\n * @param index the index of the element\n * @return empty if element is null or dosen't exist, otherwise the element at index wrapped in {@link Optional}\n */\n private static Optional<I_CardModel> getIfExists(List<I_CardModel> list, int index) {\n try {\n return Optional.ofNullable(list.get(index));\n } catch (IndexOutOfBoundsException e) {\n return Optional.empty();\n }\n }\n\n //todo might be a good idea to implement a method that checks for the moves that has been tried when in a given state\n}", "@Override\n\tpublic boolean CheckFacts(){\n\t\tqueries.add( query );\n\t\t\n\t\t// while there are still queries to be proven\n\t\twhile ( queries.size() > 0 )\n\t\t{\n\t\t\t// take the first query off of queries to be checked \n\t\t\tString currentQuery = queries.remove(0);\n\n\t\t\t// add it to the list of queries that will be used to output (if true)\n\t\t\toutputFacts.add( currentQuery );\n\n\t\t\t// Compare currentQuery with every fact in Facts:\n\t\t\t// if it matches a fact then the current loop can end\n\t\t\tif( ! CompareToFacts( currentQuery ) )\n\t\t\t{\n\t\t\t\t// if not, compare currentQuery with every entailed literal\n\t\t\t\t// if it matches, add the literal(s) from the left\n\t\t\t\t// of the entailment onto queries\n\t\t\t\tif( ! CompareToClauses( currentQuery ) )\n\t\t\t\t{\n\t\t\t\t\t// if currentQuery still didn’t find a match then \n\t\t\t\t\t// the search has failed \n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// when queries is empty, it means there are no more queries to prove,\n\t\t// so the search was a success\n\t\treturn true;\n\t}", "@Override\n\tpublic IPredicate merge(final Collection<IPredicate> states) {\n\n\t\tfinal Set<HcPredicateSymbol> mergedLocations = new HashSet<>();\n\t\tstates.stream().filter(s -> s instanceof HCPredicate)\n\t\t\t\t.forEach(hcp -> mergedLocations.addAll(((HCPredicate) hcp).getHcPredicateSymbols()));\n\n\t\tfinal IPredicate mergedPred = mPredicateFactory.or(true, states);\n\t\tfinal Term mergedFormula = mergedPred.getFormula();\n\n//\t\tTerm mergedFormula = mMgdScript.getScript().term(\"false\");\n\n//\t\tList<TermVariable> varsForHcPred = null;\n\n//\t\tfor (final IPredicate pred : states) {\n//\t\t\tif (mPredicateFactory.isDontCare(pred)) {\n//\t\t\t\treturn pred;\n//\t\t\t}\n\n//\t\t\tif (pred instanceof HCPredicate) {\n//\t\t\t\tmergedLocations.addAll(((HCPredicate) pred).getHcPredicateSymbols());\n//\t\t\t\tassert varsForHcPred == null || varsForHcPred.equals(((HCPredicate) pred).getSignature()) : \"merging \"\n//\t\t\t\t\t\t+ \"predicates with a different signature. Does that make sense??\";\n//\t\t\t\tvarsForHcPred = ((HCPredicate) pred).getSignature();\n//\t\t\t}\n//\t\t\tmergedFormula = mSimplifier.getSimplifiedTerm(\n//\t\t\t\t\tSmtUtils.or(mMgdScript.getScript(), mergedFormula, pred.getFormula()));\n//\t\t}\n\t\tif (mergedLocations.isEmpty()) {\n\t\t\treturn mPredicateFactory.newPredicate(mergedFormula);\n\t\t} else if (mPredicateFactory.isDontCare(mergedFormula)) {\n\t\t\treturn mPredicateFactory.newPredicate(mergedLocations, mergedFormula, Collections.emptyList());\n\t\t} else {\n\t\t\treturn mPredicateFactory.newPredicate(mergedLocations, mergedFormula,\n\t\t\t\t\tArrays.asList(mergedFormula.getFreeVars()));\n\t\t}\n\t}", "public Collection<ReplayState<C>> expandNode(ReplayState<C> state, Progress progress,\r\n\t\t\tCollection<ReplayState<C>> unmodifiableResultCollection) {\r\n\t\tCollection<ReplayState<C>> states = new LinkedList<ReplayState<C>>();\r\n\t\t/*\r\n\t\t * Check whether the caller considers this state to be a final state.\r\n\t\t * Note that this may depend on the marking and on the trace.\r\n\t\t */\r\n\t\tif (settings.isFinal(state.marking, state.trace)) {\r\n\t\t\t/*\r\n\t\t\t * State corresponds to final state, check whether costs are better\r\n\t\t\t * than best so far.\r\n\t\t\t */\r\n\t\t\tif (state.cost.compareTo(bestState.cost) < 0) {\r\n\t\t\t\t/*\r\n\t\t\t\t * Found a new best trace.\r\n\t\t\t\t */\r\n\t\t\t\tsynchronized (bestState) {\r\n\t\t\t\t\tbestState = state;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t/*\r\n\t\t\t * 1. Check the enabled transitions.\r\n\t\t\t */\r\n\t\t\tCollection<Transition> enabledTransitions;\r\n\t\t\tsynchronized (semantics) {\r\n\t\t\t\tsemantics.setCurrentState(state.marking);\r\n\t\t\t\tenabledTransitions = semantics.getExecutableTransitions();\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t * For every allowed action: expand this state with this action.\r\n\t\t\t */\r\n\t\t\tif (settings.isAllowed(ReplayAction.INSERT_ENABLED_MATCH)) {\r\n\t\t\t\tstates.addAll(executeEnabledMatches(state, enabledTransitions));\r\n\t\t\t}\r\n\t\t\tif (settings.isAllowed(ReplayAction.INSERT_ENABLED_INVISIBLE)) {\r\n\t\t\t\tstates.addAll(executeInvisible(state, enabledTransitions));\r\n\t\t\t}\r\n\t\t\tif (settings.isAllowed(ReplayAction.REMOVE_HEAD)) {\r\n\t\t\t\tstates.addAll(skipHead(state));\r\n\t\t\t}\r\n\t\t\tif (settings.isAllowed(ReplayAction.INSERT_ENABLED_MISMATCH)) {\r\n\t\t\t\tstates.addAll(executeEnabledMismatches(state, enabledTransitions));\r\n\t\t\t}\r\n\r\n\t\t\t/*\r\n\t\t\t * 2. Check the disabled transitions.\r\n\t\t\t */\r\n\t\t\tCollection<Transition> disabledTransitions = new HashSet<Transition>(net.getTransitions());\r\n\t\t\tdisabledTransitions.removeAll(enabledTransitions);\r\n\r\n\t\t\t/*\r\n\t\t\t * For every allowed action: expand this state with this action.\r\n\t\t\t */\r\n\t\t\tif (settings.isAllowed(ReplayAction.INSERT_DISABLED_MATCH)) {\r\n\t\t\t\tstates.addAll(executeDisabledMatches(state, disabledTransitions));\r\n\t\t\t}\r\n\t\t\tif (settings.isAllowed(ReplayAction.INSERT_DISABLED_MISMATCH)) {\r\n\t\t\t\tstates.addAll(executeDisabledMismatches(state, disabledTransitions));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn states;\r\n\t}", "@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 }", "private boolean doLeftPop(final S nonTerminal, final Predicate<S> letterPredicate) {\n if(!slp.containsProduction(nonTerminal) || slp.getAxioms().contains(nonTerminal)) {\n return false;\n }\n P production = getProduction(nonTerminal);\n S head = production.getRight().findFirst(s -> !s.isEmpty()).get();\n return letterPredicate.test(head) && !production.getRight().isEmpty();\n }", "public void updateState(){\n\t\t\n\t\t\n\t\t\n\t\tArrayList<String> toAdd = new ArrayList<String>();\n\t\tArrayList<String> toRemove = new ArrayList<String>();\n\n\t\tthis.lastAdded.clear();\n\t\tthis.lastFulfilled.clear();\n\t\tthis.lastViolated.clear();\n\t\t\n\t\ttry {\n\n\t\t\tdo{\n\t\t\t\ttoAdd.clear();\n\t\t\t\ttoRemove.clear();\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iActive = reasoner.findall(\"xactive(A,Fa,Fm,Fd,Fr,Timeout)&not(as(A,Fa,Fm,Fd,Fr,Timeout))\");\n\t\t\t\twhile(iActive.hasNext()){\n\t\t\t\t\tUnifier un = iActive.next();\n\t\t\t\t\ttoAdd.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+ adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastAdded.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+ adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iViol = reasoner.findall(\"xviol(A,Fa,Fm,Fd,Fr,Timeout)&not(vs(A,Fa,Fm,Fd,Fr,Timeout))\");\n\t\t\t\twhile(iViol.hasNext()){\n\t\t\t\t\tUnifier un = iViol.next();\n\t\t\t\t\ttoAdd.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastViolated.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iDeactF = reasoner.findall(\"xdeact_f(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iDeactF.hasNext()){\n\t\t\t\t\tUnifier un = iDeactF.next();\n\t\t\t\t\ttoAdd.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString()+\",\"+un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastFulfilled.add(\"as(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iDeactR = reasoner.findall(\"xdeact_r(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iDeactR.hasNext()){\n\t\t\t\t\tUnifier un = iDeactR.next();\n\t\t\t\t\ttoAdd.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\tthis.lastFulfilled.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<Unifier> iFailed = reasoner.findall(\"xfailed(A,Fa,Fm,Fd,Fr,Timeout)\");\n\t\t\t\twhile(iFailed.hasNext()){\n\t\t\t\t\tUnifier un = iFailed.next();\n\t\t\t\t\ttoAdd.add(\"fs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t\ttoRemove.add(\"vs(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//norms deactivated (fulfilled) whose maintenance condition does not hold can be removed.\n\t\t\t\t//if they are not removed, new instances of the same norm are not activated\n\t\t\t\tIterator<Unifier> iDeactivated_to_remove = reasoner.findall(\"ds(A,Fa,Fm,Fd,Fr,Timeout)&not(Fm)\");\n\t\t\t\twhile(iDeactivated_to_remove.hasNext()){\n\t\t\t\t\tUnifier un = iDeactivated_to_remove.next();\n\t\t\t\t\ttoRemove.add(\"ds(\"+adaptTerm(un.get(\"A\").toString())+\",\"+adaptTerm(un.get(\"Fa\").toString())+\",\"+adaptTerm(un.get(\"Fm\").toString())+\",\"+adaptTerm(un.get(\"Fd\").toString())+\",\"+adaptTerm(un.get(\"Fr\").toString())+\",\"+adaptTerm(un.get(\"Timeout\").toString())+\")\");\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\tfor(String s:toAdd){\n\t\t\t\t\treasoner.assertValue(s);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(String s:toRemove){\n\t\t\t\t\treasoner.retract(s);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(toAdd.size()>0|toRemove.size()>0);\t\t\t\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "Boolean forAll(Predicate<X> p);", "public static Predicate<BiomeSelectionContext> all() {\n\t\treturn context -> true;\n\t}", "@Override\r\n\tpublic Set<NFAState> eClosure(NFAState s) {\r\n\t\tSet<NFAState> l = new HashSet<>();\r\n\t\treturn depthFirstSearch(l, s);\r\n\t}", "private List<GPairRecord<S, S>> getNonCrossingPairs(final Predicate<Pair<S, S>> predicate) {\n List<GPairRecord<S, S>> recordList = new ArrayList<>();\n slp.getOrderedProductions().stream().map(p -> p.getLeft()).forEach(nonTerminal -> consumeNonCrossingPairs(nonTerminal, recordList::add, predicate));\n return recordList;\n }", "private static UnaryPredicate bepred() {\n return new UnaryPredicate() {\n public boolean execute(Object o) {\n\tif (o instanceof BulkEstimate) {\n\t return ((BulkEstimate)o).isComplete();\n }\n\treturn false;\n }\n };\n }", "@Override\n public StateContents<Boolean> isEmpty() {\n final List<StateContents<Boolean>> futures = new ArrayList<>(sources.size());\n for (CombiningValueStateInternal<InputT, AccumT, OutputT> source : sources) {\n futures.add(source.isEmpty());\n }\n\n // But defer the actual reads until later.\n return new StateContents<Boolean>() {\n @Override\n public Boolean read() {\n for (StateContents<Boolean> future : futures) {\n if (!future.read()) {\n return false;\n }\n }\n return true;\n }\n };\n }", "private void isFiltersSatisfied() {\n Filter[] filters = rule.getFilters();\n for (int i = 0; i < filters.length; i++) {\n linkedList.add(filters[i]);\n }\n recursiveFiltering(linkedList.peek().filter.split(\":\"),null);\n }", "boolean hasConditionList();", "private final List<State> SAT_AF(String expression) {\r\n List<State> x = new ArrayList<State>();\r\n for(State state:this._kripke.States)\r\n {\r\n \tx.add(state);\r\n }\r\n List<State> y = new ArrayList<State>();\r\n y = this.SAT(expression);\r\n while (!this.AreListStatesEqual(x, y)) {\r\n x = y;\r\n List<State> newY = new ArrayList<State>();\r\n List<State> preAStates = this.PreA(y);\r\n for(State state:y)\r\n {\r\n \tnewY.add(state);\r\n }\r\n for (State state : preAStates) {\r\n if (!newY.contains(state)) {\r\n newY.add(state);\r\n }\r\n \r\n }\r\n \r\n y = newY;\r\n }\r\n \r\n return y;\r\n }", "public boolean hasNext() {\n\t\tchecked = true;\n\t\tif (firstcall) {\n\t\t\tfirstcall = false;\n\t\t\tsolution = solver.findSolution(ProblemState.RESTORE);\n\t\t\tif (solution == null)\n\t\t\t\treturn false;\n\t\t\treturn true;\n\t\t}\n\t\treturn solver.hasNext();\n\t}", "private boolean containState(String state) {\r\n for (int i = 0; i < this.visitedList.size(); i++) {\r\n if (state.equals(this.visitedList.get(i))) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "@Test\n public void emptyCollectionToGetInstance() {\n final Predicate<Integer> allPredicate = getPredicateInstance(\n Collections.<Predicate<Integer>>emptyList());\n assertTrue(allPredicate.evaluate(getTestValue()), \"empty collection not true\");\n }", "public Map<String, Map<String, Object>> getPredicateCache()\n {\n return this.predicateCache;\n }", "public void checkWhichIsChosen(){\n // reset all initial set up\n moodListAfterFilter.clear();\n deleteFile(\"filter.sav\");\n flag = 0;\n // key of reason and moos state which is entered by user\n enteredMyReason = myReasonEditText.getText().toString();\n enteredFoReason = foReasonEditText.getText().toString();\n selectedMyMoodState = myEmotionalStateSpinner.getSelectedItem().toString();\n selectedFoMoodState = foEmotionalStateSpinner.getSelectedItem().toString();\n // if Myself Mood state is selected, then jump to its filter function\n if(selectedMyMoodState != null && !selectedMyMoodState.isEmpty()){\n filterByMyMoodState(selectedMyMoodState);\n flag ++;\n }\n // if Following Mood state is selected, then jump to its filter function\n if(selectedFoMoodState != null && !selectedFoMoodState.isEmpty()){\n filterByFoMoodState(selectedFoMoodState);\n flag ++;\n }\n // if Myself most recent week is selected, then jump to its filter function\n if (myMostRecentWeekCheckbox.isChecked()){\n filterByMyMostRece();\n flag ++;\n }\n // if Following most recent week is selected, then jump to its filter function\n if (foMostRecentWeekCheckbox.isChecked()){\n filterByFoMostRece();\n flag ++;\n }\n // if Myself display all is selected, then jump to its filter function\n if (myDisplayAllCheckbox.isChecked()){\n filterByMyDisplayAll();\n flag ++;\n }\n // if Following display all is selected, then jump to its filter function\n if (foDisplayAllCheckbox.isChecked()){\n filterByFoDisplayAll();\n flag ++;\n }\n // if Myself key of reason is entered, then jump to its filter function\n if(enteredMyReason != null && !enteredMyReason.isEmpty()){\n filterByMyReason(enteredMyReason);\n flag ++;\n }\n // if Following key of reason is entered, then jump to its filter function\n if(enteredFoReason != null && !enteredFoReason.isEmpty()){\n filterByFoReason(enteredFoReason);\n flag ++;\n }\n }", "List<State> findStatesAfterOrder( int nOrder, int nIdWorkflow );", "@Override\n public Flux<Employee> checkStatus() {\n return Flux.defer(() -> Flux.fromIterable(employees.getEmployees()));\n }", "default boolean any( Predicate<V> predicate ) {\n if ( ((Tensor<V>)this).isVirtual() ) return predicate.test( this.item() );\n return stream().anyMatch(predicate);\n }", "public List<T> wantedNodesIterative(Predicate<T> p) {\n //PART 4 \n if(root == null){\n return null;\n }\n LinkedList<TreeNode<T>> stack = new LinkedList<>();\n stack.add(root);\n \n List<T> wantedNodes =new LinkedList<>();\n TreeNode<T> current;\n \n while(!stack.isEmpty()){\n current = stack.pop();\n if(p.check(current.data)){\n wantedNodes.add(current.data);\n }\n if(current.right != null){\n stack.addFirst(current.right);\n }\n if(current.left != null){\n stack.addFirst(current.left);\n }\n }\n return wantedNodes;\n }", "boolean scavenge()\r\n/* 462: */ {\r\n/* 463:493 */ if (scavengeSome()) {\r\n/* 464:494 */ return true;\r\n/* 465: */ }\r\n/* 466:498 */ this.prev = null;\r\n/* 467:499 */ this.cursor = this.head;\r\n/* 468:500 */ return false;\r\n/* 469: */ }", "public List<HealthCheck> getChecksByState(String state);", "MapComp<K, V> removeAll(Predicate<K> p);", "@SuppressWarnings(\"unchecked\")\n\t\tprivate State<T> createFirstMandatoryStateOfLoop(final State<T> sinkState) {\n\n\t\t\tfinal IterativeCondition<T> currentFilterFunction = (IterativeCondition<T>) currentPattern.getCondition();\n\t\t\tfinal State<T> firstState = createNormalState();\n\n\t\t\tfirstState.addTake(sinkState, currentFilterFunction);\n\t\t\tfinal IterativeCondition<T> ignoreCondition = getIgnoreCondition(currentPattern);\n\t\t\tif (ignoreCondition != null) {\n\t\t\t\tfirstState.addIgnore(ignoreCondition);\n\t\t\t}\n\t\t\treturn firstState;\n\t\t}", "public static Predicate<Boolean> identity() {\n return new Predicate<Boolean>() {\n\n @Override\n public boolean test(Boolean b) {\n return b;\n }\n\n };\n }", "public abstract PredicateExpr getNext();", "public void minimize() {\n D = new boolean[states.length][states.length];\r\n S = new ArrayList<ArrayList<HashSet<Point>>>(); // lol\r\n\r\n //noinspection ForLoopReplaceableByForEach\r\n for (int i = 0; i < states.length; i++) {\r\n ArrayList<HashSet<Point>> innerList = new ArrayList<HashSet<Point>>();\r\n\r\n //noinspection ForLoopReplaceableByForEach\r\n for (int j = 0; j < states.length; j++) {\r\n Arrays.fill(D[i], false);\r\n innerList.add(new HashSet<Point>());\r\n }\r\n S.add(innerList);\r\n }\r\n\r\n // 2. states with different acceptances are distinguishable\r\n for (int i = 0; i < states.length; i++) {\r\n for (int j = i + 1; j < states.length; j++) {\r\n if (acceptStates.contains(i) != acceptStates.contains(j)) {\r\n D[i][j] = true;\r\n }\r\n }\r\n }\r\n\r\n // 3. mark as possibly indistinguishable, enforce distinguishability\r\n for (int i = 0; i < states.length; i++) {\r\n for (int j = i + 1; j < states.length; j++) {\r\n // only pairs that are as of yet indistinguishable\r\n if (D[i][j]) {\r\n continue;\r\n }\r\n\r\n DFAState qi = states[i];\r\n DFAState qj = states[j];\r\n\r\n // one of the things being compared is unreachable\r\n if (qi == null || qj == null) {\r\n continue;\r\n }\r\n\r\n // helps emulate \"for any\"\r\n boolean distinguished = false;\r\n for (int k = 0; k < qi.transitions.size(); k++) {\r\n int m = qi.transitions.get(k);\r\n int n = qj.transitions.get(k);\r\n\r\n // if on the same letter, qm and qn move to distinguishable states\r\n if (D[m][n] || D[n][m]) {\r\n dist(i, j);\r\n distinguished = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!distinguished) {\r\n // qm and qn are indistinguishable\r\n for (int k = 0; k < qi.transitions.size(); k++) {\r\n int m = qi.transitions.get(k);\r\n int n = qj.transitions.get(k);\r\n\r\n if (m < n && !(i == m && j == n)) {\r\n S.get(m).get(n).add(new Point(i, j));\r\n } else if (m > n && !(i == n && j == m)) {\r\n S.get(n).get(m).add(new Point(i, j));\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n mergeStates();\r\n }", "SearchResult search(State root, List<State> expanded_list, State goal);", "@Override\n\tpublic Set<NFAState> eClosure(NFAState s) {\n\t\tSet<NFAState> visited = new TreeSet<NFAState>();\n\t\t//invoke recursive helper\n\t\tvisited = eClosureHelper(s, visited);\n\t\t\n\t\treturn visited;\n\t}", "List<WorkflowProcessingState> getStates();", "public List<Pair> getStatesSeenSoFar() {\n\t\treturn list;\n\t}", "default Collection<ItemStack> getContentsMatchingSimulated(Predicate<ItemStack> predicate) {\n\t\treturn this.getContentsSimulated().stream().map(ItemStack::copy).filter(predicate).collect(Collectors.toList());\n\t}", "boolean hasAll();", "boolean hasAll();", "List<State> findStatesBetweenOrders( int nOrder1, int nOrder2, int nIdWorkflow );", "private static List<Filter> enumAtomicFiltersLR(List<ValNode> L, List<ValNode> R, EnumContext ec, boolean allowExists) {\n // L contains all left values, and R contains all right values in a comparator\n List<Filter> atomics = new ArrayList<>();\n for (ValNode l : L) {\n for (ValNode r : R) {\n if (l.equalsToValNode(r)) continue;\n if (l instanceof ConstantVal && r instanceof ConstantVal) continue;\n\n if (l.getType(ec).equals(r.getType(ec))) {\n if (l.getType(ec).equals(ValType.DateVal) || l.getType(ec).equals(ValType.NumberVal)) {\n for (BiFunction<Value, Value, Boolean> func : VVComparator.getAllFunctions()) {\n atomics.add(new VVComparator(Arrays.asList(l, r), func));\n }\n } else {\n atomics.add(new VVComparator(Arrays.asList(l, r), VVComparator.eq));\n atomics.add(new VVComparator(Arrays.asList(l, r), VVComparator.neq));\n\n }\n }\n }\n }\n\n // Enumerate Filter with EXISTS clause, we don't want exists to\n if (allowExists) {\n List<ValNode> allValues = new ArrayList<>();\n allValues.addAll(L);\n allValues.addAll(R);\n allValues.addAll(ec.getValNodes());\n\n List<List<ValNode>> llvns = CombinationGenerator.genCombination(\n allValues, EnumParamTN.numberOfParams);\n for (List<ValNode> vns : llvns) {\n InstantiateEnv ie = new InstantiateEnv(vns, ec);\n atomics.addAll(\n ec.getParameterizedTables().stream().map(tn -> tn.instantiate(ie))\n .filter(t -> t.getAllHoles().size() == 0)\n .map(tn -> new ExistsFilter(tn))\n .collect(Collectors.toList()));\n // Also enumerate not exists\n atomics.addAll(\n ec.getParameterizedTables().stream().map(tn -> tn.instantiate(ie))\n .filter(t -> t.getAllHoles().size() == 0)\n .map(tn -> new ExistsFilter(tn, true))\n .collect(Collectors.toList()));\n }\n }\n\n // Add IS NULL for atomic filters\n // TODO: possibly just ignore it\n Set<ValNode> allValues = new HashSet<>();\n allValues.addAll(L);\n allValues.addAll(R);\n allValues.addAll(ec.getValNodes());\n\n for (ValNode vn : allValues) {\n if (vn instanceof ValHole)\n continue;\n atomics.add(new IsNullFilter(vn, true));\n atomics.add(new IsNullFilter(vn, false));\n }\n\n atomics.add(new EmptyFilter());\n\n return atomics;\n }", "boolean isPreFiltered();", "List<E> list(Predicate<E> predicate);", "@Test\n public void trueAndFalseCombined() {\n assertFalse(getPredicateInstance(false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(false, null, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n assertFalse(getPredicateInstance(true, true, false, null).evaluate(getTestValue()),\n \"false predicate evaluated to true\");\n }", "@Override\n public boolean needsTransitiveClosureForEvaluation() {\n for(Object matcher : this.matchers){\n if(GenericMatcherMultiSourceCaller.needsTransitiveClosureForEvaluation(matcher))\n return true;\n }\n return false;\n }", "default Collection<ItemStack> getContentsMatching(Predicate<ItemStack> predicate) {\n\t\treturn this.getContents().values().stream().filter(predicate).collect(Collectors.toList());\n\t}", "List<S> getAllPossibleStates(S state);", "private boolean contain(Estado state, List<Estado> states) {\n\t\tfor (Estado valid : states) {\n\t\t\tif (valid.getValue() == state.getValue()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public void solveGame4() {\n\t\tlosingStates = new HashSet<S>();\n\t\t\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tList<Set<S>> uncontrollableSuccessors = new ArrayList<Set<S>>();\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> currentUncontrollableSuccesors;\n\t\tSet<S> currentSet; \n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\tcurrentUncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\t\t\tcurrentSet = new HashSet<S>();\n\t\t\tfor(S s: currentUncontrollableSuccesors){\n\t\t\t\tif((!relaxOnAssumptions || (!assumptionsStates.contains(s) || assumptionsStates.contains(state))\n\t\t\t\t\t\t&& (!relaxSelfLoops || (!s.equals(state)))))\n\t\t\t\t\tcurrentSet.add(s);\n\t\t\t}\n\t\t\t uncontrollableSuccessors.add(currentSet);\n\t\t\t isUncontrollable[indexCount] = currentSet.size() > 0;\n\t\t\t indexCount+=1;\n\t\t}\n\t\t\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t}\n\n\t\t// Handle the pending states\n\t\twhile (!losing.isEmpty()) {\n\t\t\tS state = losing.poll();\n\n\t\t\t\n\t\t\tlosingStates.add(state);\n\n\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\tfor (S pred : predecessors) {\n\t\t\t\tif(losing.contains(pred) || losingStates.contains(pred))\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t//if(i == -1)\n\t\t\t\t\t//continue;\n\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\tlosing.add(pred);\n\t\t\t\t}else{\n\t\t\t\t\tuncontrollableSuccessors.get(i).remove(state);\n\t\t\t\t\tif(uncontrollableSuccessors.get(i).isEmpty())\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "public HashSet<State> statesReachableFrom(State from) {\n \t\treturn statesReachableOn(from, null);\n \t\t//\t\tHashSet<State> reachable = new HashSet<State>();\n \t\t//\t\tIterator<Transition> iter = from.getTransitions().iterator();\n \t\t//\t\twhile (iter.hasNext()) {\n \t\t//\t\t\tTransition t = iter.next();\n \t\t//\t\t\t\n \t\t//\t\t\t// Add all empty transitions\n \t\t//\t\t\t// Skip if already added to prevent loops\n \t\t//\t\t\tif (t.isEmptyTransition() && !reachable.contains(t.to)) {\n \t\t//\t\t\t\t// Add this state\n \t\t//\t\t\t\treachable.add(t.to);\n \t\t//\t\t\t\t\n \t\t//\t\t\t\t// Recurse and add all reachable from this state\n \t\t//\t\t\t\treachable.addAll(statesReachableFrom(t.to));\n \t\t//\t\t\t}\n \t\t//\t\t}\n \t\t//\t\t\n \t\t//\t\treturn reachable;\n \t}", "public boolean legalMove(ArrayList<Point2D> inputMove,ArrayList<Object> Gamestate){\n FooHistory currentGameState = (FooHistory) Gamestate.get(0);\n ArrayList<Point2D> player1moves= currentGameState.getCurrentState().get(0);\n ArrayList<Point2D> player2moves= currentGameState.getCurrentState().get(1);\n //System.out.println(\"Player1 moves in FooRules: \"+ player1moves);\n \n if(inputMove.size()==1){\n for(ArrayList<Point2D> array: currentGameState.getCurrentState()){\n for(Point2D point:array){\n if(inputMove.get(0).getX()==point.getX() && inputMove.get(0).getY()==point.getY()){\n System.out.println(\"Ilegal Move\");\n return false;\n }\n }\n }\n return true;\n }\n else{//Deals with moving a piece to take pieces\n if(adjacent(inputMove.get(0),inputMove.get(1))){//Makes sure the two input moves are adjacent\n if(currentGameState.getTurnCount()%2==1){ //Player 1's turn\n for(Point2D point:player2moves){\n if(point.getX()==inputMove.get(1).getX() && point.getY()==inputMove.get(1).getY()){\n return true;\n }\n }\n }\n if(currentGameState.getTurnCount()%2==0){//Player 2's turn\n for(Point2D point:player1moves){\n if(point.getX()==inputMove.get(1).getX() && point.getY()==inputMove.get(1).getY()){\n return true;\n }\n }\n }\n }\n System.out.println(\"Ilegal Move\"); \n return false; \n }\n \n }", "private BDD reachableStates(BDD i, BDD t, BDD x, Map<Integer, Integer> renaming){\n\t\tSystem.out.println(\"\\n\" + \"[*] Computing reachable states\" + \"\\n\");\n\n\t\tBDD result = this.factory.makeZero();\n\t\tBDD rCopy = null;\n\n\t\tint counter = 1;\n\t\tdo{\n\n\t\t\tSystem.out.println(\" - iteration K = \" + counter++);\n\n\t\t\tif(rCopy != null)\n\t\t\t\trCopy.free();\n\n\t\t\trCopy = result;\t\n\n\t\t\tBDD and = t.and(result);\t\t\t\n\t\t\tBDD exist = and.exist(x);\n\t\t\tand.free();\n\n\t\t\tBDD replace = exist.replace(renaming);\n\t\t\tresult = i.or(replace);\n\n\t\t\treplace.free();\n\n\t\t}while(!result.isEquivalentTo(rCopy));\n\n\t\trCopy.free();\n\n\t\tSystem.out.println(\"\\n\" + \"[*] Done computing reachable states\" + \"\\n\");\n\n\t\treturn result;\n\t}", "private Collection<ReplayState<C>> executeDisabledMatches(ReplayState<C> state, Collection<Transition> transitions) {\r\n\t\tCollection<ReplayState<C>> states = new ArrayList<ReplayState<C>>();\r\n\t\tif (!state.trace.isEmpty()) {\r\n\t\t\tfor (Transition transition : transitions) {\r\n\t\t\t\tif (transition.isInvisible() || !map.containsKey(transition)) {\r\n\t\t\t\t} else if (map.get(transition).equals(state.trace.get(0))) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Enable the disabled transition by adding sufficient\r\n\t\t\t\t\t\t * tokens in its preset places.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tMarking preMarking = new Marking(state.marking);\r\n\t\t\t\t\t\tCollection<PetrinetEdge<? extends PetrinetNode, ? extends PetrinetNode>> edges = transition\r\n\t\t\t\t\t\t\t\t.getGraph().getInEdges(transition);\r\n\t\t\t\t\t\tfor (PetrinetEdge<? extends PetrinetNode, ? extends PetrinetNode> e : edges) {\r\n\t\t\t\t\t\t\tif (e instanceof Arc) {\r\n\t\t\t\t\t\t\t\tArc arc = (Arc) e;\r\n\t\t\t\t\t\t\t\tif (arc.getWeight() > state.marking.occurrences(arc.getSource())) {\r\n\t\t\t\t\t\t\t\t\tpreMarking.add((Place) arc.getSource(), arc.getWeight()\r\n\t\t\t\t\t\t\t\t\t\t\t- state.marking.occurrences(arc.getSource()));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine the new marking.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tMarking newMarking;\r\n\t\t\t\t\t\tsynchronized (semantics) {\r\n\t\t\t\t\t\t\tsemantics.setCurrentState(preMarking);\r\n\t\t\t\t\t\t\tsemantics.executeExecutableTransition(transition);\r\n\t\t\t\t\t\t\tnewMarking = semantics.getCurrentState();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine the new cost.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tC newCost = addOperator.add(state.cost, ReplayAction.INSERT_DISABLED_MATCH, transition,\r\n\t\t\t\t\t\t\t\tstate.trace.get(0));\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine the new trace.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tList<? extends Object> newTrace = getTail(state.trace);\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Add new state.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\taddState(states, state, newMarking, transition, newCost, newTrace);\r\n\t\t\t\t\t} catch (IllegalTransitionException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn states;\r\n\t}", "private Collection<ReplayState<C>> executeDisabledMismatches(ReplayState<C> state,\r\n\t\t\tCollection<Transition> transitions) {\r\n\t\tCollection<ReplayState<C>> states = new ArrayList<ReplayState<C>>();\r\n\t\tif (!state.trace.isEmpty()) {\r\n\t\t\tfor (Transition transition : transitions) {\r\n\t\t\t\tif (transition.isInvisible() || !map.containsKey(transition)) {\r\n\t\t\t\t} else if (!map.get(transition).equals(state.trace.get(0))) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Enable the disabled transition by adding sufficient\r\n\t\t\t\t\t\t * tokens in its preset places.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tMarking preMarking = new Marking(state.marking);\r\n\t\t\t\t\t\tCollection<PetrinetEdge<? extends PetrinetNode, ? extends PetrinetNode>> edges = transition\r\n\t\t\t\t\t\t\t\t.getGraph().getInEdges(transition);\r\n\t\t\t\t\t\tfor (PetrinetEdge<? extends PetrinetNode, ? extends PetrinetNode> e : edges) {\r\n\t\t\t\t\t\t\tif (e instanceof Arc) {\r\n\t\t\t\t\t\t\t\tArc arc = (Arc) e;\r\n\t\t\t\t\t\t\t\tif (arc.getWeight() > state.marking.occurrences(arc.getSource())) {\r\n\t\t\t\t\t\t\t\t\tpreMarking.add((Place) arc.getSource(), arc.getWeight()\r\n\t\t\t\t\t\t\t\t\t\t\t- state.marking.occurrences(arc.getSource()));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine the new marking.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tMarking newMarking;\r\n\t\t\t\t\t\tsynchronized (semantics) {\r\n\t\t\t\t\t\t\tsemantics.setCurrentState(preMarking);\r\n\t\t\t\t\t\t\tsemantics.executeExecutableTransition(transition);\r\n\t\t\t\t\t\t\tnewMarking = semantics.getCurrentState();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Determine the new cost.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tC newCost = addOperator\r\n\t\t\t\t\t\t\t\t.add(state.cost, ReplayAction.INSERT_DISABLED_MISMATCH, transition, null);\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * Add new state.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\taddState(states, state, newMarking, transition, newCost, state.trace);\r\n\t\t\t\t\t} catch (IllegalTransitionException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn states;\r\n\t}", "public Iterable<StopReplicaTopicState> topicStates() {\n if (version() < 1) {\n Map<String, StopReplicaTopicState> topicStates = new HashMap<>();\n for (StopReplicaPartitionV0 partition : data.ungroupedPartitions()) {\n StopReplicaTopicState topicState = topicStates.computeIfAbsent(partition.topicName(),\n topic -> new StopReplicaTopicState().setTopicName(topic));\n topicState.partitionStates().add(new StopReplicaPartitionState()\n .setPartitionIndex(partition.partitionIndex())\n .setDeletePartition(data.deletePartitions()));\n }\n return topicStates.values();\n } else if (version() < 3) {\n return () -> new MappedIterator<>(data.topics().iterator(), topic ->\n new StopReplicaTopicState()\n .setTopicName(topic.name())\n .setPartitionStates(topic.partitionIndexes().stream()\n .map(partition -> new StopReplicaPartitionState()\n .setPartitionIndex(partition)\n .setDeletePartition(data.deletePartitions()))\n .collect(Collectors.toList())));\n } else {\n return data.topicStates();\n }\n }", "@Nonnull\r\n\tpublic static <T> Observable<Boolean> any(\r\n\t\t\t@Nonnull final Observable<T> source,\r\n\t\t\t@Nonnull final Func1<? super T, Boolean> predicate) {\r\n\t\treturn new Containment.Any<T>(source, predicate);\r\n\t}", "default Collection<I_GameState> getRepeatStates() {\n return getRepeatStates(FULL_EQUAL);\n }", "protected PuzzleState popFrontier()\r\n\t{\n\t\tPuzzleState thisState = Frontier.pop();\r\n\t\t// Add it to the list of searched states, so that it isn't searched again\r\n\t\tSearched.add(thisState);\r\n\t\t\r\n\t\treturn thisState;\r\n\t}", "@Override\n public boolean checkCurrentStates(final CurrentStateOutput currentStateOutput,\n final String resourceName, final Partition partition, StateModelDefinition stateModelDef) {\n if (!stateModelDef.isSingleTopStateModel()) {\n return true;\n }\n // TODO: Cache top state count in the ResourceControllerDataProvider and avoid repeated counting\n // TODO: here. It would be premature to do it now. But with more use case, we can improve the\n // TODO: ResourceControllerDataProvider to calculate by default.\n if (currentStateOutput.getCurrentStateMap(resourceName, partition).values().stream()\n .filter(state -> state.equals(stateModelDef.getTopState())).count() > 1) {\n return false;\n }\n return true;\n }", "default TypedActionResult<Collection<ItemStack>> extractMatching(Direction direction, Predicate<ItemStack> predicate) {\n\t\tHashSet<ItemStack> extractedStacks = new HashSet<>();\n\t\tthis.getContents().forEach((slot, stack) -> {\n\t\t\tif (predicate.test(stack)) {\n\t\t\t\tTypedActionResult<ItemStack> extractionResult = this.extract(direction, slot);\n\n\t\t\t\tif (extractionResult.getResult().isAccepted()) {\n\t\t\t\t\textractedStacks.add(extractionResult.getValue());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (!extractedStacks.isEmpty()) {\n\t\t\treturn new TypedActionResult<>(ActionResult.SUCCESS, extractedStacks);\n\t\t} else {\n\t\t\treturn new TypedActionResult<>(ActionResult.FAIL, extractedStacks);\n\t\t}\n\t}", "public void testListFilters() {\r\n boolean[] types = {true,true,false}; // Types 1 and 2.\r\n List<InfoNode> filteredList = MapUtils.filterValues(exampleList, types);\r\n assertTrue(filteredList.size() == 2);\r\n assertTrue(filteredList.contains(node1));\r\n assertTrue(filteredList.contains(node2));\r\n assertFalse(filteredList.contains(node3));\r\n\r\n types[2] = true; // Types 1, 2 and 3.\r\n filteredList = MapUtils.filterValues(exampleList, types);\r\n assertTrue(filteredList.size() == 3);\r\n assertTrue(filteredList.contains(node1));\r\n assertTrue(filteredList.contains(node2));\r\n assertTrue(filteredList.contains(node3));\r\n\r\n types[0] = false; types[1] = false; types[2] = false;\r\n filteredList = MapUtils.filterValues(exampleList, types);\r\n assertTrue(filteredList.isEmpty());\r\n assertFalse(filteredList.contains(node1));\r\n assertFalse(filteredList.contains(node2));\r\n assertFalse(filteredList.contains(node3));\r\n }", "private Collection<ReplayState<C>> executeInvisible(ReplayState<C> state, Collection<Transition> transitions) {\r\n\t\tCollection<ReplayState<C>> states = new ArrayList<ReplayState<C>>();\r\n\t\tfor (Transition transition : transitions) {\r\n\t\t\tif (transition.isInvisible() || !map.containsKey(transition)) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Determine new marking.\r\n\t\t\t\t\t */\r\n\t\t\t\t\tMarking newMarking;\r\n\t\t\t\t\tsynchronized (semantics) {\r\n\t\t\t\t\t\tsemantics.setCurrentState(state.marking);\r\n\t\t\t\t\t\tsemantics.executeExecutableTransition(transition);\r\n\t\t\t\t\t\tnewMarking = semantics.getCurrentState();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Determine new cost.\r\n\t\t\t\t\t */\r\n\t\t\t\t\tC newCost = addOperator.add(state.cost, ReplayAction.INSERT_ENABLED_INVISIBLE, transition, null);\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Add new state.\r\n\t\t\t\t\t */\r\n\t\t\t\t\taddState(states, state, newMarking, transition, newCost, state.trace);\r\n\t\t\t\t} catch (IllegalTransitionException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn states;\r\n\t}", "public abstract Collection<Node> getGuardedSuccessors(Expression guard);", "public void getEditorTagsWithPredicate(Predicate<EclipseEditorTag> predicate, Collection<EclipseEditorTag> result){\r\n \t\ttry {\r\n \t\t\tPosition[] positions = getPositions(EclipseEditorTag.CHAMELEON_CATEGORY); // throws BadPositionCategoryException\r\n \t\t\tfor (Position position : positions) {\r\n \t\t\t\tint count=1;\r\n \t\t\t\tif(position instanceof EclipseEditorTag ){\r\n \t\t\t\t\tEclipseEditorTag editorTag = (EclipseEditorTag) position;\r\n \t\t\t\t\tif(predicate.eval(editorTag)){\r\n //\t\t\t\t\t\tSystem.out.println(count+\" Found cross reference tag at offset: \" +editorTag.getOffset()+\"with length: \"+editorTag.getLength());\r\n \t\t\t\t\t\tresult.add(editorTag);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t} catch (BadPositionCategoryException e) {\r\n \t\t\t// There exist no editorTags of the type EditorTag.CHAMELEON_CATEGORY\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (Exception e) {\r\n \t\t\t// the predicate has thrown an exception\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n \t}", "private boolean keepEvaluating(Stack<Operator> pOperatorStack, Operator pOperator) {\n if (pOperatorStack.isEmpty()) {\n return false;\n } else {\n return pOperatorStack.peek().stackPrecedence() >= pOperator.precedence();\n }\n }", "public void solveGame() {\n\t\tlosingStates = new HashSet<S>();\n\t\t\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tList<Set<S>> uncontrollableSuccessors = new ArrayList<Set<S>>();\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> currentUncontrollableSuccesors;\n\t\tSet<S> currentSet; \n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\tcurrentUncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\t\t\tcurrentSet = new HashSet<S>();\n\t\n\t\t\tif(!relaxAllControllables){\n\t\t\t\tfor(S s: currentUncontrollableSuccesors){\n\t\t\t\t\tif((!relaxOnAssumptions || (!assumptionsStates.contains(s) || assumptionsStates.contains(state))\n\t\t\t\t\t\t\t&& (!relaxSelfLoops || (!s.equals(state)))))\n\t\n\t\t\t\t\t\tcurrentSet.add(s);\n\t\t\t\t}\n\t\t\t}\n\t\t\t uncontrollableSuccessors.add(currentSet);\n\t\t\t isUncontrollable[indexCount] = currentSet.size() > 0;\n\t\t\t indexCount+=1;\n\t\t}\n\n\t\tlosingStates.addAll(game.getStates());\n\t\t\n\t\tSet<S> currentLosingStates;\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t\tcurrentLosingStates\t= new HashSet<S>();\n\t\t\t\n\t\t\t// Handle the pending states\n\t\t\twhile (!losing.isEmpty()) {\n\t\t\t\tS state = losing.poll();\n\n\t\t\t\t\n\t\t\t\tcurrentLosingStates.add(state);\n\n\t\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\t\tfor (S pred : predecessors) {\n\t\t\t\t\tif(losing.contains(pred) || currentLosingStates.contains(pred))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t\t//if(i == -1)\n\t\t\t\t\t\t//continue;\n\t\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tuncontrollableSuccessors.get(i).remove(state);\n\t\t\t\t\t\tif(uncontrollableSuccessors.get(i).isEmpty())\n\t\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlosingStates.retainAll(currentLosingStates);\n\t\t\t\n\t\t}\n\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "protected abstract List breakOutOfStateStack();", "public MapComp<K, V> removeAll(Predicate<K> p) {\n return new MapBST<K, V>(this.bst.removeAll(i -> p.test(i.left)));\n }", "@Override\n\t\tpublic boolean goalTest() {\n\t\t\tfor (int i = 0; i < k; i++) {\n\t\t\t\tif (state[i] != xGoals[i] || state[i + k] != yGoals[i]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "public void solveGame5() {\n\t\tlosingStates = new HashSet<S>();\n\t\t\n\t\tQueue<S> losing = new LinkedList<S>();\n\t\tList<Set<S>> uncontrollableSuccessors = new ArrayList<Set<S>>();\n\t\tboolean[] isUncontrollable = new boolean[game.getStates().size()+1];\n\t\tHashMap<S, Integer> stateToIndex = new HashMap<S, Integer>();\n\t\t\n\t\tSet<S> currentUncontrollableSuccesors;\n\t\tSet<S> currentSet; \n\t\tint i;\n\t\tint indexCount = 0;\n\t\tfor(S state:game.getStates()){\n\t\t\tstateToIndex.put(state, indexCount);\n\t\t\t //if(i == -1)\n\t\t\t\t//continue;\n\t\t\tcurrentUncontrollableSuccesors = ((Set<S>)this.game.getUncontrollableSuccessors(state));\n\t\t\tcurrentSet = new HashSet<S>();\n\t\t\tfor(S s: currentUncontrollableSuccesors){\n\t\t\t\tif((!relaxOnAssumptions || (!assumptionsStates.contains(s) || assumptionsStates.contains(state))\n\t\t\t\t\t\t&& (!relaxSelfLoops || (!s.equals(state)))))\n\t\t\t\t\tcurrentSet.add(s);\n\t\t\t}\n\t\t\t uncontrollableSuccessors.add(currentSet);\n\t\t\t isUncontrollable[indexCount] = currentSet.size() > 0;\n\t\t\t indexCount+=1;\n\t\t}\n\n\t\tlosingStates.addAll(game.getStates());\n\t\t\n\t\tSet<S> currentLosingStates;\n\t\tfor (Set<S> actualGoalSet : this.goalStates) {\n\t\t\tlosing.addAll(actualGoalSet);\n\t\t\tcurrentLosingStates\t= new HashSet<S>();\n\t\t\t\n\t\t\t// Handle the pending states\n\t\t\twhile (!losing.isEmpty()) {\n\t\t\t\tS state = losing.poll();\n\n\t\t\t\t\n\t\t\t\tcurrentLosingStates.add(state);\n\n\t\t\t\tSet<S> predecessors = this.game.getPredecessors(state);\n\t\t\t\tfor (S pred : predecessors) {\n\t\t\t\t\tif(losing.contains(pred) || currentLosingStates.contains(pred))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\ti = stateToIndex.get(pred);\n\t\t\t\t\t//if(i == -1)\n\t\t\t\t\t\t//continue;\n\t\t\t\t\tif (!isUncontrollable[i]) {\n\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tuncontrollableSuccessors.get(i).remove(state);\n\t\t\t\t\t\tif(uncontrollableSuccessors.get(i).isEmpty())\n\t\t\t\t\t\t\tlosing.add(pred);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlosingStates.retainAll(currentLosingStates);\n\t\t\t\n\t\t}\n\n\n\t\tSystem.out.println(\"LOSING STATES SIZe : \" + losingStates.size());\n\t\t\n\t\tthis.gameSolved = true;\n\t}", "public interface StateConditionTestIterable extends StateConditionTest, Iterable<State> {\n\t/*\n\t * This method is used to set the state context to enumerate over states.\n\t * This is useful because typically a state test is independent of other state objects\n\t * and calling this method can be used to set the context of those variables and over which to enumerate\n\t */\n\tpublic void setStateContext(State s); \n}", "public static Set<ARGState> getAllStatesOnPathsTo(ARGState pLastElement) {\n\n Set<ARGState> result = new HashSet<ARGState>();\n Deque<ARGState> waitList = new ArrayDeque<ARGState>();\n\n result.add(pLastElement);\n waitList.add(pLastElement);\n\n while (!waitList.isEmpty()) {\n ARGState currentElement = waitList.poll();\n for (ARGState parent : currentElement.getParents()) {\n if (result.add(parent)) {\n waitList.push(parent);\n }\n }\n }\n\n return result;\n }", "@Test\n\tpublic void shouldListAllStatesRegardlessAssignedRoles() {\n\t\tRoleDTO roleAssignedToUser = workflowStub.assignRole(app, user, formDto);\n\t\n\t\tRoleDTO anotherRoleDto = createAnotherRole(app, user);\n\t\t\n\t\t// Creamos un solo estado con el rol asignado al usuario\n\t\tnewState(formDto, \"state1\", roleAssignedToUser);\n\t\tnewState(formDto, \"state2\", roleAssignedToUser);\n\t\tnewState(formDto, \"state3\", anotherRoleDto);\n\t\tnewState(formDto, \"state4\", anotherRoleDto);\n\t\t\n\t\t\n\t\tList<State> states = stateService.listAllStates(formDto);\n\t\tAssert.assertNotNull(\"List of states should NOT be null\", states);\n\t\tAssert.assertEquals(\"List should have the expected size\", 4, states.size());\n\t}", "@Override\n\t@SuppressWarnings(\"unchecked\")\n\tprotected final void processWhenUpdated(Node node) {\n\t\tboolean first = false;\n\t\tif (!this.safeCurrentSCCNodes.contains(node)) {\n\t\t\tfirst = true;\n\t\t\t// Don't add the node to this set unless its OUT has been populated.\n\t\t}\n\t\tNodeInfo nodeInfo = node.getInfo();\n\t\tCollection<Node> predecessors;\n\t\tpredecessors = nodeInfo.getCFGInfo().getInterProceduralLeafPredecessors();\n\t\tF oldIN = (F) nodeInfo.getIN(analysisName);\n\t\tboolean propagateFurther = false;\n\t\tF newIN;\n\t\tif (oldIN == null) {\n\t\t\t// First processing ever of this node!\n\t\t\tpropagateFurther = true;\n\t\t\tnewIN = (predecessors.isEmpty()) ? newIN = this.getEntryFact() : this.getTop();\n\t\t} else if (first) {\n\t\t\t// First processing in the first round of update.\n\t\t\tnewIN = (predecessors.isEmpty()) ? newIN = this.getEntryFact() : this.getTop();\n\t\t} else {\n\t\t\tnewIN = oldIN; // Use the same object.\n\t\t}\n\n\t\tboolean inChanged = false;\n\t\tif (this.analysisName == AnalysisName.CROSSCALL_PREDICATE_ANALYSIS && node instanceof PostCallNode) {\n\t\t\t// A small hack here.\n\t\t\tPostCallNode postNode = (PostCallNode) node;\n\t\t\tList<FunctionDefinition> funcDef = postNode.getParent().getInfo().getCalledDefinitions();\n\t\t\tif (funcDef.isEmpty() || funcDef.stream().noneMatch(f -> this.functionWithBarrier.contains(f))) {\n\t\t\t\tpredecessors = new HashSet<>();\n\t\t\t\tpredecessors.add(postNode.getParent().getPreCallNode());\n\t\t\t}\n\t\t}\n\t\tboolean anyPredMissed = false;\n\t\tfor (Node predNode : predecessors) {\n\t\t\t/*\n\t\t\t * Ignore a predecessor if:\n\t\t\t * (i) it lies within the SCC, AND\n\t\t\t * (ii) it has not been processed yet.\n\t\t\t */\n\t\t\tSCC predSCC = predNode.getInfo().getCFGInfo().getSCC();\n\t\t\tif (predSCC != null) {\n\t\t\t\t// If null, then pred clearly belongs to some other SCC.\n\t\t\t\tif (node.getInfo().getCFGInfo().getSCC() == predSCC) {\n\t\t\t\t\t// Predecessor lies within the SCC.\n\t\t\t\t\tif (!this.safeCurrentSCCNodes.contains(predNode)) {\n\t\t\t\t\t\tanyPredMissed = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tF predOUT = (F) predNode.getInfo().getOUT(analysisName);\n\t\t\tif (predOUT == null) {\n\t\t\t\t/*\n\t\t\t\t * Here, we do not mark anyPredMissed, as this node would be\n\t\t\t\t * marked for processing whenever the predecessor has been\n\t\t\t\t * processed for the first time. Check the setting of\n\t\t\t\t * propagateFurther above.\n\t\t\t\t */\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tF edgeOUT = this.edgeTransferFunction(predOUT, predNode, node);\n\t\t\tinChanged |= newIN.merge(edgeOUT, null);\n\t\t}\n\n\t\tif (node instanceof PostCallNode) {\n\t\t\tPreCallNode preNode = ((CallStatement) node.getParent()).getPreCallNode();\n\t\t\tSCC preSCC = preNode.getInfo().getCFGInfo().getSCC();\n\t\t\tboolean doNotProcess = false;\n\t\t\tif (preSCC != null) {\n\t\t\t\t// If null, then pred clearly belongs to some other SCC.\n\t\t\t\tif (node.getInfo().getCFGInfo().getSCC() == preSCC) {\n\t\t\t\t\t// Predecessor lies within the SCC.\n\t\t\t\t\tif (!this.safeCurrentSCCNodes.contains(preNode)) {\n\t\t\t\t\t\tanyPredMissed = true;\n\t\t\t\t\t\tdoNotProcess = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!doNotProcess) {\n\t\t\t\tinChanged |= processPostCallNodesIN((PostCallNode) node, newIN);\n\t\t\t}\n\n\t\t}\n\t\tif (anyPredMissed) {\n\t\t\tthis.underApproximated.add(node);\n\t\t} else {\n\t\t\tthis.underApproximated.remove(node);\n\t\t}\n\t\tnodeInfo.setIN(analysisName, newIN);\n\n\t\t// Step 2: Apply the flow-function on IN, to obtain the OUT.\n\t\tF newOUT;\n\t\tnewOUT = node.accept(this, newIN);\n\t\tnodeInfo.setOUT(analysisName, newOUT);\n\t\tthis.safeCurrentSCCNodes.add(node); // Mark a node as processed only after its OUT has been \"purified\".\n\n\t\t// Step 3: Process the successors.\n\t\tpropagateFurther |= inChanged;\n\t\tif (propagateFurther) {\n\t\t\tthis.globalWorkList.addAll(nodeInfo.getCFGInfo().getInterProceduralLeafSuccessors());\n\t\t\tif (node instanceof PreCallNode) {\n\t\t\t\tPreCallNode pre = (PreCallNode) node;\n\t\t\t\tthis.globalWorkList.add(pre.getParent().getPostCallNode());\n\t\t\t}\n\t\t\t// If we are adding successors of a BeginNode of a FunctionDefinition, we should\n\t\t\t// add all the ParameterDeclarations.\n\t\t\tif (node instanceof BeginNode && node.getParent() instanceof FunctionDefinition) {\n\t\t\t\tFunctionDefinition func = (FunctionDefinition) node.getParent();\n\t\t\t\tfor (ParameterDeclaration paramDecl : func.getInfo().getCFGInfo().getParameterDeclarationList()) {\n\t\t\t\t\tthis.globalWorkList.add(paramDecl);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private List<ShardState> selectActiveShards(List<ShardState> shardStates) {\n List<ShardState> activeShardStates = new ArrayList<ShardState>();\n for (ShardState shardState : shardStates) {\n if (ShardState.Status.ACTIVE.equals(shardState.getStatus())) {\n activeShardStates.add(shardState);\n }\n }\n return activeShardStates;\n }", "@Override\n public Set<AbstractState> asCollection() {\n return unmodifiableReached;\n }" ]
[ "0.58505094", "0.58120817", "0.5396003", "0.5378852", "0.53344744", "0.5203293", "0.51864004", "0.51771575", "0.5138018", "0.51206803", "0.5102532", "0.5096229", "0.5082533", "0.50708413", "0.50694454", "0.50606567", "0.50348896", "0.50131035", "0.4991994", "0.49841514", "0.4982772", "0.49771833", "0.49601182", "0.48843363", "0.4877525", "0.48758733", "0.4861039", "0.4825485", "0.48245597", "0.48103517", "0.4793839", "0.47900423", "0.47895", "0.47794592", "0.4778263", "0.476526", "0.47557864", "0.47449678", "0.47275358", "0.47086418", "0.46921882", "0.4687042", "0.46867883", "0.46844444", "0.46640816", "0.46580717", "0.46578845", "0.46568623", "0.46527094", "0.46525642", "0.46457124", "0.46427664", "0.46408144", "0.46272293", "0.46232328", "0.46163663", "0.46052954", "0.46013018", "0.45910943", "0.45880917", "0.4587708", "0.4583351", "0.4583351", "0.45830122", "0.4579371", "0.45759094", "0.45703775", "0.45623806", "0.45532146", "0.45479548", "0.45465147", "0.45426935", "0.45243266", "0.45240155", "0.45190656", "0.45110092", "0.45081714", "0.44966245", "0.44951367", "0.4492832", "0.44918245", "0.4480783", "0.44760463", "0.44752556", "0.44731915", "0.4470866", "0.44683477", "0.446608", "0.4461971", "0.44616064", "0.4458397", "0.445076", "0.44426727", "0.44425112", "0.44380158", "0.44276676", "0.4425975", "0.4425569", "0.44246274", "0.44181627" ]
0.5789442
2
Returns true only if the two states are actually both referencing the same object.
private static boolean identityEqual(final I_GameState state1, final I_GameState state2) { if (state1 == state2) return true; return Stream.of(new SimpleEntry<>(state1, state2)) .flatMap( // transform the elements by making a new stream with the transformation to be used pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs // make new pair of the elements of that pile from each state .map(pileID -> new SimpleEntry<>( pair.getKey().get(pileID), pair.getValue().get(pileID) ) ) ) .allMatch(pair -> pair.getKey() == pair.getValue()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean equals(Object obj) {\n if(obj == null || obj.getClass() != getClass()) return false;\n\n State state = (State)obj;\n\n // if both side equals then we say this state is equivalent to the other state\n if(state.getSideInfo(\"left\") == getSideInfo(\"left\"))\n if(state.getSideInfo(\"right\") == getSideInfo(\"right\"))\n return true;\n\n return false;\n }", "@Override\n public boolean equals(Object other) {\n if (other == null) return false;\n else if (!(other instanceof MazeState)) return false;\n return this.getPawnOne().getPositionNr() == ((MazeState) other).getPawnOne().getPositionNr() &&\n this.getPawnTwo().getPositionNr() == ((MazeState) other).getPawnTwo().getPositionNr();\n }", "@Override\n public boolean equals(Object obj){\n \tState s=(State) obj;\n if (this.state==s.getState())\n \treturn true;\n else\n \treturn false;\n \t\t\n }", "boolean hasSameAs();", "@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 (getClass() != obj.getClass())\n\t\t\treturn false;\n\t\tState other = (State) obj;\n\t\tif (state_rep == null) {\n\t\t\tif (other.state_rep != null)\n\t\t\t\treturn false;\n\t\t} else if (!state_rep.equals(other.state_rep))\n\t\t\treturn false;\n\t\treturn true;\n\t}", "@Override\r\n public boolean equals(Object obj) {\r\n // check for null\r\n if (obj == null) {\r\n System.out.println(\"State.equals() null fail\");\r\n return false;\r\n }\r\n // check that these objects are both States\r\n if (getClass() != obj.getClass()) {\r\n System.out.println(\"State.equals() class fail\");\r\n return false;\r\n }\r\n // cast to State\r\n State other = (State) obj;\r\n // check if these have the same root stored\r\n if (!this.root.equals(other.root)) {\r\n System.out.println(\"State.equals() root fail\");\r\n return false;\r\n }\r\n // check if these have the same exit state\r\n if (this.getExit() != (other.getExit())) {\r\n System.out.println(\"State.equals() exit fail\");\r\n return false;\r\n }\r\n // check if these have the same directory stack\r\n if (!this.directoryStack.equals(other.directoryStack)) {\r\n System.out.println(\"State.equals() dirStack fail\");\r\n return false;\r\n }\r\n // check if these have the same working directory\r\n return this.getWorkingDirectory().equals(other.getWorkingDirectory());\r\n }", "public boolean equals(Object s)\n {\n if(!(s instanceof State))\n return false;\n \n return toString().equals(s.toString());\n }", "@Override\n\t\tpublic boolean equals(Object other) {\n\t\t\treturn Arrays.equals(state, ((MazeNode) other).state);\n\t\t}", "private boolean hasUniqueState()\n {\n return (getExternalArcState() == getMiddleArcState() && getExternalArcState() == getInternalArcState() && getExternalArcState() == getCircleState());\n }", "@Override\n public boolean equals(Object other) {\n return Arrays.equals(state, ((CannibalNode) other).state);\n }", "@Override\n public boolean equals(Object object) {\n DFAState otherState = (DFAState) object;\n return this.hashCode == otherState.hashCode();\n }", "public boolean equals(Object o) {\r\n\t\tif (!(o instanceof State)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tState other = (State) o;\r\n\t\treturn id.equals(other.id) && flow.equals(other.flow);\r\n\t}", "public boolean sameState(State s){\n\t\tint i = s.getHound1();\n\t\tint j = s.getHound2();\n\t\tint k = s.getHound3();\n\t\tint hare = s.getHare();\n\t\tif(hare==r){\n\t\t\tif((i==h1||i==h2||i==h3)&&(j==h1||j==h2||j==h3)&&(k==h1||k==h2||k==h3)){\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isStateEquals(State state) {\n\t\treturn environmentStatus.equals(state.name());\n\t}", "public boolean equals(AsNode other) {\n\t\treturn this.state.getHash() == other.state.getHash();\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tState State = (State) obj;\n\t\tSquare aux = null;\n\t\tboolean isequal = true;\n\t\tif (getTractor().getColumn()!=State.getTractor().getColumn() || getTractor().getRow()!=State.getTractor().getRow())\n\t\t\tisequal = false;\n\t\telse {\n\t\t\tfor (int i = 0;i<getRows() && isequal; i++) {\n\t\t\t\tfor (int j = 0;j < getColumns() && isequal; j++) {\n\t\t\t\t\taux = new Square (i,j);\n\t\t\t\t\tif (cells[i][j].getSand() != State.getSquare(aux).getSand()) \n\t\t\t\t\t\tisequal = false; \n\t\t\t\t}\n\t\t\t} \n\t\t} \n\t\treturn isequal;\n\t}", "private static boolean Equal(State o, State goal) {\n\t\tif (o==null || goal==null) return false;\n\t\tfor (int i=0;i<3;i++)\n\t\t\tfor (int j=0;j<3;j++)\n\t\t\t\tif (o.d[i][j]!=goal.d[i][j]) return false;\n\t\treturn true;\n\t}", "public boolean equals(TransitionRecord test){\r\n return (fromstate == test.getFromState() && \r\n tostate == test.getToState());\r\n }", "default boolean isSameStateAs(ReadOnlyTask other) {\n return other == this // short circuit if same object\n || (other != null // this is first to avoid NPE below\n && other.getContent().equals(this.getContent())); // state checks here onwards\n //&& other.getDate().equals(this.getDate())\n //&& other.getTime().equals(this.getTime()));\n }", "@Override\n\tpublic boolean equals( Object other) {\n\n\t\tif( !( other instanceof BooleanStateValue)) {\n return false;\n }\n\n\t\tBooleanStateValue otherValue = (BooleanStateValue) other;\n\n\t\treturn _storage == otherValue._storage;\n\t}", "@Override\n public boolean equals(Object otherMaze) {\n if (otherMaze instanceof AbstractNavigate) {\n return Arrays.equals(((AbstractNavigate) otherMaze).getState(), this.getState());\n }\n\n return false;\n }", "public boolean equivalentInteractions(InteractionObject first, InteractionObject second) {\n\t\tboolean result = \n\t\t\tfirst.getType() == second.getType() &&\n\t\t\tfirst.getIndex() == second.getIndex();\n\t\treturn result;\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof AppStates)) {\n return false;\n }\n AppStates other = (AppStates) 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 }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "boolean hasIsEquivalent();", "public boolean isSameAs(Move comp){ \n return this.xFrom==comp.xFrom &&\n this.xTo==comp.xTo &&\n this.yFrom==comp.yFrom &&\n this.yTo==comp.yTo;\n }", "public boolean isIdentical(Remote obj1, Remote obj2)\n {\n\torg.omg.CORBA.Object corbaObj1 = (org.omg.CORBA.Object)obj1;\n\torg.omg.CORBA.Object corbaObj2 = (org.omg.CORBA.Object)obj2;\n\n\treturn corbaObj1._is_equivalent(corbaObj2);\n }", "boolean containsObjectFlowState(ObjectFlowState objectFlowState);", "public static boolean isSameObject(Object a, Object b) {\n return Builtins.isSameObject(a, b);\n }", "public boolean isequal(Transition t){\n\t\tif( !this.sourcestate.isequal(t.sourcestate)){\n\t\t\treturn false;\n\t\t}\n\t\tif( !this.targetstate.isequal(t.targetstate)){\n\t\t\treturn false;\n\t\t}\n\t\tint len = this.triggers.size();\n\t\tif( len == t.getTriggers().size()){\n\t\t\tfor(int i = 0; i < len; i ++){\n\t\t\t\tString tempTriggers = this.triggers.get(i);\n\t\t\t\t\n\t\t\t\tboolean temp = false;//This means one condition has the same condition in the other transition.\n\t\t\t\tfor(int j = 0; j < len; j ++){\n\t\t\t\t\tif(tempTriggers.equals(t.getTriggers().get(j))){\n\t\t\t\t\t\ttemp = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(temp == false){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n\t\treturn true;\n\t}", "public final boolean equals(Object obj) {\n AppMethodBeat.m2504i(109592);\n if (this != obj) {\n if (obj instanceof C22192a) {\n C22192a c22192a = (C22192a) obj;\n if (C25052j.m39373j(this.username, c22192a.username)) {\n if (this.state == c22192a.state) {\n }\n }\n }\n AppMethodBeat.m2505o(109592);\n return false;\n }\n AppMethodBeat.m2505o(109592);\n return true;\n }", "public boolean checkEquality(){\n boolean flag = true;\n for (int i = 0; i < boardRows ; i++) {\n for (int j = 0; j < boardColumns; j++) {\n if(this.currentBoardState[i][j] != this.goalBoardState[i][j]){\n flag = false;\n }\n }\n }\n return flag;\n }", "private static boolean contentEqual(final I_GameState state1, final I_GameState state2) {\n //if a state is null there surely must be a mistake somewhere\n if (state1 == null || state2 == null) throw new NullPointerException(\"A state cannot be null when comparing\");\n //if ( !sizeEqual(state1, state2) ) return false;\n\n return Stream.of(new SimpleImmutableEntry<>(state1, state2))\n .flatMap( //map the pair of states to many pairs of piles\n statePair -> Arrays.stream(E_PileID.values())\n .map(pileID -> new SimpleEntry<>(\n statePair.getKey().get(pileID),\n statePair.getValue().get(pileID)\n )\n )\n )\n .map(I_GameHistory::replaceNulls)\n .flatMap( // map the pairs of piles to many pairs of Optional<I_card>s.\n listPair -> IntStream //make sure to always traverse the longer list\n .range(0, Math.max(listPair.getKey().size(), listPair.getValue().size()))\n .mapToObj(i -> new SimpleEntry<>(\n getIfExists(listPair.getKey(), i),\n getIfExists(listPair.getValue(), i))\n )\n )\n // map pairs to booleans by checking that the element in a pair are equal\n .map(cardPair -> Objects.equals(cardPair.getKey(), cardPair.getValue()))\n // reduce the many values to one bool by saying all must be true or the statement is false\n .reduce(true, (e1, e2) -> e1 && e2);\n }", "public boolean isSame(MoveLabel other) {\n if (other == this) {\n return true;\n }\n return Objects.equals(in, other.in) && Objects.equals(out, other.out);\n }", "private final boolean AreListStatesEqual(List<State> list1, List<State> list2) {\r\n if ((list1.size() != list2.size())) {\r\n return false;\r\n }\r\n \r\n for (State state : list1) {\r\n if (!list2.contains(state)) {\r\n return false;\r\n }\r\n \r\n }\r\n \r\n return true;\r\n }", "public boolean isSetState()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(STATE$8) != 0;\r\n }\r\n }", "default boolean isRepeatState() {\n return isRepeatState(FULL_EQUAL);\n }", "public boolean equals(Ship other) {\r\n return lowerLeft.equals(other.lowerLeft);\r\n }", "public boolean isSame(MoveEdge other) {\n if (other == this) {\n return true;\n }\n return Objects.equals(in, other.in) && Objects.equals(out, other.out);\n }", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean hasState();", "boolean equalTo(ObjectPassDemo o) {\n return (o.a == a && o.b == b);\n }", "public final void testSameObjectEquals() {\n final Transaction copy = testTransaction1;\n assertTrue(testTransaction1.equals(copy)); // pmd doesn't like either\n // way\n\n }", "public boolean sameAsGold() {\n\t\tif (this.level == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\tArrayList<Gold> goldObjects = this.level.getGoldObjects();\n\n\t\tfor (int i = 0; i < goldObjects.size(); i++) {\n\t\t\tif (this.tilePositionX == goldObjects.get(i).getPositionX()\n\t\t\t\t\t&& this.tilePositionY == goldObjects.get(i).getPositionY()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@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\tpublic boolean equals(Object obj) {\n\t\tMove other = (Move)obj;\n\t\treturn (other.game==game) && (other.player==player) && (other.conseq==conseq);\n\t}", "@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }", "public boolean equals(Object otherObj)\n {\n Strand other = (Strand)otherObj;\n //TODO: determine if the two strands are equal.\n // Strands are equal if they have the same type,\n // have the same length, and have identical\n // sequences.\n \n return false;\n }", "@Test\n @DisplayName(\"Test should detect equality between equal states.\")\n public void testShouldResultInEquality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Hi\");\n\n Assertions.assertThat(os1).isEqualTo(os2);\n }", "@Override\n public boolean equals(Object o) {\n final BoardCell secondCell = (BoardCell) o;\n return((this.xCor==secondCell.xCor)\n &&(this.yCor==secondCell.yCor));\n }", "public boolean alreadyOwnsIdenticalRoute(){\n City city1 = mSelectedRoute.getCity1();\n City city2 = mSelectedRoute.getCity2();\n for(int i=0; i<mUser.getClaimedRoutes().size(); i++){\n City ownedCity1 = mUser.getClaimedRoutes().get(i).getCity1();\n City ownedCity2 = mUser.getClaimedRoutes().get(i).getCity2();\n if(city1.equals(ownedCity1) && city2.equals(ownedCity2))\n return true;\n }\n return false;\n }", "public boolean isEqual(Road r) {\n if (this.targetVertex == r.targetVertex && this.startVertex == r.startVertex || this.targetVertex == r.startVertex && this.startVertex == r.targetVertex) {\n return true;\n } else {\n return false;\n }\n }", "@Override\n\tpublic boolean equals(Object o) {\n\t\tif (o == this)\n\t\t\treturn true;\n\t\tif (!(o instanceof ClientState))\n\t\t\treturn false;\n\n\t\tClientState cs = (ClientState) o;\n\t\tif (userId != cs.userId)\n\t\t\treturn false;\n\t\tif (yVote != cs.yVote)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "private boolean oneEquals(AccessPath that) {\n //if (this._n != that._n) return false;\n if (this._field != that._field) return false;\n if (this._last != that._last) return false;\n if (this.succ.size() != that.succ.size()) return false;\n return true;\n }", "public boolean equals(Object other) {\r\n if (other == null || !(other instanceof BsMemberAddress)) { return false; }\r\n BsMemberAddress otherEntity = (BsMemberAddress)other;\r\n if (!xSV(getMemberAddressId(), otherEntity.getMemberAddressId())) { return false; }\r\n return true;\r\n }", "@Override\n public boolean equals(Object obj) {\n if (obj == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(obj instanceof ModelManager)) {\n return false;\n }\n\n // state check\n ModelManager other = (ModelManager) obj;\n return mapGrid.equals(other.mapGrid)\n && userPrefs.equals(other.userPrefs)\n && Objects.equals(selectedPerson.get(), other.selectedPerson.get());\n }", "public static boolean m66061a(Object obj, Object obj2) {\n return obj == obj2 || (obj != null && obj.equals(obj2));\n }", "@Test\n public void testHashCodeAndEquals() throws Exception {\n final String name = \"testName\";\n\n TestStateDescriptor<String> original = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> same = new TestStateDescriptor<>(name, String.class);\n TestStateDescriptor<String> sameBySerializer =\n new TestStateDescriptor<>(name, StringSerializer.INSTANCE);\n\n // test that hashCode() works on state descriptors with initialized and uninitialized\n // serializers\n assertEquals(original.hashCode(), same.hashCode());\n assertEquals(original.hashCode(), sameBySerializer.hashCode());\n\n assertEquals(original, same);\n assertEquals(original, sameBySerializer);\n\n // equality with a clone\n TestStateDescriptor<String> clone = CommonTestUtils.createCopySerializable(original);\n assertEquals(original, clone);\n\n // equality with an initialized\n clone.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, clone);\n\n original.initializeSerializerUnlessSet(new ExecutionConfig());\n assertEquals(original, same);\n }", "static public boolean areEqual(Object aThis, Object aThat) {\r\n // System.out.println(\"Object\");\r\n return aThis == null ? aThat == null : aThis.equals(aThat);\r\n }", "public boolean winState() {\n\t\treturn this.numTargets == this.onTargets;\n\t}", "@NeededForTesting\n public static boolean areObjectsEqual(Object a, Object b) {\n return a == b || (a != null && a.equals(b));\n }", "@Override\n\tpublic boolean equals(Object other) { \n\t\tif (other instanceof Fish) {\n\t\t\tFish otherFish =((Fish) other);\n\t\t\treturn this.xloc == otherFish.getXLoc() && this.yloc == otherFish.getYLoc()\n\t\t\t\t\t\t\t\t&& this.isCaught == otherFish.isCaught && this.direction\n\t\t\t\t\t\t\t\t== otherFish.direction && this.species == otherFish.species;\n\t\t}\n\t\treturn false;\n\t}", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof TypeOfEstate)) {\r\n return false;\r\n }\r\n TypeOfEstate other = (TypeOfEstate) object;\r\n if ((this.typeOfEstateID == null && other.typeOfEstateID != null) || (this.typeOfEstateID != null && !this.typeOfEstateID.equals(other.typeOfEstateID))) {\r\n return false;\r\n }\r\n return true;\r\n }", "boolean equals(GameState b) {\n for (int i = 0; i < SIZE; i++) {\n for (int j = 0; j < SIZE; j++) {\n if (board[i][j] != b.board[i][j]) {\n return false;\n }\n }\n }\n return true;\n\n }", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof PersonCard)) {\n return false;\n }\n\n // state check\n PersonCard card = (PersonCard) other;\n return displayedIndex == card.getDisplayedIndex()\n && staff.equals(card.staff);\n }", "public static void main(String[] args) {\nAddress addobj = new Address();\r\nAddress addobj2=new Address();\r\n\r\nSystem.out.println(\"addobj: \"+addobj);\r\nSystem.out.println(\"addobj2: \"+addobj2);\r\nSystem.out.println(addobj==addobj2);\r\n//System.out.println(addobj.equals(addobj2));\r\n\r\naddobj.name=\"F\";\r\naddobj.zip=94536;\r\naddobj2.name=\"F\";\r\naddobj2.zip=94536;\r\n\r\nSystem.out.println(addobj.equals(addobj2));\r\n\r\n\r\n}", "boolean hasHasState();", "public boolean equals(XObject obj2){\n if(obj2.getType()==XObject.CLASS_NODESET)\n return obj2.equals(this);\n if(null!=m_obj){\n return m_obj.equals(obj2.m_obj);\n }else{\n return obj2.m_obj==null;\n }\n }", "@Override\n public boolean isSame(Item other) {\n return this.equals(other);\n }", "@Override\n\t\tpublic boolean equals(Object other) {\n\t\t\tif(other instanceof Edge) {\n\t\t\t\tEdge e = (Edge) other;\n\t\t\t\treturn e._one.equals(this._one) && e._two.equals(this._two)\n\t\t\t\t\t|| e._one.equals(this._two) && e._two.equals(this._one);\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "default boolean equalsCurrent() {\n return getName().equalsIgnoreCase(current().getName());\n }", "@Override\n protected boolean doEquals(Object obj) {\n if (obj instanceof BsMemberFollowing) {\n BsMemberFollowing other = (BsMemberFollowing)obj;\n if (!xSV(_memberFollowingId, other._memberFollowingId)) { return false; }\n return true;\n } else {\n return false;\n }\n }", "@Override\n public boolean equals(Object other) {\n return other == this // short circuit if same object\n || (other instanceof SwitchPeriodCommand // instanceof handles nulls\n && pastDate.equals(((SwitchPeriodCommand) other).pastDate)); // state check\n }", "public boolean isCopyState() {\n\t\treturn true;\n\t}", "public boolean isGoalState() {\n boolean isGoal = false;\r\n if(currjug1 == goal || currjug2 == goal)\r\n isGoal = true;\r\n return isGoal;\r\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "public boolean isSetState()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(STATE$14) != null;\r\n }\r\n }", "@Override\n public boolean equals(Object o) {\n if (!(o instanceof Arrow)) return false;\n\n Arrow a = (Arrow) o;\n return from.equals(a.from) && to.equals(a.to) && color.equals(a.color);\n }", "public boolean equals(Object obj) {\r\n House house = (House)obj;\r\n return (calcBuildingArea() == house.calcBuildingArea() && (house.hasPool()==hasPool()));\r\n }", "public static boolean preEq(Object a, Object b) {\n\t\treturn a != null && b != null && a.getClass().equals(b.getClass());\n\t}", "public boolean isEqual(Object objectname1, Object objectname2, Class<?> voClass) {\n\t\treturn false;\n\t}", "public boolean equals(Object obj){\r\n\t\tDirectedEdge edge=(DirectedEdge)obj;\r\n\t\tif (source.equals(edge.getSouceNode() )&& \r\n\t\t\ttarget.equals(edge.getTargetNode()))\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "@Override\n public boolean equals(Object obj) {\n StorePairGeneric<E> o = (StorePairGeneric<E>) obj;\n return this.first.equals(o.first);\n \n // or boolean ans = this.first(temp.first);\n // return ans;\n }", "@Override\r\n\t\tpublic boolean isSameNode(Node other)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}", "private boolean isOpen () {\n boolean result = false;\n if (interOne == null || interTwo == null) result = true;\n return (result);\n }", "public boolean equals(Object obj) {\n\t\tMercator p;\n\t\ttry {\n\t\t\tp = (Mercator)obj;\n\t\t} catch (ClassCastException ex) {\n\t\t\treturn false;\n\t\t}\n\t\tif(!super.equals(p))return false;\n\t\treturn (refY==p.refY) && (scaleY==p.scaleY);\n\t}", "public boolean differ(Object a, Object b) {\n Node set1 = find(getNode(a));\n Node set2 = find(getNode(b));\n\n return set1 != set2;\n }", "public boolean equals(Object r) {\r\n\t\tboolean sameTown = this.source.equals(((Road) r).getSource()) && this.destination.equals(((Road) r).getDestination());\r\n\t\tboolean oppositeTown = this.source.equals(((Road) r).getDestination()) && this.destination.equals(((Road) r).getSource());\r\n\t\t\r\n\t\tif(sameTown || oppositeTown)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return false;\n }", "public boolean equals(Tile tile) {\n\t\treturn tile.getShape() == shape && tile.getColor() == color;\n\t}", "public abstract boolean equals(Object other);", "@Override public boolean equals(Object o) { // since 1.3.1\n // should these ever match actually?\n return (o == this);\n }", "@Override\n public boolean isSame(Bike other) {\n if (other == this) {\n return true;\n }\n\n return other != null\n && other.getName().equals(this.getName());\n }" ]
[ "0.73099566", "0.73012435", "0.71788776", "0.7134352", "0.71051455", "0.7079063", "0.7023255", "0.702203", "0.70143044", "0.698853", "0.69300675", "0.69081247", "0.6894597", "0.67519516", "0.6705154", "0.6698834", "0.6656676", "0.6612467", "0.6595321", "0.64442503", "0.6437983", "0.6335106", "0.63262486", "0.6320761", "0.62595505", "0.6229893", "0.6167134", "0.61556834", "0.6151972", "0.6149756", "0.61380273", "0.60951453", "0.60912734", "0.6079625", "0.60615945", "0.60583025", "0.60433567", "0.60300887", "0.6023361", "0.59849477", "0.59849477", "0.59849477", "0.59849477", "0.59849477", "0.59849477", "0.59849477", "0.59849477", "0.5980025", "0.594067", "0.5932572", "0.5907844", "0.58932036", "0.58882713", "0.58851355", "0.58695006", "0.58683", "0.5866573", "0.5863097", "0.58489543", "0.584724", "0.5832572", "0.583249", "0.58237773", "0.58179086", "0.5812916", "0.58083266", "0.5796428", "0.579107", "0.57838", "0.5783782", "0.57823765", "0.57775646", "0.5770772", "0.5767508", "0.57649654", "0.5764356", "0.57572645", "0.57560086", "0.57526153", "0.5750802", "0.5744572", "0.5743476", "0.5743476", "0.57424074", "0.57407326", "0.57199436", "0.57170427", "0.57150507", "0.5706432", "0.57012266", "0.569514", "0.5687871", "0.56877774", "0.5685702", "0.5683212", "0.56824446", "0.5680073", "0.5680057", "0.5678966", "0.567751" ]
0.62648576
24
Returns true if the sizes of the lists in the first state are all equal to the length of the corresponding list in the second state.
private static boolean sizeEqual(final I_GameState state1, final I_GameState state2) { //if a state is null there surely must be a mistake somewhere if (state1 == null || state2 == null) throw new NullPointerException("A state cannot be null when comparing"); // make a stream with a data structure containing both states return Stream.of(new SimpleEntry<>(state1, state2)) .flatMap( // transform the elements by making a new stream with the transformation to be used pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs // make new pair of the elements of that pile from each state .map(pileID -> new SimpleEntry<>( pair.getKey().get(pileID), pair.getValue().get(pileID) ) ) ) .map(I_GameHistory::replaceNulls) .allMatch(pair -> pair.getKey().size() == pair.getValue().size()); // check they have equal sizes }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private final boolean AreListStatesEqual(List<State> list1, List<State> list2) {\r\n if ((list1.size() != list2.size())) {\r\n return false;\r\n }\r\n \r\n for (State state : list1) {\r\n if (!list2.contains(state)) {\r\n return false;\r\n }\r\n \r\n }\r\n \r\n return true;\r\n }", "private static boolean contentEqual(final I_GameState state1, final I_GameState state2) {\n //if a state is null there surely must be a mistake somewhere\n if (state1 == null || state2 == null) throw new NullPointerException(\"A state cannot be null when comparing\");\n //if ( !sizeEqual(state1, state2) ) return false;\n\n return Stream.of(new SimpleImmutableEntry<>(state1, state2))\n .flatMap( //map the pair of states to many pairs of piles\n statePair -> Arrays.stream(E_PileID.values())\n .map(pileID -> new SimpleEntry<>(\n statePair.getKey().get(pileID),\n statePair.getValue().get(pileID)\n )\n )\n )\n .map(I_GameHistory::replaceNulls)\n .flatMap( // map the pairs of piles to many pairs of Optional<I_card>s.\n listPair -> IntStream //make sure to always traverse the longer list\n .range(0, Math.max(listPair.getKey().size(), listPair.getValue().size()))\n .mapToObj(i -> new SimpleEntry<>(\n getIfExists(listPair.getKey(), i),\n getIfExists(listPair.getValue(), i))\n )\n )\n // map pairs to booleans by checking that the element in a pair are equal\n .map(cardPair -> Objects.equals(cardPair.getKey(), cardPair.getValue()))\n // reduce the many values to one bool by saying all must be true or the statement is false\n .reduce(true, (e1, e2) -> e1 && e2);\n }", "public boolean areEqual(Element element1, Element element2, HashMap<String, Integer> lengthMap, GUIState state, GUIState currentState) throws MultipleListOrGridException {\n if (!isAttributeEqual(element1, element2)) {\n return false;\n }\n\n for (int i = 0; i < max(element1.elements().size(), element2.elements().size()); i++) {\n if (i == ((Element) element1).elements().size() || i == ((Element) element2).elements().size())\n return false;\n if (element1.attributeValue(NodeAttribute.Class) != null && element2.attributeValue(NodeAttribute.Class) != null &&\n (element1.attributeValue(NodeAttribute.Class).equals(NodeAttribute.ListView) && element2.attributeValue(NodeAttribute.Class).equals(NodeAttribute.ListView)\n || element1.attributeValue(NodeAttribute.Class).equals(NodeAttribute.GridView) && element2.attributeValue(NodeAttribute.Class).equals(NodeAttribute.GridView))) {\n\n if (state.getListSize() != currentState.getListSize() && state.getGridSize() != currentState.getGridSize()) {\n currentState.setIsDynamicListAndGrid(true);\n }\n if (currentState.isDynamicListAndGrid()) {\n if (lengthMap.get(getCurrentXpath(element1, getStringList(element1))) == null)\n lengthMap.put(getCurrentXpath(element1, getStringList(element1)), 0);\n\n if (!areEqual((Element) element1.elements().get(i), (Element) element2.elements().get(i), lengthMap, state, currentState)) {\n return false;\n } else {\n int lengthValue = lengthMap.get(getCurrentXpath(element1, getStringList(element1))) + 1;\n lengthMap.put(getCurrentXpath(element1, getStringList(element1)), lengthValue);\n if (lengthMap.get(getCurrentXpath(element1, getStringList(element1))) >= maxListGridSizeThreshold) {\n this.totalListGridEquivalentStateCount++;\n state.setIsEquivalentState(true);\n if (!state.getImagelist().contains(currentState.getImagelist().get(0)))\n state.addImage(currentState.getImagelist().get(0));\n state.increaseEquivalentStateCount();\n state.setIsListAndGrid(true);\n return true;\n }\n }\n } else {\n return false;\n }\n\n } else {\n if (!areEqual((Element) element1.elements().get(i), (Element) element2.elements().get(i), lengthMap, state, currentState)) {\n return false;\n }\n }\n }\n return true;\n }", "private boolean sameElements(List firstList, List secondList)\r\n\t{\r\n\t\t\r\n\t\t// The size hould be the same, otherwise stop.\r\n\t\tif (firstList.size() != secondList.size())\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Iterate over the elements of the first list.\r\n\t\tfor (int index = 0; index < firstList.size(); index++)\r\n\t\t{\r\n\t\t\t// Check if the element is also in the second list.\r\n\t\t\tif (!secondList.contains(firstList.get(index)))\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// They heve the same elements.\r\n\t\treturn true;\r\n\t}", "@Property\n public boolean reverse_has_the_same_size_as_original(@ForAll List<?> original) {\n return Lists.reverse(original).size() == original.size();\n }", "public static boolean areStacksSimilarWithSize (ItemStack firstStack, ItemStack secondStack) {\n \n return firstStack == null && secondStack == null ? true : isValidStack(firstStack) && isValidStack(secondStack) && firstStack.getItemDamage() == secondStack.getItemDamage() && firstStack.getItem() == secondStack.getItem() && firstStack.getCount() == secondStack.getCount();\n }", "private void checkStateSizes()\n\t{\n\t\tif (variableNames.size() != domainSizes.size())\n\t\t{\n\t\t\tif (DEBUG)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Variable names length = \"\n\t\t\t\t\t\t+ variableNames.size());\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"Domain size length = \" + domainSizes.size());\n\t\t\t}\n\t\t\tSystem.err.println(\"Numbers of state variables in inputs differ.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t}", "private boolean checkIfAlreadyIsState(ArrayList<ArrayList<Integer>> states, ArrayList<Integer> state){\n boolean res=true;\n Collections.sort(state);\n\n for (int i = 0 ; i < states.size();i++){\n ArrayList<Integer> currState = states.get(i);\n\n if(currState.size() != state.size())\n continue;\n else{\n Collections.sort(currState);\n\n if(state.equals(currState)){\n res = false;\n break;\n }\n }\n }\n\n return res;\n }", "boolean sameDimensions(List<Layer> layers);", "private static boolean isSame(List<PokerLabel> list, int size) {\n PokerLabel firstPokerLabel = list.get(0);\n int num = firstPokerLabel.getNum();\n for (PokerLabel p: list) {\n if (num != p.getNum()) {\n return false;\n }\n }\n return true;\n }", "private boolean allVolumeSizesMatch(List<Long> currentVolumeSizes) {\n // If the storage systems match then check all current sizes of the volumes too, any mismatch\n // will lead to a calculation check\n List<Long> currentVolumeSizesCopy = new ArrayList<Long>();\n currentVolumeSizesCopy.addAll(currentVolumeSizes);\n for (Long currentSize : currentVolumeSizes) {\n for (Long compareSize : currentVolumeSizesCopy) {\n if (currentSize.longValue() != compareSize.longValue()) {\n return false;\n }\n }\n }\n\n _log.info(\"All volumes are of the same size. No need for capacity calculations.\");\n return true;\n }", "public static boolean haveIdenticalContents(List list1, List list2)\r\n {\r\n if ((list1 == null) != (list2 == null))\r\n {\r\n // One is null and other is not.\r\n return false;\r\n }\r\n if (list1 != null)\r\n {\r\n // Both are not null.\r\n if (list1.size() != list2.size())\r\n {\r\n // Different sizes.\r\n return false;\r\n }\r\n // Both not null and same size.\r\n for (int i = 0; i < list1.size(); i++)\r\n {\r\n if (list1.get(i) != list2.get(i))\r\n {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }", "public boolean isValid() {\n if (state.length != Board.dim*Board.dim) return false;\n if ((double)Board.dim != Math.sqrt((double)state.length)) return false;\n byte[] counts = new byte[state.length];\n try {\n for (int i = 0; i < counts.length; i++) counts[state[i]]++;\n } catch (ArrayIndexOutOfBoundsException e) { return false; }\n for (int i = 0; i < counts.length; i++) if (counts[i] != 1) return false;\n return true;\n }", "private boolean isSameList(CardList l1, CardList l2){\r\n\t\tif (l1.size()!=l2.size())\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tIterator<Card> i1 = l1.iterator();\r\n\t\tIterator<Card> i2 = l2.iterator();\r\n\t\twhile(i1.hasNext()){\r\n\t\t\tif (!i1.next().equals(i2.next()))\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static boolean equals(int[] list1, int[] list2) {\n boolean verdict = false;\n \n // use bubbleSort to sort each list\n list1 = bubbleSort(list1);\n list2 = bubbleSort(list2);\n \n if (list1.length == list2.length) {\n verdict = true;\n for (int i = 0; i < list1.length; i++) {\n if (list1[i] != list2[i]) {\n verdict = false;\n break;\n }\n }\n }\n return verdict;\n }", "private static boolean identityEqual(final I_GameState state1, final I_GameState state2) {\n if (state1 == state2)\n return true;\n\n return Stream.of(new SimpleEntry<>(state1, state2))\n .flatMap( // transform the elements by making a new stream with the transformation to be used\n pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs\n // make new pair of the elements of that pile from each state\n .map(pileID -> new SimpleEntry<>(\n pair.getKey().get(pileID),\n pair.getValue().get(pileID)\n )\n )\n )\n .allMatch(pair -> pair.getKey() == pair.getValue());\n }", "private static void _assertSizeAlignment(boolean[] one, boolean[] other){\r\n assert one.length==other.length:\r\n String.format(\"Incompatible Arrays %s / %s\",one.length,other.length);\r\n }", "boolean areIdentical(IsIdenticalLists listb) {\n Node a = this.head, b = listb.head;\n while (a != null && b != null) {\n if (a.value != b.value)\n return false;\n\n /* If we reach here, then a and b are not null\n and their data is same, so move to next nodes\n in both lists */\n a = a.next;\n b = b.next;\n }\n\n // If linked lists are identical, then 'a' and 'b' must\n // be null at this point.\n return (a == null && b == null);\n }", "boolean hasSize();", "boolean hasSize();", "boolean hasSize();", "boolean hasSize();", "private void testSize() {\n init();\n assertTrue(\"FListInteger.size(l0)\", FListInteger.size(l0) == 0);\n assertTrue(\"FListInteger.size(l1)\", FListInteger.size(l1) == 1);\n assertTrue(\"FListInteger.size(l2)\", FListInteger.size(l2) == 2);\n assertTrue(\"FListInteger.size(l3)\", FListInteger.size(l3) == 3);\n }", "private static boolean equalLists(List l1, List l2) {\r\n if (l1 == l2) {\r\n return true;\r\n }\r\n if (l1 == null || l2 == null) // but not both, see above\r\n {\r\n return false;\r\n }\r\n if (l1.size() != l2.size()) {\r\n return false;\r\n }\r\n boolean match = true;\r\n for (int i = 0; i < l1.size() && match; i++) {\r\n if (!l1.get(i).equals(l2.get(i))) {\r\n match = false;\r\n }\r\n }\r\n return match;\r\n }", "public static boolean CheckDirectlySuperList(List<Integer> list1, List<Integer> list2){\n\n Set<Integer> hashSet1 = new HashSet<>(list1);\n Set<Integer> hashSet2 = new HashSet<>(list2);\n\n boolean contain = false;\n\n if (list1.size()-list2.size()==1){\n contain = true;\n for (Integer i: hashSet2){\n if (!hashSet1.contains(i)){\n contain = false;\n break;\n }\n }\n }\n return contain;\n }", "public boolean isValid() {\n\n if (this.eTime == INFINITY) return false;\n\n int oldCountA = (a != null) ? a.getCount() : 0;\n int oldCountB = (b != null) ? b.getCount() : 0;\n\n if (countA != oldCountA || countB != oldCountB)\n return false;\n\n return true;\n }", "public static boolean haveEqualContents(List list1, List list2)\r\n {\r\n if ((list1 == null) != (list2 == null))\r\n {\r\n // One is null and other is not.\r\n return false;\r\n }\r\n if (list1 != null)\r\n {\r\n // Both are not null.\r\n if (list1.size() != list2.size())\r\n {\r\n // Different sizes.\r\n return false;\r\n }\r\n // Both not null and same size.\r\n for (int i = 0; i < list1.size(); i++)\r\n {\r\n if (!ObjUtil.equalsOrBothNull(list1.get(i), list2.get(i)))\r\n {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }", "public boolean isEquals() {\n long len = -1L;\n\n //1. check the lengths of the words\n for(S left : slp.getAxioms()) {\n if(len == -1L) {\n len = slp.length(left);\n }\n else {\n if(len != slp.length(left)) {\n return false;\n }\n }\n }\n\n // all words are the empty word\n if(len == 0) {\n return true;\n }\n\n // 2. the length are all equals and not zero => execute the recompression\n execute();\n\n S otherSymbol = null;\n boolean first = true;\n\n // 3. chech now if for all axioms X : |val(X)| = 1 and all val(X) are equals.\n for(S left : slp.getAxioms()) {\n if(first) {\n slp.length(left, true);\n first = false;\n }\n\n if(slp.length(left) != 1) {\n return false;\n }\n else {\n S symbol = slp.get(left, 1);\n if(otherSymbol == null) {\n otherSymbol = symbol;\n }\n\n if(!symbol.equals(otherSymbol)) {\n return false;\n }\n }\n }\n\n return true;\n }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "private static boolean compareList(List<Object> l1, List<Object> l2)\n {\n int count=0;\n for (Object o : l1)\n {\n Object temp = o;\n for (Object otemp : l2)\n {\n if (EqualsBuilder.reflectionEquals(temp, otemp))\n {\n count++;\n }\n }\n\n }\n\n if(count == l1.size()) return true;\n return false;\n\n }", "private final boolean indicesEqual(Collection<TableName> list1, Collection<TableName> list2)\n {\n logger.info(\"indicesEqual - Enter - Index1: {}, Index2: {}\", list1, list2);\n\n // lists must have the same number of indices.\n if (list1.size() != list2.size()) {\n logger.warn(\"Indices lists are different sizes!\");\n return false;\n }\n\n // lists must have the same indices (irrespective of internal ordering).\n Iterator<TableName> iter = list1.iterator();\n while (iter.hasNext()) {\n if (!list2.contains(iter.next())) {\n logger.warn(\"Indices mismatch in list!\");\n return false;\n }\n }\n\n return true;\n }", "public boolean validate() {\n double ab = lengthSide(a, b);\n double ac = lengthSide(a, c);\n double bc = lengthSide(b, c);\n\n return ((ab < ac + bc)\n && (ac < ab + bc)\n && (bc < ab + ac));\n }", "public boolean equalStack(StackClass otherStack){\n \tif(this.size != otherStack.size)\n \treturn false;\n \telse{\n \twhile(!this.isEmpty()){\n \tif(this.pop() != otherStack.pop())\n \treturn false;\n \t} \n \t}\n \treturn true;\n\t}", "public boolean equals(LinkedList list){\n if (this.size() == list.size()){\n for (int i = 0; i < this.size(); i++){\n if(this.get(i) != list.get(i)){\n return false;\n }\n }\n return true;\n }else{ \n return false;\n } \n }", "public static boolean theSame(LayeredComponent lc1, LayeredComponent lc2) {\n \tif (lc1.numberOfLayers() != lc2.numberOfLayers()) {\n \t\treturn false;\n \t}\n \n \tfor (int i = 0; i < lc1.numberOfLayers(); i++) {\n \t\tif (lc1.getLayer(i).size() != lc2.getLayer(i).size())\n \t\t\treturn false;\n \t}\n \t\n \treturn true;\n }", "boolean testLength(Tester t) {\n return t.checkExpect(lob3.length(), 3) && t.checkExpect(los3.length(), 3)\n && t.checkExpect(los1.length(), 1) && t.checkExpect(new MtLoGamePiece().length(), 0);\n }", "public boolean sameState(State s){\n\t\tint i = s.getHound1();\n\t\tint j = s.getHound2();\n\t\tint k = s.getHound3();\n\t\tint hare = s.getHare();\n\t\tif(hare==r){\n\t\t\tif((i==h1||i==h2||i==h3)&&(j==h1||j==h2||j==h3)&&(k==h1||k==h2||k==h3)){\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean validationPhase(Secret secretA, Secret secretB, int smallestSize, double[] optimalBox) {\n\n\t\t// number of all possible subsets with a size of smallestSize\n\t\tint numberSubsets; \n\t\tif((secretA.getTimes().size() / smallestSize) <= (secretB.getTimes().size() / smallestSize)) {\n\t\t\tnumberSubsets = (secretA.getTimes().size() / smallestSize);\n\t\t} else {\n\t\t\tnumberSubsets = (secretB.getTimes().size() / smallestSize);\n\t\t}\n\n\t\t// rest of the size modulo all subsets\n\t\tint restA = secretA.getTimes().size() % (numberSubsets * smallestSize);\n\t\tint restB = secretB.getTimes().size() % (numberSubsets * smallestSize);\n\n\t\tArrayList<Time> subsetA; \n\t\tArrayList<Time> subsetB;\n\n\t\tint countWrongResults = 0;\n\n\t\tArrayList<String> validateSubsetSignificantDifferent = new ArrayList<String>();\n\t\tArrayList<String> validateSubsetOverlapA = new ArrayList<String>();\n\t\tArrayList<String> validateSubsetOverlapB = new ArrayList<String>();\n\t\tArrayList<Time> prevSubsetA = new ArrayList<Time>();\n\t\tArrayList<Time> prevSubsetB = new ArrayList<Time>();\n\n\n\t\tfor (int i = 0; i < numberSubsets; ++i) {\n\n\t\t\tint countInvalid = 0;\n\t\t\t// the rest will be deducted at the beginning\n\t\t\tsubsetA = secretA.getBisectedTimes(restA + (smallestSize * i), smallestSize);\n\t\t\tsubsetB = secretB.getBisectedTimes(restB + (smallestSize * i), smallestSize);\n\n\t\t\tCollections.sort(subsetA);\n\t\t\tCollections.sort(subsetB);\n\n\t\t\tif (BoxTest.boxTestSmaller(subsetA, subsetB, optimalBox)) {\n\t\t\t\tvalidateSubsetSignificantDifferent.add(\"o\");\n\n\t\t\t} else {\n\t\t\t\tvalidateSubsetSignificantDifferent.add(\"x\");\n\t\t\t\t//logger.info(\"subset \" + i + \": wrong result\");\n\t\t\t\t++countInvalid;\n\t\t\t}\n\t\t\t\n\t\t\tif(i != 0) {\n\t\t\t\tif (BoxTest.boxTestOverlap(prevSubsetA, subsetA, optimalBox)) {\n\t\t\t\t\tvalidateSubsetOverlapA.add(\"o\");\n\n\t\t\t\t} else {\n\t\t\t\t\tvalidateSubsetOverlapA.add(\"x\");\n\t\t\t\t\t//logger.info(\"subset \" + i + \": only significant different\");\n\t\t\t\t\t++countInvalid;\n\t\t\t\t} \n\n\t\t\t\tif (BoxTest.boxTestOverlap(prevSubsetB, subsetB, optimalBox)) {\n\t\t\t\t\tvalidateSubsetOverlapB.add(\"o\");\n\t\t\t\t\t//logger.info(\"subset \" + i + \": right result\");\n\n\t\t\t\t} else {\n\t\t\t\t\tvalidateSubsetOverlapB.add(\"x\");\n\t\t\t\t\t//logger.info(\"subset \" + i + \": only significant different, subset A overlaps\");\n\t\t\t\t\t++countInvalid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(countInvalid > 0) {\n\t\t\t\t++countWrongResults;\n\t\t\t}\n\n\t\t\tprevSubsetA = new ArrayList<Time>();\n\t\t\tprevSubsetB = new ArrayList<Time>();\n\n\t\t\tprevSubsetA = subsetA;\n\t\t\tprevSubsetB = subsetB;\n\t\t}\n\n\t\tdouble confidenceInterval = 100 - (countWrongResults * 100 / numberSubsets);\n\n\t\tthis.boxTestResults.get(this.boxTestResults.size() - 1).saveValidation(smallestSize, confidenceInterval, validateSubsetOverlapA, validateSubsetOverlapB, validateSubsetSignificantDifferent);\n\t\tlogger.finest(\"\\n\\\"o\\\" = successful box test \\n\\\"x\\\" = unsuccesful box test\\n\");\n\t\tlogger.finest(secretA.getName() + \" overlaps: \" + Folder.convertArrayListToString(validateSubsetOverlapA));\n\t\tlogger.finest(secretB.getName() + \" overlaps: \" + Folder.convertArrayListToString(validateSubsetOverlapB));\n\t\tlogger.finest(secretA.getName() + \" < \" + secretB.getName() + \": \" + Folder.convertArrayListToString(validateSubsetSignificantDifferent));\n\n\t\tlogger.info(secretA.getName() + \" < \" + secretB.getName() + \": validate smallest size \" + smallestSize + \": \" + countWrongResults + \" out of \" + numberSubsets + \" comparisons returned wrong results.\");\n\n\t\tif(countWrongResults != 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "private boolean isNxNShape() {\n return this.matrix.size() == this.n &&\n this.matrix.stream()\n .allMatch(row -> row.size() == this.n);\n }", "private static boolean containSamePieces(Collection<Piece> pieces1,\n\t\t\tCollection<Piece> pieces2) {\n\t\t// Ensure that the two collections have the correct number of pieces.\n\t\tif (pieces1.size() != pieces2.size()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Copy the pieces to new lists so that the old piece collections are\n\t\t// not modified.\n\t\tfinal List<Piece> p1 = new ArrayList<Piece>();\n\t\tfinal List<Piece> p2 = new ArrayList<Piece>();\n\t\tfor (Piece iPiece : pieces1) {\n\t\t\tp1.add(iPiece);\n\t\t}\n\t\tfor (Piece iPiece : pieces2) {\n\t\t\tp2.add(iPiece);\n\t\t}\n\n\t\t// For each piece in the first list, remove an identical piece from the\n\t\t// second list.\n\t\tfor (Piece iPiece : p1) {\n\t\t\tif (p2.contains(iPiece)) {\n\t\t\t\tp2.remove(iPiece);\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// At the end, if all items in the first list have found matches in the\n\t\t// second list, and the two lists are the same size, the lists must\n\t\t// contain the same pieces.\n\t\treturn true;\n\t}", "boolean hasOrderSize();", "protected boolean isSameSnakSet(Iterator<Snak> snaks1, Iterator<Snak> snaks2) {\n\t\tArrayList<Snak> snakList1 = new ArrayList<>(5);\n\t\twhile (snaks1.hasNext()) {\n\t\t\tsnakList1.add(snaks1.next());\n\t\t}\n\n\t\tint snakCount2 = 0;\n\t\twhile (snaks2.hasNext()) {\n\t\t\tsnakCount2++;\n\t\t\tSnak snak2 = snaks2.next();\n\t\t\tboolean found = false;\n\t\t\tfor (int i = 0; i < snakList1.size(); i++) {\n\t\t\t\tif (snak2.equals(snakList1.get(i))) {\n\t\t\t\t\tsnakList1.set(i, null);\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn snakCount2 == snakList1.size();\n\t}", "private boolean contain(Estado state, List<Estado> states) {\n\t\tfor (Estado valid : states) {\n\t\t\tif (valid.getValue() == state.getValue()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean goodSize( Coordinates startCoord, Coordinates endCoord, int size) {\n\t\t\r\n\t\tint nb1 = startCoord.getNumber();\r\n\t\tchar letter1 = startCoord.getLetter();\r\n\t\tint nb2 = endCoord.getNumber();\r\n\t\tchar letter2 = endCoord.getLetter();\r\n\t\t\r\n\t\treturn (\r\n\t\t\t\t(Math.abs(nb1 - nb2) == size-1)\r\n\t\t\t\t|| \r\n\t\t\t\t(Math.abs(letter1 - letter2) == size-1 ));\r\n\t}", "private final void checkRowCount(final int size1, final int size2) {\n\t\tif (size1 == size2) {\n\t\t\tContextComparator.addResult(namespace,\n\t\t\t\t\tContextComparatorConfigReferences.TEST_CATEGORY_ROW_COUNT,\n\t\t\t\t\tContextComparatorConfigReferences.TEST_STATUS_PASSED,\n\t\t\t\t\tnull);\n\t\t\treturn;\n\t\t} else {\n\t\t\tLOGGER.error(\"Count of rows doesn't match.\");\n\t\t\tContextComparator.addResult(namespace,\n\t\t\t\t\tContextComparatorConfigReferences.TEST_CATEGORY_ROW_COUNT,\n\t\t\t\t\tContextComparatorConfigReferences.TEST_STATUS_FAILED,\n\t\t\t\t\tContextComparator.CONTEXT_1.getName() + \" : \" + size1 + \", \"\n\t\t\t\t\t\t\t+ ContextComparator.CONTEXT_2.getName() + \" : \" + size2);\n\t\t\treturn;\n\t\t}\n\t}", "public boolean isValid() {\n return hops.size() >= 2;\n }", "boolean equals(GameState b) {\n for (int i = 0; i < SIZE; i++) {\n for (int j = 0; j < SIZE; j++) {\n if (board[i][j] != b.board[i][j]) {\n return false;\n }\n }\n }\n return true;\n\n }", "public static boolean canCombineItemsets(ArrayList<String> is1, ArrayList<String> is2) {\n\t\tif(is1.size() != is2.size()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tint commonElements = 0;\n\t\t\n\t\tfor(String item : is2) {\n\t\t\tif(is1.contains(item)) {\n\t\t\t\tcommonElements += 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn (commonElements == is1.size() - 1);\n\t}", "public boolean checkEquality(){\n boolean flag = true;\n for (int i = 0; i < boardRows ; i++) {\n for (int j = 0; j < boardColumns; j++) {\n if(this.currentBoardState[i][j] != this.goalBoardState[i][j]){\n flag = false;\n }\n }\n }\n return flag;\n }", "private void assertEqual(long count, long size) {\n\t\t\n\t}", "@Override\n\t\tpublic boolean equals(Object other) {\n\t\t\treturn Arrays.equals(state, ((MazeNode) other).state);\n\t\t}", "public static boolean equalsUnordered( Collection<?> collection1, Collection<?> collection2 )\r\n {\r\n //\r\n boolean retval = collection1.size() == collection2.size();\r\n \r\n //\r\n for ( Object iObject : collection1 )\r\n {\r\n retval &= collection2.contains( iObject );\r\n }\r\n \r\n //\r\n return retval;\r\n }", "@Override\n public boolean equals(Object other) {\n return Arrays.equals(state, ((CannibalNode) other).state);\n }", "public static void main(String[] args) {\n\t\tList l=new ArrayList();\r\n\t\tl.add(12);\r\n\t\tl.add(45);\r\n\t\tl.add(15);\r\n\t\tl.add(78);\r\n\t\t\r\n\t\tList l2=new ArrayList();\r\n\t\tl2.add(12);\r\n\t\tl2.add(45);\r\n\t\tl2.add(10);\r\n\t\tl2.add(78);\r\n\t\t\r\n\t\tBoolean m=l.containsAll(l2);\r\n\t\t\r\n\t\tif(m)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Elements are same\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Not equal\");\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "private static boolean checkOrderList() {\n if (size != MainGUI.orderList.size()) {\n size = MainGUI.orderList.size();\n return true;\n }\n\n return false;\n }", "public static void main(String args[]) {\n IsIdenticalLists llist1 = new IsIdenticalLists();\n IsIdenticalLists llist2 = new IsIdenticalLists();\n\n /* The constructed linked lists are :\n llist1: 3->2->1\n llist2: 3->2->1 */\n\n llist1.push(1);\n llist1.push(2);\n llist1.push(3);\n\n llist2.push(1);\n llist2.push(2);\n llist2.push(3);\n\n if (llist1.areIdentical(llist2) == true)\n System.out.println(\"Identical \");\n else\n System.out.println(\"Not identical \");\n\n }", "boolean areTheyEqual(int[] array_a, int[] array_b) {\n if(array_a == null || array_b == null || array_a.length!=array_b.length) return false;\n\n HashMap<Integer,Integer> count = new HashMap<>();\n for(int x : array_a){\n count.put(x, count.getOrDefault(x,0)+1);\n }\n for(int y : array_b){\n count.put(y, count.getOrDefault(y,0)-1);\n if(count.get(y)==0) count.remove(y);\n }\n return count.size()==0;\n }", "private boolean rangeEquals(Object [] b1, Object [] b2, int length)\n /*! #end !*/\n {\n for (int i = 0; i < length; i++)\n {\n if (!Intrinsics.equalsKType(b1[i], b2[i]))\n {\n return false;\n }\n }\n\n return true;\n }", "private static boolean checkPermutationCountingArray(String s1, String s2) {\n // Strings are of unequal length. Cannot be permutations.\n if (s1.length() != s2.length()) {\n return false;\n }\n\n int[] characterCount = new int[128];\n for (int i = 0; i < s1.length(); i++) {\n characterCount[s1.charAt(i)]++;\n characterCount[s2.charAt(i)]--;\n }\n for (int i = 0; i < characterCount.length; i++) {\n if (characterCount[i] != 0) return false;\n }\n return true;\n }", "private static boolean isEqual(int[] nums1, int[] nums2){\n \tfor(int i=0; i<nums1.length; i++){\n \t\tif(nums1[i]!=nums2[i]){\n \t\t\treturn false;\n \t\t}\n \t}\n \treturn true;\n }", "boolean growing(boolean bothDimensions) {\n if (complete()) {\n if (bothDimensions)\n return (start2D.x < stop2D.x) && (start2D.y <= stop2D.y);\n else\n return (start2D.x < stop2D.x) || (start2D.y <= stop2D.y);\n } else\n return true;\n }", "private boolean testIfPermutationIsValid(Integer[] s1, Integer[] s2, List<ChesspairingPlayer> players) {\n\t\tfor (int i = 0; i < s1.length; i++) {\n\t\t\tint indexA = s1[i];\n\t\t\tint indexB = s2[i];\n\t\t\tChesspairingGame game = new ChesspairingGame();\n\t\t\tgame.setWhitePlayer(players.get(indexA));\n\t\t\tgame.setBlackPlayer(players.get(indexB));\n\t\t\tboolean gameIsValid = testIfGameIsValid(game);\n\t\t\tif (!gameIsValid) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean checkIfFull() {\n this.isFull = true;\n for(int i=0; i<this.size; i++) {\n for(int j=0; j<this.size; j++) if(this.state[i][j].isEmpty) this.isFull = false;\n }\n }", "private boolean isAppropriate(int[] counts, int length) {\n\n if (length % 2 == 0) {\n for (int count : counts) {\n if (count != 0 && count % 2 == 1) {\n return false;\n }\n }\n }\n else {\n int oddCount = 0;\n for (int count : counts) {\n if (count != 0 && count % 2 == 1) {\n if (++oddCount > 1) {\n return false;\n }\n }\n }\n }\n\n return true;\n }", "private static void assertStatesEquals(State[] statesFsaExpected, State[] statesFsaActual) {\n\t\t\n\t\t\n\t\tArrayList<String> statesNamesExpected = new ArrayList<String>();\n\t\tArrayList<String> statesNamesActual = new ArrayList<String>();\n\t\t\n\t\t\n\t\t//populate\n\t\tfor ( State s : statesFsaExpected ){\n\t\t\tstatesNamesExpected.add(s.getName());\n\t\t}\n\t\t\n\t\tfor ( State s : statesFsaActual ) {\n\t\t\tstatesNamesActual.add(s.getName());\n\t\t}\n\t\t\n\t\t\n\t\t//check\n\t\tfor ( String expected : statesNamesExpected ){\n\t\t\tif ( ! statesNamesActual.contains(expected) ){\n\t\t\t\tfail(\"State \"+expected+\" not found\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor ( String actual : statesNamesActual ){\n\t\t\tif ( ! statesNamesExpected.contains(actual) ){\n\t\t\t\tfail(\"State \"+actual+\" not expected\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "void size() {\n assertEquals(words.size(), trie.size());\n }", "public boolean isFullHouse() {\n // TODO: complete this method. Hint: could you call the pair and three-of-a-kind\n // methods here?\n \treturn rankSet().size() ==2 && sameSet.size() == 2;\n }", "private boolean areHistoriesEqual(SchemaHistory schemaHistory, ArrayList<DBVersion> lifetime, ArrayList<Map<String,Integer>> transitions)\n\t{\n\t\treturn areSchemasEqual(schemaHistory, lifetime) && areTransitionsEqual(schemaHistory, transitions);\n\t}", "public final boolean equal() {\n\t\tif (size > 1) {\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (topMostValue == secondTopMostValue) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean empty() {\n return stk1.isEmpty() && stk2.isEmpty();\n }", "public boolean compareLength(Length l1, Length l2){\n return Double.compare(l1.value*l1.unit.baseUnitConversion, l2.value*l2.unit.baseUnitConversion) == 0;\n }", "public boolean isFull() {\n return (kv1 != null && kv2 != null);\n }", "@Test\n public void testSize() {\n testAdd();\n assertEquals(9, list1.size());\n }", "public static boolean inSameRing(MMFFMolecule mol, int a1, int a2, int size) {\n if (!mol.isRingAtom(a1) || !mol.isRingAtom(a2))\n return false;\n\n RingCollection rings = mol.getRingSet();\n\n for (int r=0; r<rings.getSize(); r++)\n if (rings.getRingSize(r) == size\n && rings.isAtomMember(r, a1)\n && rings.isAtomMember(r, a2))\n return true;\n\n return false;\n }", "private boolean isSimilar(ColumnState[] state) {\n\t\tif (state.length != getColumnCount() + hiddenCols.size())\n\t\t\treturn false;\n\t\ttry {\n\t\t\tfor (ColumnState colState : state) {\n\t\t\t\tif (!hiddenCols.containsKey(colState.getColId()))\n\t\t\t\t\tgetColumnIndex(colState.getColId());\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (IllegalArgumentException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public static boolean Match(Vector a, Vector b){\n return a.axis.length == b.axis.length;\n }", "public void testSize() {\n assertEquals(10, maze1.size());\n }", "public boolean isSubset(/*@ non_null @*/ JMLObjectSet<E> s2) {\n if (size > s2.int_size()) {\n return false;\n } else {\n for (JMLListObjectNode<E> walker = the_list;\n walker != null;\n walker = walker.next) {\n if (!s2.has(walker.val)) {\n return false;\n }\n } \n //@ assert (\\forall Object e; ; this.has(e) ==> s2.has(e));\n return true;\n } \n }", "public static boolean equals(int[] list1, int[] list2) {\r\n if (list1.length != list2.length) {\r\n return false;\r\n }\r\n\r\n return java.util.Arrays.equals(list1, list2);\r\n }", "private boolean ifFull() {\n return items.length == size;\n }", "static public boolean sequenceEquals(List source, List arg) {\n\t\tif ( source.size() != arg.size() ) {\n\t\t\treturn false;\n\t\t}\n\t\tIterator it1 = source.iterator();\n\t\tIterator it2 = arg.iterator();\n\t\twhile ( it1.hasNext() ) {\n\t\t\tObject elem1 = it1.next();\n\t\t\tObject elem2 = it2.next();\n\t\t\tif ( elem1 instanceof Integer ) {\n\t\t\t\tif ( ((Integer)elem1).intValue() != ((Integer)elem2).intValue() ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( elem1 instanceof Float ) {\n\t\t\t\t\tif ( ((Float)elem1).floatValue() != ((Float)elem2).floatValue() ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( elem1 instanceof Boolean ) {\n\t\t\t\t\t\tif ( ((Boolean)elem1).booleanValue() != ((Boolean)elem2).booleanValue() ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( !elem1.equals(elem2) ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean equals(Object other) {\n if (other == null) return false;\n else if (!(other instanceof MazeState)) return false;\n return this.getPawnOne().getPositionNr() == ((MazeState) other).getPawnOne().getPositionNr() &&\n this.getPawnTwo().getPositionNr() == ((MazeState) other).getPawnTwo().getPositionNr();\n }", "private boolean identicalBonds(List<List<IBond>> bondListList, List<IBond> bondList) {\n \n \tboolean identical = false;\n \tint count = 0;\n \tint size = 0;\n \t\n \tfor (int i = 0; i < bondListList.size(); i++) {\n\t\t\t//different amount of bonds\n \t\tif(bondListList.get(i).size() != bondList.size())\n\t\t\t\tcontinue;\n \t\t\n \t\tsize = bondListList.get(i).size();\n \t\tfor(IBond currentBond : bondListList.get(i))\n \t\t{\n \t\t\tif(bondList.contains(currentBond))\n \t\t\t\tcount++;\n \t\t\telse\n \t\t\t\tbreak;\n \t\t\t\n \t\t\tif(count == size)\n \t\t\t\tidentical = true;\n \t\t}\n\t\t}\n \treturn identical;\n }", "private static boolean Equal(State o, State goal) {\n\t\tif (o==null || goal==null) return false;\n\t\tfor (int i=0;i<3;i++)\n\t\t\tfor (int j=0;j<3;j++)\n\t\t\t\tif (o.d[i][j]!=goal.d[i][j]) return false;\n\t\treturn true;\n\t}", "@Test\r\n public void testSize1() {\r\n Assert.assertEquals(5, set1.size());\r\n }", "public void testSize() {\n assertEquals(this.stack.size(), 10, 0.01);\n assertEquals(this.empty.size(), 0, 0.01);\n }", "public boolean check_hash() {\n HashSet<E> realSet = new HashSet(this);\n return realSet.size() == this.size();\n }", "protected boolean arraysEqual(short[] other) {\n if (other == arrayOfShorts) {\n return true;\n }\n\n if (other.length != arrayOfShorts.length) {\n return false;\n }\n\n for (int i = 0; i < arrayOfShorts.length; i++) {\n if (other[i] != arrayOfShorts[i]) {\n return false;\n }\n }\n return true;\n }", "public boolean equals(Object other) {\n //first make sure that the object is an arraylist\n //and also make sure that it isnt null\n if (other == null || !(other instanceof ArrayList)) {\n return false;\n }\n \n //type cast the argument into an array, now that we know that it is one\n ArrayList<E> that = (ArrayList<E>) other;\n \n //check to see if the lengths are the same\n if (this.array.length == that.array.length) {\n //if the lengths are the same, check each value to see if they are the same\n //loop through the array only once\n for (int i = 0; i < this.array.length; i++) {\n //compare the elements of each index\n if (this.array[i] == that.array[i]) {\n //continue to check all elements\n continue;\n } else {\n //if one of the elements aren't the same, return false\n return false;\n }\n }\n } else {\n //return false if the lengths are not the same\n return false;\n }\n \n //if it gets through the loop, then all of the elements are equal \n return true;\n }", "private static boolean equals(int[] array1, int[] array2) {\n if(array1.length != array2.length)\n return false;\n \n Arrays.sort(array1);\n Arrays.sort(array2);\n \n int i = 0;\n for(; i < array1.length; ++i) {\n if(array1[i] != array2[i])\n break;\n }\n \n return (i == array1.length);\n }", "public boolean percolates() {\n\t\tint top = uf.find(0);\n\t\tint bottom = uf.find(size * size + 1);\n\t\treturn top == bottom;\n\t}", "public static void verifySpListEquals(ImList<SPTarget> lst1, ImList<SPTarget> lst2) {\n assertEquals(lst1.size(), lst2.size());\n\n for (int i=0; i<lst1.size(); ++i) {\n SPTarget t1 = lst1.get(i);\n SPTarget t2 = lst2.get(i);\n\n // The two targets won't compare .equals(), but we can just check\n // the coordinates and get enough of an idea that they are the\n // same for the purposes of testing GuideProbeTargets.\n\n assertEquals(t1.getTarget().getRa().getAs(CoordinateParam.Units.DEGREES), t2.getTarget().getRa().getAs(CoordinateParam.Units.DEGREES), 0.000001);\n assertEquals(t1.getTarget().getDec().getAs(CoordinateParam.Units.DEGREES), t2.getTarget().getDec().getAs(CoordinateParam.Units.DEGREES), 0.000001);\n }\n }", "private boolean isFull() {\n\t\treturn (size == bq.length);\n\t}", "public boolean canReproduce() {\r\n ArrayList<Cell> neighbours = getNeighbours(FIRSTLAYER);\r\n\r\n int numOfSameT = 0;\r\n int numOfEmpty = 0;\r\n int numOfFoodC = 0;\r\n\r\n for (Cell cell : neighbours) {\r\n if (isSameType(cell.getInhabit())) {\r\n numOfSameT++;\r\n } else if (cell.getInhabit() == null && isTerrainAccessiable(cell)) {\r\n numOfEmpty++;\r\n } else if (isEdible(cell.getInhabit())) {\r\n numOfFoodC++;\r\n }\r\n }\r\n\r\n return (numOfSameT >= numOfSameTypeNeighbourToReproduce() \r\n && numOfEmpty >= numOfEmptyToReproduce()\r\n && numOfFoodC >= numOfFoodCellToReproduce());\r\n }", "boolean hasSameAs();", "private static boolean kthSmallesElementFound(int[] list1, int[] list2, int nElementsList1, int nElementsList2) {\n if(nElementsList2 < 1) {\n return true;\n }\n\n if(list1[nElementsList1-1] == list2[nElementsList2-1]) {\n return true;\n }\n\n if(nElementsList1 == list1.length) {\n return list1[nElementsList1-1] <= list2[nElementsList2];\n }\n\n if(nElementsList2 == list2.length) {\n return list2[nElementsList2-1] <= list1[nElementsList1];\n }\n\n return list1[nElementsList1-1] <= list2[nElementsList2] && list2[nElementsList2-1] <= list1[nElementsList1];\n }", "public boolean checkSize(int nx, int ny, int nz) {\n \tif( nx%2 != 0 ) return false;\n \tif( nz%2 != 0 ) return false;\n \treturn true;\n }", "public boolean hasElements(List<T> items) {\n \tif(stack.size() != items.size()) //if items and the stack have different sizes\n \t\treturn false;\n \t\n \tfor(int i = 0; i < stack.size(); i++){\n \t\tif(!items.get(i).equals(stack.get(i))){ //check that the elements appear in the same order \n \t\t\treturn false;\n \t\t}\n \t}\n \treturn true;\n }", "public boolean percolates(){\n\t\tif(isPathological)\n\t\t\treturn isOpen(1,1);\n\t\t//System.out.println(\"Root top: \"+ quickUnion.find(N+2));\n\t\t\n\t\treturn (quickUnion.find(N*N+1) == quickUnion.find(0)); \t\n\t}", "public boolean checkState(){\r\n boolean checkZero = false;\r\n for (int i = 0; i<puzzleSize; i++){\r\n for (int j = 0; j<puzzleSize; j++){\r\n if (this.state[i][j] == 0)\r\n checkZero = true;\r\n if ( (this.state[i][j]<0) || (this.state[i][j]>maxValue)){\r\n System.out.println(\"Value greater than \" + maxValue + \" found.\");\r\n return false;\r\n }\r\n for (int k = 0; k<puzzleSize; k++){\r\n for (int l = 0; l<puzzleSize; l++){\r\n if ( (this.state[i][j] == this.state[k][l])&&( (i!=k) || (j!=l))){\r\n System.out.println(\"State contained duplicate value(s).\");\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (!checkZero)\r\n System.out.println(\"State did not contain an empty space. Denote an empty space with a 0.\");\r\n return checkZero;\r\n }" ]
[ "0.6937856", "0.6866047", "0.67330706", "0.62304145", "0.61206895", "0.60708547", "0.6058871", "0.60528725", "0.5958367", "0.5934609", "0.59239185", "0.5916038", "0.58209735", "0.5728735", "0.5728224", "0.5708776", "0.5697465", "0.56916356", "0.5689526", "0.5689526", "0.5689526", "0.5689526", "0.56718117", "0.5662647", "0.5636731", "0.56348854", "0.5584127", "0.5578759", "0.5571706", "0.55641365", "0.55361784", "0.55331385", "0.5531026", "0.5520345", "0.54984355", "0.5491981", "0.5471915", "0.54377675", "0.54271215", "0.53727436", "0.5364044", "0.5360975", "0.53559464", "0.5354584", "0.53510934", "0.53305894", "0.5321663", "0.53029126", "0.5274654", "0.5271882", "0.5266752", "0.525686", "0.5256747", "0.52518237", "0.52431273", "0.52394295", "0.5232064", "0.5226717", "0.5211435", "0.52111375", "0.52040935", "0.52009124", "0.5200038", "0.51989555", "0.5198708", "0.5198356", "0.51977545", "0.5189901", "0.51790816", "0.5177472", "0.5176081", "0.51720333", "0.51704663", "0.516924", "0.5162118", "0.51553243", "0.51508635", "0.51447564", "0.5144737", "0.51441693", "0.51419365", "0.51409733", "0.51333976", "0.51294714", "0.5127788", "0.51255363", "0.5122541", "0.5109398", "0.5090574", "0.50883865", "0.50841403", "0.507677", "0.50693244", "0.5067617", "0.50668687", "0.5064157", "0.5061589", "0.50611657", "0.50601155", "0.505777" ]
0.7620933
0
Returns true only if the content of each list in one state matches exactly the content of the corresponding lists in the other state. Objects.equals() is used to check equality of the contents.
private static boolean contentEqual(final I_GameState state1, final I_GameState state2) { //if a state is null there surely must be a mistake somewhere if (state1 == null || state2 == null) throw new NullPointerException("A state cannot be null when comparing"); //if ( !sizeEqual(state1, state2) ) return false; return Stream.of(new SimpleImmutableEntry<>(state1, state2)) .flatMap( //map the pair of states to many pairs of piles statePair -> Arrays.stream(E_PileID.values()) .map(pileID -> new SimpleEntry<>( statePair.getKey().get(pileID), statePair.getValue().get(pileID) ) ) ) .map(I_GameHistory::replaceNulls) .flatMap( // map the pairs of piles to many pairs of Optional<I_card>s. listPair -> IntStream //make sure to always traverse the longer list .range(0, Math.max(listPair.getKey().size(), listPair.getValue().size())) .mapToObj(i -> new SimpleEntry<>( getIfExists(listPair.getKey(), i), getIfExists(listPair.getValue(), i)) ) ) // map pairs to booleans by checking that the element in a pair are equal .map(cardPair -> Objects.equals(cardPair.getKey(), cardPair.getValue())) // reduce the many values to one bool by saying all must be true or the statement is false .reduce(true, (e1, e2) -> e1 && e2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private final boolean AreListStatesEqual(List<State> list1, List<State> list2) {\r\n if ((list1.size() != list2.size())) {\r\n return false;\r\n }\r\n \r\n for (State state : list1) {\r\n if (!list2.contains(state)) {\r\n return false;\r\n }\r\n \r\n }\r\n \r\n return true;\r\n }", "public static boolean haveIdenticalContents(List list1, List list2)\r\n {\r\n if ((list1 == null) != (list2 == null))\r\n {\r\n // One is null and other is not.\r\n return false;\r\n }\r\n if (list1 != null)\r\n {\r\n // Both are not null.\r\n if (list1.size() != list2.size())\r\n {\r\n // Different sizes.\r\n return false;\r\n }\r\n // Both not null and same size.\r\n for (int i = 0; i < list1.size(); i++)\r\n {\r\n if (list1.get(i) != list2.get(i))\r\n {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }", "public static boolean haveEqualContents(List list1, List list2)\r\n {\r\n if ((list1 == null) != (list2 == null))\r\n {\r\n // One is null and other is not.\r\n return false;\r\n }\r\n if (list1 != null)\r\n {\r\n // Both are not null.\r\n if (list1.size() != list2.size())\r\n {\r\n // Different sizes.\r\n return false;\r\n }\r\n // Both not null and same size.\r\n for (int i = 0; i < list1.size(); i++)\r\n {\r\n if (!ObjUtil.equalsOrBothNull(list1.get(i), list2.get(i)))\r\n {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }", "private static boolean compareList(List<Object> l1, List<Object> l2)\n {\n int count=0;\n for (Object o : l1)\n {\n Object temp = o;\n for (Object otemp : l2)\n {\n if (EqualsBuilder.reflectionEquals(temp, otemp))\n {\n count++;\n }\n }\n\n }\n\n if(count == l1.size()) return true;\n return false;\n\n }", "private boolean contain(Estado state, List<Estado> states) {\n\t\tfor (Estado valid : states) {\n\t\t\tif (valid.getValue() == state.getValue()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean areIdentical(IsIdenticalLists listb) {\n Node a = this.head, b = listb.head;\n while (a != null && b != null) {\n if (a.value != b.value)\n return false;\n\n /* If we reach here, then a and b are not null\n and their data is same, so move to next nodes\n in both lists */\n a = a.next;\n b = b.next;\n }\n\n // If linked lists are identical, then 'a' and 'b' must\n // be null at this point.\n return (a == null && b == null);\n }", "private boolean isSameList(CardList l1, CardList l2){\r\n\t\tif (l1.size()!=l2.size())\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tIterator<Card> i1 = l1.iterator();\r\n\t\tIterator<Card> i2 = l2.iterator();\r\n\t\twhile(i1.hasNext()){\r\n\t\t\tif (!i1.next().equals(i2.next()))\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private static boolean equalLists(List l1, List l2) {\r\n if (l1 == l2) {\r\n return true;\r\n }\r\n if (l1 == null || l2 == null) // but not both, see above\r\n {\r\n return false;\r\n }\r\n if (l1.size() != l2.size()) {\r\n return false;\r\n }\r\n boolean match = true;\r\n for (int i = 0; i < l1.size() && match; i++) {\r\n if (!l1.get(i).equals(l2.get(i))) {\r\n match = false;\r\n }\r\n }\r\n return match;\r\n }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "@Override\n\t\tpublic boolean equals(Object other) {\n\t\t\treturn Arrays.equals(state, ((MazeNode) other).state);\n\t\t}", "private static boolean identityEqual(final I_GameState state1, final I_GameState state2) {\n if (state1 == state2)\n return true;\n\n return Stream.of(new SimpleEntry<>(state1, state2))\n .flatMap( // transform the elements by making a new stream with the transformation to be used\n pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs\n // make new pair of the elements of that pile from each state\n .map(pileID -> new SimpleEntry<>(\n pair.getKey().get(pileID),\n pair.getValue().get(pileID)\n )\n )\n )\n .allMatch(pair -> pair.getKey() == pair.getValue());\n }", "public boolean areEqual(Element element1, Element element2, HashMap<String, Integer> lengthMap, GUIState state, GUIState currentState) throws MultipleListOrGridException {\n if (!isAttributeEqual(element1, element2)) {\n return false;\n }\n\n for (int i = 0; i < max(element1.elements().size(), element2.elements().size()); i++) {\n if (i == ((Element) element1).elements().size() || i == ((Element) element2).elements().size())\n return false;\n if (element1.attributeValue(NodeAttribute.Class) != null && element2.attributeValue(NodeAttribute.Class) != null &&\n (element1.attributeValue(NodeAttribute.Class).equals(NodeAttribute.ListView) && element2.attributeValue(NodeAttribute.Class).equals(NodeAttribute.ListView)\n || element1.attributeValue(NodeAttribute.Class).equals(NodeAttribute.GridView) && element2.attributeValue(NodeAttribute.Class).equals(NodeAttribute.GridView))) {\n\n if (state.getListSize() != currentState.getListSize() && state.getGridSize() != currentState.getGridSize()) {\n currentState.setIsDynamicListAndGrid(true);\n }\n if (currentState.isDynamicListAndGrid()) {\n if (lengthMap.get(getCurrentXpath(element1, getStringList(element1))) == null)\n lengthMap.put(getCurrentXpath(element1, getStringList(element1)), 0);\n\n if (!areEqual((Element) element1.elements().get(i), (Element) element2.elements().get(i), lengthMap, state, currentState)) {\n return false;\n } else {\n int lengthValue = lengthMap.get(getCurrentXpath(element1, getStringList(element1))) + 1;\n lengthMap.put(getCurrentXpath(element1, getStringList(element1)), lengthValue);\n if (lengthMap.get(getCurrentXpath(element1, getStringList(element1))) >= maxListGridSizeThreshold) {\n this.totalListGridEquivalentStateCount++;\n state.setIsEquivalentState(true);\n if (!state.getImagelist().contains(currentState.getImagelist().get(0)))\n state.addImage(currentState.getImagelist().get(0));\n state.increaseEquivalentStateCount();\n state.setIsListAndGrid(true);\n return true;\n }\n }\n } else {\n return false;\n }\n\n } else {\n if (!areEqual((Element) element1.elements().get(i), (Element) element2.elements().get(i), lengthMap, state, currentState)) {\n return false;\n }\n }\n }\n return true;\n }", "@Override\n public boolean equals(Object other) {\n if (other == null) return false;\n else if (!(other instanceof MazeState)) return false;\n return this.getPawnOne().getPositionNr() == ((MazeState) other).getPawnOne().getPositionNr() &&\n this.getPawnTwo().getPositionNr() == ((MazeState) other).getPawnTwo().getPositionNr();\n }", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof VersionedAssignmentList)) {\n return false;\n }\n\n VersionedAssignmentList otherVersionedAssignmentList = (VersionedAssignmentList) other;\n\n // state check\n return super.equals(otherVersionedAssignmentList)\n && assignmentListStateList.equals(otherVersionedAssignmentList.assignmentListStateList)\n && currentStatePointer == otherVersionedAssignmentList.currentStatePointer;\n }", "private boolean isEqualList(List<Node> a, List<Node> b, boolean value){\n\t\tList<Node> tmp1 = new ArrayList<Node>(a);\n\t\tList<Node> tmp2 = new ArrayList<Node>(b);\n\t\tfor(Node n1 : tmp1){\n\t\t\tfor(Node n2 : tmp2){\n\t\t\t\tif((value && n1.isEqualNode(n2)) || (!value && n1.isSameNode(n2)))\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean equals(LinkedList list){\n if (this.size() == list.size()){\n for (int i = 0; i < this.size(); i++){\n if(this.get(i) != list.get(i)){\n return false;\n }\n }\n return true;\n }else{ \n return false;\n } \n }", "private boolean sameElements(List firstList, List secondList)\r\n\t{\r\n\t\t\r\n\t\t// The size hould be the same, otherwise stop.\r\n\t\tif (firstList.size() != secondList.size())\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Iterate over the elements of the first list.\r\n\t\tfor (int index = 0; index < firstList.size(); index++)\r\n\t\t{\r\n\t\t\t// Check if the element is also in the second list.\r\n\t\t\tif (!secondList.contains(firstList.get(index)))\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// They heve the same elements.\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tState State = (State) obj;\n\t\tSquare aux = null;\n\t\tboolean isequal = true;\n\t\tif (getTractor().getColumn()!=State.getTractor().getColumn() || getTractor().getRow()!=State.getTractor().getRow())\n\t\t\tisequal = false;\n\t\telse {\n\t\t\tfor (int i = 0;i<getRows() && isequal; i++) {\n\t\t\t\tfor (int j = 0;j < getColumns() && isequal; j++) {\n\t\t\t\t\taux = new Square (i,j);\n\t\t\t\t\tif (cells[i][j].getSand() != State.getSquare(aux).getSand()) \n\t\t\t\t\t\tisequal = false; \n\t\t\t\t}\n\t\t\t} \n\t\t} \n\t\treturn isequal;\n\t}", "public static void main(String[] args) {\n\t\tList l=new ArrayList();\r\n\t\tl.add(12);\r\n\t\tl.add(45);\r\n\t\tl.add(15);\r\n\t\tl.add(78);\r\n\t\t\r\n\t\tList l2=new ArrayList();\r\n\t\tl2.add(12);\r\n\t\tl2.add(45);\r\n\t\tl2.add(10);\r\n\t\tl2.add(78);\r\n\t\t\r\n\t\tBoolean m=l.containsAll(l2);\r\n\t\t\r\n\t\tif(m)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Elements are same\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Not equal\");\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "private <T extends AtlasBaseTypeDef> boolean compareLists(List<T> expected, List<T> actual) {\n if (expected.isEmpty() && actual.isEmpty()) {\n return true;\n }\n\n // initially this list contains all expected EntityDefs; we'll remove the actual EntityDefs;\n // the remaining items will contain the items found in this model but not in the other one\n final List<T> missingEntityDefs = newArrayList();\n missingEntityDefs.addAll(expected);\n\n for (T entityDef : actual) {\n Iterator<T> iter = missingEntityDefs.iterator();\n while (iter.hasNext()) {\n if (iter.next().getName().equals(entityDef.getName())) {\n iter.remove();\n break;\n }\n }\n }\n // not a full comparison since it's possible for this list to be empty but the other\n // model to have extra entities - but for our purposes that's good enough\n return missingEntityDefs.isEmpty();\n }", "private static boolean sizeEqual(final I_GameState state1, final I_GameState state2) {\n //if a state is null there surely must be a mistake somewhere\n if (state1 == null || state2 == null) throw new NullPointerException(\"A state cannot be null when comparing\");\n\n // make a stream with a data structure containing both states\n return Stream.of(new SimpleEntry<>(state1, state2))\n .flatMap( // transform the elements by making a new stream with the transformation to be used\n pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs\n // make new pair of the elements of that pile from each state\n .map(pileID -> new SimpleEntry<>(\n pair.getKey().get(pileID),\n pair.getValue().get(pileID)\n )\n )\n )\n .map(I_GameHistory::replaceNulls)\n .allMatch(pair -> pair.getKey().size() == pair.getValue().size()); // check they have equal sizes\n }", "@Override\n public boolean equals(Object other) {\n return Arrays.equals(state, ((CannibalNode) other).state);\n }", "public static boolean equals(int[] list1, int[] list2) {\n boolean verdict = false;\n \n // use bubbleSort to sort each list\n list1 = bubbleSort(list1);\n list2 = bubbleSort(list2);\n \n if (list1.length == list2.length) {\n verdict = true;\n for (int i = 0; i < list1.length; i++) {\n if (list1[i] != list2[i]) {\n verdict = false;\n break;\n }\n }\n }\n return verdict;\n }", "private final boolean indicesEqual(Collection<TableName> list1, Collection<TableName> list2)\n {\n logger.info(\"indicesEqual - Enter - Index1: {}, Index2: {}\", list1, list2);\n\n // lists must have the same number of indices.\n if (list1.size() != list2.size()) {\n logger.warn(\"Indices lists are different sizes!\");\n return false;\n }\n\n // lists must have the same indices (irrespective of internal ordering).\n Iterator<TableName> iter = list1.iterator();\n while (iter.hasNext()) {\n if (!list2.contains(iter.next())) {\n logger.warn(\"Indices mismatch in list!\");\n return false;\n }\n }\n\n return true;\n }", "private boolean isEqual(Iterator<?> instance, OasisList<?> baseList) {\n\n boolean equal = true;\n int i = 0;\n while (instance.hasNext()) {\n if (!baseList.get(i++).equals(instance.next())) {\n equal = false;\n break;\n }\n }\n\n return equal;\n }", "public boolean islistmatching(List<String> expected,List<String> actual){\r\n if (expected == null && actual == null){\r\n return true;\r\n }\r\n\r\n if((expected == null && actual != null) || expected != null && actual == null || expected.size() != actual.size()){\r\n return false;\r\n }\r\n\r\n expected = new ArrayList<String>(expected);\r\n actual = new ArrayList<String>(actual);\r\n\r\n Collections.sort(expected);\r\n Collections.sort(actual);\r\n\r\n return expected.equals(actual);\r\n }", "private boolean checkIfAlreadyIsState(ArrayList<ArrayList<Integer>> states, ArrayList<Integer> state){\n boolean res=true;\n Collections.sort(state);\n\n for (int i = 0 ; i < states.size();i++){\n ArrayList<Integer> currState = states.get(i);\n\n if(currState.size() != state.size())\n continue;\n else{\n Collections.sort(currState);\n\n if(state.equals(currState)){\n res = false;\n break;\n }\n }\n }\n\n return res;\n }", "boolean equals(GameState b) {\n for (int i = 0; i < SIZE; i++) {\n for (int j = 0; j < SIZE; j++) {\n if (board[i][j] != b.board[i][j]) {\n return false;\n }\n }\n }\n return true;\n\n }", "public boolean equals(Object other) {\n\t\t\n\t\t// checks if other object is a type of ISet\n\t\tif(other instanceof ISet<?>) {\n\t\t\t\n\t\t\tISet<E> otherSet = ((ISet<E>)(other));\n\t\t\t\n \t\t// lists aren't equal if sizes don't match\n \t\tif(this.size() != otherSet.size()) {\n \t\t\treturn false;\n \t\t}\n \t\t// empty lists are equal\n \t\tif(this.size() == 0 && otherSet.size() == 0) {\n \t\t\treturn true;\n \t\t}\n \t\t\n \t\t// checks all the elements in both sets to ensure equality\n \t\tif(this.containsAll(otherSet)) {\n \t\t\treturn true;\n \t\t}\n \t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n public boolean equals(Object otherMaze) {\n if (otherMaze instanceof AbstractNavigate) {\n return Arrays.equals(((AbstractNavigate) otherMaze).getState(), this.getState());\n }\n\n return false;\n }", "@Override\n public boolean equals(Object obj) {\n if(obj == null || obj.getClass() != getClass()) return false;\n\n State state = (State)obj;\n\n // if both side equals then we say this state is equivalent to the other state\n if(state.getSideInfo(\"left\") == getSideInfo(\"left\"))\n if(state.getSideInfo(\"right\") == getSideInfo(\"right\"))\n return true;\n\n return false;\n }", "@Override public boolean equals(Object o) {\n if (this == o) { return true; }\n if ( !(o instanceof Set) ) { return false; }\n Set that = (Set) o;\n return that.size() == inner.size() &&\n containsAll(that);\n }", "private static boolean containSamePieces(Collection<Piece> pieces1,\n\t\t\tCollection<Piece> pieces2) {\n\t\t// Ensure that the two collections have the correct number of pieces.\n\t\tif (pieces1.size() != pieces2.size()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Copy the pieces to new lists so that the old piece collections are\n\t\t// not modified.\n\t\tfinal List<Piece> p1 = new ArrayList<Piece>();\n\t\tfinal List<Piece> p2 = new ArrayList<Piece>();\n\t\tfor (Piece iPiece : pieces1) {\n\t\t\tp1.add(iPiece);\n\t\t}\n\t\tfor (Piece iPiece : pieces2) {\n\t\t\tp2.add(iPiece);\n\t\t}\n\n\t\t// For each piece in the first list, remove an identical piece from the\n\t\t// second list.\n\t\tfor (Piece iPiece : p1) {\n\t\t\tif (p2.contains(iPiece)) {\n\t\t\t\tp2.remove(iPiece);\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// At the end, if all items in the first list have found matches in the\n\t\t// second list, and the two lists are the same size, the lists must\n\t\t// contain the same pieces.\n\t\treturn true;\n\t}", "static public boolean sequenceEquals(List source, List arg) {\n\t\tif ( source.size() != arg.size() ) {\n\t\t\treturn false;\n\t\t}\n\t\tIterator it1 = source.iterator();\n\t\tIterator it2 = arg.iterator();\n\t\twhile ( it1.hasNext() ) {\n\t\t\tObject elem1 = it1.next();\n\t\t\tObject elem2 = it2.next();\n\t\t\tif ( elem1 instanceof Integer ) {\n\t\t\t\tif ( ((Integer)elem1).intValue() != ((Integer)elem2).intValue() ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( elem1 instanceof Float ) {\n\t\t\t\t\tif ( ((Float)elem1).floatValue() != ((Float)elem2).floatValue() ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( elem1 instanceof Boolean ) {\n\t\t\t\t\t\tif ( ((Boolean)elem1).booleanValue() != ((Boolean)elem2).booleanValue() ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( !elem1.equals(elem2) ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "boolean hasIsEquivalent();", "public boolean checkEquality(){\n boolean flag = true;\n for (int i = 0; i < boardRows ; i++) {\n for (int j = 0; j < boardColumns; j++) {\n if(this.currentBoardState[i][j] != this.goalBoardState[i][j]){\n flag = false;\n }\n }\n }\n return flag;\n }", "@Override\r\n public boolean equals(Object obj) {\r\n // check for null\r\n if (obj == null) {\r\n System.out.println(\"State.equals() null fail\");\r\n return false;\r\n }\r\n // check that these objects are both States\r\n if (getClass() != obj.getClass()) {\r\n System.out.println(\"State.equals() class fail\");\r\n return false;\r\n }\r\n // cast to State\r\n State other = (State) obj;\r\n // check if these have the same root stored\r\n if (!this.root.equals(other.root)) {\r\n System.out.println(\"State.equals() root fail\");\r\n return false;\r\n }\r\n // check if these have the same exit state\r\n if (this.getExit() != (other.getExit())) {\r\n System.out.println(\"State.equals() exit fail\");\r\n return false;\r\n }\r\n // check if these have the same directory stack\r\n if (!this.directoryStack.equals(other.directoryStack)) {\r\n System.out.println(\"State.equals() dirStack fail\");\r\n return false;\r\n }\r\n // check if these have the same working directory\r\n return this.getWorkingDirectory().equals(other.getWorkingDirectory());\r\n }", "private boolean equalsMessages(List<EmailMessage> thisMessages, List<EmailMessage> otherMessages) {\n // Since already checked that thisEmailAddress is not null\n if (otherMessages == null) {\n return false;\n }\n if (thisMessages.size() != otherMessages.size()) {\n return false;\n }\n for (int i = 0; i < thisMessages.size(); i++) {\n if (thisMessages.get(i) == null) {\n if (otherMessages.get(i) != null) {\n return false;\n }\n }\n if (!thisMessages.get(i).getContent().equals(otherMessages.get(i).getContent())) {\n return false;\n }\n }\n return true;\n }", "@Override\n public boolean equals(Object obj){\n \tState s=(State) obj;\n if (this.state==s.getState())\n \treturn true;\n else\n \treturn false;\n \t\t\n }", "public boolean equals(Object other) {\n //first make sure that the object is an arraylist\n //and also make sure that it isnt null\n if (other == null || !(other instanceof ArrayList)) {\n return false;\n }\n \n //type cast the argument into an array, now that we know that it is one\n ArrayList<E> that = (ArrayList<E>) other;\n \n //check to see if the lengths are the same\n if (this.array.length == that.array.length) {\n //if the lengths are the same, check each value to see if they are the same\n //loop through the array only once\n for (int i = 0; i < this.array.length; i++) {\n //compare the elements of each index\n if (this.array[i] == that.array[i]) {\n //continue to check all elements\n continue;\n } else {\n //if one of the elements aren't the same, return false\n return false;\n }\n }\n } else {\n //return false if the lengths are not the same\n return false;\n }\n \n //if it gets through the loop, then all of the elements are equal \n return true;\n }", "private static void assertStatesEquals(State[] statesFsaExpected, State[] statesFsaActual) {\n\t\t\n\t\t\n\t\tArrayList<String> statesNamesExpected = new ArrayList<String>();\n\t\tArrayList<String> statesNamesActual = new ArrayList<String>();\n\t\t\n\t\t\n\t\t//populate\n\t\tfor ( State s : statesFsaExpected ){\n\t\t\tstatesNamesExpected.add(s.getName());\n\t\t}\n\t\t\n\t\tfor ( State s : statesFsaActual ) {\n\t\t\tstatesNamesActual.add(s.getName());\n\t\t}\n\t\t\n\t\t\n\t\t//check\n\t\tfor ( String expected : statesNamesExpected ){\n\t\t\tif ( ! statesNamesActual.contains(expected) ){\n\t\t\t\tfail(\"State \"+expected+\" not found\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor ( String actual : statesNamesActual ){\n\t\t\tif ( ! statesNamesExpected.contains(actual) ){\n\t\t\t\tfail(\"State \"+actual+\" not expected\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "@Override\n public boolean areContentsTheSame(Item one,\n Item two) {\n return one.equals(two);\n }", "public static boolean isEqualSet(Collection set1, Collection set2) {\n/* 99 */ if (set1 == set2) {\n/* 100 */ return true;\n/* */ }\n/* 102 */ if (set1 == null || set2 == null || set1.size() != set2.size()) {\n/* 103 */ return false;\n/* */ }\n/* */ \n/* 106 */ return set1.containsAll(set2);\n/* */ }", "protected boolean isSameSnakSet(Iterator<Snak> snaks1, Iterator<Snak> snaks2) {\n\t\tArrayList<Snak> snakList1 = new ArrayList<>(5);\n\t\twhile (snaks1.hasNext()) {\n\t\t\tsnakList1.add(snaks1.next());\n\t\t}\n\n\t\tint snakCount2 = 0;\n\t\twhile (snaks2.hasNext()) {\n\t\t\tsnakCount2++;\n\t\t\tSnak snak2 = snaks2.next();\n\t\t\tboolean found = false;\n\t\t\tfor (int i = 0; i < snakList1.size(); i++) {\n\t\t\t\tif (snak2.equals(snakList1.get(i))) {\n\t\t\t\t\tsnakList1.set(i, null);\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn snakCount2 == snakList1.size();\n\t}", "private boolean isIntersectWithSource(List<Pair<Tuple,String>> list1, List<Pair<Tuple,String>> list2) {\n\t\tboolean intersect = false;\n\t\t\n\t\tfor (Pair<Tuple,String> 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 equals( Object other ){\r\n\t\t if (!(other instanceof ChainedArrays))\r\n\t\t\t return false;\r\n\t\t Iterator<T> it1 = this.iterator();\r\n\t\t @SuppressWarnings(\"unchecked\")\r\n\t\t ChainedArrays<T> other_casted = (ChainedArrays<T>) other;\r\n\t\t Iterator<T> it2 = other_casted.iterator();\r\n\t\t boolean ans = true;\r\n\t\t while(it1.hasNext()&&it2.hasNext()){\r\n\t\t\t ans &= isEqual( it1.next( ), it2.next( ) );\r\n\t\t }\r\n\t\t return ans;\r\n\t}", "@Override\r\n\tpublic boolean equals(Object o) {\r\n\t\tif (o instanceof Seed) {\r\n\t\t\tSeed s = (Seed) o;\r\n\t\t\tCards cs1, cs2;\r\n\r\n\t\t\tif (this.size() != s.size()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tfor (int i = 0; i < s.size(); i++) {\r\n\t\t\t\tcs1 = s.get(i);\r\n\t\t\t\tcs2 = this.get(i);\r\n\t\t\t\tif (cs1.getCardsType() != cs2.getCardsType()\r\n\t\t\t\t\t\t|| cs1.getCardsValue() != cs2.getCardsValue()) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "private boolean identicalAtoms(IAtomContainer molecule1, List<IAtomContainer> fragsToCompare) {\n\t\n \tfor (int i = 0; i < fragsToCompare.size(); i++) {\n \t\t//no match\n \t\tif (molecule1.getBondCount() != fragsToCompare.get(i).getBondCount() && molecule1.getAtomCount() != fragsToCompare.get(i).getAtomCount()) \n \t\t{\n \t\t\tcontinue;\n \t\t}\n \t\t\n\n \t\tint n = 0;\n \t\t//array storing all already tried atoms\n \t\tboolean[] doneAtoms = new boolean[atomsContained + 1];\n \t\tfor (int j = 0; j < molecule1.getAtomCount(); j++) {\n \t\t\tfor (int k = 0; k < fragsToCompare.get(i).getAtomCount(); k++) \n \t\t\t{\n \t\t\t\t//compare atoms by symbol, thus only check for the same sum formula --> EXPERIMENTAL\n \t\t\t\tif(molecularFormulaRedundancyCheck)\n \t\t\t\t{\n \t\t\t\t\tif (molecule1.getAtom(j).getSymbol().equals(fragsToCompare.get(i).getAtom(k).getSymbol()) &&\n \t\t\t\t\t\t\t!doneAtoms[Integer.parseInt(fragsToCompare.get(i).getAtom(k).getID())]) {\n \t\t\t\t\tn++;\n \t\t\t\t\tdoneAtoms[Integer.parseInt(fragsToCompare.get(i).getAtom(k).getID())] = true;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\t} \t\t\t\t\n \t\t\t\t//normal test creates way more fragments!\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\tif (molecule1.getAtom(j).equals(fragsToCompare.get(i).getAtom(k))) {\n \t\t\t\t\tn++;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tif(n == molecule1.getAtomCount())\n \t\t\treturn true;\n\t\t}\n\t //no match found\n\t\treturn false;\n\t}", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof SummaryCard)) {\n return false;\n }\n\n // state check\n SummaryCard summaryCard = (SummaryCard) other;\n return tasksDueToday.getText().equals(summaryCard.tasksDueToday.getText())\n && tasksCompletedToday.getText().equals(summaryCard.tasksCompletedToday.getText());\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 (getClass() != obj.getClass())\n\t\t\treturn false;\n\t\tState other = (State) obj;\n\t\tif (state_rep == null) {\n\t\t\tif (other.state_rep != null)\n\t\t\t\treturn false;\n\t\t} else if (!state_rep.equals(other.state_rep))\n\t\t\treturn false;\n\t\treturn true;\n\t}", "static public boolean orderedsetEquals(List source, List arg) {\n\t\tif ( source.size() != arg.size() ) {\n\t\t\treturn false;\n\t\t}\n\t\tIterator it1 = source.iterator();\n\t\tIterator it2 = arg.iterator();\n\t\twhile ( it1.hasNext() ) {\n\t\t\tObject elem1 = it1.next();\n\t\t\tObject elem2 = it2.next();\n\t\t\tif ( elem1 instanceof Integer ) {\n\t\t\t\tif ( ((Integer)elem1).intValue() != ((Integer)elem2).intValue() ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( elem1 instanceof Float ) {\n\t\t\t\t\tif ( ((Float)elem1).floatValue() != ((Float)elem2).floatValue() ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( elem1 instanceof Boolean ) {\n\t\t\t\t\t\tif ( ((Boolean)elem1).booleanValue() != ((Boolean)elem2).booleanValue() ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( !elem1.equals(elem2) ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "boolean hasSameAs();", "public boolean equals(LinkedList otherList) {\n\t\tif (this.size()==otherList.size()){\n\t\t\tNode compthis = this.head;\n\t\t\tNode compother = otherList.head;\n\t\t\twhile (compthis!=null){\n\t\t\t\tif (!compthis.equals(compother)){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tcompthis = compthis.next;\n\t\t\t\tcompother = compother.next;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isEquals() {\n long len = -1L;\n\n //1. check the lengths of the words\n for(S left : slp.getAxioms()) {\n if(len == -1L) {\n len = slp.length(left);\n }\n else {\n if(len != slp.length(left)) {\n return false;\n }\n }\n }\n\n // all words are the empty word\n if(len == 0) {\n return true;\n }\n\n // 2. the length are all equals and not zero => execute the recompression\n execute();\n\n S otherSymbol = null;\n boolean first = true;\n\n // 3. chech now if for all axioms X : |val(X)| = 1 and all val(X) are equals.\n for(S left : slp.getAxioms()) {\n if(first) {\n slp.length(left, true);\n first = false;\n }\n\n if(slp.length(left) != 1) {\n return false;\n }\n else {\n S symbol = slp.get(left, 1);\n if(otherSymbol == null) {\n otherSymbol = symbol;\n }\n\n if(!symbol.equals(otherSymbol)) {\n return false;\n }\n }\n }\n\n return true;\n }", "public static boolean isSameItemset(ArrayList<String> set1, ArrayList<String> set2) {\n\t\tif(set1.size() != set2.size()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tCollections.sort(set1);\n\t\tCollections.sort(set2);\n\t\t\n\t\tfor(int i=0;i<set1.size();i++) {\n\t\t\tif(!set1.get(i).equals(set2.get(i))) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "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 compareActions(List<OFAction> otherActs){\n\t\t//short circuit the sizes aren't the same... bail\n\t\tif(this.actions.size() != otherActs.size()){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//compare each action verify they are the same\n\t\tfor(int i=0;i<this.actions.size();i++){\n\t\t\tif(!this.actions.get(i).equals(otherActs.get(i))){\n\t\t\t\t//nope not the same\n\t\t\t\treturn false;\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//made it this far so they are the same!\n\t\treturn true;\n\t}", "public boolean equals (Object obj) {\n\t\tif (this.size() != ((List) obj).size()) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tint i = 0;\n\t\t\tfor (ListNode p = myHead; p != null; p = p.myNext) {\n\t\t\t\tif (p.myItem != ((List) obj).get(i)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}", "public boolean equals(Object s)\n {\n if(!(s instanceof State))\n return false;\n \n return toString().equals(s.toString());\n }", "private boolean compareList(ArrayList<Point> solutions2, ArrayList<Point> current) {\r\n\t\treturn solutions2.toString().contentEquals(current.toString());\r\n\t}", "public boolean equals(Object o) {\r\n\t\tif (!(o instanceof State)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tState other = (State) o;\r\n\t\treturn id.equals(other.id) && flow.equals(other.flow);\r\n\t}", "public boolean equals(Object obj) {\r\n\t\tif (!(obj instanceof PassengerList))\r\n\t\t\treturn false;\r\n\r\n\t\tPassengerList other = (PassengerList) obj;\r\n\r\n\t\tfor (int i = 0; i < passengers.size(); i++) {\r\n\t\t\tif (!(passengers.get(i).equals(other.getPassengerByIndex(i))))\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static void verifyGroupListEquals(ImList<GuideGroup> lst1, ImList<GuideGroup> lst2) {\n assertEquals(lst1.size(), lst2.size());\n for (int i=0; i<lst1.size(); ++i) verifyGroupEquals(lst1.get(i), lst2.get(i));\n }", "public boolean equals(DoublyLinkedList<Element> list) {\n if(super.equals(list)) return true;\n else {\n if(this.size != list.size) return false;\n else {\n Node<Element> temp = header.getNextNode();\n Node<Element> other_temp = list.header.getNextNode();\n while (temp != last() && other_temp != list.last()) {\n if(!temp.getPreNode().equals(other_temp.getPreNode())\n || !temp.getContent().equals(other_temp.getContent())\n || !temp.getNextNode().equals(other_temp.getNextNode()))\n return false;\n temp = temp.getNextNode();\n other_temp = other_temp.getNextNode();\n }\n return true;\n }\n }\n }", "public boolean equal(StringList list2) {\n\t\tIterator it1 = stringList.listIterator();\n\t\tIterator it2 = list2.iterator();\n\t\tif(list2.len() != stringList.size()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\twhile( (it1.hasNext()) ) {\n\t\t\tSystem.out.format(\"Comparing %s%n\", it1.next());\n\t\t\tif( it1.next() != it2.next()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean equals(Object other) {\r\n if (other == null || getClass() != other.getClass() || length != ((MoneyList) other).length)\r\n return false;\r\n\r\n MoneyNode nodeThis = first;\r\n MoneyNode nodeOther = ((MoneyList) other).first;\r\n while (nodeThis != null) {\r\n // Since the two linked lists are the same length,\r\n // they should reach null on the same iteration.\r\n\r\n if (nodeThis.data != nodeOther.data)\r\n return false;\r\n\r\n nodeThis = nodeThis.next;\r\n nodeOther = nodeOther.next;\r\n } // while\r\n\r\n return true;\r\n }", "public static boolean CheckDirectlySuperList(List<Integer> list1, List<Integer> list2){\n\n Set<Integer> hashSet1 = new HashSet<>(list1);\n Set<Integer> hashSet2 = new HashSet<>(list2);\n\n boolean contain = false;\n\n if (list1.size()-list2.size()==1){\n contain = true;\n for (Integer i: hashSet2){\n if (!hashSet1.contains(i)){\n contain = false;\n break;\n }\n }\n }\n return contain;\n }", "public static boolean equalsUnordered( Collection<?> collection1, Collection<?> collection2 )\r\n {\r\n //\r\n boolean retval = collection1.size() == collection2.size();\r\n \r\n //\r\n for ( Object iObject : collection1 )\r\n {\r\n retval &= collection2.contains( iObject );\r\n }\r\n \r\n //\r\n return retval;\r\n }", "private boolean allVolumeSizesMatch(List<Long> currentVolumeSizes) {\n // If the storage systems match then check all current sizes of the volumes too, any mismatch\n // will lead to a calculation check\n List<Long> currentVolumeSizesCopy = new ArrayList<Long>();\n currentVolumeSizesCopy.addAll(currentVolumeSizes);\n for (Long currentSize : currentVolumeSizes) {\n for (Long compareSize : currentVolumeSizesCopy) {\n if (currentSize.longValue() != compareSize.longValue()) {\n return false;\n }\n }\n }\n\n _log.info(\"All volumes are of the same size. No need for capacity calculations.\");\n return true;\n }", "public boolean equals(Object other) {\n if (other == this) return true;\n if (other == null) return false;\n if (other.getClass() != this.getClass()) return false;\n Board that = (Board) other;\n if (this.dimension() != that.dimension()) return false;\n for (int i = 0; i < dimension(); i++){\n for (int j = 0; j < dimension(); j++){\n if (that.blocks[i][j] != blocks[i][j])\n return false;\n }\n }\n return true;\n }", "private static boolean intersect(String[] list1, String[] list2) {\n\n Set<String> s1 = new HashSet<String>(Arrays.asList(list1));\n Set<String> s2 = new HashSet<String>(Arrays.asList(list2));\n s1.retainAll(s2);\n\n String[] result = s1.toArray(new String[s1.size()]);\n\n return result.length > 0;\n }", "private final static boolean equivalent(Automaton automaton,\n\t\t\tBinaryMatrix equivs, Automaton.Bag b1, Automaton.Bag b2) {\n\t\tint b1_size = b1.size();\n\t\tint b2_size = b2.size();\n\n\t\tif (b1_size != b2_size) {\n\t\t\t// Observe that, unlike a set, the size of a bag will never be\n\t\t\t// changed by the identification of equivalent states. Therefore,\n\t\t\t// the size of both collection must be identical, otherwise they can\n\t\t\t// never be equivalent.\n\t\t\treturn false;\n\t\t}\n\n\t\tint[] b1_children = b1.children;\n\t\tint[] b2_children = b2.children;\n\t\t// maps vertices in b2 to those they are matched against in b1\n\t\tint[] matches = new int[b1_size];\n\t\tArrays.fill(matches, -1);\n\t\t// Used to ensure no vertex is explored more than once during\n\t\t// reconfiguration.\n\t\tboolean[] visited = new boolean[b1_size];\n\t\t\n\t\t// For every state in s1\n\t\tfor (int i = 0; i != b1_size; ++i) {\n\t\t\tint b1_child = b1_children[i];\n\t\t\tif(b1_child < 0) {\n\t\t\t\t// In this case, we have to do something different.\n\t\t\t\tif(!findNegativeMatch(i,b1_children,b2_children,equivs,matches)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tArrays.fill(visited,false);\n\t\t\t\tif(!findMatch(i,b1_children,b2_children,equivs,matches,visited)) {\n\t\t\t\t\t// If we can't find a match, then it's game over and we know for\n\t\t\t\t\t// sure these two states are not equivalent.\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public boolean isEqual(Set secondSet) {\n\t\t\n\t\tArrayList<String> firstArray = noDuplicates(stringArray);\n\t\t// Taking out duplications out of our sets by calling the noDuplicates private function\n\t\tArrayList<String> secondArray = noDuplicates(secondSet.returnArray());\n\t\t\n\t\t\n\t\tfor (int i=0; i < firstArray.size(); i++) {\n\t\t\tif (secondArray.contains(firstArray.get(i)) == false) return false;\n\t\t\t// If our second array does not contain that same element as our first array, return false\n\t\t}\n\t\t\n\t\tfor (int i=0; i < secondArray.size(); i++) {\n\t\t\tif (firstArray.contains(secondArray.get(i)) == false) return false;\n\t\t\t// If our first array does not contain that same element as our second array, return false\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public static boolean canCombineItemsets(ArrayList<String> is1, ArrayList<String> is2) {\n\t\tif(is1.size() != is2.size()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tint commonElements = 0;\n\t\t\n\t\tfor(String item : is2) {\n\t\t\tif(is1.contains(item)) {\n\t\t\t\tcommonElements += 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn (commonElements == is1.size() - 1);\n\t}", "public static boolean listEquals(ListNode one, ListNode two){\n\t \t\tif(one == null && two == null) return true;\n\t \t\t//System.out.println(one);\n\t \t\t//System.out.println(two);\n\t \t\twhile(one != null || two != null){\n\t\t \t\tif(one == null && two != null || one != null && two == null) return false;\n\t\t \t\tif(one.val != two.val) return false;\n\t\t \t\tone = one.next;\n\t\t \t\ttwo = two.next;\n\t \t\t}\n\t \t\treturn true;\n\t \t}", "public boolean equals(PriorityQueue<Room> rooms1, PriorityQueue<Room> rooms2) {\n if (rooms1.size() != rooms2.size()) {\n return false;\n } else {\n int size = rooms1.size();\n for (int i = 0; i < size; i++) {\n if (!rooms1.poll().equals(rooms2.poll())) {\n return false;\n }\n }\n return true;\n }\n }", "public boolean equals(MultiStringColl obj) {\n if (how_many != obj.how_many) {\n return false;\n }\n String a1[] = new String[how_many];\n String a2[] = new String[how_many];\n int i = 0;\n btToArray(c, a1, i);\n i = 0;\n btToArray(obj.c, a2, i);\n\n boolean ret = true;\n for (i = 0; ret && i < how_many; i++) {\n ret = (a1[i].equals(a2[i]));\n }\n\n return ret;\n }", "public static void main(String args[]) {\n IsIdenticalLists llist1 = new IsIdenticalLists();\n IsIdenticalLists llist2 = new IsIdenticalLists();\n\n /* The constructed linked lists are :\n llist1: 3->2->1\n llist2: 3->2->1 */\n\n llist1.push(1);\n llist1.push(2);\n llist1.push(3);\n\n llist2.push(1);\n llist2.push(2);\n llist2.push(3);\n\n if (llist1.areIdentical(llist2) == true)\n System.out.println(\"Identical \");\n else\n System.out.println(\"Not identical \");\n\n }", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n if (!(other instanceof Workout)) {\n return false;\n }\n\n Workout otherWorkout = (Workout) other;\n return otherWorkout.getWorkoutName().equals(getWorkoutName())\n && otherWorkout.getWorkoutExercises().equals(getWorkoutExercises());\n }", "public boolean equals(Object o) {\n\t\tif(o != null) {\n\n\n\t\t\tif(getClass() != o.getClass()) return false;\n\t\t\tSinglyLinkedList other = (SinglyLinkedList) o;\n\t\t\tif(size != other.size()) {\n\t\t\t\tNode walkA = head;\n\t\t\t\tNode walkB = other.head;\n\n\t\t\t\twhile(walkA != null) {\n\t\t\t\t\tif(!walkA.getElement().equals(walkB.getElement())) return false;\n\t\t\t\t\twalkA = walkA.getNext();\n\t\t\t\t\twalkB = walkB.getNext();\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }", "public boolean equals(Object o){\n Game comparedGame = (Game) o;\n\n //Comparing current player names\n if (!comparedGame.getCurrentPlayer().equals(this.getCurrentPlayer())) return false;\n\n //Comparing queued player order\n for (int i = 0; i<this.getPlayersList().size(); i++){\n if (!this.getPlayersList().get(i).equals(comparedGame.getPlayersList().get(i))) return false;\n }\n\n //Comparing all territories\n for(int i = 0; i<this.getGenericWorldMap().getAllTerritories().size(); i++){\n if (!this.getGenericWorldMap().getAllTerritories().get(i).equals(comparedGame.getGenericWorldMap().getAllTerritories().get(i)))return false;\n }\n\n return true;\n }", "private boolean areHistoriesEqual(SchemaHistory schemaHistory, ArrayList<DBVersion> lifetime, ArrayList<Map<String,Integer>> transitions)\n\t{\n\t\treturn areSchemasEqual(schemaHistory, lifetime) && areTransitionsEqual(schemaHistory, transitions);\n\t}", "public static boolean ArrayListContainArrayList(List<Integer> list1, List<Integer> list2){\n Set<Integer> hashSet1 = new HashSet<>(list1);\n Set<Integer> hashSet2 = new HashSet<>(list2);\n\n boolean contain = true;\n\n for (Integer i: hashSet2){\n if (!hashSet1.contains(i)){\n contain = false;\n break;\n }\n }\n return contain;\n }", "@Override\n public boolean equals(Object object) {\n DFAState otherState = (DFAState) object;\n return this.hashCode == otherState.hashCode();\n }", "@Override\n\tpublic boolean equals( Object other) {\n\n\t\tif( !( other instanceof BooleanStateValue)) {\n return false;\n }\n\n\t\tBooleanStateValue otherValue = (BooleanStateValue) other;\n\n\t\treturn _storage == otherValue._storage;\n\t}", "public static void verifySpListEquals(ImList<SPTarget> lst1, ImList<SPTarget> lst2) {\n assertEquals(lst1.size(), lst2.size());\n\n for (int i=0; i<lst1.size(); ++i) {\n SPTarget t1 = lst1.get(i);\n SPTarget t2 = lst2.get(i);\n\n // The two targets won't compare .equals(), but we can just check\n // the coordinates and get enough of an idea that they are the\n // same for the purposes of testing GuideProbeTargets.\n\n assertEquals(t1.getTarget().getRa().getAs(CoordinateParam.Units.DEGREES), t2.getTarget().getRa().getAs(CoordinateParam.Units.DEGREES), 0.000001);\n assertEquals(t1.getTarget().getDec().getAs(CoordinateParam.Units.DEGREES), t2.getTarget().getDec().getAs(CoordinateParam.Units.DEGREES), 0.000001);\n }\n }", "private boolean areTransitionsForSchemaEqual(Set<foreignkeyshistory.SchemaTransition> schemaTransitions, Map<String,Integer> otherTransitions)\n\t{\n\t\t\n\t\tfor (foreignkeyshistory.SchemaTransition schemaTransition : schemaTransitions)\n\t\t{\n\t\t\tif (!transitionExists(schemaTransition, otherTransitions)){ return false; }\n\t\t}\n\t\t\n\t\tfor (Map.Entry<String, Integer> entry : otherTransitions.entrySet())\n\t\t{\n\t\t\tif (!transitionExists(entry.getKey(), entry.getValue(), schemaTransitions)){ return false; }\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public boolean equals(/*@ nullable @*/ Object ls2) {\n if (ls2 != null && ls2 instanceof JMLListEqualsNode) {\n JMLListEqualsNode<E> othLst = (JMLListEqualsNode<E>)ls2;\n JMLListEqualsNode<E> thisLst = this;\n //@ maintaining (* all earlier elements of both lists are elem_equals *);\n while (thisLst != null && othLst != null) {\n if (!elem_equals(thisLst.val, othLst.val)) {\n return false;\n }\n thisLst = thisLst.next;\n othLst = othLst.next;\n }\n return (othLst == thisLst); // both must be null.\n } else {\n return false;\n }\n }", "private boolean relationshipDefsMatch(AtlasTypesDef typesDef) {\n return compareLists(this.getRelationshipDefs(), typesDef.getRelationshipDefs());\n }", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof PersonCard)) {\n return false;\n }\n\n // state check\n PersonCard card = (PersonCard) other;\n return displayedIndex == card.getDisplayedIndex()\n && staff.equals(card.staff);\n }", "@Override\n\tpublic boolean equals(Object other) { \n\t\tif (other instanceof Fish) {\n\t\t\tFish otherFish =((Fish) other);\n\t\t\treturn this.xloc == otherFish.getXLoc() && this.yloc == otherFish.getYLoc()\n\t\t\t\t\t\t\t\t&& this.isCaught == otherFish.isCaught && this.direction\n\t\t\t\t\t\t\t\t== otherFish.direction && this.species == otherFish.species;\n\t\t}\n\t\treturn false;\n\t}", "public boolean compareObjects(Object object1, Object object2, AbstractSession session) {\n Object firstCollection = getRealCollectionAttributeValueFromObject(object1, session);\n Object secondCollection = getRealCollectionAttributeValueFromObject(object2, session);\n ContainerPolicy containerPolicy = getContainerPolicy();\n\n if (containerPolicy.sizeFor(firstCollection) != containerPolicy.sizeFor(secondCollection)) {\n return false;\n }\n\n if (containerPolicy.sizeFor(firstCollection) == 0) {\n return true;\n }\n Object iterFirst = containerPolicy.iteratorFor(firstCollection);\n Object iterSecond = containerPolicy.iteratorFor(secondCollection);\n\n //loop through the elements in both collections and compare elements at the\n //same index. This ensures that a change to order registers as a change.\n while (containerPolicy.hasNext(iterFirst)) {\n //fetch the next object from the first iterator.\n Object firstAggregateObject = containerPolicy.next(iterFirst, session);\n Object secondAggregateObject = containerPolicy.next(iterSecond, session);\n\n //fetch the next object from the second iterator.\n //matched object found, break to outer FOR loop\t\t\t\n if (!getReferenceDescriptor().getObjectBuilder().compareObjects(firstAggregateObject, secondAggregateObject, session)) {\n return false;\n }\n }\n return true;\n }", "public boolean equals( Combination other ) {\n if(this.one== other.one && this.two == other.two && this.three == other.three && other != null){\n return true;\n }\n else return false;\n }", "public static boolean compareLists(LinkedList lhs, LinkedList rhs) {\r\n\t\tif (lhs == null || rhs == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tIntegerNode iter1 = lhs.getHead();\r\n\t\tIntegerNode iter2 = rhs.getHead();\r\n\r\n\t\twhile (iter1 != null && iter2 != null) {\r\n\t\t\tif (!iter1.equals(iter1)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\titer1 = iter1.getNext();\r\n\t\t\titer2 = iter2.getNext();\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "public boolean equals(AsNode other) {\n\t\treturn this.state.getHash() == other.state.getHash();\n\t}", "public boolean same(GameState c, GameState g) \n\t{\n\t\tfor(int x = 0; x<18; x++) //loop through the boards\n\t\t{\n\t\t\tif(c.getBoard()[x] != g.getBoard()[x]) //if one value is not the same in the afrra return false\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;//if they all are the same return true\n\t}", "private final static boolean equivalent(Automaton automaton,\n\t\t\tBinaryMatrix equivs, Automaton.List il, Automaton.List jl) {\n\t\tint il_size = il.size();\n\t\tint jl_size = jl.size();\n\t\tif (il_size != jl_size) {\n\t\t\t// List have different sizes, so cannot be equivalent.\n\t\t\treturn false;\n\t\t} else {\n\t\t\t// Lists have the same size, so check each child is equivalent in\n\t\t\t// sequence\n\t\t\tint[] il_children = il.children;\n\t\t\tint[] jl_children = jl.children;\n\t\t\tfor (int k = 0; k != il_size; ++k) {\n\t\t\t\tint il_child = il_children[k];\n\t\t\t\tint jl_child = jl_children[k];\n\t\t\t\tif (il_child < 0 || jl_child < 0) {\n\t\t\t\t\t// In this case, one or both of the child states are\n\t\t\t\t\t// virtual. Thus, we cannot look them up in the equivs\n\t\t\t\t\t// relation, and must compare directly (which is safe).\n\t\t\t\t\tif (il_child != jl_child) {\n\t\t\t\t\t\t// Children are not equivalent so fail\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} else if (!equivs.get(il_child, jl_child)) {\n\t\t\t\t\t// Children are not equivalent so fail\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// All children must have been equivalent\n\t\t\treturn true;\n\t\t}\n\t}", "private static boolean Equal(State o, State goal) {\n\t\tif (o==null || goal==null) return false;\n\t\tfor (int i=0;i<3;i++)\n\t\t\tfor (int j=0;j<3;j++)\n\t\t\t\tif (o.d[i][j]!=goal.d[i][j]) return false;\n\t\treturn true;\n\t}", "private static boolean areBundlesEqual(Bundle lhs, Bundle rhs) {\n if (!lhs.keySet().equals(rhs.keySet())) {\n // Keys differ - bundles are not equal.\n return false;\n }\n for (String key : lhs.keySet()) {\n if (!areEqual(lhs.get(key), rhs.get(key))) {\n return false;\n }\n }\n return true;\n }" ]
[ "0.79567224", "0.6700266", "0.66720486", "0.6625868", "0.66063744", "0.6589261", "0.6556432", "0.6538399", "0.6522661", "0.64845294", "0.6467478", "0.6460218", "0.64558524", "0.64327353", "0.6430924", "0.6400357", "0.6377091", "0.637263", "0.63639474", "0.63210744", "0.63149965", "0.6308059", "0.6304775", "0.63038045", "0.6303561", "0.6208508", "0.6205116", "0.6203447", "0.62009835", "0.61984324", "0.6189919", "0.6186938", "0.61809343", "0.61601704", "0.6150956", "0.6147291", "0.6135795", "0.6131367", "0.6080902", "0.6078559", "0.60738873", "0.6042734", "0.6041443", "0.6038538", "0.60146576", "0.6007804", "0.6005864", "0.6004173", "0.59926957", "0.59749836", "0.596473", "0.5963344", "0.59472454", "0.59302455", "0.59291446", "0.5917357", "0.58986336", "0.58914095", "0.5884108", "0.58840406", "0.58566743", "0.5843275", "0.58393264", "0.58361715", "0.58337355", "0.5829812", "0.5812113", "0.5790254", "0.57865995", "0.57796633", "0.5779495", "0.57776", "0.57720184", "0.5768375", "0.5766166", "0.57560194", "0.57473785", "0.573872", "0.5721883", "0.57215655", "0.57196444", "0.5715924", "0.57158214", "0.5712405", "0.57070094", "0.5705138", "0.568787", "0.56862575", "0.5679879", "0.56776476", "0.5675481", "0.5650535", "0.56490356", "0.56476456", "0.564515", "0.5638477", "0.56369644", "0.5633311", "0.5628504", "0.5620186" ]
0.74987614
1
String name = request.getParameter("name");
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String name = new String(request.getParameter("name").getBytes("iso-8859-1"),"utf-8"); UserService service = new UserServiceImpl(); User user = service.findUser(name); request.setAttribute("user", user); request.getRequestDispatcher("/jsp/edituser.jsp").forward(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getParameter(HttpServletRequest request, String name) throws ValidationException;", "public String getParameter(String name) throws IOException {\n if(form == null) {\n form = builder.getInstance();\n }\n return form.get(name);\n }", "private String getParameter(String name, HttpServletRequest request) {\r\n String value = request.getParameter(name);\r\n if (value == null || \"\".equals(value)) {\r\n return null;\r\n\r\n } else {\r\n return value;\r\n }\r\n }", "public String getPara(String name) {\n\t\treturn request.getParameter(name);\n\t}", "private String getParameter(HttpServletRequest req, String name) {\n String value = req.getParameter(name);\n return value == null ? \"\" : value.trim();\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\nthrows ServletException, IOException {\nString userName = request.getParameter(\"username\");\n// retrieve the PrintWriter object and use it to output the greeting\nresponse.setContentType(\"text/html;charset=UTF-8\");\nPrintWriter out = response.getWriter();\ntry{\nout.println(\"<html>\");\nout.println(\"<head><title>GetParameter Servlet</title></head>\");\nout.println(\"<body>\");\nout.println(\"<h1>\");\nout.println(\"HELLO, \" + userName + \"!\");\nout.println(\"</h1>\");\nout.println(\"</body>\");\nout.println(\"</html>\");\n}\nfinally{\nout.close();\n}\n}", "public String getParameter(String name) {\n String[] values = getParameterValues(name);\n if (values != null && values.length > 0) {\n return values[0];\n }\n else {\n return null;\n }\n }", "protected String getStringParam(HttpServletRequest request, String name) {\r\n String[] p = request.getParameterValues(name);\r\n \r\n if (p == null) {\r\n return null;\r\n } else {\r\n return p[0];\r\n }\r\n }", "public String getParameter(String name) {\n String[] values = getParameterValues(name);\n return (values != null) ? values[0] : null;\n }", "public String getParameter(String name)\n {\n return parameters.get(name);\n }", "Object getParameter(String name);", "public final String getParameter(String name) {\n return getParameter(name, false);\n }", "public String getParameter(String name) {\n\t\treturn parameters.get(name);\n\t}", "public String getParameter(String name) {\r\n\t\treturn parameters.get(name);\r\n\t}", "public String getParameter(String name) {\r\n return _parameters.get(name);\r\n }", "private String getParameter(HttpServletRequest request, String name, String defaultValue) {\n String value = request.getParameter(name);\n if (value == null) {\n return defaultValue;\n }\n return value;\n }", "public String getParameter( String name )\n {\n return getParameter(VAL, name, null, false);\n }", "@Override\r\nprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tPrintWriter a=resp.getWriter();\r\n\tint aid=Integer.parseInt(req.getParameter(\"aid\"));\r\n\tString name=req.getParameter(\"anames\");\r\n\ta.println(\"welcome \"+name);\r\n}", "private static String getHTTPRequestParameter(PortletRequest request,\n String name) {\n String value = request.getParameter(name);\n if (value == null) {\n String portalInfo = request.getPortalContext().getPortalInfo()\n .toLowerCase();\n if (portalInfo.contains(\"liferay\")) {\n value = getLiferayHTTPRequestParameter(request, name);\n } else if (portalInfo.contains(\"gatein\")) {\n value = getGateInHTTPRequestParameter(request, name);\n }\n }\n return value;\n }", "public static String getParameter(MCRServletJob job, String name) {\n String value = job.getRequest().getParameter(name);\n return value == null ? \"\" : value.trim();\n }", "@Override\n\tpublic String getParameter(String name) {\n\t\treturn null;\n\t}", "@Override\n\t\tpublic String getParameter(String name) {\n\t\t\treturn null;\n\t\t}", "public String getParameterFromP();", "protected String getEntryName( HttpServletRequest request )\n {\n return (String) request.getParameter( ENTRY_NAME_HTTP_PARAM );\n }", "protected String getParamFromRequest(HttpServletRequest request, String key) {\n return request.getParameter(key);\n }", "java.lang.String getFormName();", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n PrintWriter writer = resp.getWriter();\n\n if (req.getParameter(\"name\") == null) {\n resp.setStatus(HttpServletResponse.SC_BAD_REQUEST);\n return;\n }\n\n writer.println(\"<!DOCTYPE html>\");\n writer.println(\"<html>\");\n writer.println(\"<body>\");\n writer.println(\"Hello \" + req.getParameter(\"name\") + \"!<br />\");\n writer.println(\"</body>\");\n writer.println(\"</html>\");\n\n// if (req.getParameter(\"name\").equals(user.getName()))\n// writer.println(\"Hello \" + req.ge);\n// else {\n// writer.println\n// }\n }", "public Object getVariable(HttpServletRequest request, String name) {\n\t\tObject obj = request.getParameter(name);\n\t\tif (obj == null) {\n\t\t\tobj = request.getAttribute(name);\n\t\t\tif (obj == null) {\n\t\t\t obj = request.getSession().getAttribute(name);\n\t\t\t if (obj == null) {\n\t\t\t obj = getCookie(request, name);\n\t\t\t if (obj == null) {\n\t\t\t\t obj = getServletContext().getAttribute(name);\n\t\t\t }\n\t\t\t }\n\t\t\t}\n\t\t}\n\t\treturn obj;\n\t}", "public String getParameter(String name) throws IllegalArgumentException {\n\t if ( LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"getParameter() \" \n\t\t+ name);\n Via via=(Via)sipHeader;\n \n if (name == null) throw new\n IllegalArgumentException(\"JAIN-EXCEPTION: null argument\");\n return via.getParameter(name);\n }", "String getRequest();", "public String getPara(String name, String defaultValue) {\n\t\tString result = request.getParameter(name);\n\t\treturn result != null && !\"\".equals(result) ? result : defaultValue;\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\n response.setContentType(\"text/html\");\r\n PrintWriter writer = response.getWriter();\r\n String userName = request.getParameter(\"userName\");\r\n HttpSession session = request.getSession();\r\n if (userName != \"\" && userName != null){\r\n \r\n session.setAttribute(\"savedUserName\", userName);\r\n }\r\n \r\n writer.println(\" Request parameter has username as \" + userName);\r\n writer.println(\" Session parameter has username \" + (String) session.getAttribute(\"savedUserName\"));\r\n //out.println(\"Hello \" + userName);\r\n \r\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tlog.info(\"Servlet is accesssed via GET method\");\r\n\t\tlog.info(\"Preparing the response!\");\r\n\t\tPrintWriter out = response.getWriter();\r\n\t\tString name = request.getParameter(\"name\");\r\n\t\tif(name==null || name.trim().length()<1) {\r\n\t\t\tlog.warn(\"The Name parameter was absent!\");\r\n\t\t\tname=\"Unknown\";\r\n\t\t}\r\n\t\tlog.error(\"The random error!\");\r\n\t\tout.close();\r\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n}", "String getParameter(String key);", "String getRequestParam(HttpServletRequest request, String param)\n {\n\t if (request != null) \n { \n\t String paramVal = request.getParameter(param); \n\t\t return paramVal;\n\t }\n\t return null;\n }", "private String getValueFromRequest(String key, HttpServletRequest request) {\n if (!StringUtils.isEmpty(key) && null != request) {\n return request.getParameter(key);\n }\n return null;\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws \r\n\t\tServletException, IOException{\r\n\t\t \r\n\t\t String name = request.getParameter(\"name\"); //// Parameter pass from browser as request. ex: http://localhost:8080/login.do?name=ehsan\r\n\t\t String password = request.getParameter(\"password\");\r\n\t\t \r\n\t\t boolean isuservalid = uservalidationservice.isUserValid(name, password);\r\n\t\t if(isuservalid) {\r\n\t\t\t request.getSession().setAttribute(\"Name\", name); // setAttribute(\"name of atribute\", value of name)/(String name, Object obj)\r\n\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t//// setting an atribut into request. servlet take the parameter and put it as atribute into request so Jsp can see it.\r\n\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t response.sendRedirect(\"/list-todos.do\"); \r\n\t\t }\r\n\t\t else {\r\n\t\t\t// request.setAttribute(\"errorMessage\", \"Sorry Worng Craditioal, Try Again!!!\");\r\n\t\t\t request.getRequestDispatcher(\"/WEB-INF/views/login.jsp\").forward(request, response);\r\n\t\t }\r\n\t }", "public Object getParameter(String name) {\n/* 192 */ Args.notNull(name, \"Parameter name\");\n/* */ \n/* 194 */ Object result = null;\n/* */ \n/* 196 */ if (this.overrideParams != null) {\n/* 197 */ result = this.overrideParams.getParameter(name);\n/* */ }\n/* 199 */ if (result == null && this.requestParams != null) {\n/* 200 */ result = this.requestParams.getParameter(name);\n/* */ }\n/* 202 */ if (result == null && this.clientParams != null) {\n/* 203 */ result = this.clientParams.getParameter(name);\n/* */ }\n/* 205 */ if (result == null && this.applicationParams != null) {\n/* 206 */ result = this.applicationParams.getParameter(name);\n/* */ }\n/* 208 */ return result;\n/* */ }", "public String getParam(String name) {\n\t\treturn getParam(name, null);\n\t}", "public static String getParam(String paramName) {\n \treturn FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(paramName);\n }", "protected String getParameter(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n\n return mapping.getParameter();\n\n }", "ChangeName.Req getChangeNameReq();", "String getCookie(HttpServletRequest request, String name) throws ValidationException;", "public String getParamValue(String name) {\n\t\treturn params.get(name);\n\t}", "@RequestMapping(value = \"hello\", method = {RequestMethod.GET, RequestMethod.POST})\n public String hello(@RequestParam String name, Model model) {\n model.addAttribute(\"greeting\", \"Hello \" + name + \"!\");\n return \"hello\";\n }", "String getName( String name );", "public String getParam(String name) {\n // For now, we ignore multiple instances of the same parameter (which is otherwise valid).\n // Also, this is O(n). If it ever becomes important, switch to HashMap<LinkedList>, though\n // order will be lost.\n\n for (NameValuePair pair : queryValues) {\n if (pair.name.equals(name)) {\n return pair.value;\n }\n }\n\n return null;\n }", "String getHeader(HttpServletRequest request, String name) throws ValidationException;", "public static String getParameter( HttpServletRequest request, String paramName ) {\n return getParameter( request, paramName, false );\n }", "public static String getParameter( HttpServletRequest request, String paramName ) {\n return getParameter( request, paramName, false );\n }", "protected Object findInRequest(final ServletRequest request, final String attributName) {\r\n\r\n Object attr = request.getParameter(attributName);\r\n if (attr == null) {\r\n attr = request.getAttribute(attributName);\r\n }\r\n return attr;\r\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\n response.setContentType(\"text/html\");\r\n PrintWriter out = response.getWriter();\r\n //String userName = request.getParameter(\"userName\");\r\n //String fullName = request.getParameter(\"fullName\");\r\n //out.println(\"Hello welcome to the web application \" + userName + \" We know your full name is \" + fullName);\r\n // String prof = request.getParameter(\"prof\");\r\n //out.println(\"you are a \" + prof);\r\n // String location = request.getParameter(\"location\");\r\n String [] location = request.getParameterValues(\"location\");\r\n // length is a method \r\n out.println(\"you are at \" + location.length + \" places\");\r\n \r\n for(int i=0; i<location.length; i++){\r\n out.println(location [i]);\r\n }\r\n \r\n }", "@RequestMapping(\"/processFormVersionTwo\")\npublic String letsShoutDude(HttpServletRequest request ,Model model )\n{\n\t// read request parameter from html form\n\tString theName = request.getParameter(\"studentName\");\n\t//convert data to all caps \n\ttheName = theName.toUpperCase();\n\t//create the message\n\tString result = \"YO YO !! \" +theName;\n\t// add msg to model\n\tmodel.addAttribute(\"message\",result);\n\n return\"helloworld\";\n \n}", "public String[] getParaValues(String name) {\n\t\treturn request.getParameterValues(name);\n\t}", "String getParam( String paraName );", "public String getParameterFromH();", "public String getParameterFromX();", "@RequestMapping(\"/processForm\")\n public String processForm(HttpServletRequest request, Model model) {\n String studentName = request.getParameter(\"studentName\");\n String convertedName = studentName != null ? studentName.toUpperCase() : null;\n String result = \"Yo! \" + convertedName;\n model.addAttribute(\"message\", result);\n\n return \"helloWorld\";\n }", "@RequestMapping(\"/processFormVersion2\")\n public String letShoutDude(HttpServletRequest request, Model model)\n {\n //read the request paramether\n String theName=request.getParameter(\"studentName\");\n //convert data to uppercase\n theName=theName.toUpperCase();\n //create message\n String rezult=\"Yo \"+theName+\" !\";\n //add message to the model\n model.addAttribute(\"message\",rezult);\n return \"helloworld\";\n }", "WebElement getNameField();", "public static String getQueryValueFromUrl(String url, String name) { \n \n URL theUrl;\n try {\n theUrl = new URL(url);\n } catch (MalformedURLException e) {\n return \"\";\n }\n \n String query = theUrl.getQuery();\n if (query != null && !query.isEmpty()) {\n String[] params = query.split(\"&\"); \n for (String param : params) {\n String[] pair = param.split(\"=\");\n if (name.equals(pair[0]) && pair.length > 1) {\n return pair[1];\n } \n } \n }\n return \"\"; \n }", "public static String getParameter( HttpServletRequest request, String paramName, boolean emptyStringsOK ) {\n String temp = request.getParameter(paramName);\n if( temp != null ) {\n if( temp.equals(\"\") && !emptyStringsOK ) {\n return null;\n }\n else {\n return temp;\n }\n }\n else {\n return null;\n }\n }", "public static String getParameter( HttpServletRequest request, String paramName, boolean emptyStringsOK ) {\n String temp = request.getParameter(paramName);\n if( temp != null ) {\n if( temp.equals(\"\") && !emptyStringsOK ) {\n return null;\n }\n else {\n return temp;\n }\n }\n else {\n return null;\n }\n }", "@RequestMapping(value={\"/name/{name:.+}\"}, method={RequestMethod.GET})\n \tpublic ModelAndView handleName(@PathVariable String name, @RequestParam(required=false) String redirect){\n \t\t\n \t Map<String,Object> model = new HashMap<String,Object>();\n \t Map<String,Object> extra = new HashMap<String,Object>();\n \n \t Object data = nameService.retrieveNameData(name, redirect,extra);\n \t if( data == null){\n \t \tthrow new ResourceNotFoundException();\n \t }\n \t model.put(\"data\",data); \n \t model.put(\"extra\",extra);\n \t \n \t\treturn new ModelAndView(\"name\", model);\n \t}", "public String getName() {return this.name.getText();}", "@Override\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t\tBufferedReader br = request.getReader();\n\t\t\n\t\tSystem.out.println(br.readLine());\n\t\t\n\t\tSystem.out.println(request.getParameter(\"name\"));\n//\t\t\n\t\tPrintWriter pw = response.getWriter();\n\t\t\n\t\tpw.println(\"ajaxTest8return\");\n\t\t\n\t}", "protected Object findInRequest(final HttpServletRequest request, final String attributName) {\r\n\r\n Object attr = request.getParameter(attributName);\r\n if (attr == null) {\r\n attr = request.getAttribute(attributName);\r\n }\r\n return attr;\r\n }", "public String getParameterValue(String name) {\n\treturn (String) _parameters.get(name);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n String userName = request.getParameter(\"name\");\n String language = request.getParameter(\"language\");\n String hometown = request.getParameter(\"hometown\");\n if(userName==null)\n \t userName=\"Unknown\";\n if(language==null)\n \t language=\"Unknown\";\n if(hometown==null)\n \t hometown=\"Unknown\";\n response.setContentType(\"text/html\");\n PrintWriter out = response.getWriter();\n out.write(\"<h1>Welcome, \" + userName + \"</h1>\");\n out.write(\"<h1>Your favorite language is: \" + language + \"</h1>\");\n out.write(\"<h1>Your hometown is: \" + hometown + \"</h1>\");\n }", "public String extractRequestParamerter(HttpServletRequest request, String parameterName, String logicalName, boolean validate) {\n String parameterValue = request.getParameter(parameterName);\n if (!validate)\n return parameterValue;\n\n if (StringUtils.isBlank(parameterValue)) {\n String name = logicalName != null ? logicalName : parameterName;\n throw new UserNDotException(name + \" not Supplied or is Empty\");\n }\n\n\n parameterValue = parameterValue.trim();\n return parameterValue;\n }", "@RequestMapping(\"/showDetails{email}\")\npublic String applyLgeave(@RequestParam String email,HttpServletRequest request)\n{\n\tEmployeeRegmodel employeeobj = ergserv.findByEmailIdh(email);\n\tString name= employeeobj.getEmployee_fullname();\n\tint id=employeeobj.getEmployee_id();\n\tString emailadd=employeeobj.getEmail();\n\tString father = employeeobj.getEmployee_fname();\n\tString date = employeeobj.getEmployee_dob();\n\tlong phone = employeeobj.getEmployee_phoneno();\n\tString add = employeeobj.getEmployee_address();\n\tString password = employeeobj.getEmployee_password();\n\tSystem.out.println(name);\n\t\n\t\n\trequest.setAttribute(\"father\", father);\n\trequest.setAttribute(\"name\", name);\n\trequest.setAttribute(\"id\", id);\n\trequest.setAttribute(\"mail\", emailadd);\n\trequest.setAttribute(\"dt\", date);\n\trequest.setAttribute(\"ph\", phone);\n\trequest.setAttribute(\"address\", add);\n\trequest.setAttribute(\"pass\", password);\n\t\n\treturn \"profile.jsp\";\n\t\n}", "Parameter getParameter();", "@RequestMapping(\"/processFormVersionThree\")\npublic String processFormVersionThree(@RequestParam(\"studentName\")String theName ,Model model )\n{\n\ttheName = theName.toUpperCase();\n\t//create the message\n\tString result = \" I love \" +theName;\n\t// add msg to model\n\tmodel.addAttribute(\"message\",result);\n\n return\"helloworld\";\n \n}", "public String getQueryParameter(String name) {\n\t\tcheckArgument(name != null && !name.isEmpty(), \"Invalid parameter name\");\n\t\treturn query.get(name);\n\t}", "private boolean isServletParam(String name)\n {\n if (name == null)\n return false;\n if (name.startsWith(PARAM_PREFIX))\n return true;\n return false;\n }", "@RequestMapping(value = \"/testRequestMethod\", method = { RequestMethod.GET, RequestMethod.POST })\n @ResponseBody\n public String testF(final HttpServletRequest request) {\n System.out.println(\"testReqeustMethod\");\n final String key = request.getParameterNames().nextElement();\n final String value = request.getParameter(key);\n System.out.println(key + \"(\" + value + \")\");\n\n return \"/module_index<br>\" + \"Parameter name: \" + key + \"<br>Parameter value: \" + value;\n }", "@Override \n public String getParameter(String name) { \n \t// System.out.println(\"The original name received from getParameter() is:\"+name); \n String value = super.getParameter(encodeXSS(name)); \n //the following sentences will be replaced by logging sentence in actual project \n //System.out.println(\"The original value received from getParameter() is:\"+value); \n if (value != null) { \n value = encodeXSS(value); \n } \n \n //the following sentences will be replaced by logging sentence in actual project \n //System.out.println(\"After handling XSS ,the actual value is:\"+value); \n //System.out.println(); \n return value; \n }", "public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException\n\t{\n\t\t//获取数据\n\t\trequest.setCharacterEncoding(\"utf-8\");\n\t\tString username = \"\";\n\t\tString password = \"\";\n\t\tusername = request.getParameter(\"name\");\n\t\tpassword = request.getParameter(\"pwd\");\n\n\t try { \n\t \n\t \t Connection con=null;\n\t \t Statement stmt=null;\n\t \t ResultSet rs1=null;\n\t \t Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\n\t \t con=DriverManager.getConnection(\"jdbc:sqlserver://localhost:1433; DatabaseName=dbToH\",\"sa\",\"123\");\n\t \t String SQL=\"select * from users where Phone='\"+ username + \"'\";\n\t \t stmt=con.createStatement();\n\t \t rs1=stmt.executeQuery(SQL);\n\t \t System.out.print(username);\n\n\t \n\t if (rs1.next()) { \n\t // 说明用户是存在的 \n\t \t\n\t \tresponse.sendRedirect(\"../index.jsp?Name=\"+username);\n\t \n\t } else { \n\t // 说明用户名不存在 \n\t \tresponse.sendRedirect(\"../login.jsp\");\n\t } \n\t } catch (Exception ex) { \n\t ex.printStackTrace(); \n\t \n\t } \n\t\t\t\t\n\t\t// 跳转\n\t\t\n\t}", "private Product getProductByPostRequest(HttpServletRequest request) {\n String name = request.getParameter(\"name\");\n String brand = request.getParameter(\"brand\");\n int price = Integer.parseInt(request.getParameter(\"price\"));\n int quantity = Integer.parseInt(request.getParameter(\"quantity\"));\n return new Product(name, brand, price, quantity);\n }", "public String inputName() {\n String name = editTextName.getText().toString();\n return name;\n }", "private String getCookieValue(HttpServletRequest request, String name) {\n Cookie[] cookies = request.getCookies();\n\n if (cookies != null) { //Stupid servlet API!\n for (Cookie cookie : cookies) {\n if (name.equals(cookie.getName())) {\n return cookie.getValue();\n }\n }\n }\n\n return \"\";\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n try (PrintWriter out = response.getWriter()) {\n /* TODO output your page here. You may use following sample code. */\n String nombreParametro=null;\n String[]valoresParametro=null;\n Iterator it;\n String nombre= request.getParameter(\"nombre\");\n String cadena = request.getParameter(\"telefono\") ;\n out.println(\"<!DOCTYPE html>\");\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Servlet registro</title>\"); \n out.println(\"</head>\");\n out.println(\"<body>\");\n out.println(\"<form action=\\\"registro\\\" method=\\\"post\\\">\");\n \n if (nombre == \"\"){\n \n out.println(\" <p><label for=\\\"nombre\\\"> Nombre </label>&nbsp;&nbsp;\");\n out.println( \"<input type=\\\"text\\\" id value= \\\"\"+nombre+\"\\\" > \");\n out.println(\"</br>\");\n \n \n }else{\n out.println(\" <p><label for=\\\"nombre\\\"> Nombre </label>&nbsp;&nbsp;\");\n out.println(request.getParameter(\"nombre\"));\n }\n if (request.getParameter(\"apellido\")==\"\"){\n \n out.println(\" <p><label for=\\\"apellido\\\"> Apellido </label>&nbsp;&nbsp;\");\n out.println( \"<input type=\\\"text\\\" id value= \\\"\"+request.getParameter(\"apellido\")+\"\\\" > \");\n out.println(\"</br>\");\n \n \n }else{\n out.println(\" <p><label for=\\\"nombre\\\"> Apellido </label>&nbsp;&nbsp;\");\n out.println(request.getParameter(\"apellido\"));\n }\n \n if (request.getParameter(\"usuario\")==\"\"){\n out.println(\" <p><label for=\\\"usuario\\\"> Usuario </label>&nbsp;&nbsp;\");\n out.println( \"<input type=\\\"text\\\" id value= \\\"\"+request.getParameter(\"usuario\")+\"\\\" > \");\n out.println(\"</br>\");\n }else{\n out.println(\" <p><label for=\\\"usuario\\\"> Usuario </label>&nbsp;&nbsp;\");\n out.println(request.getParameter(\"usuario\"));\n }\n \n if (request.getParameter(\"contrasena\")==\"\"){\n out.println(\" <p><label for=\\\"contraseña\\\"> Contraseña </label>&nbsp;&nbsp;\");\n out.println( \"<input type=\\\"text\\\" id value= \\\"\"+request.getParameter(\"contrasena\")+\"\\\" > \");\n out.println(\"</br>\");\n }else{\n out.println(\" <p><label for=\\\"contraseña\\\"> Contraseña </label>&nbsp;&nbsp;\");\n out.println(request.getParameter(\"contrasena\"));\n }\n \n if (cadena.length() != 9 || !cadena.startsWith(\"6\") || !cadena.startsWith(\"7\") || !cadena.startsWith(\"9\")) {\n out.println(\" <p><label for=\\\"telefono\\\"> Telefono </label>&nbsp;&nbsp;\");\n out.println( \"<input type=\\\"text\\\" id value= \\\"\"+request.getParameter(\"telefono\")+\"\\\" > \");\n out.println(\"</br>\");\n }else{\n out.println(\" <label for=\\\"telefono\\\"> Telefono </label>&nbsp;&nbsp;\");\n out.println(request.getParameter(\"telefono\")); \n }\n if (request.getParameter(\"sexo\")==null){\n out.println(\"<label>Sexo :</label> &nbsp;&nbsp;\");\n out.println(\"<label>Hombre :</label>&nbsp;&nbsp;\");\n out.println(\"<input type=\\\"radio\\\" name=\\\"sexo\\\" value=\\\"hombre\\\" >\");\n out.println(\"<label>Mujer :</label>&nbsp;&nbsp;\");\n out.println(\"<input type=\\\"radio\\\" name=\\\"sexo\\\" value=\\\"mujer\\\" >\");\n \n }else{\n out.println(\" <p><label for=\\\"sexo\\\"> sexo </label>&nbsp;&nbsp;\");\n out.println(request.getParameter(\"sexo\"));\n }\n \n if (request.getParameter(\"preferencia\")==null){\n out.println(\"<label>Preferencias :</label>&nbsp;&nbsp;\");\n out.println(\"<label>Deporte</label>&nbsp;&nbsp;\");\n out.println(\"<input type=\\\"checkbox\\\" name=\\\"preferencia\\\" value=\\\"Deporte\\\">\");\n out.println(\"<label>Lectura</label>&nbsp;&nbsp;\");\n out.println(\"<input type=\\\"checkbox\\\" name=\\\"preferencia\\\" value=\\\"Lectura\\\">\");\n out.println(\"<label>Cine</label>&nbsp;&nbsp;\");\n out.println(\"<input type=\\\"checkbox\\\" name=\\\"preferencia\\\" value=\\\"Cine\\\">\");\n out.println(\"<label>Deporte</label>&nbsp;&nbsp;\");\n out.println(\"<input type=\\\"checkbox\\\" name=\\\"preferencia\\\" value=\\\"Viajes\\\">\");\n \n }else{\n out.println(\" <p><label for=\\\"preferencias\\\"> preferencias </label>&nbsp;&nbsp;\");\n out.println(request.getParameter(\"preferencia\"));\n }\n \n out.println(\"<input type=\\\"submit\\\" name=\\\"enviar\\\" value=\\\"Enviar\\\">\");\n out.println(\"<input type=\\\"reset\\\" name=\\\"borrar\\\" value=\\\"borrar\\\">\");\n out.println(\"</form>\");\n \n out.println(\"<h1>Servlet registro at \" + request.getContextPath() + \"</h1>\");\n out.println(\"</body>\");\n out.println(\"</html>\");\n \n }\n }", "public Object getRequest(String attibuteName) {\n return servletRequest.getAttribute(attibuteName);\n }", "public String getRequestName ()\n {\n org.omg.CORBA.portable.InputStream $in = null;\n try {\n org.omg.CORBA.portable.OutputStream $out = _request (\"getRequestName\", true);\n $in = _invoke ($out);\n String $result = $in.read_string ();\n return $result;\n } catch (org.omg.CORBA.portable.ApplicationException $ex) {\n $in = $ex.getInputStream ();\n String _id = $ex.getId ();\n throw new org.omg.CORBA.MARSHAL (_id);\n } catch (org.omg.CORBA.portable.RemarshalException $rm) {\n return getRequestName ( );\n } finally {\n _releaseReply ($in);\n }\n }", "public Object getParameter(String name) {\n\t\tIterator itr = this.parameters.getInParameters().iterator();\n\t\twhile(itr.hasNext()){\n\t\t\tParameterExtendedImpl param = ((ParameterExtendedImpl)itr.next());\n\t\t\t\n\t\t\tif(param.getName() != null && param.getName().equalsIgnoreCase(name)){\t\t\t\t\n\t\t\t\treturn param.value;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "protected Object getSingleValueFromRequest(HttpServletRequest request_p, String strID_p)\r\n {\r\n return request_p.getParameter(strID_p);\r\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n try {\n String title = \"Reading All Request Parameters\";\n\n\tout.println(\"<head><title>ShowParameters Servlet</title></head>\");\n\n out.println(\"<BODY BGCOLOR=\\\"#FDF5E6\\\">\\n\" +\n \"<H1 ALIGN=CENTER>\" + title + \"</H1>\\n\" +\n \"<TABLE BORDER=1 ALIGN=CENTER>\\n\" +\n \"<TR BGCOLOR=\\\"#FFAD00\\\">\\n\" +\n \"<TH>Parameter Name<TH>Parameter Value(s)\");\n\n Enumeration paramNames = request.getParameterNames();\n\n \twhile(paramNames.hasMoreElements())\n \t{\n \t \tString paramName = (String)paramNames.nextElement();\n \t \tout.print(\"<TR><TD>\" + paramName + \"<TD>\");\n\n \t\tString[ ] paramValues = request.getParameterValues(paramName);\n\n \t\tif (paramValues.length == 1)// array is one entry long? contains only empty string\n \t\t{\n \t\tString paramValue = paramValues[0];\n \t\tif (paramValue.length() == 0)\t//parameter has no value\n \t\t\t out.println(\"<I>No Value</I>\"); //displays in italic\n \t\telse\n \t\t\tout.println(paramValue);\n \t\t}\n \t\telse\t\t\t//parameter has multiple values\n \t\t{\n \t\tout.println(\"<UL>\");\n \t\tfor(int i=0; i<paramValues.length; i++)\n \t\t{\n \t\t\tout.println(\"<LI>\" + paramValues[i]);\t\t//values are dislayed\n \t\t}\n\n \t\tout.println(\"</UL>\");\n \t\t}\n \t}\n\n \tout.println(\"</TABLE>\\n</BODY></HTML>\");\n } finally { \n out.close();\n }\n }", "@RequestMapping(method = {RequestMethod.GET, RequestMethod.POST}, value = \"helloForm\")\n @ResponseBody\n public String helloWithQueryParam(@RequestParam String name, @RequestParam String language) {\n return createMessage(name, language);\n }", "public String getName(){\n\n //returns the value of the name field\n return this.name;\n }", "public String getName(){return name;}", "public String getName(){return name;}", "public String getName(){return name;}", "public String getName(){return name;}", "protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n String lastName = req.getParameter(\"lastName\");\n// String age = req.getParameter(\"age\");\n\n if (LAST_NAME.equals(lastName)) {\n HttpSession session = req.getSession(true);\n session.setAttribute(\"user_in\", lastName);\n } else {\n JOptionPane.showMessageDialog(null, \"Only one user registered: Tagirov\");\n }\n res.sendRedirect(\"index.jsp\");\n }", "public String getParameter(String pname) {\n\t\treturn getParameter(pname, null);\n\t}", "void getName(String name);", "private void getParameters(HttpServletRequest request) {\n\t\t// Recoger datos\n\t\tconcepto = request.getParameter(\"concepto\");\n\t\tString importeTexto = request.getParameter(\"importe\");\n\t\ttry {\n\t\t\timporte = Double.parseDouble(importeTexto);\n\n\t\t} catch (NumberFormatException e) {\n\t\t\timporte = (double) 0;\n\t\t}\n\t\tLong idCoche = Long.parseLong(request.getParameter(\"id_coche\"));\n\t\tc = daoCoche.getBYId(idCoche);\n\t\tidAgente = Long.parseLong(request.getParameter(\"id_agente\"));\n\t}", "private void NameShow(HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString find = request.getParameter(\"find\") == \"\" ? \"^^^^\" : request.getParameter(\"find\");\r\n\t\tSystem.out.println(find);\r\n\t\tint page = request.getParameter(\"page\") == \"\" || request.getParameter(\"page\") == null ? 1\r\n\t\t\t\t: Integer.valueOf(request.getParameter(\"page\"));\r\n\t\tList<Notice> list = service.selectByName(find);\r\n\t\trequest.setAttribute(\"count\", list.size());\r\n\t\trequest.setAttribute(\"list\", list);\r\n\t\trequest.setAttribute(\"nameshow\", \"nameshow\");\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/jsp/GongGaoGuanLi.jsp\").forward(request, resp);\r\n\t}", "public static String getRequestParameter(String key) {\r\n\t\treturn FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(key);\r\n\t}" ]
[ "0.7843314", "0.7561136", "0.7522545", "0.7270524", "0.72406983", "0.6985545", "0.6938527", "0.68901056", "0.68029773", "0.6581805", "0.65771496", "0.6572917", "0.64702314", "0.64669317", "0.6458408", "0.64275306", "0.6395496", "0.63741314", "0.6368375", "0.6323871", "0.6323458", "0.63224125", "0.6307095", "0.62845474", "0.6271682", "0.62131095", "0.62077737", "0.620624", "0.61880714", "0.6178474", "0.6153912", "0.6151214", "0.6045912", "0.6004164", "0.59950244", "0.59896797", "0.59595394", "0.5939605", "0.59243035", "0.59145766", "0.5902525", "0.5895592", "0.58865315", "0.58734715", "0.58639884", "0.58321977", "0.5819407", "0.580316", "0.57851714", "0.5781221", "0.5781221", "0.57773066", "0.577554", "0.577376", "0.57670397", "0.57575154", "0.57562023", "0.5735165", "0.5726233", "0.5719382", "0.5711904", "0.5692119", "0.56877416", "0.56877416", "0.5683043", "0.567314", "0.56683296", "0.56523395", "0.56355715", "0.56315833", "0.5630189", "0.5629793", "0.5613482", "0.5607456", "0.5606472", "0.5600814", "0.55876756", "0.5569087", "0.5566457", "0.5565203", "0.5563996", "0.55508614", "0.5540431", "0.55357164", "0.5531325", "0.5519938", "0.5518145", "0.5511106", "0.55109507", "0.55074507", "0.5505824", "0.5505824", "0.5505824", "0.5505824", "0.55007094", "0.54970545", "0.54947287", "0.54879534", "0.54809916", "0.54791224" ]
0.5656432
67
TODO Autogenerated method stub
private String doHttpClientGet() { HttpGet httpGet=new HttpGet(url); HttpClient client=new DefaultHttpClient(); try { HttpResponse response=client.execute(httpGet); if(response.getStatusLine().getStatusCode()==HttpStatus.SC_OK){ result=EntityUtils.toString(response.getEntity()); } System.out.println("content----->"+result); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return result; }
{ "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 onClick(View view) { switch (view.getId()) { case R.id.vc_shuaixi: vc_image.setImageBitmap(Code.getInstance().getBitmap()); getCode = Code.getInstance().getCode(); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
Enables the My Location layer if the fine location permission has been granted.
private void enableMyLocation() { if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { // Permission to access the location is missing. PermissionUtils.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE, Manifest.permission.ACCESS_FINE_LOCATION, true); mMap.setMyLocationEnabled(true); } else if (mMap != null) { // Access to the location has been granted to the app. mMap.setMyLocationEnabled(true); } Log.i("Current Location", "Location Enabled:" + mMap.isMyLocationEnabled()); LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE); LocationListener locationListener = new OrderLocationListener(); // Register the listener with the Location Manager to receive location updates locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 9000, 0, locationListener); Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); makeUseOfNewLocation(location); location = LocationServices.FusedLocationApi.getLastLocation(client); makeUseOfNewLocation(location); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void enableLocation(){\n if(PermissionsManager.areLocationPermissionsGranted(this))\n {\n initializeLocationEngine();\n initializeLocationLayer();\n\n\n }else{\n permissionsManager = new PermissionsManager(this);\n permissionsManager.requestLocationPermissions(this);\n }\n }", "private void enableMyLocationIfPermitted() {\n if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION,\n android.Manifest.permission.ACCESS_FINE_LOCATION},\n LOCATION_PERMISSION_REQUEST_CODE);\n } else if (mGoogleMap != null) {\n mGoogleMap.setMyLocationEnabled(true);\n }\n }", "private void enableMyLocation() {\n if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n // Permission to access the location is missing.\n PermissionUtils.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE,\n android.Manifest.permission.ACCESS_FINE_LOCATION, true);\n } else if (currentMap != null) {\n // Access to the location has been granted to the app.\n currentMap.setMyLocationEnabled(true);\n }\n }", "private void enableMyLocation() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // Permission to access the location is missing.\n PermissionUtils.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE, Manifest.permission.ACCESS_FINE_LOCATION, true);\n } else if (mMap != null) {\n // Access to the location has been granted to the app.\n mMap.setMyLocationEnabled(true);\n }\n }", "private void enableMyLocation() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n // Permission to access the location is missing.\n PermissionUtils.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE,\n Manifest.permission.ACCESS_FINE_LOCATION, true);\n } else if (mMap != null) {\n // Access to the location has been granted to the app.\n mMap.setMyLocationEnabled(true);\n }\n }", "private void enableMyLocation() {\n // [START maps_check_location_permission]\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n if (map != null) {\n map.setMyLocationEnabled(true);\n }\n } else {\n // Permission to access the location is missing. Show rationale and request permission\n PermissionUtils.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE,\n Manifest.permission.ACCESS_FINE_LOCATION, true);\n }\n zoom = true;\n // [END maps_check_location_permission]\n }", "private void fineLocationPermissionGranted() {\n UtilityService.addGeofences(this);\n UtilityService.requestLocation(this);\n }", "private void enableMyLocation(){\n System.out.print(\"get here\");\n if(ContextCompat.checkSelfPermission(this.getContext(), Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED){\n // Permission to access the location is missing.\n PermissionUtils.requestPermission(this.getActivity(),LOCATION_PERMISSION_REQUEST_CODE,\n Manifest.permission.ACCESS_FINE_LOCATION,true);\n }else if(googleMap!=null){\n // Access to the location has been granted to the app.\n googleMap.setMyLocationEnabled(true);\n }\n }", "private void enableMyLocation() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n // Permission to access the location is missing.\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1337);\n } else if (mMap != null) {\n // Access to the location has been granted to the app.\n mMap.setMyLocationEnabled(true);\n }\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 500, 10, this);\n }", "@SuppressWarnings( {\"MissingPermission\"})\n private void enableLocationPlugin() {\n if (PermissionsManager.areLocationPermissionsGranted(this)) {\n // Create an instance of LOST location engine\n initializeLocationEngine();\n\n locationPlugin = new LocationLayerPlugin(mapView, map, locationEngine);\n locationPlugin.setLocationLayerEnabled(LocationLayerMode.TRACKING);\n } else {\n permissionsManager = new PermissionsManager(this);\n permissionsManager.requestLocationPermissions(this);\n }\n }", "private void setupLocation() {\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n // Permission is not granted.\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION) &&\n ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_COARSE_LOCATION)) {\n\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n LOCATION_PERMISSION_REQUEST);\n } else {\n // Request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n LOCATION_PERMISSION_REQUEST);\n }\n } else {\n // Permission has already been granted\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(getActivity(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "public void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(getActivity().getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(getActivity(), new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(getActivity().getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n\n } else {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(activity.getApplicationContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(activity,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "public void checkLocationPermission() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n 99);\n }\n\n }", "private void updateLocationUi() {\n if (mMap == null) {\n return;\n }\n try {\n if (mPermissionCheck.locationPermissionGranted()) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void getLocationPermission(){\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED){\n locationAccess = true;\n } else {\n locationAccess = false;\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOCATION_PERMISSION);\n }\n }", "private boolean isLocationAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\r\n\r\n //If permission is granted returning true\r\n if (result == PackageManager.PERMISSION_GRANTED)\r\n return true;\r\n\r\n //If permission is not granted returning false\r\n return false;\r\n }", "private void requestLocationPermission() {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n\n new AlertDialog.Builder(this)\n .setTitle(\"Permission needed\")\n .setMessage(\"Location Permission is needed to show your current location on the map\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(ScavengerHunt.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 2);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n Toast.makeText(ScavengerHunt.this, \"Location Permission is needed to update the map\", Toast.LENGTH_SHORT).show();\n }\n })\n .create()\n .show();\n\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 2);\n }\n }", "private void locationPermission() {\n if(Build.VERSION.SDK_INT<23){\n locationPermission = true;\n startService(new Intent(this, LocationService.class));\n }else{\n if(checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED\n && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED){\n locationPermission = true;\n startService(new Intent(this, LocationService.class));\n return;\n }\n\n if(shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_COARSE_LOCATION) && shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_FINE_LOCATION)){\n Snackbar.make(drawer,\"Location access is required to show your friend and questions on map.\",Snackbar.LENGTH_INDEFINITE)\n .setAction(\"OK\", new View.OnClickListener() {\n @TargetApi(Build.VERSION_CODES.M)\n @Override\n public void onClick(View v) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.ACCESS_COARSE_LOCATION},LOCATION_PERMISSION_CODE);\n }\n })\n .show();\n }else{\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.ACCESS_COARSE_LOCATION},LOCATION_PERMISSION_CODE);\n }\n }\n }", "private void checkLocationPermission() {\n\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED){\n //location permission required\n ActivityCompat.requestPermissions(this, new String[]\n {Manifest.permission.ACCESS_FINE_LOCATION}, PERMISSION_FINE_LOCATION);\n\n }else{\n //location already granted\n checkCoarseAddress();\n }\n }", "private void getLocationPermission() {\n Log.wtf(TAG, \"getLocationPermission() has been instantiated\");\n\n Log.d(TAG, \"getLocationPermission: getting location permissions\");\n String[] permissions = {\n FINE_LOCATION,\n COARSE_LOCATION\n };\n\n if (ContextCompat.checkSelfPermission(getActivity(), FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n if (ContextCompat.checkSelfPermission(getActivity(), COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n Log.d(TAG, \"getLocationPermission: Permission granted\");\n initMap();\n\n } else {\n Log.d(TAG, \"getLocationPermission: requesting permission\");\n requestPermissions(permissions, LOCATION_PERMISSION_REQUEST_CODE);\n }\n } else {\n Log.d(TAG, \"getLocationPermission: requesting permission\");\n requestPermissions(permissions, LOCATION_PERMISSION_REQUEST_CODE);\n }\n }", "public void getLocationPermission() {\n if (!isPermissionGranted())\n // get the location permission from user\n // this will prompt user a dialog to give the location permission\n requestPermissionLauncher.launch(Manifest.permission.ACCESS_FINE_LOCATION);\n /*ActivityCompat.requestPermissions(activity,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);*/\n }", "private void setMyLocationEnabled(boolean enabled) {\n try {\n mMap.setMyLocationEnabled(enabled);\n } catch (SecurityException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n switch (requestCode) {\n case 1:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n }\n\n } else {\n Toast.makeText(getContext(), \"This app needs location permission to be granted!,\",\n Toast.LENGTH_LONG).show();\n getActivity().finish();\n }\n break;\n }\n }", "@SuppressWarnings( {\"MissingPermission\"})\n private void enableLocationComponent(Style style) {\n if (PermissionsManager.areLocationPermissionsGranted(this)) {\n\n // Get an instance of the component\n LocationComponent locationComponent = mapboxMap.getLocationComponent();\n\n // Activate with a built LocationComponentActivationOptions object\n locationComponent.activateLocationComponent(LocationComponentActivationOptions.builder(this, style).build());\n\n // Enable to make component visible\n locationComponent.setLocationComponentEnabled(true);\n\n // Set the component's camera mode\n locationComponent.setCameraMode(CameraMode.TRACKING);\n\n // Set the component's render mode\n locationComponent.setRenderMode(RenderMode.COMPASS);\n\n } else {\n\n permissionsManager = new PermissionsManager(this);\n\n permissionsManager.requestLocationPermissions(this);\n\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n\n switch (requestCode) {\n case MY_LOCATION:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n gMap.setMyLocationEnabled(true);\n }\n } else {\n Toast.makeText(getActivity().getApplicationContext(), \"Bit Chat requires location permissions to be granted\", Toast.LENGTH_LONG).show();\n getActivity().finish();\n }\n break;\n }\n }", "private void requestPermissionAccessLocation() {\n int permissionCheck = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\n\n Log.d(TAG, \"permissionCheck: \" + permissionCheck);\n\n if (permissionCheck == PackageManager.PERMISSION_GRANTED) {\n updateFragmentOnLocationSuccess();\n } else {\n ActivityCompat\n .requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_CODE_PERMISSION_LOCATION);\n }\n }", "private void updateLocationUI() {\n if (map == null) {\n return;\n }\n try {\n if (locationPermissionGranted) {\n map.setMyLocationEnabled(true);\n map.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n map.setMyLocationEnabled(false);\n map.getUiSettings().setMyLocationButtonEnabled(false);\n lastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void requestFineLocationPermission() {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, PERMISSION_REQ);\n }", "private void askPermissionsAndShowMyLocation() {\n if (Build.VERSION.SDK_INT >= 23) {\n int accessCoarsePermission\n = ContextCompat.checkSelfPermission(activity, android.Manifest.permission.ACCESS_COARSE_LOCATION);\n int accessFinePermission\n = ContextCompat.checkSelfPermission(activity, android.Manifest.permission.ACCESS_FINE_LOCATION);\n\n\n if (accessCoarsePermission != PackageManager.PERMISSION_GRANTED\n || accessFinePermission != PackageManager.PERMISSION_GRANTED) {\n // The Permissions to ask user.\n String[] permissions = new String[]{android.Manifest.permission.ACCESS_COARSE_LOCATION,\n android.Manifest.permission.ACCESS_FINE_LOCATION};\n // Show a dialog asking the user to allow the above permissions.\n ActivityCompat.requestPermissions(activity, permissions,\n REQUEST_ID_ACCESS_COURSE_FINE_LOCATION);\n\n return;\n }\n }\n\n // Show current location on Map.\n this.showMyLocation();\n }", "public void requestLocation() {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) !=\n PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.INTERNET}, 12);\n }\n return;\n }\n //this line updates location\n mMap.setMyLocationEnabled(true);\n providerClient.requestLocationUpdates(locationRequest, locationCallback, getMainLooper());\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(getActivity().getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void permissionLocationRequest() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n int hasLocationPermission = checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION);\n if (hasLocationPermission != PackageManager.PERMISSION_GRANTED) {\n if (!shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_FINE_LOCATION)) {\n showMessageOKCancel(\"You need to allow access to Location\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_CODE_ASK_PERMISSIONS);\n }\n });\n }\n }\n\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n mLocationPermissionGranted = false;\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n mLocationPermissionGranted = false;\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void requestPermission() {\n boolean shouldProvideRationale = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION);\n\n if (shouldProvideRationale) {\n Log.i(TAG, \"requestPermission: \" + \"Displaying the permission rationale\");\n // provide a way so that user can grant permission\n\n showSnackbar(R.string.warning_txt, android.R.string.ok, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startLocationPermissionRequest();\n }\n });\n\n } else {\n startLocationPermissionRequest();\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n }\n }", "private void requestLocationPermission() {\n Log.d(MainActivity.TAG,\"Requesting location permission.\");\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (shouldShowRequestPermissionRationale(\n android.Manifest.permission.ACCESS_FINE_LOCATION)) {\n Toast.makeText(this, R.string.location_permission_request_rationale, Toast.LENGTH_SHORT).show();\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n }\n requestPermissions(new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MainActivity.MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void enableRequestLocationUpdate() {\n mLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,\n 1000 * 10, 10, mLocationListener);\n mLocationManager.requestLocationUpdates(\n LocationManager.NETWORK_PROVIDER, 1000 * 10, 10,\n mLocationListener);\n }", "@SuppressWarnings( {\"MissingPermission\"})\n private void enableLocationComponent(@NonNull Style loadedMapStyle) {\n if (PermissionsManager.areLocationPermissionsGranted(this)) {\n// Activate the MapboxMap LocationComponent to show user location\n// Adding in LocationComponentOptions is also an optional parameter\n locationComponent = mapboxMap.getLocationComponent();\n locationComponent.activateLocationComponent(this, loadedMapStyle);\n locationComponent.setLocationComponentEnabled(true);\n locationComponent.setRenderMode(RenderMode.COMPASS);\n// Set the component's camera mode\n locationComponent.setCameraMode(CameraMode.TRACKING_GPS);\n } else {\n permissionsManager = new PermissionsManager(this);\n permissionsManager.requestLocationPermissions(this);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "@SuppressWarnings( {\"MissingPermission\"})\n private void enableLocationComponent(@NonNull Style loadedMapStyle) {\n if (PermissionsManager.areLocationPermissionsGranted(this)) {\n\n // Get an instance of the component\n LocationComponent locationComponent = mapBoxMap.getLocationComponent();\n MapActivity.this.locationComponent=locationComponent;\n\n // Activate with options\n locationComponent.activateLocationComponent(\n LocationComponentActivationOptions.builder(this, loadedMapStyle).build());\n\n // Enable to make component visible\n locationComponent.setLocationComponentEnabled(true);\n\n // Set the component's camera mode\n locationComponent.setCameraMode(CameraMode.TRACKING);\n\n // Set the component's render mode\n locationComponent.setRenderMode(RenderMode.COMPASS);\n\n\n } else {\n permissionsManager = new PermissionsManager(this);\n permissionsManager.requestLocationPermissions(this);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(mContext,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(mActivity,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(), ACCESS_FINE_LOCATION) == PERMISSION_GRANTED &&\n ContextCompat.checkSelfPermission(this.getApplicationContext(), ACCESS_COARSE_LOCATION) == PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{\n ACCESS_FINE_LOCATION,\n ACCESS_COARSE_LOCATION\n }, PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "@SuppressLint(\"NewApi\")\n @Override\n public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {\n switch (requestCode) {\n case 1340:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n Toast.makeText(this, \"Location cannot be obtained due to \" + \"missing permission.\", Toast.LENGTH_LONG).show();\n }\n break;\n }\n }", "private void startGettingLocation() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n //should check if location is enabled\n\n initializeGoogleApiClient();\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSION_ACCESS_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(getContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED)\n {\n mLocationPermissionGranted = true;\n } else {\n requestPermissions(\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION\n );\n }\n }", "private void getLocationPermission(){\n Log.d(TAG, \"getLocationPermission: getting location permission.\");\n String[] permissions = {Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION};\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n FINE_LOCATION)== PackageManager.PERMISSION_GRANTED){\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n COURSE_LOCATION)== PackageManager.PERMISSION_GRANTED){\n mLocationPermissionGaranted = true;\n getDeviceLocation();\n }else{\n ActivityCompat.requestPermissions(this, permissions, LOCATION_PERMISSION_REQUEST_CODE);\n }\n }else{\n ActivityCompat.requestPermissions(this, permissions, LOCATION_PERMISSION_REQUEST_CODE);\n }\n }", "private void askPermissionsAndShowMyLocation() {\n boolean isGPSEnabled = false;\n // flag for network status\n boolean isNetworkEnabled = false;\n // flag for GPS status\n boolean canGetLocation = false;\n LocationManager locationManager;\n\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n\n // getting GPS status\n isGPSEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);\n\n // getting network status\n isNetworkEnabled = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\n if (Build.VERSION.SDK_INT >= 23) {\n // flag for GPS status\n if (!isGPSEnabled && !isNetworkEnabled) {\n// no network provider is enabled\n final Intent data = new Intent();\n data.putExtra(\"latitude\", latitude);\n data.putExtra(\"longitude\", longitude);\n\n setResult(Activity.RESULT_CANCELED, data);\n finish();\n } else {\n// if (accessCoarsePermission != PackageManager.PERMISSION_GRANTED\n// || accessFinePermission != PackageManager.PERMISSION_GRANTED)\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // The Permissions to ask user.\n String[] permissions = new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION};\n // Show a dialog asking the user to allow the above permissions.\n ActivityCompat.requestPermissions(this, permissions,\n REQUEST_ID_ACCESS_COURSE_FINE_LOCATION);\n\n return;\n }\n this.showMyLocation();\n }\n\n } else {\n if (!isGPSEnabled && !isNetworkEnabled) {\n// no network provider is enabled\n final Intent data = new Intent();\n data.putExtra(\"latitude\", latitude);\n data.putExtra(\"longitude\", longitude);\n\n setResult(Activity.RESULT_CANCELED, data);\n finish();\n } else {\n this.showMyLocation();\n }\n\n\n }\n // Show current location on Map.\n }", "private boolean checkPermissonLocationRequest(int requestCode) {\n if (Build.VERSION.SDK_INT >= 23) {\n if (checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED\n && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n return true;\n } else {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION}, requestCode);\n return false;\n }\n } else {\n return true;\n }\n }", "private void checkLocationPermission() {\n if(ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n if (ActivityCompat.shouldShowRequestPermissionRationale(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION)) {\n new AlertDialog.Builder(getActivity())\n .setTitle(\"give permission\")\n .setMessage(\"give permission message\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n })\n .create()\n .show();\n }\n else{\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n }\n\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "@Override\n public boolean onMyLocationButtonClick() {\n LocationManager manager = (LocationManager) getContext().getSystemService(Context.LOCATION_SERVICE);\n if (!manager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {\n // If Location disable create a alert dialog\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getContext());\n alertDialogBuilder.setMessage(\"Location is disabled in your device. Would you like to enable it?\")\n // Have to respond to this message not cancelable\n .setCancelable(false)\n // If yes open setting page to enable location\n .setPositiveButton(\"Yes\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // intent calls the android activity of location settings\n Intent callGPSSettingIntent = new Intent(\n android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n startActivity(callGPSSettingIntent);\n }\n });\n //if no close the dialog\n alertDialogBuilder.setNegativeButton(\"Maybe Later\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n AlertDialog alert = alertDialogBuilder.create();\n alert.show();\n }\n\n return false;\n }", "public void checkLocationPermission() {\n try {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (checkPermission(Manifest.permission.ACCESS_FINE_LOCATION, getActivity(), getActivity())) {\n if (checkPermission(Manifest.permission.ACCESS_COARSE_LOCATION, getActivity(), getActivity())) {\n gpsTracker.getLocation();\n } else {\n requestPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION, PERMISSION_REQUEST_CODE_LOCATION, getActivity().getApplicationContext(),\n getActivity());\n }\n } else {\n requestPermission(android.Manifest.permission.ACCESS_FINE_LOCATION, PERMISSION_REQUEST_CODE_LOCATION, getActivity().getApplicationContext(),\n getActivity());\n }\n } else {\n gpsTracker.getLocation();\n }\n } catch (Exception e) {\n // logException(e, \"GpsMapManualFragment_checkLocationPermission()\");\n }\n\n\n }", "public static void checkLocationPermission() {\n globalContext.stopService(locationIntent);\n\n globalFragmentActivity.requestPermissions(\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.ACCESS_COARSE_LOCATION\n },\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@SuppressWarnings( {\"MissingPermission\"})\n private void enableLocationComponent(@NonNull Style loadedMapStyle) {\n if (PermissionsManager.areLocationPermissionsGranted(getActivity())) {\n\n// Get an instance of the component\n LocationComponent locationComponent = mapboxMap.getLocationComponent();\n\n// Activate with options\n locationComponent.activateLocationComponent(\n LocationComponentActivationOptions.builder(getActivity(), loadedMapStyle).build());\n\n// Enable to make component visible\n locationComponent.setLocationComponentEnabled(true);\n\n// Set the component's camera mode\n locationComponent.setCameraMode(CameraMode.TRACKING);\n\n// Set the component's render mode\n locationComponent.setRenderMode(RenderMode.COMPASS);\n } else {\n permissionsManager = new PermissionsManager(this);\n permissionsManager.requestLocationPermissions(getActivity());\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 100) {\n if (resultCode != RESULT_OK)\n Toast.makeText(getContext(), \"GPS est déactivé\", Toast.LENGTH_LONG).show();\n else {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n setupmap();\n MapForm.setMyLocationEnabled(true);\n }\n }\n }\n }", "public boolean haveLocationPermissions() {\n return (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED &&\n ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED);\n }", "@SuppressWarnings(\"MissingPermission\")\n private void initializeLocationLayer(){\n locationLayerPlugin = new LocationLayerPlugin(mapView,map,locationEngine);\n locationLayerPlugin.setLocationLayerEnabled(true);\n locationLayerPlugin.setCameraMode(CameraMode.TRACKING);\n locationLayerPlugin.setRenderMode(RenderMode.COMPASS);\n\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n Log.d(TAG, \"Permission Result\");\n String[] permissions = {ACCESS_FINE_LOCATION,\n ACCESS_COURSE_LOCATION};\n\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n ACCESS_FINE_LOCATION) == PERMISSION_GRANTED) {\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n ACCESS_COURSE_LOCATION) == PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n permissions,\n LOCATION_PERMISSION_REQUEST_CODE);}\n } else{\n ActivityCompat.requestPermissions(this,\n permissions,\n LOCATION_PERMISSION_REQUEST_CODE);\n }\n }", "private void initializeLocation() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) !=\n PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // Permission is not granted\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n Constants.PERMISSION_FINE_LOCATION);\n } else {\n createLocationRequest();\n }\n } else {\n createLocationRequest();\n }\n }", "private boolean checkPermission() {\n int fineLocation = ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\n\n if (fineLocation != PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSION_REQUEST_CODE_FINE_LOCATION);\n }\n return false;\n } else {\n return true;\n }\n }", "private void askPermission() {\n if (ContextCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n Parameters.MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.ACCESS_FINE_LOCATION},1);\n }\n }", "private void enableLoc() {\r\n if (googleApiClient == null) {\r\n googleApiClient = new GoogleApiClient.Builder(this)\r\n .addApi(LocationServices.API)\r\n .addConnectionCallbacks(new GoogleApiClient.ConnectionCallbacks() {\r\n @Override\r\n public void onConnected(Bundle bundle) {\r\n\r\n }\r\n\r\n @Override\r\n public void onConnectionSuspended(int i) {\r\n googleApiClient.connect();\r\n }\r\n })\r\n .addOnConnectionFailedListener(new GoogleApiClient.OnConnectionFailedListener() {\r\n @Override\r\n public void onConnectionFailed(ConnectionResult connectionResult) {\r\n\r\n Log.d(\"Location error\", \"Location error \" + connectionResult.getErrorCode());\r\n }\r\n }).build();\r\n googleApiClient.connect();\r\n\r\n LocationRequest locationRequest = LocationRequest.create();\r\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\r\n locationRequest.setInterval(30 * 1000);\r\n locationRequest.setFastestInterval(5 * 1000);\r\n LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder()\r\n .addLocationRequest(locationRequest);\r\n\r\n builder.setAlwaysShow(true);\r\n\r\n PendingResult<LocationSettingsResult> result =\r\n LocationServices.SettingsApi.checkLocationSettings(googleApiClient, builder.build());\r\n result.setResultCallback(new ResultCallback<LocationSettingsResult>() {\r\n @Override\r\n public void onResult(LocationSettingsResult result) {\r\n final Status status = result.getStatus();\r\n switch (status.getStatusCode()) {\r\n case LocationSettingsStatusCodes.RESOLUTION_REQUIRED:\r\n try {\r\n Show the dialog by calling startResolutionForResult(),\r\n and check the result in onActivityResult().\r\n status.startResolutionForResult(Newmaps.this, REQUEST_LOCATION);\r\n } catch (IntentSender.SendIntentException e) {\r\n // Ignore the error.\r\n }\r\n break;\r\n }\r\n }\r\n });\r\n }\r\n\r\n }", "private void requestPermission(){\r\n ActivityCompat.requestPermissions(activity,new String[]{Manifest.permission.ACCESS_FINE_LOCATION},1);\r\n }", "private void askForLocationPermission() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n //this code will be executed on devices running on DONUT (NOT ICS) or later\n askForPermission(Manifest.permission.ACCESS_FINE_LOCATION, Extra.LOCATION);\n }\n }", "protected void startLocationUpdates() {\n\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n /*if (shouldShowRequestPermissionRationale(\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n showExplanationDialog(new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n requestPermissions(\n new String[]{ Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n });\n } else {\n requestPermissions(\n new String[]{ Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }*/\n } else {\n if (mGoogleApiClient.isConnected()) {\n LocationServices.FusedLocationApi.requestLocationUpdates(\n mGoogleApiClient, mLocationRequest, this);\n mRequestingLocationUpdates = true;\n Fog.d(TAG, \"requestedLocationUpdates\");\n }\n }\n }", "public void askPermission() {\n if (ContextCompat.checkSelfPermission(getActivity()\n , android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n reqestLocationPermission);\n }\n }", "void configure_button(){\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.INTERNET}\n ,10);\n }\n\n return;\n }\n // this code won't execute IF permissions are not allowed, because in the line above there is return statement.\n\n locationManager.requestLocationUpdates(\"gps\", 5000, 0, listener);\n\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n if(requestCode==REQUEST_location)\n if (Connectivity.Checkinternet(getActivity())) {\n if (requestCode == 100) {\n if (!PermissionUtils.isPermissionGranted(permissions, grantResults, Manifest.permission.ACCESS_FINE_LOCATION) &&\n !PermissionUtils.isPermissionGranted(permissions, grantResults, Manifest.permission.ACCESS_COARSE_LOCATION))\n setupmap();\n else {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n setupmap();\n MapForm.setMyLocationEnabled(true);\n }\n }\n }\n }\n }", "@SuppressLint(\"MissingPermission\")\n @AfterPermissionGranted(PERMISSION_LOCATION_ID)\n private void setMapUISettings() {\n map.getUiSettings().setZoomControlsEnabled(true);\n map.getUiSettings().setCompassEnabled(true);\n map.getUiSettings().setAllGesturesEnabled(true);\n\n map.setOnMyLocationClickListener(new GoogleMap.OnMyLocationClickListener() {\n @Override\n public void onMyLocationClick(@NonNull Location location) {\n\n }\n });\n\n map.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n return false;\n }\n });\n\n if (EasyPermissions.hasPermissions(requireContext(), Manifest.permission.ACCESS_FINE_LOCATION))\n map.setMyLocationEnabled(true);\n else\n EasyPermissions.requestPermissions(this, \"Access fine location needed to get my location\", PERMISSION_LOCATION_ID, Manifest.permission.ACCESS_FINE_LOCATION);\n }", "private void getLocationPermission() {\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n //request location permission\n ActivityCompat.requestPermissions(this, new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION\n }, LOCATION_REQUEST_CODE);\n }\n fetchLastLocation();\n }", "private void getLocation() {\n if(ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED){\n if(ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION)){\n new AlertDialog.Builder(this)\n .setTitle(\"Location Permission Required\")\n .setMessage(\"This app needs permission to use your location\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(RestaurantsActivity.this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_LOCATIONS);\n }\n })\n .create()\n .show();\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_LOCATIONS);\n }\n }\n }", "private void turnOnLocationManager(){\n mLocationManager=(LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n mLocationManager.addTestProvider(LocationManager.GPS_PROVIDER, false, false, false,\n false, true, true, true, 0, 5);\n mLocationManager.setTestProviderEnabled(LocationManager.GPS_PROVIDER, true);\n //mLocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, mLocationSource);\n }", "@SuppressWarnings({\"SameParameterValue\", \"unused\"})\n public static void allowAccessToLocation(final Boolean value) {\n sAccessToLocation = value;\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n // Show rationale and request permission.\n int i = 12;\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n i);\n\n }\n mMap.setMyLocationEnabled(true); //when location changed call line. loaction manager\n\n }", "boolean getRequireLocationPref();", "private void callPermission() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M\n && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n requestPermissions(\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_ACCESS_FINE_LOCATION);\n\n } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M\n && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED){\n\n requestPermissions(\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n PERMISSIONS_ACCESS_COARSE_LOCATION);\n } else {\n isPermission = true;\n }\n }", "@SuppressWarnings(\"unused\")\n private void setMyLocationEnabled(final JSONArray args, final CallbackContext callbackContext) throws JSONException {\n Boolean isEnabled = false;\n isEnabled = args.getBoolean(1);\n map.setMyLocationEnabled(isEnabled);\n map.getUiSettings().setMyLocationButtonEnabled(isEnabled);\n this.sendNoResult(callbackContext);\n }", "private void callPermission() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M\r\n && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION)\r\n != PackageManager.PERMISSION_GRANTED) {\r\n\r\n requestPermissions(\r\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\r\n PERMISSIONS_ACCESS_FINE_LOCATION);\r\n\r\n } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M\r\n && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION)\r\n != PackageManager.PERMISSION_GRANTED){\r\n\r\n requestPermissions(\r\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\r\n PERMISSIONS_ACCESS_COARSE_LOCATION);\r\n } else {\r\n isPermission = true;\r\n }\r\n }", "@Override\n public boolean checkPermissions() {\n int permissionState = ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION);\n return permissionState == PackageManager.PERMISSION_GRANTED;\n }", "private boolean checkPermission() {\n return (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED );\n }", "private void requestPermission() {\n if (shouldShowRequestPermissionRationale(android.Manifest.permission.ACCESS_FINE_LOCATION)) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setMessage(this.getResources().getString(R.string.request_location_permission_message))\n .setPositiveButton(this.getResources().getString(R.string.OK), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION},\n REQUEST_LOCATION);\n }\n });\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n } else {\n ActivityCompat.requestPermissions((Activity) mContext,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION},\n REQUEST_LOCATION);\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String[] permissions,\n @NonNull int[] grantResults) {\n switch (requestCode) {\n case REQUEST_LOCATION_PERMISSION:\n if (grantResults.length > 0\n && grantResults[0]\n == PackageManager.PERMISSION_GRANTED) {\n enableMyLocation();\n break;\n }\n }\n }", "private void showMyLocation() {\n\n LocationManager locationManager = (LocationManager) activity.getSystemService(LOCATION_SERVICE);\n\n String locationProvider = this.getEnabledLocationProvider();\n\n if (locationProvider == null) {\n return;\n }\n\n // Millisecond\n final long MIN_TIME_BW_UPDATES = 1000;\n // Met\n final float MIN_DISTANCE_CHANGE_FOR_UPDATES = 1;\n\n Location myLocation = null;\n try {\n // This code need permissions (Asked above ***)\n\n /* locationManager.requestLocationUpdates(\n locationProvider,\n MIN_TIME_BW_UPDATES,\n MIN_DISTANCE_CHANGE_FOR_UPDATES, (android.location.LocationListener) this); */\n\n\n // Getting Location.\n myLocation = locationManager\n .getLastKnownLocation(locationProvider);\n }\n // With Android API >= 23, need to catch SecurityException.\n catch (SecurityException e) {\n\n Log.e(\"ActivityTackeSegment\", \"Show My Location Error:\" + e.getMessage());\n e.printStackTrace();\n return;\n }\n\n if (myLocation != null) {\n\n// // Add a marker in Sydney and move the camera\n// LatLng sydney = new LatLng(-34, 151);\n// myMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// myMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n// Toast.makeText(getActivity(),\"Je suis a Sydney\",Toast.LENGTH_SHORT);\n\n\n LatLng latLng = new LatLng(myLocation.getLatitude(), myLocation.getLongitude());\n // LatLng latLng = new LatLng(-34, 151);\n //myMap.addMarker(new MarkerOptions().position(latLng).title(\"Marker in Sydney\"));\n // myMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 14));\n\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(latLng) // Sets the center of the map to location user\n .zoom(currentZoom) // Sets the zoom\n .bearing(0) // Sets the orientation of the camera to east\n .tilt(40) // Sets the tilt of the camera to 30 degrees\n .build(); // Creates a CameraPosition from the builder\n myMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n /*\n // Add Marker to Map\n MarkerOptions option = new MarkerOptions();\n option.title(\"My Location\");\n option.snippet(\"....\");\n option.position(latLng);\n Marker currentMarker = myMap.addMarker(option);\n currentMarker.showInfoWindow();\n */\n } else {\n\n Log.i(\"ActivityTrackerFragment\", \"Location not found\");\n }\n\n }", "private void enableLocationTracking() {\n map.getTrackingSettings().setDismissAllTrackingOnGesture(false);\n\n // Enable location and bearing tracking\n map.getTrackingSettings().setMyLocationTrackingMode(MyLocationTracking.TRACKING_FOLLOW);\n map.getTrackingSettings().setMyBearingTrackingMode(MyBearingTracking.COMPASS);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n if (requestCode == MY_PERMISSIONS_REQUEST_LOCATION) {\n if (grantResults.length > 0\n && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n\n // permission was granted. Do the\n // contacts-related task you need to do.\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n\n if (mGoogleApiClient == null) {\n buildGoogleApiClient();\n }\n mMap.setMyLocationEnabled(true);\n }\n\n } else {\n\n // Permission denied, Disable the functionality that depends on this permission.\n Toast.makeText(this, \"permission denied\", Toast.LENGTH_LONG).show();\n }\n\n // other 'case' lines to check for other permissions this app might request.\n // You can add here other case statements according to your requirement.\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n bulidGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n }" ]
[ "0.8208465", "0.79404676", "0.7863643", "0.7849101", "0.783358", "0.76571274", "0.763352", "0.7589871", "0.7427327", "0.73520654", "0.71160996", "0.7102486", "0.7100997", "0.70915", "0.7074462", "0.7074462", "0.705325", "0.7051611", "0.69584197", "0.6957103", "0.6953321", "0.6934158", "0.69119227", "0.68923706", "0.6859243", "0.68573743", "0.6852003", "0.6828059", "0.6815479", "0.68107724", "0.6800972", "0.6784161", "0.67742366", "0.6753588", "0.6743979", "0.6720216", "0.6704644", "0.66987526", "0.66764235", "0.66764235", "0.6667109", "0.6662714", "0.66603637", "0.6659103", "0.66574234", "0.6648772", "0.66453433", "0.66413", "0.66413", "0.6577788", "0.6577788", "0.6577788", "0.65757954", "0.6570311", "0.65684754", "0.65655166", "0.6552603", "0.6551208", "0.6543243", "0.6535762", "0.65348077", "0.65180504", "0.6486674", "0.6482329", "0.64723706", "0.64707613", "0.64635825", "0.6454513", "0.64504564", "0.644903", "0.6433224", "0.6418142", "0.64089656", "0.6387345", "0.6377488", "0.63651943", "0.63647974", "0.63602585", "0.63508075", "0.63408685", "0.6323873", "0.6321015", "0.6319497", "0.6316554", "0.63083696", "0.63076925", "0.63051486", "0.62966377", "0.6281553", "0.6276223", "0.6270102", "0.6264406", "0.62605995", "0.6257993", "0.62515163", "0.6243415", "0.6241122", "0.62381184", "0.6228176", "0.6215334" ]
0.73035705
10
Displays a dialog with error message explaining that the location permission is missing.
private void showMissingPermissionError() { PermissionUtils.PermissionDeniedDialog .newInstance(true).show(getSupportFragmentManager(), "dialog"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showMissingPermissionsDialog(){\n android.app.AlertDialog.Builder alertDialog = new android.app.AlertDialog.Builder(this);\n\n // Setting Dialog Title\n alertDialog.setTitle(\"Enable Permissions\");\n\n // Setting Dialog Message\n alertDialog.setMessage(\"Application Needs location permissions\");\n\n // On pressing the Settings button.\n alertDialog.setPositiveButton(\"Settings\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int which) {\n launchAppPermissions();\n }\n });\n\n // On pressing the cancel button\n alertDialog.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n finish();\n }\n });\n\n // Showing Alert Message\n alertDialog.show();\n }", "private void requestLocationPermission() {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n\n new AlertDialog.Builder(this)\n .setTitle(\"Permission needed\")\n .setMessage(\"Location Permission is needed to show your current location on the map\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(ScavengerHunt.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 2);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n Toast.makeText(ScavengerHunt.this, \"Location Permission is needed to update the map\", Toast.LENGTH_SHORT).show();\n }\n })\n .create()\n .show();\n\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 2);\n }\n }", "@Override\n\t\t\tpublic void onLocationFailure(String error) {\n\t\t\t\tmLoadingDialog.cancelDialog();\n\t\t\t\tToastUtil.showToast(error);\n\t\t\t}", "private void showMissingPermissionError() {\n PermissionUtils.PermissionDeniedDialog\n .newInstance(true).show(getFragmentManager(), \"dialog\");\n }", "private void showMissingPermissionError() {\n PermissionUtils.PermissionDeniedDialog.newInstance(true).show(getSupportFragmentManager(), \"dialog\");\n }", "public static DialogFragment locationPermissionDialog(Context context) {\n if (context == null) {\n return null;\n }\n BasicInfoDialogFragment dialogFragment = new BasicInfoDialogFragment();\n dialogFragment.setText(\n context.getString(R.string.dialog_wizard_location_permission_title),\n context.getString(R.string.dialog_wizard_location_permission_message));\n dialogFragment.setPositive(context.getString(R.string.dialog_wizard_location_permission_positive), null);\n commitFragment(context, dialogFragment, \"locationPermissionDialogTag\");\n return dialogFragment;\n }", "private void checkLocationPermission() {\n if(ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n if (ActivityCompat.shouldShowRequestPermissionRationale(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION)) {\n new AlertDialog.Builder(getActivity())\n .setTitle(\"give permission\")\n .setMessage(\"give permission message\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n })\n .create()\n .show();\n }\n else{\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n }\n\n }", "private void getLocation() {\n if(ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED){\n if(ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION)){\n new AlertDialog.Builder(this)\n .setTitle(\"Location Permission Required\")\n .setMessage(\"This app needs permission to use your location\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(RestaurantsActivity.this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_LOCATIONS);\n }\n })\n .create()\n .show();\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_LOCATIONS);\n }\n }\n }", "@Override\n public void onFailure(Exception e) {\n int statusCode = ((ApiException) e).getStatusCode();\n switch (statusCode) {\n case LocationSettingsStatusCodes.RESOLUTION_REQUIRED:\n try {\n ResolvableApiException rae = (ResolvableApiException) e;\n Toast.makeText(MainActivity.this, \"Location Setting Incorrect\", LENGTH_SHORT).show();\n // Call startResolutionForResult to display a pop-up asking the user to enable related permission.\n rae.startResolutionForResult(MainActivity.this, 0);\n } catch (IntentSender.SendIntentException sie) {\n Toast.makeText(MainActivity.this, (CharSequence) sie, LENGTH_SHORT).show();\n }\n break;\n default:\n break;\n }\n }", "private void permissionLocationRequest() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n int hasLocationPermission = checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION);\n if (hasLocationPermission != PackageManager.PERMISSION_GRANTED) {\n if (!shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_FINE_LOCATION)) {\n showMessageOKCancel(\"You need to allow access to Location\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_CODE_ASK_PERMISSIONS);\n }\n });\n }\n }\n\n }\n }", "private void requestPermission() {\n if (shouldShowRequestPermissionRationale(android.Manifest.permission.ACCESS_FINE_LOCATION)) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setMessage(this.getResources().getString(R.string.request_location_permission_message))\n .setPositiveButton(this.getResources().getString(R.string.OK), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION},\n REQUEST_LOCATION);\n }\n });\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n } else {\n ActivityCompat.requestPermissions((Activity) mContext,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION},\n REQUEST_LOCATION);\n }\n }", "@Override\n public void onPermissionGranted(PermissionGrantedResponse response) {\n\n final ProgressDialog progressDialog = new ProgressDialog(InfoActivity.this);\n progressDialog.setMessage(\"Getting your location...\");\n progressDialog.show();\n SmartLocation.with(InfoActivity.this).location().oneFix().start(new OnLocationUpdatedListener() {\n @Override\n public void onLocationUpdated(Location location) {\n latitudeStr = String.valueOf(location.getLatitude());\n longitudeStr = String.valueOf(location.getLongitude());\n progressDialog.dismiss();\n Toast.makeText(InfoActivity.this, location.getLatitude() + \" \" + location.getLongitude(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n\tpublic void setNotFoundUserError() {\n\t\tnew Customdialog_Base(this, \"존재하지 않는 정보입니다.\").show();\n\t}", "private void locationPermission() {\n if(Build.VERSION.SDK_INT<23){\n locationPermission = true;\n startService(new Intent(this, LocationService.class));\n }else{\n if(checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED\n && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED){\n locationPermission = true;\n startService(new Intent(this, LocationService.class));\n return;\n }\n\n if(shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_COARSE_LOCATION) && shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_FINE_LOCATION)){\n Snackbar.make(drawer,\"Location access is required to show your friend and questions on map.\",Snackbar.LENGTH_INDEFINITE)\n .setAction(\"OK\", new View.OnClickListener() {\n @TargetApi(Build.VERSION_CODES.M)\n @Override\n public void onClick(View v) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.ACCESS_COARSE_LOCATION},LOCATION_PERMISSION_CODE);\n }\n })\n .show();\n }else{\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.ACCESS_COARSE_LOCATION},LOCATION_PERMISSION_CODE);\n }\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MapsActivity.this,\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSION_REQ_LOC);\n }", "@Override\n public void onExplanationNeeded(List <String> permissionsToExplain) {\n Toast.makeText(this, \"You have to enable location on your device to use the map navigation\", Toast.LENGTH_LONG).show();\n }", "private void showDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n String message = context.getString(R.string.gps_error_message);\n builder.setMessage(message).setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface d, int id) {\n context.startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));\n d.dismiss();\n }\n }).setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface d, int id) {\n d.cancel();\n }\n });\n builder.create().show();\n }", "private void askPermissionsAndShowMyLocation() {\n if (Build.VERSION.SDK_INT >= 23) {\n int accessCoarsePermission\n = ContextCompat.checkSelfPermission(activity, android.Manifest.permission.ACCESS_COARSE_LOCATION);\n int accessFinePermission\n = ContextCompat.checkSelfPermission(activity, android.Manifest.permission.ACCESS_FINE_LOCATION);\n\n\n if (accessCoarsePermission != PackageManager.PERMISSION_GRANTED\n || accessFinePermission != PackageManager.PERMISSION_GRANTED) {\n // The Permissions to ask user.\n String[] permissions = new String[]{android.Manifest.permission.ACCESS_COARSE_LOCATION,\n android.Manifest.permission.ACCESS_FINE_LOCATION};\n // Show a dialog asking the user to allow the above permissions.\n ActivityCompat.requestPermissions(activity, permissions,\n REQUEST_ID_ACCESS_COURSE_FINE_LOCATION);\n\n return;\n }\n }\n\n // Show current location on Map.\n this.showMyLocation();\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(AdminMap.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "private void displayLocation() {\n\n if(customProgressDialog.isShowing())\n customProgressDialog.cancel();\n\n boolean hasPermissionFine = (ContextCompat.checkSelfPermission(LocationChooser.this,\n android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED);\n boolean hasPermissionCoarse = (ContextCompat.checkSelfPermission(LocationChooser.this,\n android.Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED);\n if (!hasPermissionFine || !hasPermissionCoarse) {\n ActivityCompat.requestPermissions(LocationChooser.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION}, REQUEST_LOCATION);\n } else {\n mLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n }\n mLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n if (mLocation != null) {\n sLat = mLocation.getLatitude();\n sLang = mLocation.getLongitude();\n Log.d(\"curren location:\", String.valueOf(sLat) + \"::\" + String.valueOf(sLang));\n source.setText(\"Your location\");\n //locationText.setText(String.valueOf(sLat)+\"::\"+String.valueOf(sLang));\n } else {\n Toast.makeText(this, \"Location not Detected.\", Toast.LENGTH_SHORT).show();\n // showSettingsAlert();\n }\n }", "public void getLocationPermission() {\n if (!isPermissionGranted())\n // get the location permission from user\n // this will prompt user a dialog to give the location permission\n requestPermissionLauncher.launch(Manifest.permission.ACCESS_FINE_LOCATION);\n /*ActivityCompat.requestPermissions(activity,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);*/\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(OwnerMapActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MapsActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "private void updateLocationUi() {\n if (mMap == null) {\n return;\n }\n try {\n if (mPermissionCheck.locationPermissionGranted()) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "public void checkLocationPermission() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n 99);\n }\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(mapActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(AddressBook_add.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(activity,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION );\n }", "private void updateLocationUI() {\n if (map == null) {\n return;\n }\n try {\n if (locationPermissionGranted) {\n map.setMyLocationEnabled(true);\n map.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n map.setMyLocationEnabled(false);\n map.getUiSettings().setMyLocationButtonEnabled(false);\n lastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "public void checkpermission()\n {\n permissionUtils.check_permission(permissions,\"Need GPS permission for getting your location\",1);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION );\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION );\n }", "@Override\n public void initialize(URL location, ResourceBundle resources) {\n errorMessage.setText(\"An item with the same name already exists in this location.\");\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(SearchActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "private void requestLocationPermission() {\n Log.d(MainActivity.TAG,\"Requesting location permission.\");\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (shouldShowRequestPermissionRationale(\n android.Manifest.permission.ACCESS_FINE_LOCATION)) {\n Toast.makeText(this, R.string.location_permission_request_rationale, Toast.LENGTH_SHORT).show();\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n }\n requestPermissions(new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MainActivity.MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n\t public void onLocationChanged(Location location) \n\t {\n\t dialog.show();\n\t latitudeValue = location.getLatitude();\n\t longitudeValue =location.getLongitude();\n\t if (latitudeValue != 0 && longitudeValue != 0){\n\t \n\t latitude.setText(\"Latitude is :\" + latitudeValue);\n\t longitude.setText(\"Longitude is :\" +longitudeValue);\n\t dialog.dismiss();\n\t }\n\t }", "public static void checkLocationPermission() {\n globalContext.stopService(locationIntent);\n\n globalFragmentActivity.requestPermissions(\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.ACCESS_COARSE_LOCATION\n },\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "private void askForLocationPermission() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n //this code will be executed on devices running on DONUT (NOT ICS) or later\n askForPermission(Manifest.permission.ACCESS_FINE_LOCATION, Extra.LOCATION);\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void checkLocationPermission() {\n\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED){\n //location permission required\n ActivityCompat.requestPermissions(this, new String[]\n {Manifest.permission.ACCESS_FINE_LOCATION}, PERMISSION_FINE_LOCATION);\n\n }else{\n //location already granted\n checkCoarseAddress();\n }\n }", "@Override\n protected void checkLocation() {\n // nothing\n }", "private void fetchlocation() {\n if (ContextCompat.checkSelfPermission(SelectService.this,\n Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Permission is not granted\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(SelectService.this,\n Manifest.permission.ACCESS_COARSE_LOCATION)) {\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n new AlertDialog.Builder(this)\n .setTitle(\"Required Location Permission\")\n .setMessage(\"You have to give permission to fetch your current location\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(SelectService.this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_COARSE_LOCATION);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n })\n .create()\n .show();\n\n } else {\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(SelectService.this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_COARSE_LOCATION);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n // Permission has already been granted\n fusedLocationClient.getLastLocation()\n .addOnSuccessListener(this, new OnSuccessListener<android.location.Location>() {\n @Override\n public void onSuccess(android.location.Location location) {\n // Got last known location. In some rare situations this can be null.\n if (location != null) {\n // Logic to handle location object\n latitude = location.getLatitude();\n longitude = location.getLongitude();\n }\n }\n });\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "@Override\n\t public void error()\n\t {\n\t Log.e(\"MAIN\",\"Error finding best guess location\");\n dS.lat=0;\n dS.lon=0;\n if(once)\n {\n\t //promptSetLocationService(MainActivity.this);\n }\n once=false;\n\t }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(WeatherByGPS.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onGeolocationPermissionsShowPrompt(String origin,\n GeolocationPermissions.Callback callback) {\n String perm = Manifest.permission.ACCESS_FINE_LOCATION;\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M ||\n ContextCompat.checkSelfPermission(Main2Activity.this, perm) == PackageManager.PERMISSION_GRANTED) {\n // we're on SDK < 23 OR user has already granted permission\n callback.invoke(origin, true, false);\n } else {\n if (!ActivityCompat.shouldShowRequestPermissionRationale(Main2Activity.this, perm)) {\n // ask the user for permission\n ActivityCompat.requestPermissions(Main2Activity.this, new String[]{perm}, REQUEST_FINE_LOCATION);\n\n // we will use these when user responds\n mGeolocationOrigin = origin;\n mGeolocationCallback = callback;\n }\n }\n }", "private void errorPopUp() {\n new AlertDialog.Builder(mActivity)\n .setTitle(\"Oops\")\n .setMessage(\"Please choose an emotional state or enter a date and time\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Go back without changing anything\n dialogInterface.dismiss();\n }\n })\n .create()\n .show();\n }", "@Override\n public void onSuccess(LocationSettingsResponse locationSettingsResponse) {\n Log.i(TAG, \"All location settings are satisfied.\");\n requestDangerousPermission();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(Userhome.this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_COURSE_LOCATION);\n }", "public void askPermission() {\n if (ContextCompat.checkSelfPermission(getActivity()\n , android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n reqestLocationPermission);\n }\n }", "private void AlertNoGps() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"El sistema GPS esta desactivado, ¿Desea activarlo?\")\n .setCancelable(false)\n .setPositiveButton(\"Si\", new DialogInterface.OnClickListener() {\n public void onClick(@SuppressWarnings(\"unused\") final DialogInterface dialog, @SuppressWarnings(\"unused\") final int id) {\n startActivity(new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS));\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(final DialogInterface dialog, @SuppressWarnings(\"unused\") final int id) {\n dialog.cancel();\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }", "public void onPermissionError(CommandEvent e);", "private void showRequestPermissionRationaleDialog(){\n new AlertDialog.Builder(this)\n .setMessage(\"Permissions needed to use application features.\")\n .setPositiveButton(\"Allow\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n startAppSettingsConfigActivity();\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n })\n .setCancelable(false)\n .create()\n .show();\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {\n switch (requestCode) {\n case LOCATION_REQUEST_CODE:\n // If request is denied, the result arrays are empty.\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n //Permission Granted\n fetchLastLocation();\n } else {\n AlertDialog alertDialog = new AlertDialog.Builder(MapsActivity.this).create();\n alertDialog.setTitle(\" Location Permission Denied!\");\n alertDialog.setMessage(\"\\nDefault Birmingham Location Used:\\n New Street Train Station\");\n alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n //Set default current location of New Street\n Location defaultLocation = new Location(\"LocationManager.GPS_PROVIDER\");\n defaultLocation.setLatitude(52.478060);\n defaultLocation.setLongitude(-1.898493);\n currentLocation = defaultLocation;\n supportMapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.fragment_content);\n supportMapFragment.getMapAsync(MapsActivity.this);\n break;\n }\n }\n }", "public void checkLocationPermission() {\n try {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (checkPermission(Manifest.permission.ACCESS_FINE_LOCATION, getActivity(), getActivity())) {\n if (checkPermission(Manifest.permission.ACCESS_COARSE_LOCATION, getActivity(), getActivity())) {\n gpsTracker.getLocation();\n } else {\n requestPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION, PERMISSION_REQUEST_CODE_LOCATION, getActivity().getApplicationContext(),\n getActivity());\n }\n } else {\n requestPermission(android.Manifest.permission.ACCESS_FINE_LOCATION, PERMISSION_REQUEST_CODE_LOCATION, getActivity().getApplicationContext(),\n getActivity());\n }\n } else {\n gpsTracker.getLocation();\n }\n } catch (Exception e) {\n // logException(e, \"GpsMapManualFragment_checkLocationPermission()\");\n }\n\n\n }", "public void showPatMissingDialog()\r\n {\r\n SearchButton.setEnabled(false);\r\n JOptionPane.showMessageDialog(MainFrame,\r\n\t\t \"The PAT regular expression library is not accessible.\\n\"\r\n + \"1. Make sure the software is installed.\\n\"\r\n + \"2. Check it is included in the CLASSPATH.\\n\"\r\n + \"For more details press the 'About' button.\",\r\n \"PAT software error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }", "public void showError() {\n mapView.setVisibility(View.GONE);\n loadingLayout.setVisibility(View.GONE);\n errorLayout.setVisibility(View.VISIBLE);\n\n }", "private void askPermissionsAndShowMyLocation() {\n boolean isGPSEnabled = false;\n // flag for network status\n boolean isNetworkEnabled = false;\n // flag for GPS status\n boolean canGetLocation = false;\n LocationManager locationManager;\n\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n\n // getting GPS status\n isGPSEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);\n\n // getting network status\n isNetworkEnabled = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\n if (Build.VERSION.SDK_INT >= 23) {\n // flag for GPS status\n if (!isGPSEnabled && !isNetworkEnabled) {\n// no network provider is enabled\n final Intent data = new Intent();\n data.putExtra(\"latitude\", latitude);\n data.putExtra(\"longitude\", longitude);\n\n setResult(Activity.RESULT_CANCELED, data);\n finish();\n } else {\n// if (accessCoarsePermission != PackageManager.PERMISSION_GRANTED\n// || accessFinePermission != PackageManager.PERMISSION_GRANTED)\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // The Permissions to ask user.\n String[] permissions = new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION};\n // Show a dialog asking the user to allow the above permissions.\n ActivityCompat.requestPermissions(this, permissions,\n REQUEST_ID_ACCESS_COURSE_FINE_LOCATION);\n\n return;\n }\n this.showMyLocation();\n }\n\n } else {\n if (!isGPSEnabled && !isNetworkEnabled) {\n// no network provider is enabled\n final Intent data = new Intent();\n data.putExtra(\"latitude\", latitude);\n data.putExtra(\"longitude\", longitude);\n\n setResult(Activity.RESULT_CANCELED, data);\n finish();\n } else {\n this.showMyLocation();\n }\n\n\n }\n // Show current location on Map.\n }", "@Override\n public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {\n callback.invoke(origin, true, false);\n }", "private void showPermissionSnackbar() {\n Snackbar.make(\n findViewById(R.id.container), R.string.permission_explanation, Snackbar.LENGTH_LONG)\n .setAction(R.string.permission_explanation_action, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n requestFineLocationPermission();\n }\n })\n .show();\n }", "public static void noSupplierSelected(){\r\n\t\tAlert alert = new Alert(AlertType.ERROR);\r\n\t\talert.setTitle(\"Error!\");\r\n\t\talert.setHeaderText(\"\");\r\n\t\talert.setContentText(\"Bitte wählen Sie einen Lieferanten aus!\");\r\n\t\talert.showAndWait();\r\n\t}", "@Override\n \tpublic void onGeolocationPermissionsShowPrompt(String origin,Callback callback) {\n\t \tsuper.onGeolocationPermissionsShowPrompt(origin, callback);\n\t \tcallback.invoke(origin, true, false);\n \t}", "void checkMyLocationVisibility() {\n if (settings.getReturnToMyLocation() || presenter.isTracking())\n showMyLocation();\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 100) {\n if (resultCode != RESULT_OK)\n Toast.makeText(getContext(), \"GPS est déactivé\", Toast.LENGTH_LONG).show();\n else {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n setupmap();\n MapForm.setMyLocationEnabled(true);\n }\n }\n }\n }", "public void askForPermissionsGrant(){\n int res =ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION);\n int res2 =ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION);\n if (res!= PackageManager.PERMISSION_GRANTED || res2!= PackageManager.PERMISSION_GRANTED) {\n // Permission is not granted\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"We need to access your location\")\n .setMessage(\"We want to track every breath you take\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.READ_CONTACTS},\n MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n });\n builder.create().show();\n }\n else {\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n // Permission has already been granted\n publishLastLocation();\n }\n\n }", "@Override\r\n public void onPermissionDenied(PermissionDeniedResponse response) {\n if (response.isPermanentlyDenied()) {\r\n showSettingsDialog();\r\n }\r\n }", "@Override\r\n public void onPermissionDenied(PermissionDeniedResponse response) {\n if (response.isPermanentlyDenied()) {\r\n showSettingsDialog();\r\n }\r\n }", "private void showGrantPermissionDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Stop!\")\n .setMessage(\"You must grant all the permissions request otherwise you can't use this feature.\")\n .setCancelable(false)\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int i) {\n dialog.dismiss();\n }\n });\n builder.show();\n }", "public void show_dialog_box (){\n //show the message of turning on the location\n Dialog dialog = new Dialog(this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.location_message_r);\n dialog.show();\n }", "@Override\n public void onGeolocationPermissionsShowPrompt(String origin,\n GeolocationPermissions.Callback callback) {\n callback.invoke(origin, true, false);\n }", "private void showPermissionsAlert() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Permissions required!\")\n .setMessage(\"Camera needs few permissions to work properly. Grant them in settings.\")\n .setPositiveButton(\"GOTO SETTINGS\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n CameraUtils.openSettings(ReceiveActivity.this);\n }\n })\n .setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n\n }\n }).show();\n }", "private void requestPermission() {\n boolean shouldProvideRationale = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION);\n\n if (shouldProvideRationale) {\n Log.i(TAG, \"requestPermission: \" + \"Displaying the permission rationale\");\n // provide a way so that user can grant permission\n\n showSnackbar(R.string.warning_txt, android.R.string.ok, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startLocationPermissionRequest();\n }\n });\n\n } else {\n startLocationPermissionRequest();\n }\n }", "@Override\n\tpublic void setLocation(Point location) throws CannotPlaceUserException {\n\t\tsuper.setLocation(location);\n\t}", "@Override\n public void onPermissionDenied(PermissionDeniedResponse response) {\n if (response.isPermanentlyDenied()) {\n showSettingsDialog();\n }\n }", "private void buildAlertMessageNoGps() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"This application requires GPS to work properly, do you want to enable it?\")\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n //if they click \"yes\" - ask permission for GPS\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Intent enableGpsIntent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n Log.d(TAG, \"onClick: yes\");\n // to know if the user accepted the permission, onActivityResult is called after\n startActivityForResult(enableGpsIntent, PERMISSION_REQ_ENABLE_GPS);\n }\n });\n final AlertDialog alert = builder.create();\n alert.show();\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(ActivityLivetrackingRest.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n }\n }", "@Override\n public void onFailed(int requestCode, List<String> deniedPermissions) {\n AndPermission.defaultSettingDialog(MainActivity.this, PERMISSION_CODE_WRITE_EXTERNAL_STORAGE)\n .setTitle(\"Failure of permission application\")\n .setMessage(\"Some of the permissions we need have been rejected by you or the system failed to apply for errors. Please go to the settings page to authorize manually, otherwise the function will not work properly!\")\n .setPositiveButton(\"Okay, go ahead and set it up\")\n .show();\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n\n // Display the user selected map type\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n MapStyleOptions style = MapStyleOptions.loadRawResourceStyle(mContext, R.raw.map_style_night);\n mMap.setMapStyle(style);\n\n // Don't want to display the default location button because\n // we are already displaying using a FAB\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n\n mMap.setOnMyLocationClickListener(this);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "public void validateGarageLocationError (String strRegion)\r\n\t{\r\n\r\n\t\tif (orPolicyVehicleHub.pnlScreenError.isDisplayed () == true)\r\n\t\t{\r\n\t\t\tdo\r\n\t\t\t{\r\n\t\t\t\tWebDriverWait load = new WebDriverWait (driver, GlobalWaitTime.getIntWaitTime ());\r\n\t\t\t\tload.until (ExpectedConditions.elementToBeClickable (orPolicyVehicleHub.lnkCloseError));\r\n\t\t\t\torPolicyVehicleHub.lnkCloseError.click ();\r\n\r\n\t\t\t\tthis.changeAddress (strRegion);\r\n\t\t\t} while (orPolicyVehicleHub.pnlScreenError.isDisplayed () == true);\r\n\t\t}\r\n\t}", "private void buildAlertMessageNoGps()\n {\n builder = new AlertDialog.Builder(SplashActivity.this);//Enable to getLocation\n builder.setMessage(getString(R.string.gpsdisabled))\n .setCancelable(false)\n .setPositiveButton(getString(R.string.settings), new DialogInterface.OnClickListener() {\n public void onClick(@SuppressWarnings(\"unused\") final DialogInterface dialog, @SuppressWarnings(\"unused\") final int id) {\n startActivityForResult(new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS), 01);\n }\n })\n .setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {\n public void onClick(final DialogInterface dialog, @SuppressWarnings(\"unused\") final int id)\n {\n finish();\n dialog.cancel();\n }\n });\n alert = builder.create();\n alert.show();\n }", "private void fineLocationPermissionGranted() {\n UtilityService.addGeofences(this);\n UtilityService.requestLocation(this);\n }", "public interface LocationCallback {\n \n void lacksPermission();\n void withLocation(Location location);\n}", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n }\n }", "@Override\n public void onClick(View view) {\n locationChecker.checkBeforeAsking(new PermissionChecker.CheckPermissionListener() {\n @Override\n public void onPermissionDenied() {\n Navigator.fromAnyActivityToLocationPickerActivity(NewPubActivity.this, null, null);\n }\n\n @Override\n public void onPermissionGranted() {\n\n gm.requestLastLocation(new GeoManager.GeoDirectLocationListener() {\n @Override\n public void onLocationError(Throwable error) {\n Navigator.fromAnyActivityToLocationPickerActivity(NewPubActivity.this, null, null);\n }\n\n @Override\n public void onLocationSuccess(double latitude, double longitude) {\n Navigator.fromAnyActivityToLocationPickerActivity(NewPubActivity.this, latitude, longitude);\n }\n });\n }\n });\n }", "private void showErrorDialog(int errorCode) {\n\t\t\n }", "public interface MapViewInterface {\n\n /**\n * Show a pop-up error to the user to inform of an error\n *\n * @param errorMessage message to be displayed into the dialog.\n */\n public void showError(String errorMessage);\n}", "@Override\n public void onRequestPermissionsResult(@NonNull int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n if (permissions.length == 0) {\n return;\n }\n boolean allPermissionsGranted = true;\n if (grantResults.length > 0) {\n for (int grantResult : grantResults) {\n if (grantResult != PackageManager.PERMISSION_GRANTED) {\n allPermissionsGranted = false;\n break;\n }\n }\n }\n if (!allPermissionsGranted) {\n boolean somePermissionsForeverDenied = false;\n for (String permission : permissions) {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, permission)) {\n //denied\n } else {\n if (ActivityCompat.checkSelfPermission(this, permission) == PackageManager.PERMISSION_GRANTED\n && requestCode == Extra.LOCATION) {\n getLocation();\n } else {\n //set to never ask again\n somePermissionsForeverDenied = true;\n }\n }\n }\n if (somePermissionsForeverDenied) {\n final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);\n alertDialogBuilder.setTitle(R.string.permissions_required)\n .setMessage(R.string.you_have_explicitly_denied_permissions_which_are_required_by_this_app_to_run_for_this_action_open_settings_go_to_permissions_and_allow_them)\n .setPositiveButton(R.string.settings, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,\n Uri.fromParts(Extra.PACKAGE, getPackageName(), null));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }\n })\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n })\n .setCancelable(false)\n .create()\n .show();\n }\n } else if (requestCode == Extra.LOCATION) {\n getLocation();\n }\n }", "@Override\n public void onLocationResult(LocationResult locationResult) {\n super.onLocationResult(locationResult);\n Log.d(TAG, \"onLocationResult: \");\n if (locationResult != null) {\n Log.d(TAG, \"onLocationResult: loaction!==null\");\n myLocation = locationResult.getLastLocation();\n showMarker();//de show hinh len\n }\n }" ]
[ "0.6958244", "0.67710596", "0.6752319", "0.6617532", "0.6522053", "0.6472646", "0.6438382", "0.641026", "0.6198996", "0.6167778", "0.6096244", "0.6072465", "0.6002546", "0.5997172", "0.5991611", "0.59908015", "0.59864205", "0.5952292", "0.59252274", "0.59153193", "0.59078944", "0.5907237", "0.59072334", "0.5881047", "0.585335", "0.58171016", "0.5807168", "0.57957464", "0.5774173", "0.57716465", "0.5771615", "0.5757954", "0.57511234", "0.5741735", "0.5741058", "0.57368547", "0.573413", "0.5733721", "0.5728165", "0.5726372", "0.5721944", "0.57201004", "0.5710531", "0.5694833", "0.56784964", "0.5677639", "0.56769514", "0.5675524", "0.5675524", "0.5675524", "0.5667767", "0.5666371", "0.56650454", "0.5661589", "0.56603754", "0.56532264", "0.56371325", "0.56322616", "0.5625875", "0.56250703", "0.5623895", "0.5622218", "0.5593556", "0.55908835", "0.5585392", "0.5578168", "0.55778533", "0.557339", "0.5573216", "0.55686665", "0.5564322", "0.55623156", "0.55601877", "0.55601877", "0.554661", "0.5545272", "0.5542711", "0.5528287", "0.55063397", "0.55024046", "0.54982877", "0.54877543", "0.5482537", "0.5457194", "0.54546523", "0.544871", "0.54473495", "0.54440075", "0.5435361", "0.5433891", "0.54316133", "0.5420297", "0.5402221", "0.5396328", "0.53938526", "0.53916514" ]
0.65363395
8
final String info = (String) marker.getExtraInfo().get("info");
@Override public boolean onMarkerClick(Marker marker) { Toast.makeText(CameraInfoActivity.this,"点击布点",Toast.LENGTH_SHORT).show(); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View getInfoContents(final Marker marker) {\n infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n clickhere = ((TextView) infoWindow.findViewById(R.id.tvClickHere));\n clickhere.setText(R.string.click_here);\n\n googleMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n Intent intent = new Intent(MapActivity.this, MoreOptionsActivity.class);\n if (source == null) {\n source = new LatLng(mDefaultLocation.latitude, mDefaultLocation.longitude);\n }\n if (destination == null) {\n destination = source;\n }\n\n intent.putExtra(\"source_Latitude\", source.latitude);\n intent.putExtra(\"source_Longitude\", source.longitude);\n\n intent.putExtra(\"dest_Latitude\", destination.latitude);\n intent.putExtra(\"dest_Longitude\", destination.longitude);\n\n intent.putExtra(\"title\", marker.getTitle());\n\n startActivity(intent);\n\n }\n });\n\n return infoWindow;\n }", "@Override\n public View getInfoContents(Marker marker) {\n infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(place.getAddress());\n\n snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(place.getLatLng().latitude + \",\" + place.getLatLng().longitude);\n\n clickhere = ((TextView) infoWindow.findViewById(R.id.tvClickHere));\n clickhere.setText(R.string.click_here);\n\n googleMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n Intent intent = new Intent(MapActivity.this, MoreOptionsActivity.class);\n if (source == null) {\n source = new LatLng(mDefaultLocation.latitude, mDefaultLocation.longitude);\n }\n if (destination == null) {\n destination = source;\n }\n\n intent.putExtra(\"source_Latitude\", source.latitude);\n intent.putExtra(\"source_Longitude\", source.longitude);\n\n intent.putExtra(\"dest_Latitude\", destination.latitude);\n intent.putExtra(\"dest_Longitude\", destination.longitude);\n\n intent.putExtra(\"title\", place.getAddress());\n intent.putExtra(\"place_selection\", place_selection_flag);\n\n startActivity(intent);\n\n }\n });\n\n return infoWindow;\n }", "public void setExtraInfo (String info) {\n\tthis.extraInfo = info;\n }", "@Override\n public View getInfoContents(Marker marker) {\n View view = inflater.inflate(R.layout.layout_info_window, null, false);\n TextView txtName = view.findViewById(R.id.txtName);\n txtName.setText(marker.getTitle());\n// txtName.setText(message);\n return view;\n }", "public void onInfoWindowClick(Marker marker2) {\n\n AlertDialog.Builder builder2 = new AlertDialog.Builder(Detalles.this);\n builder2.setTitle(\"Epicent\");\n builder2.setMessage(\"Referencia : \" +\"ddddddd\" +\"\\n\" +\n \"Fecha local : \" + \"ccccccc\" +\"\\n\" +\n \"Hora local : \" + \"ccccccc\"+ \"\\n\" +\n \"Profundidad : \" + \"ccccccc\"+\" km\"+ \"\\n\" +\n \"Intensidad : \" + \"ccccccc\"+ \"\\n\" +\n \"Magnitud : \" + \"ccccccc\"+ \"\\n\" +\n \"Ubicación : \" + \"ccccccc\"+ \", \" + \"ccccccc\");\n builder2.setNegativeButton(\"Cerrar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog2, int which) {\n dialog2.cancel();\n }\n });\n\n builder2.setCancelable(true);\n builder2.create().show();\n\n }", "@Override\n public View getInfoContents(Marker arg0) {\n View v = getActivity().getLayoutInflater().inflate(R.layout.info_window, null);\n // Getting reference to the TextView to set latitude\n TextView tvLat = (TextView) v.findViewById(R.id.title);\n\n // Getting reference to the TextView to set longitude\n TextView tvLng = (TextView) v.findViewById(R.id.distance);\n System.out.println(\"Title : \" + arg0.getTitle());\n if (arg0.getTitle() != null && arg0.getTitle().length() > 0) {\n // Getting the position from the marker\n\n final String title = arg0.getTitle();\n\n db.open();\n Cursor c = db.getStateFromSelectedFarm(title);\n if (c.moveToFirst()) {\n do {\n AppConstant.stateID = c.getString(c.getColumnIndex(DBAdapter.STATE_ID));\n /* String contour = c.getString(c.getColumnIndex(DBAdapter.CONTOUR));\n getAtLeastOneLatLngPoint(contour);*/\n }\n while (c.moveToNext());\n }\n db.close();\n\n final String distance = arg0.getSnippet();\n tvLat.setText(title);\n tvLng.setText(distance);\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(title).\n setMessage(distance).\n setPositiveButton(\"Farm Data\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n dialogInterface.cancel();\n Intent intent = new Intent(getActivity(), NavigationDrawerActivity.class);\n intent.putExtra(\"calling-activity\", AppConstant.HomeActivity);\n intent.putExtra(\"FarmName\", title);\n\n startActivity(intent);\n getActivity().finish();\n\n\n }\n }).\n setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n builder.show();\n\n } else {\n // Setting the latitude\n tvLat.setText(String.valueOf(arg0.getPosition().latitude));\n // Setting the longitude\n tvLng.setText(String.valueOf(arg0.getPosition().longitude));\n }\n return v;\n }", "@Override\n public View getInfoContents(Marker marker) {\n @SuppressLint(\"InflateParams\") View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents, null);\n\n TextView title = infoWindow.findViewById(R.id.title);\n title.setText(marker.getTitle());\n\n TextView snippet = infoWindow.findViewById(R.id.snippet);\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n\n if (Config.CEK_KONEKSI(ListDealerMaps.this)) {\n if (markerAccessMapping.get(marker).equals(\"1\")) {\n Intent resultIntent = new Intent();\n resultIntent.putExtra(Config.DISP_KD_DEALER, markerIdMapping.get(marker));\n resultIntent.putExtra(Config.DISP_COY_DEALER, markerCoyMapping.get(marker));\n resultIntent.putExtra(Config.DISP_NAMA_DEALER, marker.getTitle());\n setResult(Activity.RESULT_OK, resultIntent);\n finish();\n }else{\n Toast.makeText(ListDealerMaps.this, Config.ALERT_ONLY_VIEW, Toast.LENGTH_SHORT).show();\n }\n } else {\n showDialog(Config.TAMPIL_ERROR);\n }\n\n }", "@Override\n public View getInfoContents(Marker marker) {\n\n //PARAMS GENERALES\n int size = 18;\n\n //DIBUJAMOS dentro de los elementos que tenemos\n View popupView = inflater.inflate(R.layout.popupmap, null);\n Meteo meteo = (Meteo) marker.getTag();\n TextView ttvTitle = (TextView) popupView.findViewById(R.id.title);\n TextView txtDesc = (TextView) popupView.findViewById(R.id.desc);\n TextView txtTemp = (TextView) popupView.findViewById(R.id.temp);\n TextView txtTempMin = (TextView) popupView.findViewById(R.id.tempMin);\n TextView txtTempMax = (TextView) popupView.findViewById(R.id.tempMax);\n ImageView imageView = (ImageView) popupView.findViewById(R.id.imageView);\n TextView txtWind = (TextView) popupView.findViewById(R.id.wind);\n\n //TITLE and PARAMS\n ttvTitle.setText(meteo.getName());\n ttvTitle.setTextSize(25);\n ttvTitle.setTextColor(Color.WHITE);\n ttvTitle.setBackgroundColor(Color.BLUE);\n\n //IMAGE\n imageView.setImageDrawable(getDrawable(getResources().getIdentifier(\"_\" + meteo.getWeather().get(0).getIcon(), \"drawable\", getPackageName())));\n\n //TEXT VIEWS\n txtDesc.setText(\"Description: \" + meteo.getWeather().get(0).getDescription());\n txtTemp.setText(\"Température: \" + meteo.getMain().getTemp() + \"°C\");\n txtTempMax.setText(\"MAX: \" + meteo.getMain().getTemp_max() + \"°C\");\n txtTempMin.setText(\"MIN: \" + meteo.getMain().getTemp_min() + \"°C\");\n txtWind.setText(\"Force du vent: \" + meteo.getWind().getSpeed() + \" Deg: \" + meteo.getWind().getDeg());\n\n //PARAMS TEXT VIEWS\n txtDesc.setTextSize(size);\n txtTemp.setTextSize(size);\n txtTempMax.setTextSize(size);\n txtTempMin.setTextSize(size);\n txtWind.setTextSize(size);\n\n return popupView ;\n }", "@Override\n public View getInfoContents(Marker marker) {\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }", "@Override\n public View getInfoContents(Marker marker) {\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }", "@Override\n public View getInfoContents(Marker marker) {\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }", "@Override\n public View getInfoContents(Marker marker) {\n TextView titleView = (TextView) contentsView.findViewById(R.id.text_info_window_title);\n titleView.setText(marker.getTitle());\n return contentsView;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n if (Objects.equals(marker.getTag(), true)) {\n Toast.makeText(MapsActivity.this,\n \"Own marker\", Toast.LENGTH_SHORT).show();\n } else {\n try {\n showDetails(marker);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n return true;\n }", "public void showDetails(Marker marker) throws JSONException{\n JSONObject data = (JSONObject) marker.getTag();\n\n // Get data from JSONObject\n String name = getName(data);\n String address = getAddress(data);\n String direction = data.getString(\"direction\");\n\n View layout = findViewById(R.id.detailspopup);\n\n // Find views\n TextView nameView = (TextView) findViewById(R.id.name);\n TextView addressView = (TextView) findViewById(R.id.address);\n TextView directionView = (TextView) findViewById(R.id.direction);\n\n // Add data to views\n nameView.setText(name);\n addressView.setText(address);\n directionView.setText(direction);\n\n // Show invisible layout\n layout.setVisibility(View.VISIBLE);\n }", "@Override\n\tpublic void info(Marker marker, CharSequence message) {\n\n\t}", "@Override\n public void onInfoWindowClick(Marker marker) {\n makeText(this, \"Info window clicked\",\n LENGTH_SHORT).show();\n marker.getTag();\n marker.getTitle();\n marker.getId();\n\n }", "public void showMarkerInfo(OperaFirebase mapMarker){\n Intent i = new Intent(this, MarkerInfoActivity.class);\n i.putExtra(\"MapMarker\", mapMarker);\n startActivity(i);\n }", "@Override\n\tpublic void info(Marker marker, String message, Object... params) {\n\n\t}", "@Override\n public View getInfoContents(Marker arg0) {\n\n // Getting view from the layout file info_window_layout\n View v = getLayoutInflater().inflate(R.layout.window_layout, null);\n\n // Getting reference to the TextView to set latitude\n TextView tvLat = (TextView) v.findViewById(R.id.beacon_title1);\n\n // Getting reference to the TextView to set longitude\n ImageView img = (ImageView) v.findViewById(R.id.goat);\n\n // Setting the latitude\n tvLat.setText(arg0.getTitle());\n // Returning the view containing InfoWindow contents\n return v;\n\n }", "@Override\n public View getInfoContents(Marker marker)\n {\n View view = context.getLayoutInflater().inflate(R.layout.custominfowindow, null);\n\n TextView tvTitle = (TextView) view.findViewById(R.id.tv_title);\n TextView tvSubTitle = (TextView) view.findViewById(R.id.tv_subtitle);\n TextView tvAddress = (TextView) view.findViewById(R.id.tv_address);\n TextView tvOpeningTimes = (TextView) view.findViewById(R.id.tv_openingTimes);\n\n BuildingInfo building = (BuildingInfo)marker.getTag();\n\n tvTitle.setText(marker.getTitle());\n tvSubTitle.setText(marker.getSnippet());\n tvAddress.setText(building.getAddress());\n tvOpeningTimes.setText(\"Opening hours: \\n\" + Html.fromHtml(building.getOpeningTimes()));\n\n return view;\n }", "@Override\n public void onMarkerDrag(Marker marker) {\n String data_map = marker.getPosition().toString();\n String[] result = data_map.split(\",\");\n Log.d(TAG, \"ON DRAG SOMETHING \" + result[0] + \" | \" + result[1]);\n }", "@Override\n\t\t\t\tpublic View getInfoContents(Marker arg0) {\n\t\t\t\t\tView v = null;\n\n\t\t\t\t\t// Getting the position from the marker\n\t\t\t\t\tLatLng latLng = arg0.getPosition();\n\n\t\t\t\t\t// Getting reference to the TextView to set latitude\n\t\t\t\t\t//TextView tvLat = (TextView) v.findViewById(R.id.tv_lat);\n\n\t\t\t\t\t// Getting reference to the TextView to set longitude\n\t\t\t\t\t// TextView tvLng = (TextView) v.findViewById(R.id.tv_lng);\n\n\t\t\t\t\tString str = getAddress(context, latLng.latitude,\n\t\t\t\t\t\t\tlatLng.longitude);\n\n\t\t\t\t\treturn v;\n\t\t\t\t}", "public String getMarker() {\n return marker;\n }", "public String getMarker() {\n return marker;\n }", "@Override\n public String getInfo(){\n return info;\n }", "@Override\n public View getInfoContents(Marker marker) {\n return null;\n }", "@Override\n\tpublic void onInfoWindowClick(Marker marker)\n\t{\n\t\tString id = marker.getId();\n\t\tid = id.substring(1);\n\n\t\tmyLocation = new LatLng(map.getMyLocation().getLatitude(), map.getMyLocation().getLongitude());\n\n\t\tif (myLocation != null)\n\t\t{\n\t\t\tBundle bundle = new Bundle();\n\t\t\tbundle.putString(KEY_NAMA, listTempatMakan.get(Integer.parseInt(id)).getNama());\n\t\t\tbundle.putString(KEY_ALAMAT, listTempatMakan.get(Integer.parseInt(id)).getAlamat());\n\t\t\tbundle.putDouble(KEY_LAT_TUJUAN, marker.getPosition().latitude);\n\t\t\tbundle.putDouble(KEY_LNG_TUJUAN, marker.getPosition().longitude);\n\t\t\tbundle.putDouble(KEY_LAT_ASAL, myLocation.latitude);\n\t\t\tbundle.putDouble(KEY_LNG_ASAL, myLocation.longitude);\n\n\t\t\tIntent i = new Intent(MainActivity.this, InfoTempatMakanActivity.class);\n\t\t\ti.putExtras(bundle);\n\t\t\tstartActivity(i);\n\n\t\t} else\n\t\t{\n\t\t\tToast.makeText(this, \"Tidak dapat menemukan lokasi anda \", Toast.LENGTH_LONG).show();\n\t\t}\n\t}", "public String[] getExtraInfo() {\n return extraInfo;\n }", "public String getMarker() {\n return this.marker;\n }", "@Override\n\tpublic void info(Marker marker, String message) {\n\n\t}", "String getExtra();", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n\n String title = marker.getTitle();\n if (title.equals(\"A\")){\n marker.setSnippet(info_A);\n\n }else if (title.equals(\"B\")){\n marker.setSnippet(info_B);\n }\n\n\n return false;\n }", "@Override\n\t\t\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\t\t\tLog.d(\"ASD\", marker.getTitle());\n\t\t\t\t\t\tString markerItemId = infoList.get(marker.getTitle());\n\t\t\t\t\t\tonMapWindwosClick(markerItemId, marker.getTitle());\n\t\t\t\t\t}", "@Override\n public void onMapReady(GoogleMap googleMap)\n {\n\n\n mMap = googleMap;\n Intent intent = getIntent();\n seisme = (Seisme) intent.getSerializableExtra(\"seisme\");\n String[] split = seisme.getPoint().split(\" \");\n LatLng point = new LatLng(Double.parseDouble(split[0]), Double.parseDouble(split[1]));\n mMap.addMarker(new MarkerOptions().position(point).title(seisme.getTitle()));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(point));\n\n mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener()\n {\n @Override\n public void onInfoWindowClick(Marker marker)\n {\n Context context = getApplicationContext();\n Intent intent = new Intent(MapsActivity.this, infoDetail.class);\n intent.putExtra(\"item\", seisme);\n startActivity(intent);\n }\n });\n }", "@Override\n\t\tpublic View getInfoContents(Marker marker) {\n\t\t\treturn null;\n\t\t}", "@Override\n\tpublic void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3) {\n\n\t}", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n\n String title = marker.getTitle();\n if (title.equals(\"A\")) {\n marker.setSnippet(info_A);\n\n }else if (title.equals(\"B\")){\n marker.setSnippet(info_B);\n }\n\n\n return false;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n\n\n String title = marker.getTitle();\n if (title.equals(\"A\")) {\n marker.setSnippet(info_A);\n\n }else if (title.equals(\"B\")){\n marker.setSnippet(info_B);\n }\n\n\n return false;\n }", "public String getInfoString() {\n/* 140 */ return this.info;\n/* */ }", "private void describe() {\n\n GridPoint geotag = myGridPoint();\n\n MarkerOptions marker = new MarkerOptions().gridPoint(geotag);\n marker.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));\n mMap.addMarker(marker);\n\n Intent data = getIntent();\n String name = (String) data.getSerializableExtra(\"name\");\n String number = (String) data.getSerializableExtra(\"number\");\n Intent intent = new Intent(MainActivity.this,Description.class);\n intent.putExtra(\"name\", name);\n intent.putExtra(\"number\", number);\n startActivityForResult(intent,101);\n\n }", "@Override\n public void onInfoWindowLongClick(Marker marker) {\n if (marker.getTitle().equals(\"New Maintenance Form\")){\n newOld = false; //don't have to do anything.....\n }else{\n //newOld = true;\n load_id=marker.getSnippet();\n }\n //pull up the maintenance form\n Intent intent = new Intent(MaintenanceMapActivity.this, MaintenanceActivity.class);\n intent.putExtra(\"latitude\", latitude );\n intent.putExtra(\"longitude\",longitude);\n startActivity(intent);\n }", "public String getInfoString();", "@Override\n\tpublic boolean isInfoEnabled(Marker marker) {\n\t\treturn false;\n\t}", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t}", "@Override\n\t\t\tpublic View getInfoWindow(Marker marker) {\n\t\t\t\tView v = getLayoutInflater().inflate(R.layout.map_info_window, null);\n\n // Getting reference to the TextView to set title\n TextView memo = (TextView) v.findViewById(R.id.memo);\n ImageView imgV = (ImageView) v.findViewById(R.id.photo);\n\n memo.setText(marker.getTitle());\n\n \n /**\n * marker는 생성되는 순서대로 m0, m1, m2... m 뒤에 붙는 숫자들은 마커의 인덱스이고 이 인덱스는 \n * areaList의 인덱스와 같으므로 마커의 인덱스를 파싱해서 areaList에 그 인덱스로 접근하면 지역정보를 얻을 수 있다.\n */\n String id = marker.getId();\n int mIdx = Integer.parseInt( id.substring(1) ); // m 제외하고 스트링파싱 인트파.\n // LatLng l = marker.getPosition();\n \n String mPath = mAreaList.get(mIdx).pathOfPic.get(0); // 해당 위치에 저장된 많은 사진중 첫번째 사진주\n Bitmap bitm = decodeBitmapFromStringpath(mPath, 100, 100);\n imgV.setImageBitmap(bitm);\n// imgV.setImageURI(Uri.parse(mPath));\n // Returning the view containing InfoWindow contents\n return v;\n\t\t\t}", "public String getInfo()\n {\n return info;\n }", "@Override\n public View getInfoContents(Marker marker) {\n final View infoWin = inflater.inflate(R.layout.info_window_layout,null);\n\n //Instanciate and assign layout components\n ImageView itemPic = (ImageView) infoWin.findViewById(R.id.infoWinMarkerImage);\n\n TextView markerVendor = (TextView) infoWin.findViewById(R.id.infoWinMarkerVendor);\n\n TextView markerAvail = (TextView) infoWin.findViewById(R.id.infoWinMarkerAvail);\n\n\n //Set layout components\n\n Bitmap b = matchImage(marker);\n if(b != null){\n itemPic.setImageBitmap(b);\n }else{\n itemPic.setImageResource(R.drawable.utech_test);\n }\n\n markerVendor.setText(marker.getTitle());\n markerAvail.setText(marker.getSnippet());\n\n return infoWin;\n }", "String getAdditionalInfo();", "@Override\n\tpublic void info(Marker marker, String message, Object p0, Object p1, Object p2) {\n\n\t}", "public String getInfo() {\n return info;\n }", "public String getInfo() {\n return this.info;\n }", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\tint id = hashmap.get(marker)-1;\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tDataBase.Object object = new Object();\n\t\t\t\tobject = list.get(id);\n\n\t\t\t\tbundle.putSerializable(\"ob\", object);\n\n\t\t\t\tIntent intent = new Intent(getActivity(), Places.class);\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n\tpublic void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n\n\t}", "@Override\n public View getInfoWindow(Marker marker) {\n\n if(shownMarker!=null&&shownMarker.isInfoWindowShown()){\n shownMarker.hideInfoWindow();\n shownMarker.showInfoWindow();\n\n }\n\n return null;\n }", "@Override\n\tpublic void info(Marker marker, String message, Object p0, Object p1) {\n\n\t}", "@Override\n\tpublic void info(Marker marker, Object message) {\n\n\t}", "@Override\n\tpublic void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7) {\n\n\t}", "String getInfo();", "@Override\n\tpublic void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8) {\n\n\t}", "public String getInfoText();", "@Override\n\tpublic void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6) {\n\n\t}", "@Override\n\tpublic void info(Marker marker, Message msg) {\n\n\t}", "@Override\n public void onInfoWindowClick(Marker marker) {\n if(marker.equals(markerPrueba)){\n UnsaFragment.newInstance(marker.getTitle(),\"Universidad nacional de san Agustin de Arequipa\" )\n .show(getSupportFragmentManager(), null);\n\n\n }\n\n }", "@Override\n\tpublic void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4) {\n\n\t}", "@Override\n public void onInfoWindowClick(Marker marker) {\n Integer markerId = markers.get(marker);\n InfoWindowClicked(markerId);\n }", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\tLog.e(\"map\", \"at InfoWindowClisck\");\n\t\t\t\t\n\t\t\t\tString id = marker.getId();\n int mIdx = Integer.parseInt( id.substring(1) ); // m 제외하고 스트링파싱 인트파\n\t\t\t\tArrayList<String> _pathOfPic = mAreaList.get(mIdx).pathOfPic;\n\t\t\t\t\n\t\t\t\tIntent intent = new Intent(\"android.intent.action.CUSTOM_ALBUM\");\n\t\t\t\tintent.putStringArrayListExtra(\"pathOfPic\", _pathOfPic);\n\t\t\t\t\n\t\t\t\tmCtx.startActivity(intent);\t\n\t\t\t\t\n\t\t\t}", "@Override\n public String getInfo() {\n return this.info;\n }", "@Override\n\tpublic View getInfoContents(Marker marker)\n\t{\n\t\tMediaMarkerManager manager = MediaMarkerManager.getManagerFromMarker(marker);\n\t\t\n\t\tif (manager == null)\n\t\t\treturn null;\n\t\telse\n\t\t\treturn manager.getView(popupContext);\n\t}", "@Override\n\tpublic void info(Marker marker, String message, Object p0) {\n\n\t}", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 1) {\n if(resultCode == RESULT_OK) {\n location = data.getStringExtra(\"EXTRA_PLACE_NAME\");\n place_id = data.getStringExtra(\"EXTRA_PLACE_ID\");\n //lat = data.getDoubleExtra(\"EXTRA_PLACE_LAT\", 0);\n //lng = data.getDoubleExtra(\"EXTRA_PLACE_LNG\", 0);\n\n ViewLocation.setText(location);\n\n }\n }\n }", "@Override\n public void onMarkerDragEnd (Marker marker){\n lat = marker.getPosition().latitude;\n lng = marker.getPosition().longitude;\n Log.d(\"MapMarkerActivity\", \"lat: \"+lat+\" lng: \"+lng);\n }", "@Override\r\n public View getInfoWindow(Marker marker) {\n return null;\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n Intent intent = getIntent();\n String title=intent.getStringExtra(\"title\");\n Double lat = intent.getExtras().getDouble(\"latitude\");\n Double lng = intent.getExtras().getDouble(\"longitude\");\n LatLng latLng= new LatLng(lat,lng);\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .title(title)\n .anchor((float) 0.5, (float) 0.5);\n //.snippet(\"Время: \" + MainActivity.time.get(MainActivity.position));\n markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker));\n mMap.addMarker(markerOptions);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n }", "@Override\n\tpublic boolean onMarkerClick(Marker marker) {\n\t\tImageView imageView = ((ImageView) infobox.findViewById(R.id.loaded_image));\n\t\t\n//\t\t title.setText( marker.getTitle() );\n\t\t \n\t\t // load the image\n//\t\t imageLoader.displayImage( protestMap.get( marker.getId() ).getImageUrl(), imageView, new SimpleImageLoadingListener() {\n//\t\t @Override\n//\t\t public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n//\t\t super.onLoadingComplete(imageUri, view, loadedImage);\n//\t\t getInfoContents(marker);\n//\t\t }\n//\t\t });\n//\t\t \n \timageLoader.displayImage( protestMap.get( marker.getId() ).getImageUrl(), imageView);\n\t\t\n\t\t// if the Infobox is already showing hide it \n if( infobox.isShown() )\n \tinfobox.setVisibility(LinearLayout.GONE);\n // else show it\n else\n \tinfobox.setVisibility(LinearLayout.VISIBLE);\n\t\treturn false;\n\t}", "Marker getMarker();", "@Override\n\tpublic void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5) {\n\n\t}", "public void setInfo(String info) {\n this.info = info;\n }", "@Override\n\t\t\t\tpublic boolean onMarkerClick(Marker arg0) {\n\t\t\t\t\t\n\t\t\t\t\tfor(final PoiInfo poiInfo:AppContext.listmap){\n\t\t\t\t\t\tif(poiInfo.location.latitude==arg0.getPosition().latitude&&poiInfo.location.longitude==arg0.getPosition().longitude){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tView mView = LayoutInflater.from(ZhouBianYaodian.this).inflate(R.layout.map_massage_data, null);\n\t\t\t\t\t\t\tTextView dataname=(TextView) mView.findViewById(R.id.txt_map_name);\n\t\t\t\t\t\t\tTextView address=(TextView)mView. findViewById(R.id.txt_map_address);\n\t\t\t\t\t\t\tImageView imageView=(ImageView)mView. findViewById(R.id.map_image_call); \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tdataname.setText(poiInfo.name==null?\"\":poiInfo.name);\n\t\t\t\t\t\t\t\taddress.setText(poiInfo.address==null?\"\":poiInfo.address);\n\t\t\t\t\t\t\t\tif(poiInfo.phoneNum!=null&&!poiInfo.phoneNum.equals(\"\")){\n\t\t\t\t\t\t\t\t\timageView.setVisibility(ImageView.VISIBLE);\n\t\t\t\t\t\t\t\t\timageView.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(Intent.ACTION_DIAL, Uri\n\t\t\t\t\t\t\t\t\t\t\t\t\t.parse(\"tel:\" + poiInfo.phoneNum));\n\t\t\t\t\t\t\t\t\t\t\tLog.d(\"测试数据\", poiInfo.phoneNum);\n\t\t\t\t\t\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmInfoWindow= new InfoWindow(mView,arg0.getPosition(), -47);\n\t\t\t\t\t\t\tmBaiduMap.showInfoWindow(mInfoWindow);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@Override\n public boolean onMarkerClick(final Marker marker) {\n\n // Recupera la información del marcador\n Integer marcadorId = (Integer) marker.getTag();\n\n //le pasa el nombre del punto punto00...punto99\n if (marcadorId<10){\n intent.putExtra(\"puntoId\", \"punto0\"+marcadorId);\n startActivity(intent);\n }\n else{\n intent.putExtra(\"puntoId\", \"punto\"+marcadorId);\n startActivity(intent);\n }\n\n // Return false to indicate that we have not consumed the event and that we wish\n // for the default behavior to occur (which is for the camera to move such that the\n // marker is centered and for the marker's info window to open, if it has one).\n return false;\n }", "@Override\n\tpublic void info(Marker marker, CharSequence message, Throwable t) {\n\n\t}", "@Override\n\tpublic void info(Marker marker, MessageSupplier msgSupplier) {\n\n\t}", "public Object getInfo() {\n return info;\n }", "@Override\n public boolean onMarkerClick(Marker marker) {\n //Cuando se presiona un marker, se abre la ventana de info (default)\n marker.showInfoWindow();\n return true;\n }", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker arg0) {\n\t\t\t\tString id = arg0.getTitle();\n\t\t\t\t\n\t\t\t\tif(id.startsWith(\"Dis\") || id.startsWith(\"my\")){\n\t\t\t\t\tif(id.startsWith(\"Dis\")){\n\t\t\t\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this).setTitle(\"Warning\")\n\t\t\t\t\t .setMessage(\"Please select a right victim!!!\")\n\t\t\t\t\t .setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t \t // finish();\n\t\t\t\t }\n\t\t\t\t }).create();\n\t\t\t\t\t dialog.show();\n\t\t\t\t\t\t}\n\t\t\t\t\tif(id.startsWith(\"my\")){\n\t\t\t\t\t\tmyLocation = arg0.getPosition();\n\t\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)\n\t\t\t\t .setMessage(\"Do you what to update your current location?\")\n\t\t\t\t .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t \t setFlag = false;\n\t\t\t }\n\t\t\t })\n\t\t\t .setNegativeButton(\"Not now\", new DialogInterface.OnClickListener() {\n\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t \t \n\t\t\t }\n\t\t\t }).create();\n\t\t\t\t dialog.show();\n\t\t\t\t\t\t}\t\n\t\t\t\t}else{\n\t\t\t\t\tvicLocation = arg0.getPosition();\n\t\t\t\t\tfinal String PoVictim = readOneVictim(id);\n\t\t\t\t\tLog.d(\"victim infomtion:\",PoVictim);\n\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)\n\t\t\t .setMessage(\"What do you want to do with this victim?\")\n\t\t\t .setNegativeButton(\"Edit/Delect Victim\", new DialogInterface.OnClickListener() {\n\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t \t EditVictim(PoVictim);\n\t\t }\n\t\t })\n\t\t .setPositiveButton(\"Find THIS Victim\", new DialogInterface.OnClickListener() {\n\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t \t //String[] PoVIF = PoVictim.split(\",\");\n\t\t \t vicFlag = true;\n\t\t \t //LatLng vic = new LatLng(42.39398619218224,-72.52872716635466);\n\t\t \t if(vicLocation != null && myLocation != null){\n\t\t \t\t if(wayList != null){\n\t\t \t\t\t wayList.clear();\n\t\t \t\t }\n\t\t \t\t \n\t\t \t\t if(indoorFlag){ //when isindoor return true\n\t\t \t\t\t wayList = findOneVictim(myLocation, vicLocation);\n\t\t \t\t\t if(wayList != null){\n\t\t \t\t\t\t getPath();\n\t\t \t\t\t\t}\n\t\t \t\t }else{\n\t\t \t\t\t LatLng door = getNearestDoor(vicLocation);\n\t\t \t\t\t //get the first part outdoor path \n\t\t \t\t\t findDirections(myLocation.latitude,myLocation.longitude,door.latitude,door.longitude,GMapV2Direction.MODE_DRIVING );\n\t\t \t\t\t //wayList.addAll(findOneVictim(door, vicLocation));\n\t\t \t\t } \n\t\t \t }\n\t\t }\n\t\t }).create();\n\t\t\t dialog.show();\n\t\t\t\t}\t\n\t\t\t}", "public void setMarker(String marker) {\n this.marker = marker;\n }", "public void setMarker(String marker) {\n this.marker = marker;\n }", "public void setMarker(String marker) {\n this.marker = marker;\n }", "@Override\n public View getInfoWindow(Marker marker) {\n\n return null;\n }", "public String getAdditionalInfo() {\r\n return additionalInfo;\r\n }", "@Override\n public void onMapLongClick(LatLng latLng) {\n String markerName = mTextField.getText().toString();\n\n // check if a marker name is set\n if(markerName.isEmpty()) {\n markerName = \"Marker\" + Integer.toString(numberOfMarkers);\n }\n\n // add marker\n Marker marker = mMap.addMarker(\n new MarkerOptions()\n .position(latLng)\n .title(markerName)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED))\n );\n\n // add halo\n Circle halo = mMap.addCircle(new CircleOptions()\n .center(latLng)\n .radius(100.0)\n .strokeColor(Color.RED)\n .visible(false)\n );\n\n // add marker and halo to tracked markers\n mMarkerHalos.put(marker, halo);\n\n // lat and long to separate values\n double markerLat = latLng.latitude;\n double markerLong = latLng.longitude;\n\n // save marker to shared preferences\n Set<String> positionSet = new HashSet<String>();\n positionSet.add(Double.toString(markerLat));\n positionSet.add(Double.toString(markerLong));\n mPrefEditor.putStringSet(markerName, positionSet);\n mPrefEditor.apply();\n\n // clear text field\n mTextField.setText(\"\");\n\n // increase marker counter\n ++numberOfMarkers;\n }", "@Override\n\tpublic void info(Marker marker, String message, Throwable t) {\n\n\t}", "@Override\r\n\tpublic String toInfoString() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void info(Marker marker, Supplier<?> msgSupplier) {\n\n\t}", "public String getAdditionalInfo() {\n return additionalInfo;\n }", "public String getAdditionalInfo() {\n return additionalInfo;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(data!=null&&data.getStringExtra(\"Format\")!=null)\n Toast.makeText(this, \"Contents = \" + data.getStringExtra(\"Contents\") +\n \", Format = \" + data.getStringExtra(\"Format\"), Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n return;\n// openTimesheetInfo(marker.getTitle());\n }", "@Override\n public void onInfoWindowClick(Marker marker) {\n int id = hashMarker.get(marker.getPosition());\n Log.d(TAG, \"Posicion\" + marker.getPosition() + \" - \" + id);\n Iterator i = listMarkers.iterator();\n int numImages = 1;\n\n while(i.hasNext()){\n MarkerPropio m = (MarkerPropio) i.next();\n if (m.getId()==id){\n numImages=m.getNumImages();\n }\n }\n\n if (numImages==1){\n\n JsonArrayRequest jsArrayRequest = new JsonArrayRequest(GalleryImageActivity.URL_FROM_MARKER + id +\n GalleryImageActivity.URL_FORMAT, new Response.Listener<JSONArray>() {\n\n @Override\n public void onResponse(JSONArray response) {\n\n // Obtener el marker del objeto\n for(int i=0; i<response.length(); i++){\n try {\n JSONObject objeto= response.getJSONObject(i);\n int idImagen = objeto.getInt(\"id\");\n Intent intent = new Intent(getApplicationContext(), DetailActivity.class);\n intent.putExtra(DetailActivity.EXTRA_PARAM_ID, idImagen);\n startActivity(intent);\n } catch (JSONException e) {\n Log.e(TAG, \"Error de parsing: \"+ e.getMessage() + \"/// \"+ e.getCause());\n }\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \"Error Respuesta en JSON: \" + error.getMessage() + \" || \" + error.getLocalizedMessage());\n }\n });\n requestQueue.add(jsArrayRequest);\n\n } else{\n Intent intent = new Intent(this, GalleryImageActivity.class);\n intent.putExtra(GalleryImageActivity.EXTRA_PARAM_ID, id);\n intent.putExtra(GalleryImageActivity.EXTRA_PARAM, 1);\n intent.putExtra(GalleryImageActivity.EXTRA_PARAM_NAME_MARKER, marker.getTitle());\n startActivity(intent);\n }\n }", "public Marker getMarker() {\n return marker;\n }", "@Override\n\tpublic View getInfoWindow(Marker marker) {\n\t\treturn null;\n\t}" ]
[ "0.6989084", "0.69382477", "0.68726146", "0.6856287", "0.68013287", "0.6750228", "0.67444205", "0.6667151", "0.6633799", "0.66217154", "0.66217154", "0.66217154", "0.65591294", "0.6551205", "0.6505942", "0.65029377", "0.649997", "0.6458439", "0.6452251", "0.6449164", "0.64343005", "0.6428681", "0.6403232", "0.64028436", "0.64028436", "0.64018977", "0.63908476", "0.63719445", "0.6364341", "0.63601846", "0.635925", "0.63393694", "0.6333421", "0.6328033", "0.63229847", "0.631661", "0.6308613", "0.62908304", "0.62908304", "0.62805295", "0.6268764", "0.62630457", "0.62571627", "0.62494653", "0.6244404", "0.62411505", "0.6240413", "0.62383544", "0.6223162", "0.6193118", "0.6179431", "0.6167395", "0.6161985", "0.6155372", "0.6154651", "0.6151063", "0.6150232", "0.61305094", "0.6129807", "0.612942", "0.6117438", "0.6102221", "0.6096112", "0.6093785", "0.6090873", "0.6050589", "0.6046965", "0.60419023", "0.6001756", "0.599503", "0.59885746", "0.5968445", "0.5961627", "0.59573", "0.59408385", "0.59337175", "0.5921251", "0.5916355", "0.5910496", "0.59015715", "0.5885191", "0.58808136", "0.58796644", "0.5849729", "0.5844032", "0.5799086", "0.5799086", "0.5799086", "0.579181", "0.57895947", "0.57851756", "0.5776792", "0.57740474", "0.57667875", "0.5757483", "0.5757483", "0.5754075", "0.5751972", "0.5743874", "0.57340753", "0.57329106" ]
0.0
-1
TODO Autogenerated method stub
public boolean onTouch(View v, MotionEvent event) { mExpandableListView.getParent().requestDisallowInterceptTouchEvent(true); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
File file = new File(Environment.getExternalStorageDirectory(), "/Pictures/QQ/pandavideo_cut.mp4"); System.out.println(file.getPath());
private void initVideoPath() { File file = new File(Environment.getExternalStorageDirectory(), "/Pictures/QQ/pandavideo_cut.mp4"); String videoPath = file.getAbsolutePath(); // Toast.makeText(this,"文件是否存在"+file.exists(),Toast.LENGTH_LONG).show(); Toast.makeText(this,"文件路径"+videoPath,Toast.LENGTH_LONG).show(); mVideoView.setVideoPath(videoPath); mVideoView.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String getOutputMediaFile(){\n\n\t File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n\t Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n\t // This location works best if you want the created images to be shared\n\t // between applications and persist after your app has been uninstalled.\n\n\t // Create the storage directory if it does not exist\n\t if (! mediaStorageDir.exists()){\n\t if (! mediaStorageDir.mkdirs()){\n\t Log.d(\"MyCameraApp\", \"failed to create directory\");\n\t return null;\n\t }\n\t }\n\n\t // Create a media file name\n\t String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.US).format(new Date());\n\t return new File(mediaStorageDir.getPath() + File.separator + \"VID_\"+ timeStamp + \".mp4\").toString();\n\t}", "private File getOutputMediaFile() {\n if (!Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {\n Toast.makeText(this, \"请检查SDCard!\", Toast.LENGTH_SHORT).show();\n return null;\n }\n\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM), \"MyCameraApp\");\n if (!mediaStorageDir.exists()) {\n mediaStorageDir.mkdirs();\n }\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile = new File(mediaStorageDir.getPath() + File.separator + \"VID_\" + timeStamp + \".mp4\");\n return mediaFile;\n }", "private String getVideofilename() {\n String mFileName;\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String audioFileName = \"mp4_\" + timeStamp + \"_\";\n\n // Save a file: path for use with ACTION_VIEW intents\n mFileName = getExternalFilesDir(\"DIRECTORY_VIDEO\").getAbsolutePath();\n mFileName += \"/\" +audioFileName + \".mp4\";\n return mFileName;\n }", "private File getOutputMediaFile() {\n // External sdcard file location\n File mediaStorageDir = new File(Environment.getExternalStorageDirectory(),\n VIDEO_DIRECTORY_NAME);\n // Create storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n Log.d(TAG, \"Oops! Failed create \"\n + VIDEO_DIRECTORY_NAME + \" directory\");\n return null;\n }\n }\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\",\n Locale.getDefault()).format(new Date());\n File mediaFile;\n\n mediaFile = new File(mediaStorageDir.getPath() + File.separator\n + \"VID_\" + timeStamp + \".mp4\");\n\n return mediaFile;\n }", "@SuppressLint(\"SimpleDateFormat\")\n public static File createVideoFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = VIDEO_FILE_PREFIX + timeStamp + MP4_FILE_SUFFIX;\n String nameAlbum = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + nameDir;// getString(R.string.app_name);\n File albumF = new File(nameAlbum);\n if (!albumF.exists()) {\n albumF.mkdirs();\n File noMedia = new File(albumF, \".nomedia\");\n noMedia.createNewFile();\n }\n\n File imageF = new File(albumF, imageFileName);\n imageF.createNewFile();\n return imageF;\n }", "public String getPlayFile();", "private File createVideoFile() throws IOException {\n Date d = new Date();\n String nameDate = new SimpleDateFormat(\"ddMMyyyy_HHmmss\").format(d);\n this.date = new SimpleDateFormat(\"dd/MM/yyyy\").format(d);\n this.time = nameDate.substring(9,13);\n String videoFileName = \"MP4_\" + nameDate + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n videoFileName, /* prefix */\n \".mp4\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentVideoPath = image.getAbsolutePath();\n return image;\n }", "private static File getOutputMediaFile(){\r\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\r\n Environment.DIRECTORY_PICTURES), \"CameraDemo\");\r\n\r\n if (!mediaStorageDir.exists()){\r\n if (!mediaStorageDir.mkdirs()){\r\n return null;\r\n }\r\n }\r\n\r\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\r\n return new File(mediaStorageDir.getPath() + File.separator +\r\n \"IMG_\"+ timeStamp + \".jpg\");\r\n }", "public static File getSdCardMediaMusicDirectory(){\n return getSdDirectoryStoragePath(\"/NWD-MEDIA\");\n }", "public File getMagicMazeVideosDir() {\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\r\n Environment.DIRECTORY_MOVIES), \"MagicMaze\");\r\n // This location works best if you want the created images to be shared\r\n // between applications and persist after your app has been uninstalled.\r\n\r\n // Create the storage directory if it does not exist\r\n if (!mediaStorageDir.exists()) {\r\n if (!mediaStorageDir.mkdirs()) {\r\n Log.d(\"MagicMaze\", \"failed to create directory\");\r\n return null;\r\n }\r\n }\r\n return mediaStorageDir;\r\n }", "private File getOutputMediaFile(){\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), \"reliant\");\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\"+ timeStamp + \".jpg\");\n return mediaFile;\n }", "private File getOutputMediaFile() {\n\r\n File mediaStorageDir = new File(Environment.getExternalStorageDirectory().getPath() + File.separator + \"ImageUpload\" + File.separator + \"Pictures\");\r\n if (!mediaStorageDir.exists()) {\r\n if (!mediaStorageDir.mkdirs()) {\r\n Log.d(\"ImageUpload\", \"failed to create external directory\");\r\n Log.d(\"ImageUpload\", \"creating to internal directory\");\r\n mediaStorageDir = getFilesDir();\r\n }\r\n }\r\n\r\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\r\n return new File(mediaStorageDir.getPath() + File.separator + \"IMG_\" + timeStamp + \".jpg\");\r\n }", "public static File getOutputMediaFile() {\n\n\t\t// External sdcard location\n\t\tFile mediaStorageDir = new File(\n\t\t\t\tEnvironment\n\t\t\t\t\t\t.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),\n\t\t\t\t\"HiLurik\");\n\n\t\t// Create the storage directory if it does not exist\n\t\tif (!mediaStorageDir.exists()) {\n\t\t\tif (!mediaStorageDir.mkdirs()) {\n\t\t\t\tLog.d(TAG + \"Picture\", \"Oops! Failed create picture directory\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\t// Create a media file name\n\t\tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\",\n\t\t\t\tLocale.getDefault()).format(new Date());\n\t\tFile mediaFile = new File(mediaStorageDir.getPath() + File.separator\n\t\t\t\t+ \"SAMPLE_\" + timeStamp + \".jpg\");\n\t\treturn mediaFile;\n\t}", "private String getOutputFileName() {\n String filename = VideoCapture.getSelf().getOutputFileName();\n return VideoCapture.getSelf().appDir.getPath()+\"/\"+filename+\".mp4\";\n }", "@SuppressLint(\"SimpleDateFormat\")\n\tprivate static File getOutputMediaFile() {\n\n\t\t// Create Folder\n\t\tFile folder = new File(Environment.getExternalStorageDirectory()\n\t\t\t\t.toString() + \"/JuzFood/image\");\n\t\tfolder.mkdirs();\n\n\t\tif (!folder.exists()) {\n\t\t\tif (!folder.mkdirs()) {\n\t\t\t\tLog.v(\"MyCameraApp\", \"failed to create directory\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\t// Create a media file name\n\t\tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\")\n\t\t.format(new Date());\n\n\t\t// Save the path as a string value\n\t\tString extStorageDirectory = folder.toString();\n\n\t\tSystem.out.println(\"Folder Path ===== \" + extStorageDirectory);\n\n\t\tFile mediaFile = new File(extStorageDirectory + File.separator\n\t\t\t\t+ \"JUZFOOD_\" + timeStamp + \".jpg\");\n\n\t\treturn mediaFile;\n\t}", "private static String getDirectoryPath() {\n // Replace the path here with your own\n File file = new File(Environment.getExternalStorageDirectory(),\n \"/GenericAndroidSoundboard/Audio/\");\n // Create the directory if it doesn't exist\n if (!file.exists()) {\n file.mkdirs();\n }\n\n // Get the path to the newly created directory\n return Environment.getExternalStorageDirectory()\n .getAbsolutePath() + \"/GenericAndroidSoundboard/Audio/\";\n }", "private File getOutputMediaFile(){\n File mediaStorageDir = new File(Environment.getExternalStorageDirectory()\n + \"/Android/data/\"\n + getApplicationContext().getPackageName()\n + \"/Captures\");\n\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n return null;\n }\n }\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"ddMMyyyy_HHmm\").format(new Date());\n File mediaFile;\n String mImageName=\"MI_\"+ timeStamp +\".jpg\";\n mediaFile = new File(mediaStorageDir.getPath() + File.separator + mImageName);\n return mediaFile;\n }", "public String getPath() {\n\t\treturn mFileToPlay;\n\t}", "private static File getOutputMediaFile(){\n // To be safe, you should check that the SDCard is mounted\n // using Environment.getExternalStorageState() before doing this.\n\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\"+ timeStamp + \".jpg\");\n\n return mediaFile;\n }", "private static File getOutputMediaFile(String namex, Context context) {\n\r\n String pathToExternalStorage = context.getFilesDir().toString();\r\n File mediaStorageDir = new File(pathToExternalStorage + \"/\" + \"eKMIS\");\r\n\r\n //if (!appDirectory.isDirectory() || !appDirectory.exists()) //Checks if the directory exists\r\n // appDirectory.mkdir();\r\n\r\n if (!mediaStorageDir.exists()) {\r\n if (!mediaStorageDir.mkdirs()) {\r\n //Log.d(\"surevy\", \"failed to create directory\");\r\n return null;\r\n }\r\n }\r\n // Create a media file name\r\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\")\r\n .format(new Date());\r\n File mediaFile;\r\n //mediaFile = new File(mediaStorageDir.getPath() + File.separator\r\n // + \"IMG_\" + timeStamp + \".jpg\");\r\n\r\n mediaFile = new File(mediaStorageDir.getPath() + File.separator\r\n + \"IMG_\" + namex + \".jpg\");\r\n\r\n\r\n Log.d(\"Camera activty\", mediaStorageDir.getPath());\r\n\r\n return mediaFile;\r\n }", "@SuppressLint(\"SimpleDateFormat\")\n public static File createVideoFile3gp() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = VIDEO_FILE_PREFIX + timeStamp + F3GP_FILE_SUFFIX;\n String nameAlbum = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + nameDir;// getString(R.string.app_name);\n File albumF = new File(nameAlbum);\n if (!albumF.exists()) {\n albumF.mkdirs();\n File noMedia = new File(albumF, \".nomedia\");\n noMedia.createNewFile();\n }\n\n File imageF = new File(albumF, imageFileName);\n imageF.createNewFile();\n return imageF;\n }", "private File imageFile() throws IOException {\n File directory = Environment.getExternalStorageDirectory();\n\n // FileOperations.checkDirectory(directory, false);\n Photopath = directory.getAbsolutePath();\n return new File(directory,\"displaypic.jpg\");\n\n }", "private String setFileDestinationPath(){\n String filePathEnvironment = Environment.getExternalStorageDirectory().getAbsolutePath();\n Log.d(TAG, \"Full path edited \" + filePathEnvironment + \"/earwormfix/\" + generatedFilename + EXTENSION_JPG);\n return filePathEnvironment+ \"/earwormfix/\" + generatedFilename + EXTENSION_JPG;\n }", "@Override\n public void onClick(View v) {\n mPlayer = new MediaPlayer();\n try {\n mPlayer.setDataSource(Environment.getExternalStorageDirectory().getPath() + \"/\" + SAVE_FILENAME);\n mPlayer.prepare();\n mPlayer.start();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "private File getOutputMediaFile(){\n File mediaStorageDir = new File(Environment.getExternalStorageDirectory()\n + \"/Android/data/\"\n + getApplicationContext().getPackageName()\n + \"/Files\");\n\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n return null;\n }\n }\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"ddMMyyyy_HHmm\").format(new Date());\n File mediaFile;\n String mImageName=\"MI_\"+ timeStamp +\".jpg\";\n mediaFile = new File(mediaStorageDir.getPath() + File.separator + mImageName);\n return mediaFile;\n }", "private File getOutputMediaFile() {\n File mediaStorageDir = new\n File(Environment.getExternalStorageDirectory()\n + \"/FoodChain/\"\n + \"/Files\");\n\n\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n return null;\n }\n }\n File mediaFile;\n mediaFile = new File(mediaStorageDir.getPath() + File.separator + \"QRCodeImage.png\");\n return mediaFile;\n }", "public static String m19634b() {\n String str;\n try {\n str = Environment.getExternalStorageDirectory().getAbsolutePath();\n } catch (Throwable unused) {\n str = null;\n }\n return str == null ? \"\" : str.trim();\n }", "@Override\n protected Void doInBackground(String... name) {\n\n String rootDir = Environment.getExternalStorageDirectory()\n + File.separator + \"Video\";\n File rootFile = new File(rootDir);\n\n File file = new File(Environment.getExternalStorageDirectory() + File.separator + \"test.mp4\");\n try {\n file.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n\n //downloadAndSaveFile(\"220.247.244.22\", 21, \"Chamal\", \"Chamal\", \"C:\\\\Users\\\\Administrator\\\\Desktop\\\\raw\", file);\n downloadAndSaveFile(\"220.247.244.22\", 21, \"Chamal\", \"Chamal\", \"\\\\\" + name[0], file);\n\n //downloadAndSaveFile(\"192.168.0.199\", 21, \"user02\", \"user1234\", \"D:\\\\Season 01\\\\The Simpsons S01E01 480p HDTV x265 - BrB.mkv\", file);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "private File getOutputMediaFile(){\n File mediaStorageDir = new File(Environment.getExternalStorageDirectory()\n + \"/Android/data/\"\n + App.getActiveActivity().getPackageName()\n + \"/Files\");\n\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n return null;\n }\n }\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"ddMMyyyy_HHmm\").format(new Date());\n File mediaFile;\n String mImageName=\"MI_\"+ timeStamp +\".jpg\";\n mediaFile = new File(mediaStorageDir.getPath() + File.separator + mImageName);\n return mediaFile;\n }", "private File getOutputMediaFile(int type) {\n File mediaStorageDir = new File(Environment.getExternalStorageDirectory(), \"NDS videos\");\n\n\n // Create the storage directory(MyCameraVideo) if it does not exist\n if (!mediaStorageDir.exists()) {\n\n if (!mediaStorageDir.mkdirs()) {\n\n //output.setText(\"Failed to create directory MyCameraVideo.\");\n\n Toast.makeText(Suggestion_box_suggest.this, \"Failed to create directory Boo_videos.\",\n Toast.LENGTH_LONG).show();\n\n Log.d(\"MyCameraVideo\", \"Failed to create directory Boo_videos.\");\n return null;\n }\n }\n\n// For unique file name appending current timeStamp with file name\n java.util.Date date = new java.util.Date();\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\")\n .format(date.getTime());\n\n File mediaFile;\n\n if (type == MEDIA_TYPE_VIDEO) {\n\n // For unique video file name appending current timeStamp with file name\n String filename_video = \"NDS_video_\" + timeStamp + \".mp4\";\n videoFileName = filename_video;\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n filename_video);\n final String path_0 = Environment.getExternalStorageDirectory() + File.separator\n + \"NDS videos/\" + filename_video;\n String filename_to_up = path_0.substring(path_0.lastIndexOf(\"/\") + 1);\n //addCaptionToSuggestionMedia(path_0, filename_to_up, \"video\", MYRemoteId, (editText.getTag().toString().isEmpty()) ? \"0\" : editText.getTag().toString());\n //addCaptionToSuggestionMedia(path_0, filename_to_up, \"audio\", MYRemoteId, (editText.getTag().toString().isEmpty()) ? \"0\" : editText.getTag().toString());\n path_000 = path_0;\n filename_000 = filename_to_up;\n myRemoteId_000 = MYRemoteId;\n SuggestionBoxId_000 = (editText.getTag().toString().isEmpty()) ? \"0\" : editText.getTag().toString();\n//-------0--------------------------the video send--\n mediaType_000 = \"video\";\n image_tag.setVisibility(View.GONE);\n video_tag.setVisibility(View.VISIBLE);\n audio_tag.setVisibility(View.GONE);\n textSuggestion.setVisibility(View.GONE);\n video_tag.setTag(filename_to_up);\n String videoFile = path_0;\n Bitmap thumbnail = ThumbnailUtils.createVideoThumbnail(videoFile,\n MediaStore.Images.Thumbnails.FULL_SCREEN_KIND);\n//BitmapDrawable bitmapDrawable = new BitmapDrawable(thumbnail);\n // edixt_image_video.setImageBitmap(thumbnail);\n edixt_image_video.setVideoURI(Uri.parse(path_0));\n\n edixt_image_video.seekTo(100);\n///-------------\n edixt_image_video.setTag(path_0);\n///-------------\n edixt_image_video.setTag(path_0);\n//----\n edixt_image_video.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n }\n });\n edixt_image_video.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(path_0));\n intent.setDataAndType(Uri.parse(path_000), \"video/mp4\");\n startActivity(intent);\n\n return false;\n }\n });\n\n//------------0000000000000000000000000000000000000000000-dufhhhhhhhhhhhhhhhhhhhhh\n\n //-------------------\n\n } else {\n return null;\n }\n\n return mediaFile;\n }", "private File getOutputMediaFile(){\n\t\tFile file = new File( getExternalFilesDir(null), \"DemoFile.jpg\" );\n\t\treturn file;\n\t}", "public File getSubtitleStorageDir() {\n File file = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DOWNLOADS), \"Subtitle\");\n if (!file.mkdirs()) {\n Log.e(\"Subtitle\", \"Directory not created\");\n }\n return file;\n }", "public File createVideoFolder() {\n// File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n// Environment.DIRECTORY_MOVIES + File.separator), \"RokidCameraVideo\");\n// mVideoFolder = mediaStorageDir;\n\n File movieFile = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM);\n File mVideoFolder = new File(movieFile, \"Camera\");\n\n if (!mVideoFolder.exists()) {\n mVideoFolder.mkdirs();\n }\n\n return mVideoFolder;\n }", "@Override\n public void onClick(View v) {\n\n writeFile();\n\n File INTERNAL = getFilesDir();\n File EXT_DIR = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File dataDir = Environment.getExternalStorageDirectory();\n\n Log.d(\"FILE\", \"INTERNAL: \" + INTERNAL.getAbsolutePath());\n Log.d(\"FILE\", \"EXTERNAL: \" + EXT_DIR.getAbsolutePath());\n Log.d(\"FILE\", \"DATA: \" + dataDir.getAbsolutePath());\n }", "public File getMediaDir() {\r\n return mediaDir;\r\n }", "public File getOutputMediaFile(int type){\n // To be safe, you should check that the SDCard is mounted\n // using Environment.getExternalStorageState() before doing this.\n\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n Log.d(\"asda\", mediaStorageDir.getPath());\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE){\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\"+ timeStamp + \".jpg\");\n } else if(type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\"+ timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "public interface ConsValues {\n\n public String PATH = \"/storage/extSdCard/Videos/Others/灵梦和幽幽子的弹幕.mp4\";\n}", "String getFilepath();", "private File getOutputMediaFile() {\n\t\tFile picDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n\n\t\t// get the current time\n//\t\tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n\t\t\n\t\tif(mBackCameraCount < 5){\n\t\t\treturn new File(picDir.getPath() + File.separator + \"backimage_\" + mBackCameraCount + \".jpg\");\n\t\t}else {\n\t\t\treturn new File(picDir.getPath() + File.separator + \"frontimage_\" + mFrontCameraCount + \".jpg\");\n\t\t}\n\t}", "public String getPath(Context ctx)\n {\n return Environment.getExternalStorageDirectory() + \"/\" + ctx.getApplicationInfo().packageName.replaceAll(\"\\\\.\", \"\") + \"/\";\n }", "public String getPFCameraTakenPath() {\n\t\t// TODO Auto-generated method stub\n\t\tString path = pfDir.getPath()+\"/camera/\";\n\t\treturn path;\n\t}", "private String getAbsoluteFilesPath() {\n\n //sdcard/Android/data/cucumber.cukeulator\n //File directory = getTargetContext().getExternalFilesDir(null);\n //return new File(directory,\"reports\").getAbsolutePath();\n return null;\n }", "private static File getStorageDir(Context context) {\n File file = new File(context.getExternalFilesDir(\n Environment.MEDIA_MOUNTED), \"ZhouImage\");\n if (!file.exists()) {\n if (!file.mkdirs()) {\n Log.e(\"TAG\", \"Directory not created\");\n }\n }\n\n return file;\n }", "String getMedia();", "private String getFilename() {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String filename = getExternalStoragePublicDirectory(DIRECTORY_PICTURES).getPath().toString() + \"/\" + timeStamp + \".jpg\";\n\n return filename;\n }", "public String getSoundPath();", "public static File createPlayerFile(){\n try {\n playerFile = new File(System.getProperty(\"user.dir\") + \"/PlayerFiles/\" + \".txt\"); //creates player file, can it run on android?\n playerFile.createNewFile();\n }catch (IOException e){\n e.printStackTrace();\n }\n finally {\n return playerFile;\n }\n }", "private File getOutputMediaFile(int type) {\n // To be safe, you should check that the SDCard is mounted\n // using Environment.getExternalStorageState() before doing this.\n\n File mediaStorageDir = null;\n File mediaFile;\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"memreas\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n Log.d(\"memreas\", \"failed to create directory\");\n return null;\n }\n }\n // Create a media file name\n String filename;\n if (type == MEDIA_TYPE_IMAGE) {\n filename = \"IMG_\" + timeStamp + \".jpg\";\n } else if (type == MEDIA_TYPE_VIDEO) {\n filename = \"VID_\" + timeStamp + \".mp4\";\n } else {\n return null;\n }\n\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n filename);\n\n return mediaFile;\n }", "private void readFile(){\n File file = new File(Environment.getExternalStorageDirectory()+\"/saved_images/profile.jpg\");\n myPictureForShow = BitmapFactory.decodeFile(file.getAbsolutePath());\n }", "private static File getOutputMediaFile(Context context, String extension, String type) {\n // To be safe, you should check that the SDCard is mounted\n // using Environment.getExternalStorageState() before doing this.\n\n File mediaStorageDir;\n\n if(type.equals(\"save\")) {\n mediaStorageDir = new File(Environment.getExternalStorageDirectory()\n + \"/Pictures/Artisto\");\n }\n else {\n mediaStorageDir = new File(Environment.getExternalStorageDirectory()\n + \"/Android/data/\"\n + context.getApplicationContext().getPackageName()\n + \"/cache\");\n }\n\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n return null;\n }\n }\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"ddMMyyyy_HHmmss\", Locale.US).format(new Date());\n File mediaFile;\n\n String mImageName = \"IMG_\" + timeStamp + extension;\n mediaFile = new File(mediaStorageDir.getPath() + File.separator + mImageName);\n\n //path = mediaStorageDir.getPath() + File.separator + mImageName;\n\n return mediaFile;\n }", "private static File getOutputMediaFile(int type) {\n\n // External sdcard location\n File mediaStorageDir = new File(\n Environment\n .getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),\n IMAGE_DIRECTORY_NAME);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n Log.d(IMAGE_DIRECTORY_NAME, \"Oops! Failed create \"\n + IMAGE_DIRECTORY_NAME + \" directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\",\n Locale.getDefault()).format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator\n + \"IMG_\" + timeStamp + \".jpg\");\n } else if (type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator\n + \"VID_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "private static Uri getOutputMediaFileUri(){\n return Uri.fromFile(getOutputMediaFile());\n }", "private static File getOutputMediaFile(int type) {\n\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"homework\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n Log.e(\"--------\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else if (type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "@NonNull\n private File getDownloadLocation() {\n System.out.println(\"Hello. in download start\");\n File root = android.os.Environment.getExternalStorageDirectory();\n File file = new File(root.getAbsolutePath() + \"/V2A\");\n if (!file.exists()) {\n file.mkdirs();\n }\n System.out.println(file.toString());\n System.out.println(\"Hello. in download end\");\n //Toast.makeText(this, \"Starting Download\", Toast.LENGTH_SHORT).show();\n\n return file;\n\n }", "protected static File m5334a(Context context) {\n return new File(Environment.getExternalStorageDirectory().getPath() + (\"/Android/data/\" + context.getPackageName() + \"/files/\"));\n }", "public String getSavingLocation()\n {\n return Environment.getExternalStorageDirectory() + File.separator + getResources().getString(R.string.app_name);\n }", "private File getFileForPhoto(String fileName) {\r\n File mediaStorageDir = new File(getExternalFilesDir(Environment.DIRECTORY_PICTURES), TAG);\r\n\r\n if (mediaStorageDir.exists() == false && mediaStorageDir.mkdirs() == false) {\r\n Log.d(TAG, \"Cannot create directory for storing photos\");\r\n }\r\n\r\n File file = new File(mediaStorageDir.getPath() + File.separator + fileName);\r\n return file;\r\n }", "private File getExternalPhotoStorageDir() {\n File file = new File(getExternalFilesDir(\n Environment.DIRECTORY_PICTURES), \"ApparelApp\");\n if (!file.exists() && !file.mkdirs()) {\n Log.e(TAG, \"Directory not created\");\n }\n return file;\n }", "private File getOutputMediaFile(String s2){\n File mediaFile = null;\n try {\n\n\n assert s2 != null;\n String fileName = s2.substring(s2.lastIndexOf(\"/\") + 1);\n final String stringImageURL = s2.substring(0, fileName.length() - 1);\n File mediaStorageDir = new File(Environment.getExternalStorageDirectory()\n + \"/Android/data/\"\n + activity.getPackageName()\n + \"/Files/\" + stringImageURL, fileName);\n\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n return null;\n }\n }\n // Create a media file name\n //String timeStamp = new SimpleDateFormat(\"ddMMyyyy_HHmm\").format(new Date());\n\n // String mImageName=s2;\n mediaFile = new File(mediaStorageDir.getPath(), fileName);\n }catch (Exception e){\n\n }\n return mediaFile;\n }", "private static File getOutputMediaFile(int type){\n // To be safe, you should check that the SDCard is mounted\n // using Environment.getExternalStorageState() before doing this.\n\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE){\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\"+ timeStamp + \".jpg\");\n } else if(type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\"+ timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "private File createAudioFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"3gp_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_MUSIC);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".3gp\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n String z = image.getAbsolutePath();\n return image;\n }", "public static File getOutputMediaFile(int type, String name) {\n File Test = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File Test1 = Environment.getExternalStorageDirectory();\n Log.d(\"Environment\", \"Environment path \" + Test.getAbsolutePath().toString());\n File mediaStorageDir = new File(Environment.getExternalStorageDirectory(), \"RateMe\");\n Log.d(\"Environment\", \"Environment path \" + mediaStorageDir.getAbsolutePath().toString());\n if (!mediaStorageDir.exists()) {\n /*if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n\t\t\t return null;\n\t\t\t }*/\n mediaStorageDir.mkdir();\n }\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == 20) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\" + name.toLowerCase() + timeStamp + \".jpg\");\n } else\n return null;\n\n return mediaFile;\n }", "public static String getWorkingDirectory(Context context) {\n String res;\n if (isSDCardMounted()) {\n String directory = \"For Happy\";\n res = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + directory;\n } else {\n res = context.getFilesDir().getAbsolutePath() + \"/\";\n }\n if (!res.endsWith(\"/\")) {\n res += \"/\";\n }\n File f = new File(res);\n if (!f.exists()) {\n boolean success = f.mkdirs();\n if (!success) {\n LogUtil.e(\"FileUtils create file failed\");\n }\n }\n return res;\n }", "private static File getOutputMediaFile(int type) {\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else if (type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "private java.io.File getCapturedFile(com.reactnativecommunity.webview.RNCWebViewModule.MimeType r7) throws java.io.IOException {\n /*\n r6 = this;\n int[] r0 = com.reactnativecommunity.webview.RNCWebViewModule.C27492.f1192xcd6a845b\n int r7 = r7.ordinal()\n r7 = r0[r7]\n r0 = 1\n java.lang.String r1 = \"\"\n if (r7 == r0) goto L_0x001a\n r0 = 2\n if (r7 == r0) goto L_0x0013\n r7 = r1\n r0 = r7\n goto L_0x0023\n L_0x0013:\n java.lang.String r1 = android.os.Environment.DIRECTORY_MOVIES\n java.lang.String r7 = \"video-\"\n java.lang.String r0 = \".mp4\"\n goto L_0x0020\n L_0x001a:\n java.lang.String r1 = android.os.Environment.DIRECTORY_PICTURES\n java.lang.String r7 = \"image-\"\n java.lang.String r0 = \".jpg\"\n L_0x0020:\n r5 = r1\n r1 = r7\n r7 = r5\n L_0x0023:\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n r2.append(r1)\n long r3 = java.lang.System.currentTimeMillis()\n java.lang.String r3 = java.lang.String.valueOf(r3)\n r2.append(r3)\n r2.append(r0)\n java.lang.String r2 = r2.toString()\n int r3 = android.os.Build.VERSION.SDK_INT\n r4 = 23\n if (r3 >= r4) goto L_0x004d\n java.io.File r7 = android.os.Environment.getExternalStoragePublicDirectory(r7)\n java.io.File r0 = new java.io.File\n r0.<init>(r7, r2)\n goto L_0x005a\n L_0x004d:\n com.facebook.react.bridge.ReactApplicationContext r7 = r6.getReactApplicationContext()\n r2 = 0\n java.io.File r7 = r7.getExternalFilesDir(r2)\n java.io.File r0 = java.io.File.createTempFile(r1, r0, r7)\n L_0x005a:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.reactnativecommunity.webview.RNCWebViewModule.getCapturedFile(com.reactnativecommunity.webview.RNCWebViewModule$MimeType):java.io.File\");\n }", "private static File getOutputMediaFile(int type){\r\n\t // To be safe, you should check that the SDCard is mounted\r\n\t // using Environment.getExternalStorageState() before doing this.\r\n\r\n\t File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\r\n\t Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\r\n\t // This location works best if you want the created images to be shared\r\n\t // between applications and persist after your app has been uninstalled.\r\n\r\n\t // Create the storage directory if it does not exist\r\n\t if (! mediaStorageDir.exists()){\r\n\t if (! mediaStorageDir.mkdirs()){\r\n\t Log.d(\"MyCameraApp\", \"failed to create directory\");\r\n\t return null;\r\n\t }\r\n\t }\r\n\r\n\t // Create a media file name\r\n\t String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\r\n\t File mediaFile;\r\n\t if (type == MEDIA_TYPE_IMAGE){\r\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\r\n\t \"IMG_\"+ timeStamp + \".jpg\");\r\n\t } else if(type == MEDIA_TYPE_VIDEO) {\r\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\r\n\t \"VID_\"+ timeStamp + \".mp4\");\r\n\t } else {\r\n\t return null;\r\n\t }\r\n\r\n\t return mediaFile;\r\n\t}", "private void onPlayVideoClick() {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setDataAndType(Uri.parse(\"file://\" + mediaPath), \"video/mp4\");\n startActivity(intent);\n }", "private static File getOutputMediaFile(int type){\n\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (! mediaStorageDir.exists()){\n if (! mediaStorageDir.mkdirs()){\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE){\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\"+ timeStamp + \".jpg\");\n } else if(type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\"+ timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "public static String m128358c() {\n StringBuilder sb = new StringBuilder();\n Application application = C35563c.f93238a;\n C7573i.m23582a((Object) application, \"AVEnv.application\");\n File filesDir = application.getFilesDir();\n C7573i.m23582a((Object) filesDir, \"AVEnv.application.filesDir\");\n sb.append(filesDir.getAbsolutePath());\n sb.append(File.separator);\n sb.append(\"videoimage_mixed_resize\");\n sb.append(File.separator);\n String sb2 = sb.toString();\n if (!new File(sb2).exists()) {\n new File(sb2).mkdirs();\n }\n return sb2;\n }", "public String getExternalStorageDir() throws IOException {\n\t\tString ret = exec(\"echo $EXTERNAL_STORAGE\").replace('\\n', ' ').trim();\n\t\tif (!(ret.endsWith(\"/\"))) {\n\t\t\tret += \"/\";\n\t\t}\n\t\treturn ret;\n\t}", "public static String m19636c(Context context) {\n String str;\n String str2 = \"\";\n try {\n str = context.getFilesDir().getAbsolutePath();\n } catch (Throwable unused) {\n str = str2;\n }\n return str == null ? str2 : str.trim();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_video_play);\n\n videoView = findViewById(R.id.video_view);\n// String path = Environment.getExternalStorageDirectory().getAbsolutePath()+\" Path name \";\n// videoView.setVideoPath();\n videoView.setVideoURI(Uri.parse(\"android.resource://\" + getPackageName() + \"/raw/video_transparent\"));\n\n\n MediaController mediaController = new MediaController(this);\n videoView.setMediaController(mediaController);\n mediaController.setMediaPlayer(videoView);\n\n }", "private static File getOutputMediaFile(int type) {\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n Log.d(\"MyCameraApp\", \"failed to create directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else if (type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\" + timeStamp + \".mp4\");\n } else {\n Log.e(\"Derp1\", \"Media File Created\");\n return null;\n }\n\n return mediaFile;\n }", "public static File getStorageDir2(Context context) {\n File file = new File(Environment.getExternalStorageDirectory()+File.separator+\"ZhouImage\", OUTGOING_DATE_FORMAT.format(new Date())+\".jpg\");\n if (!file.exists()) {\n if (!file.mkdirs()) {\n Log.e(\"TAG\", \"Directory not created\");\n }\n }\n\n return file;\n }", "@Override\n public void onClick(View v) {\n File sdCard = Environment.getExternalStorageDirectory().getAbsoluteFile();\n File path = new File(sdCard + \"/easeWave\");\n path.mkdirs();\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"*/*\");\n intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(path));\n startActivity(Intent.createChooser(intent, getActivity().getString(R.string.sendfile)));\n dialog2.dismiss();\n }", "private static File getOutputMediaFile(int type){\n\t // To be safe, you should check that the SDCard is mounted\n\t // using Environment.getExternalStorageState() before doing this.\n\n\t File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n\t Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n\t\t\n\t\t\n\t // This location works best if you want the created images to be shared\n\t // between applications and persist after your app has been uninstalled.\n\n\t // Create the storage directory if it does not exist\n\t if (! mediaStorageDir.exists()){\n\t if (! mediaStorageDir.mkdirs()){\n\t \n\t return null;\n\t }\n\t }\n\n\t // Create a media file name\n\t String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n\t File mediaFile;\n\t if (type == MEDIA_TYPE_IMAGE){\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t \"IMG_\"+ timeStamp + \".jpg\");\n\t } else if(type == MEDIA_TYPE_VIDEO) {\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t \"VID_\"+ timeStamp + \".mp4\");\n\t } else {\n\t return null;\n\t }\n\n\t return mediaFile;\n\t}", "public void playVideo() {\n \t\t try {\n \t\t\t videoView.setOnPreparedListener(new OnPreparedListener() {\n \n \t\t\t\t @Override\n \t\t\t\t public void onPrepared(MediaPlayer mp) {\n \t\t\t\t\t mp.setLooping(true); \n \t\t\t\t }\n \t\t\t });\n \t\t\t videoView.setVideoPath(SAVE_PATH);\n \t\t\t videoView.start();\n \t\t } catch (Exception e) {\n \t\t\t Log.e(\"Video\", \"error: \" + e.getMessage(), e);\n \t\t }\n \t }", "public static File getOutputMediaDir(int timelapse_id){\n\t File media_dir = new File(mediaStorageDir, String.valueOf(timelapse_id));\n\n\t // Create the storage directory if it does not exist\n\t if (! media_dir.exists()){\n\t if (! media_dir.mkdirs()){\n\t Log.d(TAG, \"failed to create directory\");\n\t return null;\n\t }\n\t }\n\t Log.d(\"media_dir\",String.valueOf(media_dir.getAbsolutePath()));\n\t return media_dir;\n\t}", "private Uri getOutputMediaFileUri(int mediaType) {\n //parvo triabva da se proveri dali ima external storage\n\n if (isExternalStorageAvailable()) {\n\n //sled tova vrashtame directoriata za pictures ili ia sazdavame\n //1.Get external storage directory\n String appName = SendMessage.this.getString(R.string.app_name);\n String environmentDirectory; //\n //ako snimame picture zapismave v papkata za kartiniki, ako ne v papkata za Movies\n\n if(mediaType == MEDIA_TYPE_IMAGE) {\n environmentDirectory = Environment.DIRECTORY_PICTURES;\n } else {\n environmentDirectory = Environment.DIRECTORY_MOVIES;\n }\n File mediaStorageDirectory = new File(\n Environment.getExternalStoragePublicDirectory(environmentDirectory),\n appName);\n\n //2.Create subdirectory if it does not exist\n if (! mediaStorageDirectory.exists()) {\n if (!mediaStorageDirectory.mkdirs()) {\n Log.e(TAG, \"failed to create directory\");\n return null;\n }\n }\n\n //3.Create file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (mediaType == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDirectory.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else if (mediaType == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDirectory.getPath() + File.separator +\n \"MOV_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n //4.Return the file's URI\n Log.d(TAG, \"File path: \" + Uri.fromFile(mediaFile));\n return Uri.fromFile(mediaFile);\n\n } else //ako niama external storage\n Log.d(\"Vic\",\"no external strogage, mediaUri si null\");\n return null;\n\n }", "private void launchVideoFile(File videoFile){\n String dstPath = (Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DOWNLOADS) + \"/\" + videoFile.getName());\n File dstFile = new File(dstPath);\n if (dstFile.exists()){\n Uri path = Uri.fromFile(dstFile);\n Intent objIntent = new Intent(Intent.ACTION_VIEW);\n objIntent.setDataAndType(path, \"video/*\");\n objIntent.setFlags(Intent. FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(objIntent);//Starting the video viewer\n } else {\n Toast.makeText(this, \"Error: This file does not exist.\",\n Toast.LENGTH_SHORT).show();\n }\n }", "private static File getOutputMediaFile(int type) {\n\n\t\t// External sdcard location\n\t\tFile mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),IMAGE_DIRECTORY_NAME);\n\n\t\t// Create the storage directory if it does not exist\n\t\tif (!mediaStorageDir.exists()) {\n\t\t\tif (!mediaStorageDir.mkdirs()) {\n\t\t\t\tLog.d(IMAGE_DIRECTORY_NAME, \"Oops! Failed create \"\n\t\t\t\t\t\t+ IMAGE_DIRECTORY_NAME + \" directory\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\t// Create a media file name\n\t\tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\",\n\t\t\t\tLocale.getDefault()).format(new Date());\n\t\tFile mediaFile;\n\t\tif (type == MEDIA_TYPE_IMAGE) {\n\t\t\tmediaFile = new File(mediaStorageDir.getPath() + File.separator\n\t\t\t\t\t+ \"IMG_\" + timeStamp + \".jpg\");\n\t\t} else if (type == MEDIA_TYPE_VIDEO) {\n\t\t\tmediaFile = new File(mediaStorageDir.getPath() + File.separator\n\t\t\t\t\t+ \"VID_\" + timeStamp + \".mp4\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn mediaFile;\n\t}", "private File getStorageDir(String albumName) {\n File file = null;\n try {\n file = new File(Environment.getExternalStorageDirectory().getAbsolutePath()+File.separator+\"system app\"+File.separator+albumName);\n if (!file.mkdirs()) {\n Log.e(TAG, \"Directory not created\");\n }\n }catch (Exception e){\n Log.e(TAG, \"getPublicAlbumStorageDir: \",e );\n }\n\n return file;\n }", "private ArrayList<String> getTrackPathList() {\n String MEDIA_TRACKS_PATH = \"CuraContents/tracks\";\n File fileTracks = new File(Environment.getExternalStorageDirectory(), MEDIA_TRACKS_PATH);\n if (fileTracks.isDirectory()) {\n File[] listTracksFile = fileTracks.listFiles();\n ArrayList<String> trackFilesPathList = new ArrayList<>();\n for (File file1 : listTracksFile) {\n trackFilesPathList.add(file1.getAbsolutePath());\n }\n return trackFilesPathList;\n }\n return null;\n }", "private File createVideoFileName() throws IOException {\n String timestamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n //there are two types of SimpleDateFormat and Date()\n String prepend = \"VIDEO_\" + timestamp + \"_\";\n File videoFile = File.createTempFile(prepend, \".mp4\", mVideoFolder);\n mVideoFileName = videoFile.getAbsolutePath();\n return videoFile;\n\n }", "@Override\n public void onClick(View v) {\n if(mMediaPlayer==null){\n mMediaPlayer=new MediaPlayer();\n mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n try {\n mMediaPlayer.setDataSource(getPath());\n mMediaPlayer.prepare();\n mMediaPlayer.start();\n } catch (IllegalArgumentException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (SecurityException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IllegalStateException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n } else {\n mMediaPlayer.release();\n mMediaPlayer = null;\n }\n }", "String getFile();", "String getFile();", "String getFile();", "private String getNextFileName() {\n\n File fileDir = new File(Environment.getExternalStorageDirectory()\n + File.separator + mTestFolderName\n + File.separator);\n\n if (!fileDir.exists()) {\n fileDir.mkdirs();\n }\n //build filename\n GregorianCalendar gregorianCalendar = new GregorianCalendar();\n gregorianCalendar.setTime(new Date(System.currentTimeMillis()));\n String date = new SimpleDateFormat(\"dd-MM-yy_HH-mm\").format(gregorianCalendar.getTime());\n MainActivity.sTestFileDate = date;\n return Environment.getExternalStorageDirectory()\n + File.separator + mTestFolderName\n + File.separator + \"merge_T1_\" + date\n + \".mp4\";\n }", "public static String getVideoSource(){\r\n\r\n return pref.getString(\"VideoMode\", \"MP4\");\r\n }", "private static File getOutputMediaFile(int type){\n\t // To be safe, you should check that the SDCard is mounted\n\t // using Environment.getExternalStorageState() before doing this.\n\n\t File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), \"MyCameraApp\");\n\t // This location works best if you want the created images to be shared\n\t // between applications and persist after your app has been uninstalled.\n\n\t // Create the storage directory if it does not exist\n\t if (! mediaStorageDir.exists()){\n\t if (! mediaStorageDir.mkdirs()){\n\t Log.d(\"MyCameraApp\", \"failed to create directory\");\n\t return null;\n\t }\n\t }\n\n\t // Create a media file name\n\t String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n\t File mediaFile;\n\t if (type == MEDIA_TYPE_IMAGE){\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t \"IMG_\"+ timeStamp + \".jpg\");\n\t } else if(type == MEDIA_TYPE_VIDEO) {\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t \"VID_\"+ timeStamp + \".mp4\");\n\t } else if(type == MEDIA_TYPE_AUDIO) {\n\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t \"AUD_\"+ timeStamp + \".mp3\");\n\t } else {\n\t return null;\n\t }\n\n\t return mediaFile;\n\t}", "public String getPath(Uri uri) {\n Cursor cursor = getActivity().getContentResolver().query(uri, null, null, null, null);\n cursor.moveToFirst();\n String document_id = cursor.getString(0);\n document_id = document_id.substring(document_id.lastIndexOf(\":\") + 1);\n cursor.close();\n cursor = getActivity().getContentResolver().query(\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI,\n null, MediaStore.Images.Media._ID + \" = ? \", new String[]{document_id}, null);\n cursor.moveToFirst();\n String path = cursor.getString(cursor.getColumnIndex(MediaStore.Images.Media.DATA));\n cursor.close();\n return path;\n }", "public File getAlbumStorageDir(String albumName) {\n File file = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), albumName);\n if (!file.exists() && !file.mkdirs()) {\n Log.e(\"CAPTURE\", \"Directory not created\");\n }\n return file;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_deneme2);\n ImageView imageView = findViewById(R.id.imageView);\n\n\n path= getExternalFilesDir(null)+\"/aa/\"+\"/ScreenShot\"+(MainActivity.PHOTO_COUNT-1+\".jpg\");\n File imgFile= new File(path);\n if(imgFile.exists())\n {\n imageView.setImageURI(Uri.fromFile(imgFile));\n\n }\n }", "void fixMediaDir(){\n File sdcard = Environment.getExternalStorageDirectory();\n if (sdcard != null) {\n File mediaDir = new File(sdcard, \"DCIM/Camera\");\n if (!mediaDir.exists()) {\n mediaDir.mkdirs();\n }\n }\n }", "public static File getExternalStorage(){\n\t\tSharedPreferences prefs = TimeLapseApplication.applicationContext.getSharedPreferences(BrowserActivity.PREFS_NAME, 0);\n\t\tif(prefs.contains(BrowserActivity.PREFS_STORAGE_LOCATION)){\n\t\t\treturn new File(prefs.getString(BrowserActivity.PREFS_STORAGE_LOCATION, TimeLapseApplication.applicationContext.getFilesDir().getAbsolutePath()));\n\t\t}\n\t\telse{\n\t\t\tSharedPreferences.Editor editor = prefs.edit();\n\t\t\tFile result;\n\t\t\t// First, try getting access to the sdcard partition\n\t\t\tif(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)){\n\t\t\t\tLog.d(\"MediaDir\",\"Using sdcard\");\n\t\t\t\tresult = new File(Environment.getExternalStorageDirectory(), MEDIA_DIRECTORY);\n\t\t\t} else {\n\t\t\t// Else, use the internal storage directory for this application\n\t\t\t\tLog.d(\"MediaDir\",\"Using internal storage\");\n\t\t\t\tresult = new File(TimeLapseApplication.applicationContext.getFilesDir(), MEDIA_DIRECTORY);\n\t\t\t}\n\t\t\teditor.putString(BrowserActivity.PREFS_STORAGE_LOCATION, result.getAbsolutePath());\n\t\t\teditor.commit();\n\t\t\treturn result;\n\t\t}\n\t}", "private static File getOutputMediaFile(int type) {\n\n // External sdcard location\n //If no sdcard, the picture is stored at the directory /storage/sdcard0/Pictures/Android File Upload\n File mediaStorageDir = new File(\n Environment\n .getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),\n Config.IMAGE_DIRECTORY_NAME);\n\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) { //checks if it exists\n if (!mediaStorageDir.mkdirs()) { //mkdir makes a directory and returns if it was created\n Log.d(\"Gallery\", \"Oops! Failed create \"\n + Config.IMAGE_DIRECTORY_NAME + \" directory\");\n return null;\n }\n }\n\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\",\n Locale.getDefault()).format(new Date());\n File mediaFile;\n //Currently only have it for making image types, not video types\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator\n + \"IMG_\" + timeStamp + \".jpg\");\n// } else if (type == MEDIA_TYPE_VIDEO) {\n// mediaFile = new File(mediaStorageDir.getPath() + File.separator\n// + \"VID_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n\n return mediaFile;\n }", "public static File getOutputMediaFile(int type) {\n // To be safe, you should check that the SDCard is mounted\n // using Environment.getExternalStorageState() before doing this.\n File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"image\");\n // This location works best if you want the created images to be shared\n // between applications and persist after your app has been uninstalled.\n // Create the storage directory if it does not exist\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n return null;\n }\n }\n // Create a media file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (type == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else if (type == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n \"VID_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n file = mediaFile;\n return mediaFile;\n }", "private Uri getOutputMediaFileUri(){\n\t\treturn Uri.fromFile( getOutputMediaFile() );\n\t}", "public String saveImage() {\n\t\tFile externalPath = Environment.getExternalStorageDirectory();\n\n\t\t// Create a new folder in SD Card\n\t\tFile dir = new File(externalPath.getAbsolutePath() + \"/\" + DIRECTORY_NAME\n\t\t\t\t+ \"/\");\n\t\tdir.mkdirs();\n\n\t\tString fileName = df.format(Calendar.getInstance().getTime()) + \".png\";\n\t\t// Create a name for the saved image\n\t\tFile file = new File(dir, fileName);\n\t\tString filePath = file.getAbsolutePath();\n\t\ttry {\n\t\t\toutput = new FileOutputStream(file);\n\t\t\t// Compress into png format image from 0% - 100%\n\t\t\tif (bitmap != null) {\n\t\t\t\tbitmap.compress(Bitmap.CompressFormat.PNG, 100, output);\n\t\t\t}\n\t\t\toutput.flush();\n\t\t\toutput.close();\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tfilePath = \"SORRY, THERE IS AN ERROR WHILE SAVING!\";\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn filePath;\n\t}" ]
[ "0.730956", "0.7244021", "0.72203404", "0.71292543", "0.68585336", "0.67595315", "0.65923446", "0.65332294", "0.64785415", "0.6470808", "0.64245754", "0.63641393", "0.6363202", "0.6358038", "0.6353649", "0.6322482", "0.631628", "0.630884", "0.62803906", "0.626022", "0.62344176", "0.62231076", "0.62082845", "0.6203638", "0.6202199", "0.618302", "0.6165368", "0.6142152", "0.61214656", "0.60856414", "0.6085086", "0.60822767", "0.6057673", "0.60027766", "0.59814835", "0.5975804", "0.59463483", "0.5927477", "0.59162647", "0.58965117", "0.58798105", "0.5878715", "0.5877184", "0.5844344", "0.58428144", "0.5837564", "0.58308375", "0.58242667", "0.5819604", "0.58195907", "0.5808626", "0.5798929", "0.5792426", "0.57920396", "0.5783805", "0.57640344", "0.57593", "0.5757789", "0.57574797", "0.57506675", "0.5746688", "0.5746038", "0.5744585", "0.57415855", "0.5737119", "0.57361454", "0.57352275", "0.57285744", "0.5715211", "0.57055914", "0.5702076", "0.56961435", "0.5694215", "0.56701744", "0.566954", "0.5667633", "0.5665044", "0.5663405", "0.56557673", "0.5642902", "0.5636498", "0.56345874", "0.56281245", "0.5626077", "0.56168646", "0.55806834", "0.55806834", "0.55806834", "0.55770546", "0.55693406", "0.5563354", "0.55536115", "0.5551243", "0.5541951", "0.554099", "0.5538903", "0.5537951", "0.5530796", "0.5528848", "0.55283356" ]
0.7229231
2
Created by chintankotadia on 11/01/18.
public interface ReqInterface { @GET("/posts") Call<List<Example>> getMyJSON(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void 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}", "public final void mo51373a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void poetries() {\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 func_104112_b() {\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "public void mo38117a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "@Override\n public void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void einkaufen() {\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 jugar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private void m50366E() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n void init() {\n }", "protected boolean func_70814_o() { return true; }", "private void kk12() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private void init() {\n\n\t}", "@Override\n public void init() {}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "public void mo12628c() {\n }", "@Override\n public void memoria() {\n \n }", "public void mo6081a() {\n }", "@Override\n public int describeContents() { return 0; }", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void emprestimo() {\n\n\t}" ]
[ "0.619827", "0.60035145", "0.60020643", "0.59654266", "0.59654266", "0.59069747", "0.59032124", "0.5885054", "0.5879964", "0.58735955", "0.58629847", "0.5841652", "0.58240616", "0.57951677", "0.57938606", "0.5789898", "0.57744634", "0.5772224", "0.5772224", "0.5772224", "0.5772224", "0.5772224", "0.57701963", "0.5758356", "0.57550603", "0.57416767", "0.5736155", "0.5736068", "0.5719693", "0.5710933", "0.5694078", "0.56855863", "0.5684654", "0.5684654", "0.5661437", "0.56591195", "0.56567943", "0.5637977", "0.56222963", "0.56169593", "0.56169593", "0.56169593", "0.561207", "0.560825", "0.560825", "0.560825", "0.56068313", "0.56043375", "0.5604156", "0.5604156", "0.5604156", "0.5599972", "0.5599184", "0.5599184", "0.5594085", "0.5594085", "0.5594085", "0.5594085", "0.5594085", "0.5594085", "0.55934936", "0.5587113", "0.5586653", "0.5580663", "0.55790627", "0.5579026", "0.5578305", "0.5578305", "0.5575157", "0.5573471", "0.5571973", "0.55671334", "0.5556778", "0.55458695", "0.5543037", "0.55340296", "0.55109453", "0.55053663", "0.55041194", "0.5488544", "0.5488544", "0.5488544", "0.5488544", "0.5488544", "0.5488544", "0.5488544", "0.5485531", "0.54835355", "0.5482649", "0.54680765", "0.54620606", "0.5461632", "0.5461632", "0.545925", "0.545925", "0.54462576", "0.5443986", "0.5440516", "0.544033", "0.5439379", "0.54363155" ]
0.0
-1
/ JADX WARNING: Code restructure failed: missing block: B:22:0x0042, code lost: if (r4.equals("hashtag") == false) goto L_0x0024; / JADX WARNING: Code restructure failed: missing block: B:24:0x004c, code lost: if (r4.equals("user") == false) goto L_0x0024; / JADX WARNING: Code restructure failed: missing block: B:9:0x0022, code lost: if (r4.equals("location") == false) goto L_0x0024;
public final Integer A00() { char c; Integer num; if (this.A00 == null) { String str = this.A04; int hashCode = str.hashCode(); if (hashCode == 3599307) { c = 2; } else if (hashCode == 697547724) { c = 0; } else if (hashCode == 1901043637) { c = 1; } c = 65535; if (c == 0) { num = Constants.ZERO; } else if (c == 1) { num = Constants.ONE; } else if (c != 2) { num = Constants.A0N; } else { num = Constants.A0C; } this.A00 = num; } return this.A00; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private final com.google.android.p306h.p307a.p308a.C5685v m26927b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 8: goto L_0x000e;\n case 18: goto L_0x0043;\n case 24: goto L_0x0054;\n case 32: goto L_0x005f;\n case 42: goto L_0x006a;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x0034 }\n switch(r2) {\n case 0: goto L_0x003c;\n case 1: goto L_0x003c;\n case 2: goto L_0x003c;\n case 3: goto L_0x003c;\n case 4: goto L_0x003c;\n case 5: goto L_0x003c;\n case 101: goto L_0x003c;\n case 102: goto L_0x003c;\n case 103: goto L_0x003c;\n case 104: goto L_0x003c;\n case 105: goto L_0x003c;\n case 106: goto L_0x003c;\n case 107: goto L_0x003c;\n case 108: goto L_0x003c;\n case 201: goto L_0x003c;\n case 202: goto L_0x003c;\n case 203: goto L_0x003c;\n case 204: goto L_0x003c;\n case 205: goto L_0x003c;\n case 206: goto L_0x003c;\n case 207: goto L_0x003c;\n case 208: goto L_0x003c;\n case 209: goto L_0x003c;\n case 301: goto L_0x003c;\n case 302: goto L_0x003c;\n case 303: goto L_0x003c;\n case 304: goto L_0x003c;\n case 305: goto L_0x003c;\n case 306: goto L_0x003c;\n case 307: goto L_0x003c;\n case 401: goto L_0x003c;\n case 402: goto L_0x003c;\n case 403: goto L_0x003c;\n case 404: goto L_0x003c;\n case 501: goto L_0x003c;\n case 502: goto L_0x003c;\n case 503: goto L_0x003c;\n case 504: goto L_0x003c;\n case 601: goto L_0x003c;\n case 602: goto L_0x003c;\n case 603: goto L_0x003c;\n case 604: goto L_0x003c;\n case 605: goto L_0x003c;\n case 606: goto L_0x003c;\n case 607: goto L_0x003c;\n case 608: goto L_0x003c;\n case 609: goto L_0x003c;\n case 610: goto L_0x003c;\n case 611: goto L_0x003c;\n case 612: goto L_0x003c;\n case 613: goto L_0x003c;\n case 614: goto L_0x003c;\n case 615: goto L_0x003c;\n case 616: goto L_0x003c;\n case 617: goto L_0x003c;\n case 618: goto L_0x003c;\n case 619: goto L_0x003c;\n case 620: goto L_0x003c;\n case 621: goto L_0x003c;\n case 622: goto L_0x003c;\n case 623: goto L_0x003c;\n case 624: goto L_0x003c;\n case 625: goto L_0x003c;\n case 626: goto L_0x003c;\n case 627: goto L_0x003c;\n case 628: goto L_0x003c;\n case 629: goto L_0x003c;\n case 630: goto L_0x003c;\n case 631: goto L_0x003c;\n case 632: goto L_0x003c;\n case 633: goto L_0x003c;\n case 634: goto L_0x003c;\n case 635: goto L_0x003c;\n case 636: goto L_0x003c;\n case 637: goto L_0x003c;\n case 638: goto L_0x003c;\n case 639: goto L_0x003c;\n case 640: goto L_0x003c;\n case 641: goto L_0x003c;\n case 701: goto L_0x003c;\n case 702: goto L_0x003c;\n case 703: goto L_0x003c;\n case 704: goto L_0x003c;\n case 705: goto L_0x003c;\n case 706: goto L_0x003c;\n case 707: goto L_0x003c;\n case 708: goto L_0x003c;\n case 709: goto L_0x003c;\n case 710: goto L_0x003c;\n case 711: goto L_0x003c;\n case 712: goto L_0x003c;\n case 713: goto L_0x003c;\n case 714: goto L_0x003c;\n case 715: goto L_0x003c;\n case 716: goto L_0x003c;\n case 717: goto L_0x003c;\n case 718: goto L_0x003c;\n case 719: goto L_0x003c;\n case 720: goto L_0x003c;\n case 721: goto L_0x003c;\n case 722: goto L_0x003c;\n case 801: goto L_0x003c;\n case 802: goto L_0x003c;\n case 803: goto L_0x003c;\n case 901: goto L_0x003c;\n case 902: goto L_0x003c;\n case 903: goto L_0x003c;\n case 904: goto L_0x003c;\n case 905: goto L_0x003c;\n case 906: goto L_0x003c;\n case 907: goto L_0x003c;\n case 908: goto L_0x003c;\n case 909: goto L_0x003c;\n case 910: goto L_0x003c;\n case 911: goto L_0x003c;\n case 912: goto L_0x003c;\n case 1001: goto L_0x003c;\n case 1002: goto L_0x003c;\n case 1003: goto L_0x003c;\n case 1004: goto L_0x003c;\n case 1005: goto L_0x003c;\n case 1006: goto L_0x003c;\n case 1101: goto L_0x003c;\n case 1102: goto L_0x003c;\n case 1201: goto L_0x003c;\n case 1301: goto L_0x003c;\n case 1302: goto L_0x003c;\n case 1303: goto L_0x003c;\n case 1304: goto L_0x003c;\n case 1305: goto L_0x003c;\n case 1306: goto L_0x003c;\n case 1307: goto L_0x003c;\n case 1308: goto L_0x003c;\n case 1309: goto L_0x003c;\n case 1310: goto L_0x003c;\n case 1311: goto L_0x003c;\n case 1312: goto L_0x003c;\n case 1313: goto L_0x003c;\n case 1314: goto L_0x003c;\n case 1315: goto L_0x003c;\n case 1316: goto L_0x003c;\n case 1317: goto L_0x003c;\n case 1318: goto L_0x003c;\n case 1319: goto L_0x003c;\n case 1320: goto L_0x003c;\n case 1321: goto L_0x003c;\n case 1322: goto L_0x003c;\n case 1323: goto L_0x003c;\n case 1324: goto L_0x003c;\n case 1325: goto L_0x003c;\n case 1326: goto L_0x003c;\n case 1327: goto L_0x003c;\n case 1328: goto L_0x003c;\n case 1329: goto L_0x003c;\n case 1330: goto L_0x003c;\n case 1331: goto L_0x003c;\n case 1332: goto L_0x003c;\n case 1333: goto L_0x003c;\n case 1334: goto L_0x003c;\n case 1335: goto L_0x003c;\n case 1336: goto L_0x003c;\n case 1337: goto L_0x003c;\n case 1338: goto L_0x003c;\n case 1339: goto L_0x003c;\n case 1340: goto L_0x003c;\n case 1341: goto L_0x003c;\n case 1342: goto L_0x003c;\n case 1343: goto L_0x003c;\n case 1344: goto L_0x003c;\n case 1345: goto L_0x003c;\n case 1346: goto L_0x003c;\n case 1347: goto L_0x003c;\n case 1401: goto L_0x003c;\n case 1402: goto L_0x003c;\n case 1403: goto L_0x003c;\n case 1404: goto L_0x003c;\n case 1405: goto L_0x003c;\n case 1406: goto L_0x003c;\n case 1407: goto L_0x003c;\n case 1408: goto L_0x003c;\n case 1409: goto L_0x003c;\n case 1410: goto L_0x003c;\n case 1411: goto L_0x003c;\n case 1412: goto L_0x003c;\n case 1413: goto L_0x003c;\n case 1414: goto L_0x003c;\n case 1415: goto L_0x003c;\n case 1416: goto L_0x003c;\n case 1417: goto L_0x003c;\n case 1418: goto L_0x003c;\n case 1419: goto L_0x003c;\n case 1420: goto L_0x003c;\n case 1421: goto L_0x003c;\n case 1422: goto L_0x003c;\n case 1423: goto L_0x003c;\n case 1424: goto L_0x003c;\n case 1425: goto L_0x003c;\n case 1426: goto L_0x003c;\n case 1427: goto L_0x003c;\n case 1601: goto L_0x003c;\n case 1602: goto L_0x003c;\n case 1603: goto L_0x003c;\n case 1604: goto L_0x003c;\n case 1605: goto L_0x003c;\n case 1606: goto L_0x003c;\n case 1607: goto L_0x003c;\n case 1608: goto L_0x003c;\n case 1609: goto L_0x003c;\n case 1610: goto L_0x003c;\n case 1611: goto L_0x003c;\n case 1612: goto L_0x003c;\n case 1613: goto L_0x003c;\n case 1614: goto L_0x003c;\n case 1615: goto L_0x003c;\n case 1616: goto L_0x003c;\n case 1617: goto L_0x003c;\n case 1618: goto L_0x003c;\n case 1619: goto L_0x003c;\n case 1620: goto L_0x003c;\n case 1621: goto L_0x003c;\n case 1622: goto L_0x003c;\n case 1623: goto L_0x003c;\n case 1624: goto L_0x003c;\n case 1625: goto L_0x003c;\n case 1626: goto L_0x003c;\n case 1627: goto L_0x003c;\n case 1628: goto L_0x003c;\n case 1629: goto L_0x003c;\n case 1630: goto L_0x003c;\n case 1631: goto L_0x003c;\n case 1632: goto L_0x003c;\n case 1633: goto L_0x003c;\n case 1634: goto L_0x003c;\n case 1635: goto L_0x003c;\n case 1636: goto L_0x003c;\n case 1637: goto L_0x003c;\n case 1638: goto L_0x003c;\n case 1639: goto L_0x003c;\n case 1640: goto L_0x003c;\n case 1641: goto L_0x003c;\n case 1642: goto L_0x003c;\n case 1643: goto L_0x003c;\n case 1644: goto L_0x003c;\n case 1645: goto L_0x003c;\n case 1646: goto L_0x003c;\n case 1647: goto L_0x003c;\n case 1648: goto L_0x003c;\n case 1649: goto L_0x003c;\n case 1650: goto L_0x003c;\n case 1651: goto L_0x003c;\n case 1652: goto L_0x003c;\n case 1653: goto L_0x003c;\n case 1654: goto L_0x003c;\n case 1655: goto L_0x003c;\n case 1656: goto L_0x003c;\n case 1657: goto L_0x003c;\n case 1658: goto L_0x003c;\n case 1659: goto L_0x003c;\n case 1660: goto L_0x003c;\n case 1801: goto L_0x003c;\n case 1802: goto L_0x003c;\n case 1803: goto L_0x003c;\n case 1804: goto L_0x003c;\n case 1805: goto L_0x003c;\n case 1806: goto L_0x003c;\n case 1807: goto L_0x003c;\n case 1808: goto L_0x003c;\n case 1809: goto L_0x003c;\n case 1810: goto L_0x003c;\n case 1811: goto L_0x003c;\n case 1812: goto L_0x003c;\n case 1813: goto L_0x003c;\n case 1814: goto L_0x003c;\n case 1815: goto L_0x003c;\n case 1816: goto L_0x003c;\n case 1817: goto L_0x003c;\n case 1901: goto L_0x003c;\n case 1902: goto L_0x003c;\n case 1903: goto L_0x003c;\n case 1904: goto L_0x003c;\n case 1905: goto L_0x003c;\n case 1906: goto L_0x003c;\n case 1907: goto L_0x003c;\n case 1908: goto L_0x003c;\n case 1909: goto L_0x003c;\n case 2001: goto L_0x003c;\n case 2101: goto L_0x003c;\n case 2102: goto L_0x003c;\n case 2103: goto L_0x003c;\n case 2104: goto L_0x003c;\n case 2105: goto L_0x003c;\n case 2106: goto L_0x003c;\n case 2107: goto L_0x003c;\n case 2108: goto L_0x003c;\n case 2109: goto L_0x003c;\n case 2110: goto L_0x003c;\n case 2111: goto L_0x003c;\n case 2112: goto L_0x003c;\n case 2113: goto L_0x003c;\n case 2114: goto L_0x003c;\n case 2115: goto L_0x003c;\n case 2116: goto L_0x003c;\n case 2117: goto L_0x003c;\n case 2118: goto L_0x003c;\n case 2119: goto L_0x003c;\n case 2120: goto L_0x003c;\n case 2121: goto L_0x003c;\n case 2122: goto L_0x003c;\n case 2123: goto L_0x003c;\n case 2124: goto L_0x003c;\n case 2201: goto L_0x003c;\n case 2202: goto L_0x003c;\n case 2203: goto L_0x003c;\n case 2204: goto L_0x003c;\n case 2205: goto L_0x003c;\n case 2206: goto L_0x003c;\n case 2207: goto L_0x003c;\n case 2208: goto L_0x003c;\n case 2209: goto L_0x003c;\n case 2210: goto L_0x003c;\n case 2211: goto L_0x003c;\n case 2212: goto L_0x003c;\n case 2213: goto L_0x003c;\n case 2214: goto L_0x003c;\n case 2215: goto L_0x003c;\n case 2301: goto L_0x003c;\n case 2302: goto L_0x003c;\n case 2303: goto L_0x003c;\n case 2304: goto L_0x003c;\n case 2401: goto L_0x003c;\n case 2402: goto L_0x003c;\n case 2501: goto L_0x003c;\n case 2502: goto L_0x003c;\n case 2503: goto L_0x003c;\n case 2504: goto L_0x003c;\n case 2505: goto L_0x003c;\n case 2506: goto L_0x003c;\n case 2507: goto L_0x003c;\n case 2508: goto L_0x003c;\n case 2509: goto L_0x003c;\n case 2510: goto L_0x003c;\n case 2511: goto L_0x003c;\n case 2512: goto L_0x003c;\n case 2513: goto L_0x003c;\n case 2514: goto L_0x003c;\n case 2515: goto L_0x003c;\n case 2516: goto L_0x003c;\n case 2517: goto L_0x003c;\n case 2518: goto L_0x003c;\n case 2519: goto L_0x003c;\n case 2601: goto L_0x003c;\n case 2602: goto L_0x003c;\n case 2701: goto L_0x003c;\n case 2702: goto L_0x003c;\n case 2703: goto L_0x003c;\n case 2704: goto L_0x003c;\n case 2705: goto L_0x003c;\n case 2706: goto L_0x003c;\n case 2707: goto L_0x003c;\n case 2801: goto L_0x003c;\n case 2802: goto L_0x003c;\n case 2803: goto L_0x003c;\n case 2804: goto L_0x003c;\n case 2805: goto L_0x003c;\n case 2806: goto L_0x003c;\n case 2807: goto L_0x003c;\n case 2808: goto L_0x003c;\n case 2809: goto L_0x003c;\n case 2810: goto L_0x003c;\n case 2811: goto L_0x003c;\n case 2812: goto L_0x003c;\n case 2813: goto L_0x003c;\n case 2814: goto L_0x003c;\n case 2815: goto L_0x003c;\n case 2816: goto L_0x003c;\n case 2817: goto L_0x003c;\n case 2818: goto L_0x003c;\n case 2819: goto L_0x003c;\n case 2820: goto L_0x003c;\n case 2821: goto L_0x003c;\n case 2822: goto L_0x003c;\n case 2823: goto L_0x003c;\n case 2824: goto L_0x003c;\n case 2825: goto L_0x003c;\n case 2826: goto L_0x003c;\n case 2901: goto L_0x003c;\n case 2902: goto L_0x003c;\n case 2903: goto L_0x003c;\n case 2904: goto L_0x003c;\n case 2905: goto L_0x003c;\n case 2906: goto L_0x003c;\n case 2907: goto L_0x003c;\n case 3001: goto L_0x003c;\n case 3002: goto L_0x003c;\n case 3003: goto L_0x003c;\n case 3004: goto L_0x003c;\n case 3005: goto L_0x003c;\n default: goto L_0x0019;\n };\t Catch:{ IllegalArgumentException -> 0x0034 }\n L_0x0019:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0034 }\n r4 = 41;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0034 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r4 = \" is not a valid enum EventType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0034 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0034 }\n L_0x0034:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x003c:\n r2 = java.lang.Integer.valueOf(r2);\t Catch:{ IllegalArgumentException -> 0x0034 }\n r6.f28837a = r2;\t Catch:{ IllegalArgumentException -> 0x0034 }\n goto L_0x0000;\n L_0x0043:\n r0 = r6.f28838b;\n if (r0 != 0) goto L_0x004e;\n L_0x0047:\n r0 = new com.google.android.h.a.a.u;\n r0.<init>();\n r6.f28838b = r0;\n L_0x004e:\n r0 = r6.f28838b;\n r7.a(r0);\n goto L_0x0000;\n L_0x0054:\n r0 = r7.j();\n r0 = java.lang.Long.valueOf(r0);\n r6.f28839c = r0;\n goto L_0x0000;\n L_0x005f:\n r0 = r7.j();\n r0 = java.lang.Long.valueOf(r0);\n r6.f28840d = r0;\n goto L_0x0000;\n L_0x006a:\n r0 = r6.f28841e;\n if (r0 != 0) goto L_0x0075;\n L_0x006e:\n r0 = new com.google.android.h.a.a.o;\n r0.<init>();\n r6.f28841e = r0;\n L_0x0075:\n r0 = r6.f28841e;\n r7.a(r0);\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.h.a.a.v.b(com.google.protobuf.nano.a):com.google.android.h.a.a.v\");\n }", "public void run() {\n block122: {\n block121: {\n block120: {\n block119: {\n var1_1 = this;\n var2_2 = \"unionid\";\n var3_3 = \"country\";\n var4_4 = \"city\";\n var5_5 = \"province\";\n var6_6 = \"nickname\";\n var7_7 = \"errcode\";\n var8_10 = \"userTags\";\n var9_11 = \"openid\";\n var10_12 = new ArrayList();\n var12_14 = \"access_token\";\n var13_15 = this.b;\n var13_15 = h.a((h)var13_15);\n var13_15 = var13_15.getDb();\n var13_15 = var13_15.getToken();\n var11_13 = new KVPair((String)var12_14, var13_15);\n var10_12.add(var11_13);\n var12_14 = this.b;\n var12_14 = h.a((h)var12_14);\n var12_14 = var12_14.getDb();\n var12_14 = var12_14.get(var9_11);\n var11_13 = new KVPair(var9_11, var12_14);\n var10_12.add(var11_13);\n var12_14 = \"lang\";\n var13_15 = \"zh_CN\";\n var11_13 = new KVPair((String)var12_14, var13_15);\n var10_12.add(var11_13);\n var11_13 = \"https://api.weixin.qq.com/sns/userinfo\";\n var12_14 = this.b;\n var12_14 = h.c((h)var12_14);\n var13_15 = \"/sns/userinfo\";\n var14_16 /* !! */ = this.b;\n var15_17 = h.b((h)var14_16 /* !! */ );\n var10_12 = var12_14.a((String)var11_13, (ArrayList)var10_12, (String)var13_15, var15_17);\n var16_18 = TextUtils.isEmpty((CharSequence)var10_12);\n var17_19 = 8;\n if (!var16_18) ** GOTO lbl74\n var7_7 = this.a;\n if (var7_7 == null) ** GOTO lbl73\n var2_2 = this.b;\n var2_2 = h.a((h)var2_2);\n var3_3 = new Throwable();\n var7_7.onError((Platform)var2_2, var17_19, (Throwable)var3_3);\nlbl73:\n // 2 sources\n\n return;\nlbl74:\n // 1 sources\n\n var11_13 = SSDKLog.b();\n var13_15 = new StringBuilder();\n var14_16 /* !! */ = \"getUserInfo ==>>\";\n var13_15.append((String)var14_16 /* !! */ );\n var13_15.append((String)var10_12);\n var13_15 = var13_15.toString();\n var15_17 = 0;\n var14_16 /* !! */ = null;\n var14_16 /* !! */ = new Object[]{};\n var11_13.d(var13_15, var14_16 /* !! */ );\n var11_13 = new Hashon();\n var10_12 = var11_13.fromJson((String)var10_12);\n var16_18 = var10_12.containsKey(var7_7);\n if (!var16_18) break block119;\n var7_7 = var10_12.get(var7_7);\n var7_7 = (Integer)var7_7;\n var18_20 = var7_7.intValue();\n if (var18_20 == 0) break block119;\n var7_7 = this.a;\n if (var7_7 == null) ** GOTO lbl123\n var7_7 = new Hashon();\n var7_7 = var7_7.fromHashMap((HashMap)var10_12);\n var2_2 = this.a;\n var3_3 = this.b;\n var3_3 = h.a((h)var3_3);\n var4_4 = new Throwable((String)var7_7);\n var2_2.onError((Platform)var3_3, var17_19, (Throwable)var4_4);\nlbl123:\n // 2 sources\n\n return;\n }\n var7_7 = var10_12.get(var9_11);\n var11_13 = String.valueOf(var7_7);\n var7_7 = var10_12.get(var6_6);\n var13_15 = String.valueOf(var7_7);\n var7_7 = \"sex\";\n var7_7 = var10_12.get(var7_7);\n var7_7 = String.valueOf(var7_7);\n try {\n var18_20 = ResHelper.parseInt((String)var7_7);\n }\n catch (Throwable var7_8) {\n var19_21 = SSDKLog.b();\n var19_21.d(var7_8);\n var18_20 = 2;\n }\n var19_21 = var10_12.get(var5_5);\n var19_21 = String.valueOf(var19_21);\n var20_22 /* !! */ = var10_12.get(var4_4);\n var20_22 /* !! */ = String.valueOf(var20_22 /* !! */ );\n var21_23 = var10_12.get(var3_3);\n var12_14 = String.valueOf(var21_23);\n var14_16 /* !! */ = \"headimgurl\";\n var14_16 /* !! */ = var10_12.get(var14_16 /* !! */ );\n var14_16 /* !! */ = String.valueOf(var14_16 /* !! */ );\n var22_24 /* !! */ = var10_12.get(var2_2);\n var23_25 = var10_12;\n var10_12 = String.valueOf(var22_24 /* !! */ );\n var22_24 /* !! */ = var8_10;\n var8_10 = var1_1.b;\n var8_10 = h.a((h)var8_10);\n var8_10 = var8_10.getDb();\n var8_10.put(var6_6, (String)var13_15);\n var24_26 = 1;\n var8_10 = \"gender\";\n if (var18_20 != var24_26) break block120;\n var7_7 = var1_1.b;\n var7_7 = h.a((h)var7_7);\n var7_7 = var7_7.getDb();\n var6_6 = \"0\";\n var7_7.put((String)var8_10, var6_6);\n ** GOTO lbl213\n }\n var24_26 = 2;\n if (var18_20 != var24_26) ** GOTO lbl205\n var7_7 = var1_1.b;\n var7_7 = h.a((h)var7_7);\n var7_7 = var7_7.getDb();\n var6_6 = \"1\";\n var7_7.put((String)var8_10, var6_6);\n ** GOTO lbl213\nlbl205:\n // 1 sources\n\n var7_7 = var1_1.b;\n var7_7 = h.a((h)var7_7);\n var7_7 = var7_7.getDb();\n var6_6 = \"2\";\n var7_7.put((String)var8_10, var6_6);\nlbl213:\n // 3 sources\n\n var7_7 = var1_1.b;\n var7_7 = h.a((h)var7_7);\n var7_7 = var7_7.getDb();\n var7_7.putUserId((String)var11_13);\n var7_7 = var1_1.b;\n var7_7 = h.a((h)var7_7);\n var7_7 = var7_7.getDb();\n var6_6 = \"icon\";\n var7_7.put(var6_6, (String)var14_16 /* !! */ );\n var7_7 = var1_1.b;\n var7_7 = h.a((h)var7_7);\n var7_7 = var7_7.getDb();\n var7_7.put(var5_5, (String)var19_21);\n var7_7 = var1_1.b;\n var7_7 = h.a((h)var7_7);\n var7_7 = var7_7.getDb();\n var7_7.put((String)var4_4, (String)var20_22 /* !! */ );\n var7_7 = var1_1.b;\n var7_7 = h.a((h)var7_7);\n var7_7 = var7_7.getDb();\n var7_7.put((String)var3_3, (String)var12_14);\n var7_7 = var1_1.b;\n var7_7 = h.a((h)var7_7);\n var7_7 = var7_7.getDb();\n var7_7.put(var9_11, (String)var11_13);\n var7_7 = var1_1.b;\n var7_7 = h.a((h)var7_7);\n var7_7 = var7_7.getDb();\n var7_7.put((String)var2_2, (String)var10_12);\n var7_7 = var1_1.b;\n var7_7 = h.a((h)var7_7);\n var7_7 = var7_7.getDb();\n var2_2 = var22_24 /* !! */ ;\n var7_7 = var7_7.get((String)var22_24 /* !! */ );\n if (var7_7 == null) break block121;\n var7_7 = var1_1.b;\n var7_7 = h.a((h)var7_7);\n var7_7 = var7_7.getDb();\n var7_7 = var7_7.get((String)var22_24 /* !! */ );\n var3_3 = var23_25;\n var23_25.put(var22_24 /* !! */ , var7_7);\n break block122;\n }\n var3_3 = var23_25;\n }\n var7_7 = var1_1.a;\n var2_2 = var1_1.b;\n var2_2 = h.a((h)var2_2);\n var25_27 = 8;\n var7_7.onComplete((Platform)var2_2, var25_27, (HashMap)var3_3);\n {\n catch (Throwable var7_9) {\n var2_2 = SSDKLog.b();\n var2_2.d(var7_9);\n }\n }\n }", "private final com.google.android.finsky.verifier.p259a.p260a.C4709m m21920b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 16: goto L_0x0015;\n case 26: goto L_0x0046;\n case 34: goto L_0x0053;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r7.f();\n r6.f24221c = r0;\n goto L_0x0000;\n L_0x0015:\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x003b }\n switch(r2) {\n case 0: goto L_0x0043;\n case 1: goto L_0x0020;\n case 2: goto L_0x0043;\n default: goto L_0x0020;\n };\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x0020:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x003b }\n r4 = 44;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x003b }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x003b }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x003b }\n r4 = \" is not a valid enum ResourceType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x003b }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x003b }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x003b }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x003b:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x0043:\n r6.f24222d = r2;\t Catch:{ IllegalArgumentException -> 0x003b }\n goto L_0x0000;\n L_0x0046:\n r0 = r7.g();\n r6.f24223e = r0;\n r0 = r6.f24220b;\n r0 = r0 | 1;\n r6.f24220b = r0;\n goto L_0x0000;\n L_0x0053:\n r0 = r7.f();\n r6.f24224f = r0;\n r0 = r6.f24220b;\n r0 = r0 | 2;\n r6.f24220b = r0;\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.finsky.verifier.a.a.m.b(com.google.protobuf.nano.a):com.google.android.finsky.verifier.a.a.m\");\n }", "public void m7211c() {\n /*\n r34 = this;\n r16 = 0;\n r15 = 0;\n r5 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case -1172269795: goto L_0x002e;\n case 2157948: goto L_0x0038;\n case 2571565: goto L_0x0024;\n default: goto L_0x0018;\n };\n L_0x0018:\n r2 = r3;\n L_0x0019:\n switch(r2) {\n case 0: goto L_0x0042;\n case 1: goto L_0x0162;\n case 2: goto L_0x01a9;\n default: goto L_0x001c;\n };\n L_0x001c:\n r2 = \"Undefined type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n L_0x0023:\n return;\n L_0x0024:\n r4 = \"TEXT\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x002c:\n r2 = 0;\n goto L_0x0019;\n L_0x002e:\n r4 = \"STICKER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0036:\n r2 = 1;\n goto L_0x0019;\n L_0x0038:\n r4 = \"FILE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0040:\n r2 = 2;\n goto L_0x0019;\n L_0x0042:\n r4 = mobi.mmdt.ott.provider.p169c.C1594n.TEXT;\n r33 = r5;\n L_0x0046:\n r8 = mobi.mmdt.componentsutils.p079a.p084e.C1113a.m6421a();\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.IN;\n r0 = r34;\n r2 = r0.f4758b;\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.p109d.p111b.C1309a.m6934a(r3);\n r3 = r3.m6942b();\n r2 = r2.equals(r3);\n if (r2 == 0) goto L_0x0064;\n L_0x0062:\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.OUT;\n L_0x0064:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m7972a(r2, r3, r10);\n if (r2 != 0) goto L_0x0023;\n L_0x0072:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n if (r2 == 0) goto L_0x008a;\n L_0x007a:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n r0 = r34;\n r3 = r0.f4759c;\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x024e;\n L_0x008a:\n r17 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x00b8;\n L_0x0098:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x00b8;\n L_0x00aa:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r17 = r2;\n L_0x00b8:\n r2 = new mobi.mmdt.ott.d.a.b;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.NOT_READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n r2.<init>(r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16, r17);\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.logic.p157e.C1509a.m7621a(r3);\n r0 = r34;\n r4 = r0.f4762f;\n r0 = r33;\n r3.m7626a(r2, r0, r4);\n L_0x00f2:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x013c;\n L_0x00fe:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x013c;\n L_0x0110:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n mobi.mmdt.ott.provider.p169c.C1583c.m7976b(r3, r4, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m8003n(r3, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n r5 = mobi.mmdt.ott.provider.p169c.C1595o.SINGLE;\n mobi.mmdt.ott.logic.p112a.p120c.p121a.p123b.C1387u.m7218a(r3, r4, r2, r5);\n L_0x013c:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = \"TEXT\";\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x0023;\n L_0x0150:\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.b;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4762f;\n r2.<init>(r3, r15, r4);\n mobi.mmdt.ott.logic.C1494c.m7541c(r2);\n goto L_0x0023;\n L_0x0162:\n r6 = mobi.mmdt.ott.provider.p169c.C1594n.STICKER;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"STICKER_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4762f;\n r4 = \"STICKER_PACKAGE_ID\";\n r3 = r3.get(r4);\n r3 = (java.lang.String) r3;\n r0 = r34;\n r4 = r0.f4762f;\n r7 = \"STICKER_VERSION\";\n r4 = r4.get(r7);\n r4 = (java.lang.String) r4;\n if (r4 == 0) goto L_0x02c9;\n L_0x018a:\n if (r2 == 0) goto L_0x02c9;\n L_0x018c:\n if (r3 == 0) goto L_0x02c9;\n L_0x018e:\n r7 = r4.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x0194:\n r7 = r2.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x019a:\n r7 = r3.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x01a0:\n r16 = mobi.mmdt.ott.provider.p174h.C1629b.m8295a(r4, r3, r2);\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n L_0x01a9:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"FILE_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case 327328941: goto L_0x01de;\n case 796404377: goto L_0x01ca;\n case 802160718: goto L_0x01e8;\n case 808293817: goto L_0x01d4;\n default: goto L_0x01bd;\n };\n L_0x01bd:\n r2 = r3;\n L_0x01be:\n switch(r2) {\n case 0: goto L_0x01f2;\n case 1: goto L_0x020c;\n case 2: goto L_0x0222;\n case 3: goto L_0x0238;\n default: goto L_0x01c1;\n };\n L_0x01c1:\n r2 = \"Undefined file type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n goto L_0x0023;\n L_0x01ca:\n r4 = \"FILE_TYPE_IMAGE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01d2:\n r2 = 0;\n goto L_0x01be;\n L_0x01d4:\n r4 = \"FILE_TYPE_VIDEO\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01dc:\n r2 = 1;\n goto L_0x01be;\n L_0x01de:\n r4 = \"FILE_TYPE_PUSH_TO_TALK\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01e6:\n r2 = 2;\n goto L_0x01be;\n L_0x01e8:\n r4 = \"FILE_TYPE_OTHER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01f0:\n r2 = 3;\n goto L_0x01be;\n L_0x01f2:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.IMAGE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.IMAGE;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n L_0x0207:\n r33 = r2;\n r4 = r3;\n goto L_0x0046;\n L_0x020c:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.VIDEO;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.VIDEO;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0222:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.PUSH_TO_TALK;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.PUSH_TO_TALK;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0238:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.FILE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.OTHER;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x024e:\n if (r33 == 0) goto L_0x029c;\n L_0x0250:\n r0 = r34;\n r0 = r0.f4757a;\n r18 = r0;\n r19 = r33.m8082n();\n r20 = r33.m8069a();\n r21 = r33.m8079k();\n r22 = r33.m8073e();\n r23 = r33.m8078j();\n r24 = r33.m8077i();\n r26 = 0;\n r27 = r33.m8081m();\n r28 = r33.m8080l();\n r29 = r33.m8075g();\n r30 = r33.m8071c();\n r31 = r33.m8072d();\n r32 = r33.m8070b();\n r33 = r33.m8074f();\n r2 = mobi.mmdt.ott.provider.p170d.C1598c.m8100a(r18, r19, r20, r21, r22, r23, r24, r26, r27, r28, r29, r30, r31, r32, r33);\n r2 = r2.getLastPathSegment();\n r2 = java.lang.Long.parseLong(r2);\n r15 = java.lang.Long.valueOf(r2);\n L_0x029c:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n mobi.mmdt.ott.provider.p169c.C1583c.m7966a(r2, r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16);\n goto L_0x00f2;\n L_0x02c9:\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: mobi.mmdt.ott.logic.a.c.a.b.s.c():void\");\n }", "public void mo38101a(okhttp3.internal.http2.C13256a r4, okhttp3.internal.http2.C13256a r5, java.io.IOException r6) {\n /*\n r3 = this;\n r3.mo38100a(r4) // Catch:{ IOException -> 0x0003 }\n L_0x0003:\n r4 = 0\n monitor-enter(r3)\n java.util.Map<java.lang.Integer, okhttp3.internal.http2.h> r0 = r3.f34193g // Catch:{ all -> 0x004a }\n boolean r0 = r0.isEmpty() // Catch:{ all -> 0x004a }\n if (r0 != 0) goto L_0x0026\n java.util.Map<java.lang.Integer, okhttp3.internal.http2.h> r4 = r3.f34193g // Catch:{ all -> 0x004a }\n java.util.Collection r4 = r4.values() // Catch:{ all -> 0x004a }\n java.util.Map<java.lang.Integer, okhttp3.internal.http2.h> r0 = r3.f34193g // Catch:{ all -> 0x004a }\n int r0 = r0.size() // Catch:{ all -> 0x004a }\n okhttp3.internal.http2.h[] r0 = new okhttp3.internal.http2.C13281h[r0] // Catch:{ all -> 0x004a }\n java.lang.Object[] r4 = r4.toArray(r0) // Catch:{ all -> 0x004a }\n okhttp3.internal.http2.h[] r4 = (okhttp3.internal.http2.C13281h[]) r4 // Catch:{ all -> 0x004a }\n java.util.Map<java.lang.Integer, okhttp3.internal.http2.h> r0 = r3.f34193g // Catch:{ all -> 0x004a }\n r0.clear() // Catch:{ all -> 0x004a }\n L_0x0026:\n monitor-exit(r3) // Catch:{ all -> 0x004a }\n if (r4 == 0) goto L_0x0035\n int r0 = r4.length\n r1 = 0\n L_0x002b:\n if (r1 >= r0) goto L_0x0035\n r2 = r4[r1]\n r2.mo38133a(r5, r6) // Catch:{ IOException -> 0x0032 }\n L_0x0032:\n int r1 = r1 + 1\n goto L_0x002b\n L_0x0035:\n okhttp3.internal.http2.i r4 = r3.f34208v // Catch:{ IOException -> 0x003a }\n r4.close() // Catch:{ IOException -> 0x003a }\n L_0x003a:\n java.net.Socket r4 = r3.f34207u // Catch:{ IOException -> 0x003f }\n r4.close() // Catch:{ IOException -> 0x003f }\n L_0x003f:\n java.util.concurrent.ScheduledExecutorService r4 = r3.f34198l\n r4.shutdown()\n java.util.concurrent.ExecutorService r4 = r3.f34199m\n r4.shutdown()\n return\n L_0x004a:\n r4 = move-exception\n monitor-exit(r3) // Catch:{ all -> 0x004a }\n throw r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.http2.C13262e.mo38101a(okhttp3.internal.http2.a, okhttp3.internal.http2.a, java.io.IOException):void\");\n }", "private synchronized void m29549c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x0050 }\n if (r0 == 0) goto L_0x004b;\t Catch:{ all -> 0x0050 }\n L_0x0005:\n r0 = com.google.android.m4b.maps.cg.bx.m23056a();\t Catch:{ all -> 0x0050 }\n r1 = 0;\n r2 = r6.f24854d;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r3 = r6.f24853c;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r2 = r2.openFileInput(r3);\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n if (r2 == 0) goto L_0x0027;\n L_0x0014:\n r3 = new com.google.android.m4b.maps.ar.a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.de.af.f19891a;\t Catch:{ IOException -> 0x0036 }\n r3.<init>(r4);\t Catch:{ IOException -> 0x0036 }\n r6.f24851a = r3;\t Catch:{ IOException -> 0x0036 }\n r3 = r6.f24851a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.ap.C4655c.m20771a(r2);\t Catch:{ IOException -> 0x0036 }\n r3.m20819a(r4);\t Catch:{ IOException -> 0x0036 }\n goto L_0x0029;\t Catch:{ IOException -> 0x0036 }\n L_0x0027:\n r6.f24851a = r1;\t Catch:{ IOException -> 0x0036 }\n L_0x0029:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n L_0x002c:\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n goto L_0x004b;\n L_0x0030:\n r2 = move-exception;\n r5 = r2;\n r2 = r1;\n r1 = r5;\n goto L_0x0044;\n L_0x0035:\n r2 = r1;\n L_0x0036:\n r6.f24851a = r1;\t Catch:{ all -> 0x0043 }\n r1 = r6.f24854d;\t Catch:{ all -> 0x0043 }\n r3 = r6.f24853c;\t Catch:{ all -> 0x0043 }\n r1.deleteFile(r3);\t Catch:{ all -> 0x0043 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n goto L_0x002c;\t Catch:{ all -> 0x0050 }\n L_0x0043:\n r1 = move-exception;\t Catch:{ all -> 0x0050 }\n L_0x0044:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n throw r1;\t Catch:{ all -> 0x0050 }\n L_0x004b:\n r0 = 1;\t Catch:{ all -> 0x0050 }\n r6.f24852b = r0;\t Catch:{ all -> 0x0050 }\n monitor-exit(r6);\n return;\n L_0x0050:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.c():void\");\n }", "public void a() {\n block8 : {\n block9 : {\n var1_1 = this.f();\n var2_2 = false;\n if (var1_1) break block8;\n this.j.c();\n var6_3 = this.k;\n var7_4 = this.b;\n var8_5 = (l)var6_3;\n var9_6 = var8_5.a(var7_4);\n if (var9_6 != null) break block9;\n this.a(false);\n var2_2 = true;\n ** GOTO lbl30\n }\n if (var9_6 != n.b) ** GOTO lbl26\n this.a(this.g);\n var11_7 = this.k;\n var12_8 = this.b;\n var13_9 = (l)var11_7;\n try {\n block10 : {\n var2_2 = var13_9.a(var12_8).d();\n break block10;\nlbl26: // 1 sources:\n var10_10 = var9_6.d();\n var2_2 = false;\n if (!var10_10) {\n this.b();\n }\n }\n this.j.g();\n }\n finally {\n this.j.d();\n }\n }\n if ((var3_12 = this.c) == null) return;\n if (var2_2) {\n var4_13 = var3_12.iterator();\n while (var4_13.hasNext()) {\n ((d)var4_13.next()).a(this.b);\n }\n }\n e.a(this.h, this.j, this.c);\n }\n\n /*\n * Exception decompiling\n */\n public final void a(ListenableWorker.a var1_1) {\n // This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.\n // org.benf.cfr.reader.util.ConfusedCFRException: Tried to end blocks [4[TRYBLOCK]], but top level block is 10[WHILELOOP]\n // org.benf.cfr.reader.b.a.a.j.a(Op04StructuredStatement.java:432)\n // org.benf.cfr.reader.b.a.a.j.d(Op04StructuredStatement.java:484)\n // org.benf.cfr.reader.b.a.a.i.a(Op03SimpleStatement.java:607)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:692)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:182)\n // org.benf.cfr.reader.b.f.a(CodeAnalyser.java:127)\n // org.benf.cfr.reader.entities.attributes.f.c(AttributeCode.java:96)\n // org.benf.cfr.reader.entities.g.p(Method.java:396)\n // org.benf.cfr.reader.entities.d.e(ClassFile.java:890)\n // org.benf.cfr.reader.entities.d.b(ClassFile.java:792)\n // org.benf.cfr.reader.b.a(Driver.java:128)\n // org.benf.cfr.reader.a.a(CfrDriverImpl.java:63)\n // com.njlabs.showjava.decompilers.JavaExtractionWorker.decompileWithCFR(JavaExtractionWorker.kt:61)\n // com.njlabs.showjava.decompilers.JavaExtractionWorker.doWork(JavaExtractionWorker.kt:130)\n // com.njlabs.showjava.decompilers.BaseDecompiler.withAttempt(BaseDecompiler.kt:108)\n // com.njlabs.showjava.workers.DecompilerWorker$b.run(DecompilerWorker.kt:118)\n // java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)\n // java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)\n // java.lang.Thread.run(Thread.java:919)\n throw new IllegalStateException(\"Decompilation failed\");\n }\n\n public final void a(String string) {\n LinkedList linkedList = new LinkedList();\n linkedList.add((Object)string);\n while (!linkedList.isEmpty()) {\n String string2 = (String)linkedList.remove();\n if (((l)this.k).a(string2) != n.f) {\n k k2 = this.k;\n n n2 = n.d;\n String[] arrstring = new String[]{string2};\n ((l)k2).a(n2, arrstring);\n }\n linkedList.addAll((Collection)((a.i.r.p.c)this.l).a(string2));\n }\n }\n\n /*\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n */\n public final void a(boolean bl) {\n this.j.c();\n k k2 = this.j.k();\n l l2 = (l)k2;\n List list = l2.a();\n ArrayList arrayList = (ArrayList)list;\n boolean bl2 = arrayList.isEmpty();\n if (bl2) {\n f.a(this.a, RescheduleReceiver.class, false);\n }\n this.j.g();\n this.p.c((Object)bl);\n return;\n finally {\n this.j.d();\n }\n }\n\n public final void b() {\n this.j.c();\n k k2 = this.k;\n n n2 = n.a;\n String[] arrstring = new String[]{this.b};\n l l2 = (l)k2;\n l2.a(n2, arrstring);\n k k3 = this.k;\n String string = this.b;\n long l3 = System.currentTimeMillis();\n l l4 = (l)k3;\n l4.b(string, l3);\n k k4 = this.k;\n String string2 = this.b;\n l l5 = (l)k4;\n try {\n l5.a(string2, -1L);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(true);\n }\n }\n\n public final void c() {\n this.j.c();\n k k2 = this.k;\n String string = this.b;\n long l2 = System.currentTimeMillis();\n l l3 = (l)k2;\n l3.b(string, l2);\n k k3 = this.k;\n n n2 = n.a;\n String[] arrstring = new String[]{this.b};\n l l4 = (l)k3;\n l4.a(n2, arrstring);\n k k4 = this.k;\n String string2 = this.b;\n l l5 = (l)k4;\n l5.f(string2);\n k k5 = this.k;\n String string3 = this.b;\n l l6 = (l)k5;\n try {\n l6.a(string3, -1L);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(false);\n }\n }\n\n public final void d() {\n k k2 = this.k;\n String string = this.b;\n n n2 = ((l)k2).a(string);\n if (n2 == n.b) {\n h h2 = h.a();\n String string2 = s;\n Object[] arrobject = new Object[]{this.b};\n h2.a(string2, String.format((String)\"Status for %s is RUNNING;not doing any work and rescheduling for later execution\", (Object[])arrobject), new Throwable[0]);\n this.a(true);\n return;\n }\n h h4 = h.a();\n String string3 = s;\n Object[] arrobject = new Object[]{this.b, n2};\n h4.a(string3, String.format((String)\"Status for %s is %s; not doing any work\", (Object[])arrobject), new Throwable[0]);\n this.a(false);\n }\n\n public void e() {\n this.j.c();\n this.a(this.b);\n a.i.e e2 = ((ListenableWorker.a.a)this.g).a;\n k k2 = this.k;\n String string = this.b;\n l l2 = (l)k2;\n try {\n l2.a(string, e2);\n this.j.g();\n return;\n }\n finally {\n this.j.d();\n this.a(false);\n }\n }\n\n public final boolean f() {\n if (this.r) {\n h h2 = h.a();\n String string = s;\n Object[] arrobject = new Object[]{this.o};\n h2.a(string, String.format((String)\"Work interrupted for %s\", (Object[])arrobject), new Throwable[0]);\n k k2 = this.k;\n String string2 = this.b;\n n n2 = ((l)k2).a(string2);\n if (n2 == null) {\n this.a(false);\n return true;\n }\n this.a(true ^ n2.d());\n return true;\n }\n return false;\n }\n\n /*\n * Loose catch block\n * Enabled aggressive block sorting\n * Enabled unnecessary exception pruning\n * Enabled aggressive exception aggregation\n * Lifted jumps to return sites\n */\n public void run() {\n int n2;\n block42 : {\n block41 : {\n i i2;\n Cursor cursor;\n block48 : {\n block46 : {\n ListenableWorker listenableWorker;\n block47 : {\n a.i.e e2;\n block44 : {\n g g2;\n block45 : {\n block40 : {\n boolean bl;\n Iterator iterator;\n j j2;\n StringBuilder stringBuilder;\n block43 : {\n a.i.r.p.n n3 = this.m;\n String string = this.b;\n o o2 = (o)n3;\n if (o2 == null) throw null;\n n2 = 1;\n i i3 = i.a((String)\"SELECT DISTINCT tag FROM worktag WHERE work_spec_id=?\", (int)n2);\n if (string == null) {\n i3.bindNull(n2);\n } else {\n i3.bindString(n2, string);\n }\n o2.a.b();\n Cursor cursor2 = a.f.l.a.a(o2.a, (a.g.a.e)i3, false);\n ArrayList arrayList = new ArrayList(cursor2.getCount());\n while (cursor2.moveToNext()) {\n arrayList.add((Object)cursor2.getString(0));\n }\n this.n = arrayList;\n stringBuilder = new StringBuilder(\"Work [ id=\");\n stringBuilder.append(this.b);\n stringBuilder.append(\", tags={ \");\n iterator = arrayList.iterator();\n bl = true;\n break block43;\n finally {\n cursor2.close();\n i3.b();\n }\n }\n while (iterator.hasNext()) {\n String string = (String)iterator.next();\n if (bl) {\n bl = false;\n } else {\n stringBuilder.append(\", \");\n }\n stringBuilder.append(string);\n }\n stringBuilder.append(\" } ]\");\n this.o = stringBuilder.toString();\n if (this.f()) {\n return;\n }\n this.j.c();\n k k2 = this.k;\n String string = this.b;\n l l2 = (l)k2;\n this.e = j2 = l2.d(string);\n if (j2 == null) {\n h h2 = h.a();\n String string2 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.b;\n h2.b(string2, String.format((String)\"Didn't find WorkSpec for id %s\", (Object[])arrobject), new Throwable[0]);\n this.a(false);\n return;\n }\n if (j2.b != n.a) {\n this.d();\n this.j.g();\n h h4 = h.a();\n String string3 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h4.a(string3, String.format((String)\"%s is not in ENQUEUED state. Nothing more to do.\", (Object[])arrobject), new Throwable[0]);\n return;\n }\n if (j2.d() || this.e.c()) {\n long l3 = System.currentTimeMillis();\n boolean bl2 = this.e.n == 0L;\n if (!bl2 && l3 < this.e.a()) {\n h h5 = h.a();\n String string4 = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h5.a(string4, String.format((String)\"Delaying execution for %s because it is being executed before schedule.\", (Object[])arrobject), new Throwable[0]);\n this.a((boolean)n2);\n return;\n }\n }\n this.j.g();\n if (!this.e.d()) break block40;\n e2 = this.e.e;\n break block44;\n }\n g2 = g.a(this.e.d);\n if (g2 != null) break block45;\n h h6 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.d;\n h6.b(string, String.format((String)\"Could not create Input Merger %s\", (Object[])arrobject), new Throwable[0]);\n break block46;\n }\n ArrayList arrayList = new ArrayList();\n arrayList.add((Object)this.e.e);\n k k3 = this.k;\n String string = this.b;\n l l4 = (l)k3;\n if (l4 == null) throw null;\n i2 = i.a((String)\"SELECT output FROM workspec WHERE id IN (SELECT prerequisite_id FROM dependency WHERE work_spec_id=?)\", (int)n2);\n if (string == null) {\n i2.bindNull(n2);\n } else {\n i2.bindString(n2, string);\n }\n l4.a.b();\n cursor = a.f.l.a.a(l4.a, (a.g.a.e)i2, false);\n ArrayList arrayList2 = new ArrayList(cursor.getCount());\n while (cursor.moveToNext()) {\n arrayList2.add((Object)a.i.e.b(cursor.getBlob(0)));\n }\n arrayList.addAll((Collection)arrayList2);\n e2 = g2.a((List<a.i.e>)arrayList);\n }\n a.i.e e3 = e2;\n UUID uUID = UUID.fromString((String)this.b);\n List<String> list = this.n;\n WorkerParameters.a a2 = this.d;\n int n5 = this.e.k;\n a.i.b b2 = this.h;\n WorkerParameters workerParameters = new WorkerParameters(uUID, e3, list, a2, n5, b2.a, this.i, b2.c);\n if (this.f == null) {\n this.f = this.h.c.a(this.a, this.e.c, workerParameters);\n }\n if ((listenableWorker = this.f) != null) break block47;\n h h7 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h7.b(string, String.format((String)\"Could not create Worker %s\", (Object[])arrobject), new Throwable[0]);\n break block46;\n }\n if (!listenableWorker.isUsed()) break block48;\n h h8 = h.a();\n String string = s;\n Object[] arrobject = new Object[n2];\n arrobject[0] = this.e.c;\n h8.b(string, String.format((String)\"Received an already-used Worker %s; WorkerFactory should return new instances\", (Object[])arrobject), new Throwable[0]);\n }\n this.e();\n return;\n }\n this.f.setUsed();\n this.j.c();\n k k4 = this.k;\n String string = this.b;\n l l5 = (l)k4;\n if (l5.a(string) != n.a) break block41;\n k k5 = this.k;\n n n7 = n.b;\n String[] arrstring = new String[n2];\n arrstring[0] = this.b;\n l l6 = (l)k5;\n l6.a(n7, arrstring);\n k k6 = this.k;\n String string5 = this.b;\n l l7 = (l)k6;\n try {\n l7.e(string5);\n break block42;\n }\n finally {\n cursor.close();\n i2.b();\n }\n catch (Throwable throwable) {\n throw throwable;\n }\n finally {\n this.j.d();\n }\n }\n n2 = 0;\n }\n this.j.g();\n if (n2 != 0) {\n if (this.f()) {\n return;\n }\n c c2 = new c();\n ((a.i.r.q.m.b)this.i).c.execute((Runnable)new a.i.r.k(this, c2));\n c2.a((Runnable)new a.i.r.l(this, c2, this.o), ((a.i.r.q.m.b)this.i).a);\n return;\n }\n this.d();\n return;\n finally {\n this.j.d();\n }\n }\n\n public static class a {\n public Context a;\n public ListenableWorker b;\n public a.i.r.q.m.a c;\n public a.i.b d;\n public WorkDatabase e;\n public String f;\n public List<d> g;\n public WorkerParameters.a h = new WorkerParameters.a();\n\n public a(Context context, a.i.b b2, a.i.r.q.m.a a2, WorkDatabase workDatabase, String string) {\n this.a = context.getApplicationContext();\n this.c = a2;\n this.d = b2;\n this.e = workDatabase;\n this.f = string;\n }\n }\n\n}", "public void run() {\n /*\n r8 = this;\n r1 = com.umeng.commonsdk.proguard.b.b;\t Catch:{ Throwable -> 0x00c9 }\n monitor-enter(r1);\t Catch:{ Throwable -> 0x00c9 }\n r0 = r8.a;\t Catch:{ all -> 0x00c6 }\n if (r0 == 0) goto L_0x00c4;\n L_0x0009:\n r0 = r8.b;\t Catch:{ all -> 0x00c6 }\n if (r0 == 0) goto L_0x00c4;\n L_0x000d:\n r0 = com.umeng.commonsdk.proguard.b.a;\t Catch:{ all -> 0x00c6 }\n if (r0 != 0) goto L_0x00c4;\n L_0x0013:\n r0 = 1;\n com.umeng.commonsdk.proguard.b.a = r0;\t Catch:{ all -> 0x00c6 }\n r0 = \"walle-crash\";\n r2 = 1;\n r2 = new java.lang.Object[r2];\t Catch:{ all -> 0x00c6 }\n r3 = 0;\n r4 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00c6 }\n r4.<init>();\t Catch:{ all -> 0x00c6 }\n r5 = \"report thread is \";\n r4 = r4.append(r5);\t Catch:{ all -> 0x00c6 }\n r5 = com.umeng.commonsdk.proguard.b.a;\t Catch:{ all -> 0x00c6 }\n r4 = r4.append(r5);\t Catch:{ all -> 0x00c6 }\n r4 = r4.toString();\t Catch:{ all -> 0x00c6 }\n r2[r3] = r4;\t Catch:{ all -> 0x00c6 }\n com.umeng.commonsdk.statistics.common.e.a(r0, r2);\t Catch:{ all -> 0x00c6 }\n r0 = r8.b;\t Catch:{ all -> 0x00c6 }\n r0 = com.umeng.commonsdk.proguard.c.a(r0);\t Catch:{ all -> 0x00c6 }\n r2 = android.text.TextUtils.isEmpty(r0);\t Catch:{ all -> 0x00c6 }\n if (r2 != 0) goto L_0x00c4;\n L_0x0045:\n r2 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00c6 }\n r2.<init>();\t Catch:{ all -> 0x00c6 }\n r3 = r8.a;\t Catch:{ all -> 0x00c6 }\n r3 = r3.getFilesDir();\t Catch:{ all -> 0x00c6 }\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"/\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"stateless\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"/\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"umpx_internal\";\n r3 = r3.getBytes();\t Catch:{ all -> 0x00c6 }\n r4 = 0;\n r3 = android.util.Base64.encodeToString(r3, r4);\t Catch:{ all -> 0x00c6 }\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r2 = r2.toString();\t Catch:{ all -> 0x00c6 }\n r3 = r8.a;\t Catch:{ all -> 0x00c6 }\n r4 = 10;\n com.umeng.commonsdk.stateless.f.a(r3, r2, r4);\t Catch:{ all -> 0x00c6 }\n r2 = new com.umeng.commonsdk.stateless.UMSLEnvelopeBuild;\t Catch:{ all -> 0x00c6 }\n r2.<init>();\t Catch:{ all -> 0x00c6 }\n r3 = r8.a;\t Catch:{ all -> 0x00c6 }\n r3 = r2.buildSLBaseHeader(r3);\t Catch:{ all -> 0x00c6 }\n r4 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x00cb }\n r4.<init>();\t Catch:{ JSONException -> 0x00cb }\n r5 = \"content\";\n r4.put(r5, r0);\t Catch:{ JSONException -> 0x00cb }\n r0 = \"ts\";\n r6 = java.lang.System.currentTimeMillis();\t Catch:{ JSONException -> 0x00cb }\n r4.put(r0, r6);\t Catch:{ JSONException -> 0x00cb }\n r0 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x00cb }\n r0.<init>();\t Catch:{ JSONException -> 0x00cb }\n r5 = \"crash\";\n r0.put(r5, r4);\t Catch:{ JSONException -> 0x00cb }\n r4 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x00cb }\n r4.<init>();\t Catch:{ JSONException -> 0x00cb }\n r5 = \"tp\";\n r4.put(r5, r0);\t Catch:{ JSONException -> 0x00cb }\n r0 = r8.a;\t Catch:{ JSONException -> 0x00cb }\n r5 = \"umpx_internal\";\n r0 = r2.buildSLEnvelope(r0, r3, r4, r5);\t Catch:{ JSONException -> 0x00cb }\n if (r0 == 0) goto L_0x00c4;\n L_0x00bc:\n r2 = \"exception\";\n r0 = r0.has(r2);\t Catch:{ JSONException -> 0x00cb }\n if (r0 != 0) goto L_0x00c4;\n L_0x00c4:\n monitor-exit(r1);\t Catch:{ all -> 0x00c6 }\n L_0x00c5:\n return;\n L_0x00c6:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x00c6 }\n throw r0;\t Catch:{ Throwable -> 0x00c9 }\n L_0x00c9:\n r0 = move-exception;\n goto L_0x00c5;\n L_0x00cb:\n r0 = move-exception;\n goto L_0x00c4;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.umeng.commonsdk.proguard.bb.run():void\");\n }", "private final com.google.android.play.p179a.p352a.C6210u m28673b(com.google.protobuf.nano.a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 16: goto L_0x001b;\n case 26: goto L_0x0058;\n case 34: goto L_0x0065;\n case 42: goto L_0x0072;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.m4918a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r7.f();\n r6.f31049b = r0;\n r0 = r6.f31048a;\n r0 = r0 | 1;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x001b:\n r1 = r6.f31048a;\n r1 = r1 | 2;\n r6.f31048a = r1;\n r1 = r7.o();\n r2 = r7.i();\t Catch:{ IllegalArgumentException -> 0x0047 }\n switch(r2) {\n case 0: goto L_0x004f;\n case 1: goto L_0x004f;\n case 2: goto L_0x004f;\n case 3: goto L_0x004f;\n case 4: goto L_0x004f;\n case 5: goto L_0x004f;\n case 6: goto L_0x004f;\n default: goto L_0x002c;\n };\t Catch:{ IllegalArgumentException -> 0x0047 }\n L_0x002c:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r4 = 38;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r4 = \" is not a valid enum OsType\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0047 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0047 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0047 }\n L_0x0047:\n r2 = move-exception;\n r7.e(r1);\n r6.m4918a(r7, r0);\n goto L_0x0000;\n L_0x004f:\n r6.f31050c = r2;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r6.f31048a;\t Catch:{ IllegalArgumentException -> 0x0047 }\n r2 = r2 | 2;\n r6.f31048a = r2;\t Catch:{ IllegalArgumentException -> 0x0047 }\n goto L_0x0000;\n L_0x0058:\n r0 = r7.f();\n r6.f31051d = r0;\n r0 = r6.f31048a;\n r0 = r0 | 4;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x0065:\n r0 = r7.f();\n r6.f31052e = r0;\n r0 = r6.f31048a;\n r0 = r0 | 8;\n r6.f31048a = r0;\n goto L_0x0000;\n L_0x0072:\n r0 = r7.f();\n r6.f31053f = r0;\n r0 = r6.f31048a;\n r0 = r0 | 16;\n r6.f31048a = r0;\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.play.a.a.u.b(com.google.protobuf.nano.a):com.google.android.play.a.a.u\");\n }", "public static void m72639a(com.p280ss.android.ugc.aweme.feed.model.Aweme r3, java.lang.String r4, int r5) {\n /*\n if (r3 == 0) goto L_0x006d\n boolean r0 = r3.isFamiliar()\n r1 = 1\n if (r0 != r1) goto L_0x006c\n boolean r0 = com.p280ss.android.ugc.aweme.utils.C43122ff.m136762a(r3)\n if (r0 == 0) goto L_0x0010\n goto L_0x006c\n L_0x0010:\n com.ss.android.ugc.aweme.app.g.d r0 = com.p280ss.android.ugc.aweme.app.p305g.C22984d.m75611a()\n java.lang.String r1 = \"enter_from\"\n java.lang.String r2 = \"homepage_hot\"\n com.ss.android.ugc.aweme.app.g.d r0 = r0.mo59973a(r1, r2)\n java.lang.String r1 = \"event_type\"\n com.ss.android.ugc.aweme.app.g.d r4 = r0.mo59973a(r1, r4)\n java.lang.String r0 = \"rec_uid\"\n java.lang.String r1 = com.p280ss.android.ugc.aweme.metrics.C33230ac.m107205a(r3)\n com.ss.android.ugc.aweme.app.g.d r4 = r4.mo59973a(r0, r1)\n java.lang.String r0 = \"req_id\"\n java.lang.String r1 = r3.getRequestId()\n com.ss.android.ugc.aweme.app.g.d r4 = r4.mo59973a(r0, r1)\n java.lang.String r0 = \"rec_reason\"\n com.ss.android.ugc.aweme.feed.model.RelationDynamicLabel r1 = r3.getRelationLabel()\n if (r1 == 0) goto L_0x0044\n java.lang.String r1 = r1.getLabelInfo()\n if (r1 != 0) goto L_0x0046\n L_0x0044:\n java.lang.String r1 = \"\"\n L_0x0046:\n com.ss.android.ugc.aweme.app.g.d r4 = r4.mo59973a(r0, r1)\n java.lang.String r0 = \"card_type\"\n java.lang.String r1 = \"item\"\n com.ss.android.ugc.aweme.app.g.d r4 = r4.mo59973a(r0, r1)\n java.lang.String r0 = \"group_id\"\n java.lang.String r3 = r3.getAid()\n com.ss.android.ugc.aweme.app.g.d r3 = r4.mo59973a(r0, r3)\n r4 = -1\n if (r5 == r4) goto L_0x0064\n java.lang.String r4 = \"feed_order\"\n r3.mo59970a(r4, r5)\n L_0x0064:\n java.lang.String r4 = \"follow_card\"\n java.util.Map<java.lang.String, java.lang.String> r3 = r3.f60753a\n com.p280ss.android.ugc.aweme.common.C6907h.m21524a(r4, r3)\n return\n L_0x006c:\n return\n L_0x006d:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.familiar.p966b.C21718a.m72639a(com.ss.android.ugc.aweme.feed.model.Aweme, java.lang.String, int):void\");\n }", "public final synchronized void mo5320b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r1 = 0;\t Catch:{ all -> 0x004c }\n r2 = 0;\t Catch:{ all -> 0x004c }\n if (r0 == 0) goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0007:\n r0 = r6.f24851a;\t Catch:{ all -> 0x004c }\n if (r0 != 0) goto L_0x0013;\t Catch:{ all -> 0x004c }\n L_0x000b:\n r0 = r6.f24854d;\t Catch:{ all -> 0x004c }\n r3 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r0.deleteFile(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0013:\n r0 = com.google.android.m4b.maps.cg.bx.m23058b();\t Catch:{ all -> 0x004c }\n r3 = r6.f24854d;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24853c;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r3 = r3.openFileOutput(r4, r1);\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24851a;\t Catch:{ IOException -> 0x0033 }\n r4 = r4.m20837d();\t Catch:{ IOException -> 0x0033 }\n r3.write(r4);\t Catch:{ IOException -> 0x0033 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n L_0x002b:\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\n L_0x002f:\n r1 = move-exception;\n r3 = r2;\n goto L_0x003f;\n L_0x0032:\n r3 = r2;\n L_0x0033:\n r4 = r6.f24854d;\t Catch:{ all -> 0x003e }\n r5 = r6.f24853c;\t Catch:{ all -> 0x003e }\n r4.deleteFile(r5);\t Catch:{ all -> 0x003e }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n goto L_0x002b;\t Catch:{ all -> 0x004c }\n L_0x003e:\n r1 = move-exception;\t Catch:{ all -> 0x004c }\n L_0x003f:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n throw r1;\t Catch:{ all -> 0x004c }\n L_0x0046:\n r6.f24851a = r2;\t Catch:{ all -> 0x004c }\n r6.f24852b = r1;\t Catch:{ all -> 0x004c }\n monitor-exit(r6);\n return;\n L_0x004c:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.b():void\");\n }", "public static void m9105b(com.facebook.api.feedcache.db.FeedDbMutationService r5) {\n /*\n L_0x0000:\n r1 = r5.f5242q;\n monitor-enter(r1);\n r0 = r5.f5242q;\t Catch:{ all -> 0x004d }\n r0 = r0.isEmpty();\t Catch:{ all -> 0x004d }\n if (r0 == 0) goto L_0x0010;\n L_0x000b:\n r0 = 0;\n r5.f5240o = r0;\t Catch:{ all -> 0x004d }\n monitor-exit(r1);\t Catch:{ all -> 0x004d }\n return;\n L_0x0010:\n r0 = r5.f5242q;\t Catch:{ all -> 0x004d }\n r0 = r0.removeFirst();\t Catch:{ all -> 0x004d }\n r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbRequest) r0;\t Catch:{ all -> 0x004d }\n monitor-exit(r1);\t Catch:{ all -> 0x004d }\n r1 = \"FeedDbMutationService(%s)\";\n r2 = r0.getClass();\n r2 = r2.getSimpleName();\n r3 = -341619410; // 0xffffffffeba34d2e float:-3.9483876E26 double:NaN;\n com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r1, r2, r3);\n r1 = -243934633; // 0xfffffffff175da57 float:-1.21740455E30 double:NaN;\n r1 = com.facebook.tools.dextr.runtime.detour.LoomLoggerDetour.a(r1);\n r2 = \"FeedDbMutationService\";\n r3 = r0.getClass();\n r3 = r3.getSimpleName();\n com.facebook.loom.logger.api.LoomLogger.a(r1, r2, r3);\n r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbInsertionRequest;\t Catch:{ all -> 0x0134 }\n if (r1 == 0) goto L_0x0050;\n L_0x0041:\n r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbInsertionRequest) r0;\t Catch:{ all -> 0x0134 }\n r5.m9111a(r0);\t Catch:{ all -> 0x0134 }\n r0 = 1514815075; // 0x5a4a3e63 float:1.42316351E16 double:7.484180884E-315;\n com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0);\n goto L_0x0000;\n L_0x004d:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ }\n throw r0;\n L_0x0050:\n r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbMutationRequest;\t Catch:{ }\n if (r1 == 0) goto L_0x0060;\n L_0x0054:\n r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbMutationRequest) r0;\t Catch:{ }\n r5.m9100a(r0);\t Catch:{ }\n r0 = 32841027; // 0x1f51d43 float:9.0040775E-38 double:1.6225623E-316;\n com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0);\n goto L_0x0000;\n L_0x0060:\n r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbStorySeenRequest;\t Catch:{ }\n if (r1 == 0) goto L_0x0070;\n L_0x0064:\n r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbStorySeenRequest) r0;\t Catch:{ }\n r5.m9103a(r0);\t Catch:{ }\n r0 = -150761083; // 0xfffffffff7039185 float:-2.668525E33 double:NaN;\n com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0);\n goto L_0x0000;\n L_0x0070:\n r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbImageCacheStateUpdateRequest;\t Catch:{ }\n if (r1 == 0) goto L_0x0080;\n L_0x0074:\n r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbImageCacheStateUpdateRequest) r0;\t Catch:{ }\n r5.m9097a(r0);\t Catch:{ }\n r0 = -1582673432; // 0xffffffffa1aa51e8 float:-1.1541328E-18 double:NaN;\n com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0);\n goto L_0x0000;\n L_0x0080:\n r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbSeeFirstClearRequest;\t Catch:{ }\n if (r1 == 0) goto L_0x0091;\n L_0x0084:\n r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbSeeFirstClearRequest) r0;\t Catch:{ }\n r5.m9101a(r0);\t Catch:{ }\n r0 = -1051379810; // 0xffffffffc155379e float:-13.326078 double:NaN;\n com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0);\n goto L_0x0000;\n L_0x0091:\n r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbCacheResultRerankRequest;\t Catch:{ }\n if (r1 == 0) goto L_0x00a2;\n L_0x0095:\n r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbCacheResultRerankRequest) r0;\t Catch:{ }\n r5.m9094a(r0);\t Catch:{ }\n r0 = -521547659; // 0xffffffffe0e9d075 float:-1.3478476E20 double:NaN;\n com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0);\n goto L_0x0000;\n L_0x00a2:\n r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbCacheRerankRequest;\t Catch:{ }\n if (r1 == 0) goto L_0x00b3;\n L_0x00a6:\n r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbCacheRerankRequest) r0;\t Catch:{ }\n r5.m9093a(r0);\t Catch:{ }\n r0 = -495910365; // 0xffffffffe2710223 float:-1.1114548E21 double:NaN;\n com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0);\n goto L_0x0000;\n L_0x00b3:\n r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbStoryImageUrlAddRequest;\t Catch:{ }\n if (r1 == 0) goto L_0x00c4;\n L_0x00b7:\n r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbStoryImageUrlAddRequest) r0;\t Catch:{ }\n r5.m9102a(r0);\t Catch:{ }\n r0 = 1956524893; // 0x749e335d float:1.0027157E32 double:9.66651735E-315;\n com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0);\n goto L_0x0000;\n L_0x00c4:\n r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbDeleteStoriesRequest;\t Catch:{ }\n if (r1 == 0) goto L_0x00d5;\n L_0x00c8:\n r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbDeleteStoriesRequest) r0;\t Catch:{ }\n r5.m9095a(r0);\t Catch:{ }\n r0 = 1671584920; // 0x63a25c98 float:5.990089E21 double:8.25872683E-315;\n com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0);\n goto L_0x0000;\n L_0x00d5:\n r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbDeleteStoryRequest;\t Catch:{ }\n if (r1 == 0) goto L_0x00e6;\n L_0x00d9:\n r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbDeleteStoryRequest) r0;\t Catch:{ }\n r5.m9096a(r0);\t Catch:{ }\n r0 = -696100424; // 0xffffffffd68259b8 float:-7.1660925E13 double:NaN;\n com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0);\n goto L_0x0000;\n L_0x00e6:\n r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbVpvOmnistoreSyncRequest;\t Catch:{ }\n if (r1 == 0) goto L_0x00f5;\n L_0x00ea:\n r5.m9106c();\t Catch:{ }\n r0 = -1045059660; // 0xffffffffc1b5a7b4 float:-22.706886 double:NaN;\n com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0);\n goto L_0x0000;\n L_0x00f5:\n r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbLikeAndCommentCountUpdateRequest;\t Catch:{ }\n if (r1 == 0) goto L_0x0106;\n L_0x00f9:\n r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbLikeAndCommentCountUpdateRequest) r0;\t Catch:{ }\n r5.m9098a(r0);\t Catch:{ }\n r0 = 759596755; // 0x2d4686d3 float:1.1284934E-11 double:3.752906613E-315;\n com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0);\n goto L_0x0000;\n L_0x0106:\n r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbLiveVideoStatusUpdateRequest;\t Catch:{ }\n if (r1 == 0) goto L_0x0117;\n L_0x010a:\n r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbLiveVideoStatusUpdateRequest) r0;\t Catch:{ }\n r5.m9099a(r0);\t Catch:{ }\n r0 = -1270711073; // 0xffffffffb4427cdf float:-1.8113086E-7 double:NaN;\n com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0);\n goto L_0x0000;\n L_0x0117:\n r1 = \"FeedDbMutationService\";\n r2 = \"Mutation request is not supported: %s\";\n r3 = 1;\n r3 = new java.lang.Object[r3];\t Catch:{ }\n r4 = 0;\n r0 = r0.getClass();\t Catch:{ }\n r0 = r0.getSimpleName();\t Catch:{ }\n r3[r4] = r0;\t Catch:{ }\n com.facebook.debug.log.BLog.c(r1, r2, r3);\t Catch:{ }\n r0 = 492192568; // 0x1d564338 float:2.8357415E-21 double:2.43175439E-315;\n com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0);\n goto L_0x0000;\n L_0x0134:\n r0 = move-exception;\n r1 = -693974918; // 0xffffffffd6a2c87a float:-8.9490962E13 double:NaN;\n com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r1);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.api.feedcache.db.FeedDbMutationService.b(com.facebook.api.feedcache.db.FeedDbMutationService):void\");\n }", "private synchronized void m3985g() {\n /*\n r8 = this;\n monitor-enter(r8);\n r2 = java.lang.Thread.currentThread();\t Catch:{ all -> 0x0063 }\n r3 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r3 = r3.mo1186c();\t Catch:{ all -> 0x0063 }\n r2 = r2.equals(r3);\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0021;\n L_0x0011:\n r2 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1185b();\t Catch:{ all -> 0x0063 }\n r3 = new com.google.analytics.tracking.android.aa;\t Catch:{ all -> 0x0063 }\n r3.<init>(r8);\t Catch:{ all -> 0x0063 }\n r2.add(r3);\t Catch:{ all -> 0x0063 }\n L_0x001f:\n monitor-exit(r8);\n return;\n L_0x0021:\n r2 = r8.f2122n;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x0028;\n L_0x0025:\n r8.m3999d();\t Catch:{ all -> 0x0063 }\n L_0x0028:\n r2 = com.google.analytics.tracking.android.ab.f1966a;\t Catch:{ all -> 0x0063 }\n r3 = r8.f2110b;\t Catch:{ all -> 0x0063 }\n r3 = r3.ordinal();\t Catch:{ all -> 0x0063 }\n r2 = r2[r3];\t Catch:{ all -> 0x0063 }\n switch(r2) {\n case 1: goto L_0x0036;\n case 2: goto L_0x006e;\n case 3: goto L_0x00aa;\n default: goto L_0x0035;\n };\t Catch:{ all -> 0x0063 }\n L_0x0035:\n goto L_0x001f;\n L_0x0036:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0066;\n L_0x003e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.poll();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to store\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2112d;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1197a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n goto L_0x0036;\n L_0x0063:\n r2 = move-exception;\n monitor-exit(r8);\n throw r2;\n L_0x0066:\n r2 = r8.f2121m;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x001f;\n L_0x006a:\n r8.m3987h();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x006e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x00a0;\n L_0x0076:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.peek();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to service\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2111c;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1204a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2.poll();\t Catch:{ all -> 0x0063 }\n goto L_0x006e;\n L_0x00a0:\n r2 = r8.f2123o;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1198a();\t Catch:{ all -> 0x0063 }\n r8.f2109a = r2;\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x00aa:\n r2 = \"Need to reconnect\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x001f;\n L_0x00b7:\n r8.m3991j();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.analytics.tracking.android.y.g():void\");\n }", "public final synchronized java.lang.String m92g(java.lang.String r5) {\n /*\n r4 = this;\n r1 = 1;\n r0 = 0;\n monitor-enter(r4);\n if (r5 == 0) goto L_0x002c;\n L_0x0005:\n r2 = r5.trim();\t Catch:{ all -> 0x0037 }\n r2 = r2.length();\t Catch:{ all -> 0x0037 }\n if (r2 <= 0) goto L_0x002c;\n L_0x000f:\n if (r0 == 0) goto L_0x002e;\n L_0x0011:\n r0 = \"key should not be empty %s\";\n r1 = 1;\n r1 = new java.lang.Object[r1];\t Catch:{ all -> 0x0037 }\n r2 = 0;\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0037 }\n r3.<init>();\t Catch:{ all -> 0x0037 }\n r3 = r3.append(r5);\t Catch:{ all -> 0x0037 }\n r3 = r3.toString();\t Catch:{ all -> 0x0037 }\n r1[r2] = r3;\t Catch:{ all -> 0x0037 }\n com.tencent.bugly.legu.proguard.C0073w.m524d(r0, r1);\t Catch:{ all -> 0x0037 }\n r0 = 0;\n L_0x002a:\n monitor-exit(r4);\n return r0;\n L_0x002c:\n r0 = r1;\n goto L_0x000f;\n L_0x002e:\n r0 = r4.f112Y;\t Catch:{ all -> 0x0037 }\n r0 = r0.get(r5);\t Catch:{ all -> 0x0037 }\n r0 = (java.lang.String) r0;\t Catch:{ all -> 0x0037 }\n goto L_0x002a;\n L_0x0037:\n r0 = move-exception;\n monitor-exit(r4);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.bugly.legu.crashreport.common.info.a.g(java.lang.String):java.lang.String\");\n }", "private final com.google.wireless.android.finsky.dfe.p515h.p516a.ae m35733b(com.google.protobuf.nano.C7213a r7) {\n /*\n r6 = this;\n L_0x0000:\n r0 = r7.m33550a();\n switch(r0) {\n case 0: goto L_0x000d;\n case 10: goto L_0x000e;\n case 18: goto L_0x001f;\n case 26: goto L_0x002c;\n case 34: goto L_0x0039;\n case 42: goto L_0x004a;\n case 50: goto L_0x0057;\n case 56: goto L_0x0064;\n case 64: goto L_0x00a3;\n case 72: goto L_0x00b1;\n case 82: goto L_0x00bf;\n default: goto L_0x0007;\n };\n L_0x0007:\n r0 = super.a(r7, r0);\n if (r0 != 0) goto L_0x0000;\n L_0x000d:\n return r6;\n L_0x000e:\n r0 = r6.f38026c;\n if (r0 != 0) goto L_0x0019;\n L_0x0012:\n r0 = new com.google.android.finsky.cv.a.bd;\n r0.<init>();\n r6.f38026c = r0;\n L_0x0019:\n r0 = r6.f38026c;\n r7.m33552a(r0);\n goto L_0x0000;\n L_0x001f:\n r0 = r7.m33564f();\n r6.f38027d = r0;\n r0 = r6.f38025b;\n r0 = r0 | 1;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x002c:\n r0 = r7.m33564f();\n r6.f38028e = r0;\n r0 = r6.f38025b;\n r0 = r0 | 2;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x0039:\n r0 = r6.f38029f;\n if (r0 != 0) goto L_0x0044;\n L_0x003d:\n r0 = new com.google.android.finsky.cv.a.ax;\n r0.<init>();\n r6.f38029f = r0;\n L_0x0044:\n r0 = r6.f38029f;\n r7.m33552a(r0);\n goto L_0x0000;\n L_0x004a:\n r0 = r7.m33564f();\n r6.f38030g = r0;\n r0 = r6.f38025b;\n r0 = r0 | 4;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x0057:\n r0 = r7.m33564f();\n r6.f38031h = r0;\n r0 = r6.f38025b;\n r0 = r0 | 8;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x0064:\n r1 = r6.f38025b;\n r1 = r1 | 16;\n r6.f38025b = r1;\n r1 = r7.m33573o();\n r2 = r7.m33567i();\t Catch:{ IllegalArgumentException -> 0x0090 }\n switch(r2) {\n case 0: goto L_0x0099;\n case 1: goto L_0x0099;\n case 2: goto L_0x0099;\n case 3: goto L_0x0099;\n case 4: goto L_0x0099;\n default: goto L_0x0075;\n };\t Catch:{ IllegalArgumentException -> 0x0090 }\n L_0x0075:\n r3 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r4 = 36;\n r5 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r5.<init>(r4);\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r5.append(r2);\t Catch:{ IllegalArgumentException -> 0x0090 }\n r4 = \" is not a valid enum Type\";\n r2 = r2.append(r4);\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r2.toString();\t Catch:{ IllegalArgumentException -> 0x0090 }\n r3.<init>(r2);\t Catch:{ IllegalArgumentException -> 0x0090 }\n throw r3;\t Catch:{ IllegalArgumentException -> 0x0090 }\n L_0x0090:\n r2 = move-exception;\n r7.m33562e(r1);\n r6.a(r7, r0);\n goto L_0x0000;\n L_0x0099:\n r6.f38032i = r2;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r6.f38025b;\t Catch:{ IllegalArgumentException -> 0x0090 }\n r2 = r2 | 16;\n r6.f38025b = r2;\t Catch:{ IllegalArgumentException -> 0x0090 }\n goto L_0x0000;\n L_0x00a3:\n r0 = r7.m33563e();\n r6.f38033j = r0;\n r0 = r6.f38025b;\n r0 = r0 | 32;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x00b1:\n r0 = r7.m33563e();\n r6.f38034k = r0;\n r0 = r6.f38025b;\n r0 = r0 | 64;\n r6.f38025b = r0;\n goto L_0x0000;\n L_0x00bf:\n r0 = r6.f38035l;\n if (r0 != 0) goto L_0x00ca;\n L_0x00c3:\n r0 = new com.google.android.finsky.cv.a.cv;\n r0.<init>();\n r6.f38035l = r0;\n L_0x00ca:\n r0 = r6.f38035l;\n r7.m33552a(r0);\n goto L_0x0000;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.wireless.android.finsky.dfe.h.a.ae.b(com.google.protobuf.nano.a):com.google.wireless.android.finsky.dfe.h.a.ae\");\n }", "private final com.google.wireless.android.finsky.dfe.p505c.p506a.ec m35437b(com.google.protobuf.nano.C7213a r8) {\n /*\n r7 = this;\n r1 = 0;\n L_0x0001:\n r0 = r8.m33550a();\n switch(r0) {\n case 0: goto L_0x000e;\n case 8: goto L_0x000f;\n case 16: goto L_0x004c;\n case 26: goto L_0x006f;\n case 34: goto L_0x007c;\n default: goto L_0x0008;\n };\n L_0x0008:\n r0 = super.a(r8, r0);\n if (r0 != 0) goto L_0x0001;\n L_0x000e:\n return r7;\n L_0x000f:\n r2 = r7.f37533a;\n r2 = r2 | 1;\n r7.f37533a = r2;\n r2 = r8.m33573o();\n r3 = r8.m33567i();\t Catch:{ IllegalArgumentException -> 0x003b }\n switch(r3) {\n case 0: goto L_0x0043;\n case 1: goto L_0x0043;\n default: goto L_0x0020;\n };\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x0020:\n r4 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x003b }\n r5 = 42;\n r6 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x003b }\n r6.<init>(r5);\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r6.append(r3);\t Catch:{ IllegalArgumentException -> 0x003b }\n r5 = \" is not a valid enum ResultCode\";\n r3 = r3.append(r5);\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r3.toString();\t Catch:{ IllegalArgumentException -> 0x003b }\n r4.<init>(r3);\t Catch:{ IllegalArgumentException -> 0x003b }\n throw r4;\t Catch:{ IllegalArgumentException -> 0x003b }\n L_0x003b:\n r3 = move-exception;\n r8.m33562e(r2);\n r7.a(r8, r0);\n goto L_0x0001;\n L_0x0043:\n r7.f37534b = r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r7.f37533a;\t Catch:{ IllegalArgumentException -> 0x003b }\n r3 = r3 | 1;\n r7.f37533a = r3;\t Catch:{ IllegalArgumentException -> 0x003b }\n goto L_0x0001;\n L_0x004c:\n r2 = r7.f37533a;\n r2 = r2 | 2;\n r7.f37533a = r2;\n r2 = r8.m33573o();\n r3 = r8.m33560d();\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = com.google.wireless.android.finsky.dfe.p505c.p506a.dp.m35391a(r3);\t Catch:{ IllegalArgumentException -> 0x0067 }\n r7.f37535c = r3;\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = r7.f37533a;\t Catch:{ IllegalArgumentException -> 0x0067 }\n r3 = r3 | 2;\n r7.f37533a = r3;\t Catch:{ IllegalArgumentException -> 0x0067 }\n goto L_0x0001;\n L_0x0067:\n r3 = move-exception;\n r8.m33562e(r2);\n r7.a(r8, r0);\n goto L_0x0001;\n L_0x006f:\n r0 = r8.m33565g();\n r7.f37536d = r0;\n r0 = r7.f37533a;\n r0 = r0 | 4;\n r7.f37533a = r0;\n goto L_0x0001;\n L_0x007c:\n r0 = 34;\n r2 = com.google.protobuf.nano.C7222l.m33624a(r8, r0);\n r0 = r7.f37537e;\n if (r0 != 0) goto L_0x00a8;\n L_0x0086:\n r0 = r1;\n L_0x0087:\n r2 = r2 + r0;\n r2 = new com.google.wireless.android.finsky.dfe.p505c.p506a.ed[r2];\n if (r0 == 0) goto L_0x0091;\n L_0x008c:\n r3 = r7.f37537e;\n java.lang.System.arraycopy(r3, r1, r2, r1, r0);\n L_0x0091:\n r3 = r2.length;\n r3 = r3 + -1;\n if (r0 >= r3) goto L_0x00ac;\n L_0x0096:\n r3 = new com.google.wireless.android.finsky.dfe.c.a.ed;\n r3.<init>();\n r2[r0] = r3;\n r3 = r2[r0];\n r8.m33552a(r3);\n r8.m33550a();\n r0 = r0 + 1;\n goto L_0x0091;\n L_0x00a8:\n r0 = r7.f37537e;\n r0 = r0.length;\n goto L_0x0087;\n L_0x00ac:\n r3 = new com.google.wireless.android.finsky.dfe.c.a.ed;\n r3.<init>();\n r2[r0] = r3;\n r0 = r2[r0];\n r8.m33552a(r0);\n r7.f37537e = r2;\n goto L_0x0001;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.wireless.android.finsky.dfe.c.a.ec.b(com.google.protobuf.nano.a):com.google.wireless.android.finsky.dfe.c.a.ec\");\n }", "private void a(com.bytedance.crash.nativecrash.c r6, java.lang.String r7, boolean r8) {\n /*\n r5 = this;\n r0 = 0\n boolean r1 = r6.c() // Catch:{ Throwable -> 0x009a }\n if (r1 != 0) goto L_0x0008\n return\n L_0x0008:\n com.bytedance.crash.e.d r8 = a((com.bytedance.crash.nativecrash.c) r6, (boolean) r8) // Catch:{ Throwable -> 0x009a }\n if (r8 == 0) goto L_0x0099\n org.json.JSONObject r1 = r8.f19424b // Catch:{ Throwable -> 0x009a }\n if (r1 == 0) goto L_0x0099\n java.io.File r1 = r6.f19496a // Catch:{ Throwable -> 0x009a }\n java.lang.String r2 = \".npth\"\n java.io.File r1 = com.bytedance.crash.i.h.a(r1, r2) // Catch:{ Throwable -> 0x009a }\n com.bytedance.crash.db.a r2 = com.bytedance.crash.db.a.a() // Catch:{ Throwable -> 0x009a }\n java.lang.String r3 = r1.getAbsolutePath() // Catch:{ Throwable -> 0x009a }\n boolean r2 = r2.a((java.lang.String) r3) // Catch:{ Throwable -> 0x009a }\n if (r2 != 0) goto L_0x0096\n org.json.JSONObject r2 = r8.f19424b // Catch:{ Throwable -> 0x009a }\n java.lang.String r3 = \"upload_scene\"\n java.lang.String r4 = \"launch_scan\"\n r2.put(r3, r4) // Catch:{ Throwable -> 0x009a }\n if (r7 == 0) goto L_0x0038\n java.lang.String r3 = \"crash_uuid\"\n r2.put(r3, r7) // Catch:{ Throwable -> 0x009a }\n L_0x0038:\n com.bytedance.crash.d r7 = com.bytedance.crash.d.NATIVE // Catch:{ Throwable -> 0x009a }\n java.lang.String r3 = com.bytedance.crash.c.a.f19382f // Catch:{ Throwable -> 0x009a }\n com.bytedance.crash.event.a r7 = com.bytedance.crash.event.b.a((com.bytedance.crash.d) r7, (java.lang.String) r3, (org.json.JSONObject) r2) // Catch:{ Throwable -> 0x009a }\n com.bytedance.crash.event.c.a((com.bytedance.crash.event.a) r7) // Catch:{ Throwable -> 0x009a }\n com.bytedance.crash.event.a r7 = r7.clone() // Catch:{ Throwable -> 0x009a }\n java.lang.String r3 = com.bytedance.crash.c.a.g // Catch:{ Throwable -> 0x009a }\n com.bytedance.crash.event.a r7 = r7.eventType(r3) // Catch:{ Throwable -> 0x009a }\n java.lang.String r0 = r8.f19423a // Catch:{ Throwable -> 0x0093 }\n java.lang.String r2 = r2.toString() // Catch:{ Throwable -> 0x0093 }\n java.lang.String r8 = r8.f19425c // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.upload.h r8 = com.bytedance.crash.upload.b.a((java.lang.String) r0, (java.lang.String) r2, (java.lang.String) r8) // Catch:{ Throwable -> 0x0093 }\n boolean r0 = r8.a() // Catch:{ Throwable -> 0x0093 }\n if (r0 == 0) goto L_0x0083\n boolean r6 = r6.e() // Catch:{ Throwable -> 0x0093 }\n if (r6 != 0) goto L_0x0074\n com.bytedance.crash.db.a r6 = com.bytedance.crash.db.a.a() // Catch:{ Throwable -> 0x0093 }\n java.lang.String r0 = r1.getAbsolutePath() // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.db.a.a r0 = com.bytedance.crash.db.a.a.a(r0) // Catch:{ Throwable -> 0x0093 }\n r6.a((com.bytedance.crash.db.a.a) r0) // Catch:{ Throwable -> 0x0093 }\n L_0x0074:\n r6 = 0\n com.bytedance.crash.event.a r6 = r7.state(r6) // Catch:{ Throwable -> 0x0093 }\n org.json.JSONObject r8 = r8.f19589c // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.event.a r6 = r6.errorInfo((org.json.JSONObject) r8) // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.event.c.a((com.bytedance.crash.event.a) r6) // Catch:{ Throwable -> 0x0093 }\n goto L_0x0099\n L_0x0083:\n int r6 = r8.f19587a // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.event.a r6 = r7.state(r6) // Catch:{ Throwable -> 0x0093 }\n java.lang.String r8 = r8.f19588b // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.event.a r6 = r6.errorInfo((java.lang.String) r8) // Catch:{ Throwable -> 0x0093 }\n com.bytedance.crash.event.c.a((com.bytedance.crash.event.a) r6) // Catch:{ Throwable -> 0x0093 }\n goto L_0x00aa\n L_0x0093:\n r6 = move-exception\n r0 = r7\n goto L_0x009b\n L_0x0096:\n r6.e() // Catch:{ Throwable -> 0x009a }\n L_0x0099:\n return\n L_0x009a:\n r6 = move-exception\n L_0x009b:\n if (r0 == 0) goto L_0x00aa\n r7 = 211(0xd3, float:2.96E-43)\n com.bytedance.crash.event.a r7 = r0.state(r7)\n com.bytedance.crash.event.a r6 = r7.errorInfo((java.lang.Throwable) r6)\n com.bytedance.crash.event.c.a((com.bytedance.crash.event.a) r6)\n L_0x00aa:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bytedance.crash.runtime.d.a(com.bytedance.crash.nativecrash.c, java.lang.String, boolean):void\");\n }", "public void a(com.xiaomi.push.jc r6) {\n /*\n r5 = this;\n r6.a()\n L_0x0003:\n com.xiaomi.push.iz r0 = r6.a()\n byte r1 = r0.a\n if (r1 != 0) goto L_0x0012\n r6.f()\n r5.a()\n return\n L_0x0012:\n short r1 = r0.f784a\n r2 = 11\n switch(r1) {\n case 1: goto L_0x00b6;\n case 2: goto L_0x00a3;\n case 3: goto L_0x0098;\n case 4: goto L_0x008d;\n case 5: goto L_0x0082;\n case 6: goto L_0x0019;\n case 7: goto L_0x0071;\n case 8: goto L_0x0066;\n case 9: goto L_0x0038;\n case 10: goto L_0x002c;\n case 11: goto L_0x0020;\n default: goto L_0x0019;\n }\n L_0x0019:\n byte r0 = r0.a\n com.xiaomi.push.jf.a(r6, r0)\n goto L_0x00c0\n L_0x0020:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f573g = r0\n goto L_0x00c0\n L_0x002c:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f572f = r0\n goto L_0x00c0\n L_0x0038:\n byte r1 = r0.a\n r2 = 13\n if (r1 != r2) goto L_0x0019\n com.xiaomi.push.jb r0 = r6.a()\n java.util.HashMap r1 = new java.util.HashMap\n int r2 = r0.f788a\n int r2 = r2 * 2\n r1.<init>(r2)\n r5.f567a = r1\n r1 = 0\n L_0x004e:\n int r2 = r0.f788a\n if (r1 >= r2) goto L_0x0062\n java.lang.String r2 = r6.a()\n java.lang.String r3 = r6.a()\n java.util.Map<java.lang.String, java.lang.String> r4 = r5.f567a\n r4.put(r2, r3)\n int r1 = r1 + 1\n goto L_0x004e\n L_0x0062:\n r6.h()\n goto L_0x00c0\n L_0x0066:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f571e = r0\n goto L_0x00c0\n L_0x0071:\n byte r1 = r0.a\n r2 = 10\n if (r1 != r2) goto L_0x0019\n long r0 = r6.a()\n r5.f563a = r0\n r0 = 1\n r5.a((boolean) r0)\n goto L_0x00c0\n L_0x0082:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f570d = r0\n goto L_0x00c0\n L_0x008d:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f569c = r0\n goto L_0x00c0\n L_0x0098:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f568b = r0\n goto L_0x00c0\n L_0x00a3:\n byte r1 = r0.a\n r2 = 12\n if (r1 != r2) goto L_0x0019\n com.xiaomi.push.hv r0 = new com.xiaomi.push.hv\n r0.<init>()\n r5.f564a = r0\n com.xiaomi.push.hv r0 = r5.f564a\n r0.a((com.xiaomi.push.jc) r6)\n goto L_0x00c0\n L_0x00b6:\n byte r1 = r0.a\n if (r1 != r2) goto L_0x0019\n java.lang.String r0 = r6.a()\n r5.f565a = r0\n L_0x00c0:\n r6.g()\n goto L_0x0003\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.xiaomi.push.hx.a(com.xiaomi.push.jc):void\");\n }", "private void a(java.lang.String r6, java.lang.StringBuilder r7) {\n /*\n r5 = this;\n r0 = F;\n r1 = J;\n r2 = 35;\n r1 = r1[r2];\n r1 = r6.indexOf(r1);\n if (r1 <= 0) goto L_0x0057;\n L_0x000e:\n r2 = J;\n r3 = 38;\n r2 = r2[r3];\n r2 = r2.length();\n r2 = r2 + r1;\n r3 = r6.charAt(r2);\n r4 = 43;\n if (r3 != r4) goto L_0x0039;\n L_0x0021:\n r3 = 59;\n r3 = r6.indexOf(r3, r2);\n if (r3 <= 0) goto L_0x0032;\n L_0x0029:\n r3 = r6.substring(r2, r3);\t Catch:{ RuntimeException -> 0x0072 }\n r7.append(r3);\t Catch:{ RuntimeException -> 0x0072 }\n if (r0 == 0) goto L_0x0039;\n L_0x0032:\n r2 = r6.substring(r2);\t Catch:{ RuntimeException -> 0x0072 }\n r7.append(r2);\t Catch:{ RuntimeException -> 0x0072 }\n L_0x0039:\n r2 = J;\t Catch:{ RuntimeException -> 0x0074 }\n r3 = 37;\n r2 = r2[r3];\t Catch:{ RuntimeException -> 0x0074 }\n r2 = r6.indexOf(r2);\t Catch:{ RuntimeException -> 0x0074 }\n r3 = J;\t Catch:{ RuntimeException -> 0x0074 }\n r4 = 36;\n r3 = r3[r4];\t Catch:{ RuntimeException -> 0x0074 }\n r3 = r3.length();\t Catch:{ RuntimeException -> 0x0074 }\n r2 = r2 + r3;\n r1 = r6.substring(r2, r1);\t Catch:{ RuntimeException -> 0x0074 }\n r7.append(r1);\t Catch:{ RuntimeException -> 0x0074 }\n if (r0 == 0) goto L_0x005e;\n L_0x0057:\n r0 = l(r6);\t Catch:{ RuntimeException -> 0x0074 }\n r7.append(r0);\t Catch:{ RuntimeException -> 0x0074 }\n L_0x005e:\n r0 = J;\n r1 = 39;\n r0 = r0[r1];\n r0 = r7.indexOf(r0);\n if (r0 <= 0) goto L_0x0071;\n L_0x006a:\n r1 = r7.length();\t Catch:{ RuntimeException -> 0x0076 }\n r7.delete(r0, r1);\t Catch:{ RuntimeException -> 0x0076 }\n L_0x0071:\n return;\n L_0x0072:\n r0 = move-exception;\n throw r0;\n L_0x0074:\n r0 = move-exception;\n throw r0;\n L_0x0076:\n r0 = move-exception;\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, java.lang.StringBuilder):void\");\n }", "int a(java.lang.String r8, com.google.ho r9, java.lang.StringBuilder r10, boolean r11, com.google.ae r12) {\n /*\n r7 = this;\n r1 = 0;\n r0 = r8.length();\t Catch:{ RuntimeException -> 0x0009 }\n if (r0 != 0) goto L_0x000b;\n L_0x0007:\n r0 = r1;\n L_0x0008:\n return r0;\n L_0x0009:\n r0 = move-exception;\n throw r0;\n L_0x000b:\n r2 = new java.lang.StringBuilder;\n r2.<init>(r8);\n r0 = J;\n r3 = 25;\n r0 = r0[r3];\n if (r9 == 0) goto L_0x001c;\n L_0x0018:\n r0 = r9.a();\n L_0x001c:\n r0 = r7.a(r2, r0);\n if (r11 == 0) goto L_0x0025;\n L_0x0022:\n r12.a(r0);\t Catch:{ RuntimeException -> 0x0040 }\n L_0x0025:\n r3 = com.google.aw.FROM_DEFAULT_COUNTRY;\t Catch:{ RuntimeException -> 0x0042 }\n if (r0 == r3) goto L_0x005e;\n L_0x0029:\n r0 = r2.length();\t Catch:{ RuntimeException -> 0x003e }\n r1 = 2;\n if (r0 > r1) goto L_0x0044;\n L_0x0030:\n r0 = new com.google.ao;\t Catch:{ RuntimeException -> 0x003e }\n r1 = com.google.dk.TOO_SHORT_AFTER_IDD;\t Catch:{ RuntimeException -> 0x003e }\n r2 = J;\t Catch:{ RuntimeException -> 0x003e }\n r3 = 26;\n r2 = r2[r3];\t Catch:{ RuntimeException -> 0x003e }\n r0.<init>(r1, r2);\t Catch:{ RuntimeException -> 0x003e }\n throw r0;\t Catch:{ RuntimeException -> 0x003e }\n L_0x003e:\n r0 = move-exception;\n throw r0;\n L_0x0040:\n r0 = move-exception;\n throw r0;\n L_0x0042:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x003e }\n L_0x0044:\n r0 = r7.a(r2, r10);\n if (r0 == 0) goto L_0x0050;\n L_0x004a:\n r12.a(r0);\t Catch:{ RuntimeException -> 0x004e }\n goto L_0x0008;\n L_0x004e:\n r0 = move-exception;\n throw r0;\n L_0x0050:\n r0 = new com.google.ao;\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\n r2 = J;\n r3 = 24;\n r2 = r2[r3];\n r0.<init>(r1, r2);\n throw r0;\n L_0x005e:\n if (r9 == 0) goto L_0x00d2;\n L_0x0060:\n r0 = r9.L();\n r3 = java.lang.String.valueOf(r0);\n r4 = r2.toString();\n r5 = r4.startsWith(r3);\n if (r5 == 0) goto L_0x00d2;\n L_0x0072:\n r5 = new java.lang.StringBuilder;\n r3 = r3.length();\n r3 = r4.substring(r3);\n r5.<init>(r3);\n r3 = r9.X();\n r4 = r7.o;\n r6 = r3.g();\n r4 = r4.a(r6);\n r6 = 0;\n r7.a(r5, r9, r6);\n r6 = r7.o;\n r3 = r3.f();\n r3 = r6.a(r3);\n r6 = r4.matcher(r2);\t Catch:{ RuntimeException -> 0x00ca }\n r6 = r6.matches();\t Catch:{ RuntimeException -> 0x00ca }\n if (r6 != 0) goto L_0x00af;\n L_0x00a5:\n r4 = r4.matcher(r5);\t Catch:{ RuntimeException -> 0x00cc }\n r4 = r4.matches();\t Catch:{ RuntimeException -> 0x00cc }\n if (r4 != 0) goto L_0x00bb;\n L_0x00af:\n r2 = r2.toString();\t Catch:{ RuntimeException -> 0x00ce }\n r2 = r7.a(r3, r2);\t Catch:{ RuntimeException -> 0x00ce }\n r3 = com.google.dz.TOO_LONG;\t Catch:{ RuntimeException -> 0x00ce }\n if (r2 != r3) goto L_0x00d2;\n L_0x00bb:\n r10.append(r5);\t Catch:{ RuntimeException -> 0x00d0 }\n if (r11 == 0) goto L_0x00c5;\n L_0x00c0:\n r1 = com.google.aw.FROM_NUMBER_WITHOUT_PLUS_SIGN;\t Catch:{ RuntimeException -> 0x00d0 }\n r12.a(r1);\t Catch:{ RuntimeException -> 0x00d0 }\n L_0x00c5:\n r12.a(r0);\n goto L_0x0008;\n L_0x00ca:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00cc }\n L_0x00cc:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00ce }\n L_0x00ce:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00d0 }\n L_0x00d0:\n r0 = move-exception;\n throw r0;\n L_0x00d2:\n r12.a(r1);\n r0 = r1;\n goto L_0x0008;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, com.google.ho, java.lang.StringBuilder, boolean, com.google.ae):int\");\n }", "void a(bu var1_1, f var2_2, Map var3_3, double var4_4, double var6_5) {\n block6 : {\n var14_6 = fj.z;\n var8_7 = M.b();\n var9_8 = var2_2.a();\n while (var9_8.f()) {\n var10_9 = var9_8.a();\n if (var14_6) break block6;\n if (!var10_9.e() || var1_1.i((y.c.d)var10_9).bendCount() > 1) ** GOTO lbl-1000\n var11_10 = var1_1.i((y.c.d)var10_9);\n var12_11 = var11_10.getSourceRealizer();\n if (var1_1.i((y.c.d)var10_9).bendCount() == 0) {\n var11_10.appendBend(var11_10.getSourcePort().a(var12_11), var11_10.getSourcePort().b(var12_11) - 20.0 - var12_11.getHeight());\n }\n this.a(var1_1, var4_4, var6_5, (y.c.d)var10_9, true, false, false, var10_9.c());\n if (var14_6) lbl-1000: // 2 sources:\n {\n var8_7.a(var10_9, true);\n var8_7.a((Object)var3_3.get(var10_9), true);\n }\n var9_8.g();\n if (!var14_6) continue;\n }\n var1_1.a(as.a, var8_7);\n }\n var9_8 = new as();\n var9_8.a(5.0);\n var9_8.b(false);\n var9_8.a(true);\n try {\n var10_9 = new bI(1);\n var10_9.a(false);\n var10_9.b(true);\n var10_9.d().a(true);\n var10_9.a(var1_1, (ah)var9_8);\n return;\n }\n finally {\n var1_1.d_(as.a);\n }\n }", "private void b044904490449щ0449щ() {\n /*\n r7 = this;\n r0 = new rrrrrr.ccrcrc;\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = r7.bнн043Dннн;\n r2 = com.immersion.aws.analytics.ImmrAnalytics.b044C044C044C044Cьь(r2);\n r2 = r2.getFilesDir();\n r1 = r1.append(r2);\n r2 = java.io.File.separator;\n r1 = r1.append(r2);\n L_0x001b:\n r2 = 1;\n switch(r2) {\n case 0: goto L_0x001b;\n case 1: goto L_0x0024;\n default: goto L_0x001f;\n };\n L_0x001f:\n r2 = 0;\n switch(r2) {\n case 0: goto L_0x0024;\n case 1: goto L_0x001b;\n default: goto L_0x0023;\n };\n L_0x0023:\n goto L_0x001f;\n L_0x0024:\n r2 = \"3HC4C-01.txt\";\n r1 = r1.append(r2);\n r1 = r1.toString();\n r0.<init>(r1);\n r0.load();\n L_0x0034:\n r1 = r0.size();\n if (r1 <= 0) goto L_0x007a;\n L_0x003a:\n r1 = r0.peek();\n r2 = new rrrrrr.rcccrr;\n r2.<init>();\n r3 = r7.bнн043Dннн;\n r3 = com.immersion.aws.analytics.ImmrAnalytics.b044Cь044C044Cьь(r3);\n monitor-enter(r3);\n r4 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r4 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r4);\t Catch:{ all -> 0x0074 }\n r4 = r4.bЛ041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r5 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r5 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r5);\t Catch:{ all -> 0x0074 }\n r5 = r5.b041B041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r6 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r6 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r6);\t Catch:{ all -> 0x0074 }\n r6 = r6.bЛЛЛ041B041BЛ;\t Catch:{ all -> 0x0074 }\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n r1 = r2.sendHttpRequestFromCache(r4, r5, r6, r1);\n if (r1 == 0) goto L_0x0077;\n L_0x0069:\n if (r4 == 0) goto L_0x0077;\n L_0x006b:\n if (r5 == 0) goto L_0x0077;\n L_0x006d:\n r0.remove();\n r0.save();\n goto L_0x0034;\n L_0x0074:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n throw r0;\n L_0x0077:\n r0.save();\n L_0x007a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rrrrrr.cccccr.b044904490449щ0449щ():void\");\n }", "public final void run() {\n /*\n r10 = this;\n r8 = 2;\n r7 = 1;\n r6 = 0;\n r2 = com.uc.apollo.media.impl.O.UNKNOWN;\n r1 = 0;\n r0 = r10.e;\t Catch:{ d -> 0x0051, Throwable -> 0x0090 }\n r3 = r10.f;\t Catch:{ d -> 0x0051, Throwable -> 0x0090 }\n r0 = com.uc.apollo.media.b.c.a(r0, r3);\t Catch:{ d -> 0x0051, Throwable -> 0x0090 }\n if (r0 == 0) goto L_0x004b;\n L_0x0010:\n r2 = com.uc.apollo.media.impl.O.M3U8;\t Catch:{ d -> 0x00cf, Throwable -> 0x0090 }\n r1 = r0.c();\t Catch:{ d -> 0x00cf, Throwable -> 0x0090 }\n if (r1 == 0) goto L_0x00db;\n L_0x0018:\n r1 = com.uc.apollo.media.impl.O.M3U8_LIVE;\t Catch:{ d -> 0x00cf, Throwable -> 0x0090 }\n L_0x001a:\n r2 = r10.h;\t Catch:{ d -> 0x00d5, Throwable -> 0x0090 }\n if (r2 == 0) goto L_0x0022;\n L_0x001e:\n r2 = 1;\n r0.a(r2);\t Catch:{ d -> 0x00d5, Throwable -> 0x0090 }\n L_0x0022:\n r2 = com.uc.apollo.media.impl.O.UNKNOWN;\n if (r1 == r2) goto L_0x0030;\n L_0x0026:\n r2 = new java.lang.StringBuilder;\n r3 = \"content type is \";\n r2.<init>(r3);\n r2.append(r1);\n L_0x0030:\n r2 = r10.g;\n if (r2 == 0) goto L_0x004a;\n L_0x0034:\n r2 = c;\n r3 = r10.d;\n r4 = 3;\n r4 = new java.lang.Object[r4];\n r5 = r10.g;\n r4[r6] = r5;\n r4[r7] = r1;\n r4[r8] = r0;\n r0 = r2.obtainMessage(r8, r3, r6, r4);\n r0.sendToTarget();\n L_0x004a:\n return;\n L_0x004b:\n r0 = com.uc.apollo.media.impl.O.PARSE_FAILURE;\t Catch:{ d -> 0x0051, Throwable -> 0x0090 }\n r9 = r1;\n r1 = r0;\n r0 = r9;\n goto L_0x0022;\n L_0x0051:\n r0 = move-exception;\n r9 = r0;\n r0 = r2;\n r2 = r9;\n L_0x0055:\n r3 = r2.a();\n if (r3 == 0) goto L_0x007e;\n L_0x005b:\n r4 = r3.length;\n r5 = 8;\n if (r4 < r5) goto L_0x007e;\n L_0x0060:\n r4 = 4;\n r4 = r3[r4];\n r5 = 102; // 0x66 float:1.43E-43 double:5.04E-322;\n if (r4 == r5) goto L_0x007c;\n L_0x0067:\n r4 = 5;\n r4 = r3[r4];\n r5 = 116; // 0x74 float:1.63E-43 double:5.73E-322;\n if (r4 == r5) goto L_0x007c;\n L_0x006e:\n r4 = 6;\n r4 = r3[r4];\n r5 = 121; // 0x79 float:1.7E-43 double:6.0E-322;\n if (r4 == r5) goto L_0x007c;\n L_0x0075:\n r4 = 7;\n r3 = r3[r4];\n r4 = 112; // 0x70 float:1.57E-43 double:5.53E-322;\n if (r3 != r4) goto L_0x007e;\n L_0x007c:\n r0 = com.uc.apollo.media.impl.O.MP4;\n L_0x007e:\n r3 = com.uc.apollo.media.impl.O.UNKNOWN;\n if (r0 != r3) goto L_0x008c;\n L_0x0082:\n r3 = new java.lang.StringBuilder;\n r4 = \"parse failure, msg: \";\n r3.<init>(r4);\n r3.append(r2);\n L_0x008c:\n r9 = r1;\n r1 = r0;\n r0 = r9;\n goto L_0x0022;\n L_0x0090:\n r0 = move-exception;\n r1 = com.uc.apollo.media.impl.O.PARSE_FAILURE;\n r1 = a;\n r2 = new java.lang.StringBuilder;\n r3 = \"parse failure: \";\n r2.<init>(r3);\n r2 = r2.append(r0);\n r2 = r2.toString();\n android.util.Log.w(r1, r2);\n r1 = r10.g;\n if (r1 == 0) goto L_0x004a;\n L_0x00ab:\n r1 = c;\n r2 = r10.d;\n r3 = new java.lang.Object[r8];\n r4 = r10.g;\n r3[r6] = r4;\n r4 = new java.lang.StringBuilder;\n r5 = \"parse failure: \";\n r4.<init>(r5);\n r0 = r4.append(r0);\n r0 = r0.toString();\n r3[r7] = r0;\n r0 = r1.obtainMessage(r7, r2, r6, r3);\n r0.sendToTarget();\n goto L_0x004a;\n L_0x00cf:\n r1 = move-exception;\n r9 = r1;\n r1 = r0;\n r0 = r2;\n r2 = r9;\n goto L_0x0055;\n L_0x00d5:\n r2 = move-exception;\n r9 = r0;\n r0 = r1;\n r1 = r9;\n goto L_0x0055;\n L_0x00db:\n r1 = r2;\n goto L_0x001a;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.uc.apollo.media.impl.f.run():void\");\n }", "@androidx.annotation.Nullable\n /* renamed from: j */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final p005b.p096l.p097a.p151d.p152a.p154b.C3474b mo14822j(java.lang.String r9) {\n /*\n r8 = this;\n java.io.File r0 = new java.io.File\n java.io.File r1 = r8.mo14820g()\n r0.<init>(r1, r9)\n boolean r1 = r0.exists()\n r2 = 3\n r3 = 6\n r4 = 1\n r5 = 0\n r6 = 0\n if (r1 != 0) goto L_0x0022\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s\"\n r0.mo14884b(r2, r9, r1)\n L_0x001f:\n r9 = r6\n goto L_0x0093\n L_0x0022:\n java.io.File r1 = new java.io.File\n b.l.a.d.a.b.o1 r7 = r8.f6567b\n int r7 = r7.mo14797a()\n java.lang.String r7 = java.lang.String.valueOf(r7)\n r1.<init>(r0, r7)\n boolean r0 = r1.exists()\n r7 = 2\n if (r0 != 0) goto L_0x0050\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0050:\n java.io.File[] r0 = r1.listFiles()\n if (r0 == 0) goto L_0x007b\n int r1 = r0.length\n if (r1 != 0) goto L_0x005a\n goto L_0x007b\n L_0x005a:\n if (r1 <= r4) goto L_0x0074\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Multiple pack versions found for pack name: %s app version: %s\"\n r0.mo14884b(r3, r9, r1)\n goto L_0x001f\n L_0x0074:\n r9 = r0[r5]\n java.lang.String r9 = r9.getCanonicalPath()\n goto L_0x0093\n L_0x007b:\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"No pack version found for pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0093:\n if (r9 != 0) goto L_0x0096\n return r6\n L_0x0096:\n java.io.File r0 = new java.io.File\n java.lang.String r1 = \"assets\"\n r0.<init>(r9, r1)\n boolean r1 = r0.isDirectory()\n if (r1 != 0) goto L_0x00af\n b.l.a.d.a.e.f r9 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r0\n java.lang.String r0 = \"Failed to find assets directory: %s\"\n r9.mo14884b(r3, r0, r1)\n return r6\n L_0x00af:\n java.lang.String r0 = r0.getCanonicalPath()\n b.l.a.d.a.b.w r1 = new b.l.a.d.a.b.w\n r1.<init>(r5, r9, r0)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p005b.p096l.p097a.p151d.p152a.p154b.C3544t.mo14822j(java.lang.String):b.l.a.d.a.b.b\");\n }", "@java.lang.Deprecated\n /* renamed from: a */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static synchronized void m13804a(android.content.Context r3, com.facebook.C6787r.C6788a r4) {\n /*\n java.lang.Class<com.facebook.r> r0 = com.facebook.C6787r.class\n monitor-enter(r0)\n java.lang.Boolean r1 = f12487s // Catch:{ all -> 0x0088 }\n boolean r1 = r1.booleanValue() // Catch:{ all -> 0x0088 }\n if (r1 == 0) goto L_0x0012\n if (r4 == 0) goto L_0x0010\n r4.mo20141a() // Catch:{ all -> 0x0088 }\n L_0x0010:\n monitor-exit(r0)\n return\n L_0x0012:\n java.lang.String r1 = \"applicationContext\"\n com.facebook.internal.C6697T.m13461a(r3, r1) // Catch:{ all -> 0x0088 }\n r1 = 0\n com.facebook.internal.C6697T.m13460a(r3, r1) // Catch:{ all -> 0x0088 }\n com.facebook.internal.C6697T.m13466b(r3, r1) // Catch:{ all -> 0x0088 }\n android.content.Context r1 = r3.getApplicationContext() // Catch:{ all -> 0x0088 }\n f12481m = r1 // Catch:{ all -> 0x0088 }\n android.content.Context r1 = f12481m // Catch:{ all -> 0x0088 }\n m13810b(r1) // Catch:{ all -> 0x0088 }\n java.lang.String r1 = f12472d // Catch:{ all -> 0x0088 }\n boolean r1 = com.facebook.internal.C6694S.m13436b(r1) // Catch:{ all -> 0x0088 }\n if (r1 != 0) goto L_0x0080\n r1 = 1\n java.lang.Boolean r1 = java.lang.Boolean.valueOf(r1) // Catch:{ all -> 0x0088 }\n f12487s = r1 // Catch:{ all -> 0x0088 }\n boolean r1 = m13817g() // Catch:{ all -> 0x0088 }\n if (r1 == 0) goto L_0x0041\n m13812c() // Catch:{ all -> 0x0088 }\n L_0x0041:\n android.content.Context r1 = f12481m // Catch:{ all -> 0x0088 }\n boolean r1 = r1 instanceof android.app.Application // Catch:{ all -> 0x0088 }\n if (r1 == 0) goto L_0x0056\n boolean r1 = com.facebook.C6557O.m12974e() // Catch:{ all -> 0x0088 }\n if (r1 == 0) goto L_0x0056\n android.content.Context r1 = f12481m // Catch:{ all -> 0x0088 }\n android.app.Application r1 = (android.app.Application) r1 // Catch:{ all -> 0x0088 }\n java.lang.String r2 = f12472d // Catch:{ all -> 0x0088 }\n com.facebook.p127a.p130b.C6602h.m13083a(r1, r2) // Catch:{ all -> 0x0088 }\n L_0x0056:\n com.facebook.internal.C6670D.m13313f() // Catch:{ all -> 0x0088 }\n com.facebook.internal.C6678J.m13355d() // Catch:{ all -> 0x0088 }\n android.content.Context r1 = f12481m // Catch:{ all -> 0x0088 }\n com.facebook.internal.C6712c.m13522a(r1) // Catch:{ all -> 0x0088 }\n com.facebook.internal.G r1 = new com.facebook.internal.G // Catch:{ all -> 0x0088 }\n com.facebook.o r2 = new com.facebook.o // Catch:{ all -> 0x0088 }\n r2.<init>() // Catch:{ all -> 0x0088 }\n r1.<init>(r2) // Catch:{ all -> 0x0088 }\n f12480l = r1 // Catch:{ all -> 0x0088 }\n java.util.concurrent.FutureTask r1 = new java.util.concurrent.FutureTask // Catch:{ all -> 0x0088 }\n com.facebook.p r2 = new com.facebook.p // Catch:{ all -> 0x0088 }\n r2.<init>(r4, r3) // Catch:{ all -> 0x0088 }\n r1.<init>(r2) // Catch:{ all -> 0x0088 }\n java.util.concurrent.Executor r2 = m13822l() // Catch:{ all -> 0x0088 }\n r2.execute(r1) // Catch:{ all -> 0x0088 }\n monitor-exit(r0)\n return\n L_0x0080:\n com.facebook.FacebookException r1 = new com.facebook.FacebookException // Catch:{ all -> 0x0088 }\n java.lang.String r2 = \"A valid Facebook app id must be set in the AndroidManifest.xml or set by calling FacebookSdk.setApplicationId before initializing the sdk.\"\n r1.<init>(r2) // Catch:{ all -> 0x0088 }\n throw r1 // Catch:{ all -> 0x0088 }\n L_0x0088:\n r3 = move-exception\n monitor-exit(r0)\n throw r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.C6787r.m13804a(android.content.Context, com.facebook.r$a):void\");\n }", "public void m2108c() {\n /*\n r3 = this;\n r0 = \"Calling this from your main thread can lead to deadlock\";\n com.google.android.gms.common.internal.C1305x.m6628c(r0);\n monitor-enter(r3);\n r0 = r3.f1274g;\t Catch:{ all -> 0x002a }\n if (r0 == 0) goto L_0x000e;\n L_0x000a:\n r0 = r3.f1268a;\t Catch:{ all -> 0x002a }\n if (r0 != 0) goto L_0x0010;\n L_0x000e:\n monitor-exit(r3);\t Catch:{ all -> 0x002a }\n L_0x000f:\n return;\n L_0x0010:\n r0 = r3.f1270c;\t Catch:{ IllegalArgumentException -> 0x002d }\n if (r0 == 0) goto L_0x001f;\n L_0x0014:\n r0 = com.google.android.gms.common.stats.C1530b.m6956a();\t Catch:{ IllegalArgumentException -> 0x002d }\n r1 = r3.f1274g;\t Catch:{ IllegalArgumentException -> 0x002d }\n r2 = r3.f1268a;\t Catch:{ IllegalArgumentException -> 0x002d }\n r0.m6963a(r1, r2);\t Catch:{ IllegalArgumentException -> 0x002d }\n L_0x001f:\n r0 = 0;\n r3.f1270c = r0;\t Catch:{ all -> 0x002a }\n r0 = 0;\n r3.f1269b = r0;\t Catch:{ all -> 0x002a }\n r0 = 0;\n r3.f1268a = r0;\t Catch:{ all -> 0x002a }\n monitor-exit(r3);\t Catch:{ all -> 0x002a }\n goto L_0x000f;\n L_0x002a:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x002a }\n throw r0;\n L_0x002d:\n r0 = move-exception;\n r1 = \"AdvertisingIdClient\";\n r2 = \"AdvertisingIdClient unbindService failed.\";\n android.util.Log.i(r1, r2, r0);\t Catch:{ all -> 0x002a }\n goto L_0x001f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.ads.c.a.c():void\");\n }", "public static void a(java.lang.Integer r8, java.lang.String[] r9, java.lang.String[] r10) {\n /*\n r1 = d;\n if (r8 == 0) goto L_0x001e;\n L_0x0004:\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r2 = z;\n r3 = 64;\n r2 = r2[r3];\n r0 = r0.append(r2);\n r0 = r0.append(r8);\n r0 = r0.toString();\n com.whatsapp.util.Log.e(r0);\n L_0x001e:\n if (r9 == 0) goto L_0x007a;\n L_0x0020:\n if (r10 == 0) goto L_0x007a;\n L_0x0022:\n r0 = r9.length;\n r2 = r10.length;\n if (r0 != r2) goto L_0x0050;\n L_0x0026:\n r0 = 0;\n L_0x0027:\n r2 = r9.length;\n if (r0 >= r2) goto L_0x004e;\n L_0x002a:\n r2 = r9[r0];\n r2 = android.text.TextUtils.isEmpty(r2);\n if (r2 != 0) goto L_0x004a;\n L_0x0032:\n r2 = r10[r0];\n r2 = android.text.TextUtils.isEmpty(r2);\n if (r2 != 0) goto L_0x004a;\n L_0x003a:\n r2 = b;\n r3 = r9[r0];\n r4 = new com.whatsapp.contact.l;\n r6 = 0;\n r5 = r10[r0];\n r4.<init>(r6, r5);\n r2.put(r3, r4);\n L_0x004a:\n r0 = r0 + 1;\n if (r1 == 0) goto L_0x0027;\n L_0x004e:\n if (r1 == 0) goto L_0x007a;\n L_0x0050:\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = z;\n r2 = 65;\n r1 = r1[r2];\n r0 = r0.append(r1);\n r1 = r9.length;\n r0 = r0.append(r1);\n r1 = z;\n r2 = 63;\n r1 = r1[r2];\n r0 = r0.append(r1);\n r1 = r10.length;\n r0 = r0.append(r1);\n r0 = r0.toString();\n com.whatsapp.util.Log.e(r0);\n L_0x007a:\n r0 = i;\n r0.open();\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.contact.i.a(java.lang.Integer, java.lang.String[], java.lang.String[]):void\");\n }", "private void b(int r14) {\n /*\n r13 = this;\n java.lang.Integer r0 = r13.w\n if (r0 != 0) goto L_0x000b\n java.lang.Integer r14 = java.lang.Integer.valueOf(r14)\n r13.w = r14\n goto L_0x005b\n L_0x000b:\n java.lang.Integer r0 = r13.w\n int r0 = r0.intValue()\n if (r0 == r14) goto L_0x005b\n java.lang.IllegalStateException r0 = new java.lang.IllegalStateException\n java.lang.String r14 = a(r14)\n java.lang.String r14 = java.lang.String.valueOf(r14)\n java.lang.Integer r1 = r13.w\n int r1 = r1.intValue()\n java.lang.String r1 = a(r1)\n java.lang.String r1 = java.lang.String.valueOf(r1)\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n java.lang.String r3 = java.lang.String.valueOf(r14)\n int r3 = r3.length()\n int r3 = r3 + 51\n java.lang.String r4 = java.lang.String.valueOf(r1)\n int r4 = r4.length()\n int r3 = r3 + r4\n r2.<init>(r3)\n java.lang.String r3 = \"Cannot use sign-in mode: \"\n r2.append(r3)\n r2.append(r14)\n java.lang.String r14 = \". Mode was already set to \"\n r2.append(r14)\n r2.append(r1)\n java.lang.String r14 = r2.toString()\n r0.<init>(r14)\n throw r0\n L_0x005b:\n com.google.android.gms.internal.zzqy r14 = r13.l\n if (r14 == 0) goto L_0x0060\n return\n L_0x0060:\n java.util.Map<com.google.android.gms.common.api.Api$zzc<?>, com.google.android.gms.common.api.Api$zze> r14 = r13.c\n java.util.Collection r14 = r14.values()\n java.util.Iterator r14 = r14.iterator()\n r0 = 0\n r1 = 0\n L_0x006c:\n boolean r2 = r14.hasNext()\n if (r2 == 0) goto L_0x0088\n java.lang.Object r2 = r14.next()\n com.google.android.gms.common.api.Api$zze r2 = (com.google.android.gms.common.api.Api.zze) r2\n boolean r3 = r2.zzahd()\n r4 = 1\n if (r3 == 0) goto L_0x0080\n r0 = 1\n L_0x0080:\n boolean r2 = r2.zzahs()\n if (r2 == 0) goto L_0x006c\n r1 = 1\n goto L_0x006c\n L_0x0088:\n java.lang.Integer r14 = r13.w\n int r14 = r14.intValue()\n switch(r14) {\n case 1: goto L_0x00ae;\n case 2: goto L_0x0092;\n case 3: goto L_0x00c2;\n default: goto L_0x0091;\n }\n L_0x0091:\n goto L_0x00c2\n L_0x0092:\n if (r0 == 0) goto L_0x00c2\n android.content.Context r2 = r13.n\n java.util.concurrent.locks.Lock r4 = r13.j\n android.os.Looper r5 = r13.o\n com.google.android.gms.common.GoogleApiAvailability r6 = r13.t\n java.util.Map<com.google.android.gms.common.api.Api$zzc<?>, com.google.android.gms.common.api.Api$zze> r7 = r13.c\n com.google.android.gms.common.internal.zzh r8 = r13.e\n java.util.Map<com.google.android.gms.common.api.Api<?>, java.lang.Integer> r9 = r13.f\n com.google.android.gms.common.api.Api$zza<? extends com.google.android.gms.internal.zzwz, com.google.android.gms.internal.zzxa> r10 = r13.g\n java.util.ArrayList<com.google.android.gms.internal.zzqf> r11 = r13.v\n r3 = r13\n com.google.android.gms.internal.zzqh r14 = com.google.android.gms.internal.zzqh.a(r2, r3, r4, r5, r6, r7, r8, r9, r10, r11)\n L_0x00ab:\n r13.l = r14\n return\n L_0x00ae:\n if (r0 != 0) goto L_0x00b8\n java.lang.IllegalStateException r14 = new java.lang.IllegalStateException\n java.lang.String r0 = \"SIGN_IN_MODE_REQUIRED cannot be used on a GoogleApiClient that does not contain any authenticated APIs. Use connect() instead.\"\n r14.<init>(r0)\n throw r14\n L_0x00b8:\n if (r1 == 0) goto L_0x00c2\n java.lang.IllegalStateException r14 = new java.lang.IllegalStateException\n java.lang.String r0 = \"Cannot use SIGN_IN_MODE_REQUIRED with GOOGLE_SIGN_IN_API. Use connect(SIGN_IN_MODE_OPTIONAL) instead.\"\n r14.<init>(r0)\n throw r14\n L_0x00c2:\n com.google.android.gms.internal.zzqr r14 = new com.google.android.gms.internal.zzqr\n android.content.Context r2 = r13.n\n java.util.concurrent.locks.Lock r4 = r13.j\n android.os.Looper r5 = r13.o\n com.google.android.gms.common.GoogleApiAvailability r6 = r13.t\n java.util.Map<com.google.android.gms.common.api.Api$zzc<?>, com.google.android.gms.common.api.Api$zze> r7 = r13.c\n com.google.android.gms.common.internal.zzh r8 = r13.e\n java.util.Map<com.google.android.gms.common.api.Api<?>, java.lang.Integer> r9 = r13.f\n com.google.android.gms.common.api.Api$zza<? extends com.google.android.gms.internal.zzwz, com.google.android.gms.internal.zzxa> r10 = r13.g\n java.util.ArrayList<com.google.android.gms.internal.zzqf> r11 = r13.v\n r1 = r14\n r3 = r13\n r12 = r13\n r1.<init>(r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12)\n goto L_0x00ab\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.zzqp.b(int):void\");\n }", "final com.google.bV a(java.util.Map r14) {\n /*\n r13_this = this;\n r6 = f;\n if (r14 == 0) goto L_0x013c;\n L_0x0004:\n r0 = com.google.fm.TRY_HARDER;\n r0 = r14.containsKey(r0);\n if (r0 == 0) goto L_0x013c;\n L_0x000c:\n r0 = 1;\n r2 = r0;\n L_0x000e:\n if (r14 == 0) goto L_0x0140;\n L_0x0010:\n r0 = com.google.fm.PURE_BARCODE;\n r0 = r14.containsKey(r0);\n if (r0 == 0) goto L_0x0140;\n L_0x0018:\n r0 = 1;\n L_0x0019:\n r1 = r13.b;\n r7 = r1.f();\n r1 = r13.b;\n r8 = r1.b();\n r1 = r7 * 3;\n r1 = r1 / 228;\n r3 = 3;\n if (r1 < r3) goto L_0x002e;\n L_0x002c:\n if (r2 == 0) goto L_0x002f;\n L_0x002e:\n r1 = 3;\n L_0x002f:\n r2 = 0;\n r3 = 5;\n r9 = new int[r3];\n r4 = r1 + -1;\n r5 = r1;\n L_0x0036:\n if (r4 >= r7) goto L_0x0127;\n L_0x0038:\n if (r2 != 0) goto L_0x0127;\n L_0x003a:\n r1 = 0;\n r3 = 0;\n r9[r1] = r3;\n r1 = 1;\n r3 = 0;\n r9[r1] = r3;\n r1 = 2;\n r3 = 0;\n r9[r1] = r3;\n r1 = 3;\n r3 = 0;\n r9[r1] = r3;\n r1 = 4;\n r3 = 0;\n r9[r1] = r3;\n r1 = 0;\n r3 = 0;\n L_0x0050:\n if (r3 >= r8) goto L_0x010d;\n L_0x0052:\n r10 = r13.b;\n r10 = r10.a(r3, r4);\n if (r10 == 0) goto L_0x0069;\n L_0x005a:\n r10 = r1 & 1;\n r11 = 1;\n if (r10 != r11) goto L_0x0061;\n L_0x005f:\n r1 = r1 + 1;\n L_0x0061:\n r10 = r9[r1];\n r10 = r10 + 1;\n r9[r1] = r10;\n if (r6 == 0) goto L_0x0109;\n L_0x0069:\n r10 = r1 & 1;\n if (r10 != 0) goto L_0x0103;\n L_0x006d:\n r10 = 4;\n if (r1 != r10) goto L_0x00f9;\n L_0x0070:\n r1 = a(r9);\n if (r1 == 0) goto L_0x015f;\n L_0x0076:\n r1 = r13.a(r9, r4, r3, r0);\n if (r1 == 0) goto L_0x0159;\n L_0x007c:\n r5 = 2;\n r1 = r13.a;\n if (r1 == 0) goto L_0x0156;\n L_0x0081:\n r1 = r13.b();\n if (r6 == 0) goto L_0x00c2;\n L_0x0087:\n r2 = r13.c();\n r10 = 2;\n r10 = r9[r10];\n if (r2 <= r10) goto L_0x0152;\n L_0x0090:\n r3 = 2;\n r3 = r9[r3];\n r2 = r2 - r3;\n r2 = r2 - r5;\n r3 = r4 + r2;\n r2 = r8 + -1;\n L_0x0099:\n if (r6 == 0) goto L_0x014e;\n L_0x009b:\n r4 = r5;\n r12 = r3;\n r3 = r1;\n r1 = r2;\n r2 = r12;\n L_0x00a0:\n r5 = 0;\n r10 = 2;\n r10 = r9[r10];\n r9[r5] = r10;\n r5 = 1;\n r10 = 3;\n r10 = r9[r10];\n r9[r5] = r10;\n r5 = 2;\n r10 = 4;\n r10 = r9[r10];\n r9[r5] = r10;\n r5 = 3;\n r10 = 1;\n r9[r5] = r10;\n r5 = 4;\n r10 = 0;\n r9[r5] = r10;\n r5 = 3;\n if (r6 == 0) goto L_0x0147;\n L_0x00bd:\n r5 = r4;\n r4 = r2;\n r12 = r3;\n r3 = r1;\n r1 = r12;\n L_0x00c2:\n r2 = 0;\n r10 = 0;\n r11 = 0;\n r9[r10] = r11;\n r10 = 1;\n r11 = 0;\n r9[r10] = r11;\n r10 = 2;\n r11 = 0;\n r9[r10] = r11;\n r10 = 3;\n r11 = 0;\n r9[r10] = r11;\n r10 = 4;\n r11 = 0;\n r9[r10] = r11;\n if (r6 == 0) goto L_0x0143;\n L_0x00d9:\n r2 = 0;\n r10 = 2;\n r10 = r9[r10];\n r9[r2] = r10;\n r2 = 1;\n r10 = 3;\n r10 = r9[r10];\n r9[r2] = r10;\n r2 = 2;\n r10 = 4;\n r10 = r9[r10];\n r9[r2] = r10;\n r2 = 3;\n r10 = 1;\n r9[r2] = r10;\n r2 = 4;\n r10 = 0;\n r9[r2] = r10;\n r2 = 3;\n if (r6 == 0) goto L_0x0143;\n L_0x00f6:\n r12 = r2;\n r2 = r1;\n r1 = r12;\n L_0x00f9:\n r1 = r1 + 1;\n r10 = r9[r1];\n r10 = r10 + 1;\n r9[r1] = r10;\n if (r6 == 0) goto L_0x0109;\n L_0x0103:\n r10 = r9[r1];\n r10 = r10 + 1;\n r9[r1] = r10;\n L_0x0109:\n r3 = r3 + 1;\n if (r6 == 0) goto L_0x0050;\n L_0x010d:\n r1 = a(r9);\n if (r1 == 0) goto L_0x0124;\n L_0x0113:\n r1 = r13.a(r9, r4, r8, r0);\n if (r1 == 0) goto L_0x0124;\n L_0x0119:\n r1 = 0;\n r5 = r9[r1];\n r1 = r13.a;\n if (r1 == 0) goto L_0x0124;\n L_0x0120:\n r2 = r13.b();\n L_0x0124:\n r4 = r4 + r5;\n if (r6 == 0) goto L_0x0036;\n L_0x0127:\n r0 = r13.a();\n com.google.bm.a(r0);\n r1 = new com.google.bV;\n r1.<init>(r0);\n r0 = com.google.gC.a;\n if (r0 == 0) goto L_0x013b;\n L_0x0137:\n r0 = r6 + 1;\n f = r0;\n L_0x013b:\n return r1;\n L_0x013c:\n r0 = 0;\n r2 = r0;\n goto L_0x000e;\n L_0x0140:\n r0 = 0;\n goto L_0x0019;\n L_0x0143:\n r12 = r2;\n r2 = r1;\n r1 = r12;\n goto L_0x0109;\n L_0x0147:\n r12 = r1;\n r1 = r5;\n r5 = r4;\n r4 = r2;\n r2 = r3;\n r3 = r12;\n goto L_0x0109;\n L_0x014e:\n r4 = r3;\n r3 = r2;\n goto L_0x00c2;\n L_0x0152:\n r2 = r3;\n r3 = r4;\n goto L_0x0099;\n L_0x0156:\n r1 = r2;\n goto L_0x0087;\n L_0x0159:\n r1 = r3;\n r3 = r2;\n r2 = r4;\n r4 = r5;\n goto L_0x00a0;\n L_0x015f:\n r1 = r2;\n goto L_0x00d9;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.bj.a(java.util.Map):com.google.bV\");\n }", "private final void m110460au() {\n /*\n r6 = this;\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r1 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.profile.model.User r0 = r0.getAuthor()\n if (r0 == 0) goto L_0x003e\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r1 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.profile.model.User r0 = r0.getAuthor()\n java.lang.String r1 = \"mAweme.author\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.base.model.UrlModel r0 = r0.getAvatarMedium()\n if (r0 != 0) goto L_0x0024\n goto L_0x003e\n L_0x0024:\n com.ss.android.ugc.aweme.base.ui.RemoteImageView r0 = r6.f89219bm\n com.ss.android.ugc.aweme.feed.model.Aweme r1 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n com.ss.android.ugc.aweme.profile.model.User r1 = r1.getAuthor()\n java.lang.String r2 = \"mAweme.author\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n com.ss.android.ugc.aweme.base.model.UrlModel r1 = r1.getAvatarMedium()\n com.p280ss.android.ugc.aweme.base.C23323e.m76524b(r0, r1)\n goto L_0x004a\n L_0x003e:\n com.ss.android.ugc.aweme.base.ui.RemoteImageView r0 = r6.f89219bm\n r1 = 2131232103(0x7f080567, float:1.8080306E38)\n com.ss.android.ugc.aweme.base.model.AppImageUri r1 = com.p280ss.android.ugc.aweme.base.model.AppImageUri.m76615a(r1)\n com.p280ss.android.ugc.aweme.base.C23323e.m76504a(r0, r1)\n L_0x004a:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n boolean r0 = com.p280ss.android.ugc.aweme.commercialize.utils.C25352e.m83221d(r0)\n if (r0 != 0) goto L_0x0053\n return\n L_0x0053:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n r1 = 3\n boolean r0 = com.p280ss.android.ugc.aweme.commercialize.utils.C25300bx.m83125a(r0, r1)\n r1 = 0\n if (r0 == 0) goto L_0x00a2\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r6.f89216bj\n if (r0 == 0) goto L_0x00d0\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r2 = r2.getAwemeRawAd()\n if (r2 == 0) goto L_0x007b\n com.ss.android.ugc.aweme.commercialize.model.OmVast r2 = r2.getOmVast()\n if (r2 == 0) goto L_0x007b\n com.bytedance.vast.model.Vast r2 = r2.vast\n if (r2 == 0) goto L_0x007b\n java.lang.String r2 = r2.adTitle\n goto L_0x007c\n L_0x007b:\n r2 = r1\n L_0x007c:\n if (r2 != 0) goto L_0x0081\n java.lang.String r2 = \"\"\n goto L_0x009c\n L_0x0081:\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r2 = r2.getAwemeRawAd()\n if (r2 == 0) goto L_0x009b\n com.ss.android.ugc.aweme.commercialize.model.OmVast r2 = r2.getOmVast()\n if (r2 == 0) goto L_0x009b\n com.bytedance.vast.model.Vast r2 = r2.vast\n if (r2 == 0) goto L_0x009b\n java.lang.String r2 = r2.adTitle\n goto L_0x009c\n L_0x009b:\n r2 = r1\n L_0x009c:\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n r0.setText(r2)\n goto L_0x00d0\n L_0x00a2:\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r6.f89216bj\n if (r0 == 0) goto L_0x00d0\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n com.ss.android.ugc.aweme.profile.model.User r2 = r2.getAuthor()\n if (r2 != 0) goto L_0x00b8\n java.lang.String r2 = \"\"\n L_0x00b5:\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n goto L_0x00cd\n L_0x00b8:\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n com.ss.android.ugc.aweme.profile.model.User r2 = r2.getAuthor()\n java.lang.String r3 = \"mAweme.author\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n java.lang.String r2 = r2.getNickname()\n goto L_0x00b5\n L_0x00cd:\n r0.setText(r2)\n L_0x00d0:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 == 0) goto L_0x00e2\n java.lang.String r0 = r0.getAppInstall()\n goto L_0x00e3\n L_0x00e2:\n r0 = r1\n L_0x00e3:\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n boolean r0 = android.text.TextUtils.isEmpty(r0)\n r2 = 1082130432(0x40800000, float:4.0)\n r3 = 8\n if (r0 == 0) goto L_0x011b\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r4 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r4)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 != 0) goto L_0x00ff\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x00ff:\n java.lang.String r4 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r4)\n float r0 = r0.getAppLike()\n int r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))\n if (r0 >= 0) goto L_0x011b\n android.widget.LinearLayout r0 = r6.f89217bk\n if (r0 == 0) goto L_0x0113\n r0.setVisibility(r3)\n L_0x0113:\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r6.f89218bl\n if (r0 == 0) goto L_0x011b\n r4 = 2\n r0.setMaxLines(r4)\n L_0x011b:\n com.ss.android.ugc.aweme.commercialize.ad.AdRatingView r0 = r6.f89207aZ\n if (r0 == 0) goto L_0x013b\n com.ss.android.ugc.aweme.feed.model.Aweme r4 = r6.f77546j\n java.lang.String r5 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r4, r5)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r4 = r4.getAwemeRawAd()\n if (r4 != 0) goto L_0x012f\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x012f:\n java.lang.String r5 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r4, r5)\n float r4 = r4.getAppLike()\n r0.setRatingProgress(r4)\n L_0x013b:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r4 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r4)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 != 0) goto L_0x014b\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x014b:\n java.lang.String r4 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r4)\n float r0 = r0.getAppLike()\n int r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))\n if (r0 >= 0) goto L_0x0166\n com.ss.android.ugc.aweme.commercialize.ad.AdRatingView r0 = r6.f89207aZ\n if (r0 == 0) goto L_0x015f\n r0.setVisibility(r3)\n L_0x015f:\n android.view.View r0 = r6.f89209ba\n if (r0 == 0) goto L_0x0166\n r0.setVisibility(r3)\n L_0x0166:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 == 0) goto L_0x0178\n java.lang.String r0 = r0.getAppInstall()\n goto L_0x0179\n L_0x0178:\n r0 = r1\n L_0x0179:\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n boolean r0 = android.text.TextUtils.isEmpty(r0)\n if (r0 == 0) goto L_0x0190\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r6.f89210bb\n if (r0 == 0) goto L_0x0188\n r0.setVisibility(r3)\n L_0x0188:\n android.view.View r0 = r6.f89209ba\n if (r0 == 0) goto L_0x01ac\n r0.setVisibility(r3)\n goto L_0x01ac\n L_0x0190:\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r6.f89210bb\n if (r0 == 0) goto L_0x01ac\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r4 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r4)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r2 = r2.getAwemeRawAd()\n if (r2 == 0) goto L_0x01a6\n java.lang.String r2 = r2.getAppInstall()\n goto L_0x01a7\n L_0x01a6:\n r2 = r1\n L_0x01a7:\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n r0.setText(r2)\n L_0x01ac:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n java.lang.String r0 = r0.getDesc()\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n boolean r0 = android.text.TextUtils.isEmpty(r0)\n if (r0 != 0) goto L_0x0212\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r6.f89218bl\n if (r0 == 0) goto L_0x01d3\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n java.lang.String r2 = r2.getDesc()\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n r0.setText(r2)\n L_0x01d3:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 == 0) goto L_0x01e4\n java.lang.String r1 = r0.getAdMoreTextual()\n L_0x01e4:\n java.lang.CharSequence r1 = (java.lang.CharSequence) r1\n boolean r0 = android.text.TextUtils.isEmpty(r1)\n if (r0 != 0) goto L_0x021a\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r6.f89218bl\n if (r0 == 0) goto L_0x0211\n com.ss.android.ugc.aweme.feed.model.Aweme r1 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r1 = r1.getAwemeRawAd()\n if (r1 != 0) goto L_0x0200\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x0200:\n java.lang.String r2 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n java.lang.String r1 = r1.getAdMoreTextual()\n java.lang.String r2 = \"mAweme.awemeRawAd!!.adMoreTextual\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n r0.setMoreString(r1)\n L_0x0211:\n return\n L_0x0212:\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r6.f89218bl\n if (r0 == 0) goto L_0x021a\n r0.setVisibility(r3)\n return\n L_0x021a:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.newfollow.p1424vh.CommercialFlowFeedViewHolder.m110460au():void\");\n }", "private void m14047a(@javax.annotation.Nullable okhttp3.internal.p155a.C2918d.C2915a r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = this;\n if (r1 == 0) goto L_0x0005;\n L_0x0002:\n r1.m14100c();\t Catch:{ IOException -> 0x0005 }\n L_0x0005:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a(okhttp3.internal.a.d$a):void\");\n }", "private final com.google.wireless.android.finsky.dfe.p513g.p514a.C7467r m35669b(com.google.protobuf.nano.C7213a r8) {\n /*\n r7 = this;\n r1 = 0;\n L_0x0001:\n r0 = r8.m33550a();\n switch(r0) {\n case 0: goto L_0x000e;\n case 10: goto L_0x000f;\n case 18: goto L_0x001c;\n case 26: goto L_0x0029;\n case 34: goto L_0x003c;\n case 42: goto L_0x0050;\n case 50: goto L_0x0064;\n case 82: goto L_0x0078;\n case 98: goto L_0x008e;\n case 138: goto L_0x00a4;\n case 146: goto L_0x00b9;\n case 152: goto L_0x00c7;\n case 162: goto L_0x0106;\n case 170: goto L_0x011c;\n case 178: goto L_0x012e;\n case 184: goto L_0x0143;\n case 192: goto L_0x0151;\n case 218: goto L_0x015f;\n case 226: goto L_0x0171;\n case 234: goto L_0x0187;\n case 258: goto L_0x019d;\n case 266: goto L_0x01b3;\n case 274: goto L_0x01c8;\n case 290: goto L_0x01de;\n case 298: goto L_0x021e;\n case 306: goto L_0x022c;\n default: goto L_0x0008;\n };\n L_0x0008:\n r0 = super.a(r8, r0);\n if (r0 != 0) goto L_0x0001;\n L_0x000e:\n return r7;\n L_0x000f:\n r0 = r8.m33564f();\n r7.f37912d = r0;\n r0 = r7.f37911c;\n r0 = r0 | 1;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x001c:\n r0 = r8.m33564f();\n r7.f37914f = r0;\n r0 = r7.f37911c;\n r0 = r0 | 4;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x0029:\n r0 = r7.f37916h;\n if (r0 != 0) goto L_0x0034;\n L_0x002d:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.c;\n r0.<init>();\n r7.f37916h = r0;\n L_0x0034:\n r0 = r7.f37916h;\n r8.m33552a(r0);\n r7.f37910a = r1;\n goto L_0x0001;\n L_0x003c:\n r0 = r7.f37917i;\n if (r0 != 0) goto L_0x0047;\n L_0x0040:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.z;\n r0.<init>();\n r7.f37917i = r0;\n L_0x0047:\n r0 = r7.f37917i;\n r8.m33552a(r0);\n r0 = 1;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0050:\n r0 = r7.f37919k;\n if (r0 != 0) goto L_0x005b;\n L_0x0054:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.f;\n r0.<init>();\n r7.f37919k = r0;\n L_0x005b:\n r0 = r7.f37919k;\n r8.m33552a(r0);\n r0 = 3;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0064:\n r0 = r7.f37922n;\n if (r0 != 0) goto L_0x006f;\n L_0x0068:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.o;\n r0.<init>();\n r7.f37922n = r0;\n L_0x006f:\n r0 = r7.f37922n;\n r8.m33552a(r0);\n r0 = 6;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0078:\n r0 = r7.f37924p;\n if (r0 != 0) goto L_0x0083;\n L_0x007c:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.d;\n r0.<init>();\n r7.f37924p = r0;\n L_0x0083:\n r0 = r7.f37924p;\n r8.m33552a(r0);\n r0 = 8;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x008e:\n r0 = r7.f37926r;\n if (r0 != 0) goto L_0x0099;\n L_0x0092:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.n;\n r0.<init>();\n r7.f37926r = r0;\n L_0x0099:\n r0 = r7.f37926r;\n r8.m33552a(r0);\n r0 = 10;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x00a4:\n r0 = r7.f37923o;\n if (r0 != 0) goto L_0x00af;\n L_0x00a8:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.q;\n r0.<init>();\n r7.f37923o = r0;\n L_0x00af:\n r0 = r7.f37923o;\n r8.m33552a(r0);\n r0 = 7;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x00b9:\n r0 = r8.m33565g();\n r7.f37931w = r0;\n r0 = r7.f37911c;\n r0 = r0 | 16;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x00c7:\n r2 = r7.f37911c;\n r2 = r2 | 2;\n r7.f37911c = r2;\n r2 = r8.m33573o();\n r3 = r8.m33567i();\t Catch:{ IllegalArgumentException -> 0x00f3 }\n switch(r3) {\n case 0: goto L_0x00fc;\n case 101: goto L_0x00fc;\n case 102: goto L_0x00fc;\n case 103: goto L_0x00fc;\n case 105: goto L_0x00fc;\n case 106: goto L_0x00fc;\n case 107: goto L_0x00fc;\n case 108: goto L_0x00fc;\n case 109: goto L_0x00fc;\n case 111: goto L_0x00fc;\n case 112: goto L_0x00fc;\n case 113: goto L_0x00fc;\n case 114: goto L_0x00fc;\n case 115: goto L_0x00fc;\n case 116: goto L_0x00fc;\n case 117: goto L_0x00fc;\n case 118: goto L_0x00fc;\n case 119: goto L_0x00fc;\n case 120: goto L_0x00fc;\n case 201: goto L_0x00fc;\n case 202: goto L_0x00fc;\n case 203: goto L_0x00fc;\n case 204: goto L_0x00fc;\n case 205: goto L_0x00fc;\n case 206: goto L_0x00fc;\n case 207: goto L_0x00fc;\n case 209: goto L_0x00fc;\n case 210: goto L_0x00fc;\n case 211: goto L_0x00fc;\n case 212: goto L_0x00fc;\n case 213: goto L_0x00fc;\n case 214: goto L_0x00fc;\n case 215: goto L_0x00fc;\n case 217: goto L_0x00fc;\n case 218: goto L_0x00fc;\n case 219: goto L_0x00fc;\n case 220: goto L_0x00fc;\n case 221: goto L_0x00fc;\n case 222: goto L_0x00fc;\n case 223: goto L_0x00fc;\n case 224: goto L_0x00fc;\n case 301: goto L_0x00fc;\n case 302: goto L_0x00fc;\n case 304: goto L_0x00fc;\n case 305: goto L_0x00fc;\n case 307: goto L_0x00fc;\n case 309: goto L_0x00fc;\n case 310: goto L_0x00fc;\n case 311: goto L_0x00fc;\n case 312: goto L_0x00fc;\n case 313: goto L_0x00fc;\n case 314: goto L_0x00fc;\n case 316: goto L_0x00fc;\n case 317: goto L_0x00fc;\n case 318: goto L_0x00fc;\n case 319: goto L_0x00fc;\n case 320: goto L_0x00fc;\n case 321: goto L_0x00fc;\n case 322: goto L_0x00fc;\n case 323: goto L_0x00fc;\n case 324: goto L_0x00fc;\n case 325: goto L_0x00fc;\n case 326: goto L_0x00fc;\n case 327: goto L_0x00fc;\n case 328: goto L_0x00fc;\n case 401: goto L_0x00fc;\n case 402: goto L_0x00fc;\n case 403: goto L_0x00fc;\n case 404: goto L_0x00fc;\n case 405: goto L_0x00fc;\n case 406: goto L_0x00fc;\n case 407: goto L_0x00fc;\n case 408: goto L_0x00fc;\n case 409: goto L_0x00fc;\n case 410: goto L_0x00fc;\n case 411: goto L_0x00fc;\n case 412: goto L_0x00fc;\n case 501: goto L_0x00fc;\n case 502: goto L_0x00fc;\n case 503: goto L_0x00fc;\n case 504: goto L_0x00fc;\n case 505: goto L_0x00fc;\n case 506: goto L_0x00fc;\n case 507: goto L_0x00fc;\n case 508: goto L_0x00fc;\n case 509: goto L_0x00fc;\n case 510: goto L_0x00fc;\n case 511: goto L_0x00fc;\n case 512: goto L_0x00fc;\n case 513: goto L_0x00fc;\n case 514: goto L_0x00fc;\n case 515: goto L_0x00fc;\n case 601: goto L_0x00fc;\n case 701: goto L_0x00fc;\n case 702: goto L_0x00fc;\n case 703: goto L_0x00fc;\n case 704: goto L_0x00fc;\n case 705: goto L_0x00fc;\n case 706: goto L_0x00fc;\n case 707: goto L_0x00fc;\n case 708: goto L_0x00fc;\n case 709: goto L_0x00fc;\n case 710: goto L_0x00fc;\n case 711: goto L_0x00fc;\n case 801: goto L_0x00fc;\n case 802: goto L_0x00fc;\n case 803: goto L_0x00fc;\n case 804: goto L_0x00fc;\n case 805: goto L_0x00fc;\n case 806: goto L_0x00fc;\n case 807: goto L_0x00fc;\n case 808: goto L_0x00fc;\n case 809: goto L_0x00fc;\n case 810: goto L_0x00fc;\n case 811: goto L_0x00fc;\n case 812: goto L_0x00fc;\n case 901: goto L_0x00fc;\n case 902: goto L_0x00fc;\n case 903: goto L_0x00fc;\n case 904: goto L_0x00fc;\n case 905: goto L_0x00fc;\n case 906: goto L_0x00fc;\n case 907: goto L_0x00fc;\n case 908: goto L_0x00fc;\n case 909: goto L_0x00fc;\n case 910: goto L_0x00fc;\n case 911: goto L_0x00fc;\n case 912: goto L_0x00fc;\n case 913: goto L_0x00fc;\n case 914: goto L_0x00fc;\n case 915: goto L_0x00fc;\n case 916: goto L_0x00fc;\n case 1001: goto L_0x00fc;\n case 1002: goto L_0x00fc;\n default: goto L_0x00d8;\n };\t Catch:{ IllegalArgumentException -> 0x00f3 }\n L_0x00d8:\n r4 = new java.lang.IllegalArgumentException;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r5 = 44;\n r6 = new java.lang.StringBuilder;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r6.<init>(r5);\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r3 = r6.append(r3);\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r5 = \" is not a valid enum RelationType\";\n r3 = r3.append(r5);\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r3 = r3.toString();\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r4.<init>(r3);\t Catch:{ IllegalArgumentException -> 0x00f3 }\n throw r4;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n L_0x00f3:\n r3 = move-exception;\n r8.m33562e(r2);\n r7.a(r8, r0);\n goto L_0x0001;\n L_0x00fc:\n r7.f37913e = r3;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r3 = r7.f37911c;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n r3 = r3 | 2;\n r7.f37911c = r3;\t Catch:{ IllegalArgumentException -> 0x00f3 }\n goto L_0x0001;\n L_0x0106:\n r0 = r7.f37927s;\n if (r0 != 0) goto L_0x0111;\n L_0x010a:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.m;\n r0.<init>();\n r7.f37927s = r0;\n L_0x0111:\n r0 = r7.f37927s;\n r8.m33552a(r0);\n r0 = 11;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x011c:\n r0 = r7.f37932x;\n if (r0 != 0) goto L_0x0127;\n L_0x0120:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.ag;\n r0.<init>();\n r7.f37932x = r0;\n L_0x0127:\n r0 = r7.f37932x;\n r8.m33552a(r0);\n goto L_0x0001;\n L_0x012e:\n r0 = r7.f37920l;\n if (r0 != 0) goto L_0x0139;\n L_0x0132:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.t;\n r0.<init>();\n r7.f37920l = r0;\n L_0x0139:\n r0 = r7.f37920l;\n r8.m33552a(r0);\n r0 = 4;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0143:\n r0 = r8.m33560d();\n r7.f37933y = r0;\n r0 = r7.f37911c;\n r0 = r0 | 32;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x0151:\n r0 = r8.m33560d();\n r7.f37934z = r0;\n r0 = r7.f37911c;\n r0 = r0 | 64;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x015f:\n r0 = r7.f37908A;\n if (r0 != 0) goto L_0x016a;\n L_0x0163:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.k;\n r0.<init>();\n r7.f37908A = r0;\n L_0x016a:\n r0 = r7.f37908A;\n r8.m33552a(r0);\n goto L_0x0001;\n L_0x0171:\n r0 = r7.f37929u;\n if (r0 != 0) goto L_0x017c;\n L_0x0175:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.y;\n r0.<init>();\n r7.f37929u = r0;\n L_0x017c:\n r0 = r7.f37929u;\n r8.m33552a(r0);\n r0 = 13;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x0187:\n r0 = r7.f37928t;\n if (r0 != 0) goto L_0x0192;\n L_0x018b:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.b;\n r0.<init>();\n r7.f37928t = r0;\n L_0x0192:\n r0 = r7.f37928t;\n r8.m33552a(r0);\n r0 = 12;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x019d:\n r0 = r7.f37925q;\n if (r0 != 0) goto L_0x01a8;\n L_0x01a1:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.e;\n r0.<init>();\n r7.f37925q = r0;\n L_0x01a8:\n r0 = r7.f37925q;\n r8.m33552a(r0);\n r0 = 9;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x01b3:\n r0 = r7.f37921m;\n if (r0 != 0) goto L_0x01be;\n L_0x01b7:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.h;\n r0.<init>();\n r7.f37921m = r0;\n L_0x01be:\n r0 = r7.f37921m;\n r8.m33552a(r0);\n r0 = 5;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x01c8:\n r0 = r7.f37930v;\n if (r0 != 0) goto L_0x01d3;\n L_0x01cc:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.x;\n r0.<init>();\n r7.f37930v = r0;\n L_0x01d3:\n r0 = r7.f37930v;\n r8.m33552a(r0);\n r0 = 14;\n r7.f37910a = r0;\n goto L_0x0001;\n L_0x01de:\n r0 = 290; // 0x122 float:4.06E-43 double:1.433E-321;\n r2 = com.google.protobuf.nano.C7222l.m33624a(r8, r0);\n r0 = r7.f37909B;\n if (r0 != 0) goto L_0x020a;\n L_0x01e8:\n r0 = r1;\n L_0x01e9:\n r2 = r2 + r0;\n r2 = new com.google.wireless.android.finsky.dfe.p513g.p514a.C7468s[r2];\n if (r0 == 0) goto L_0x01f3;\n L_0x01ee:\n r3 = r7.f37909B;\n java.lang.System.arraycopy(r3, r1, r2, r1, r0);\n L_0x01f3:\n r3 = r2.length;\n r3 = r3 + -1;\n if (r0 >= r3) goto L_0x020e;\n L_0x01f8:\n r3 = new com.google.wireless.android.finsky.dfe.g.a.s;\n r3.<init>();\n r2[r0] = r3;\n r3 = r2[r0];\n r8.m33552a(r3);\n r8.m33550a();\n r0 = r0 + 1;\n goto L_0x01f3;\n L_0x020a:\n r0 = r7.f37909B;\n r0 = r0.length;\n goto L_0x01e9;\n L_0x020e:\n r3 = new com.google.wireless.android.finsky.dfe.g.a.s;\n r3.<init>();\n r2[r0] = r3;\n r0 = r2[r0];\n r8.m33552a(r0);\n r7.f37909B = r2;\n goto L_0x0001;\n L_0x021e:\n r0 = r8.m33564f();\n r7.f37915g = r0;\n r0 = r7.f37911c;\n r0 = r0 | 8;\n r7.f37911c = r0;\n goto L_0x0001;\n L_0x022c:\n r0 = r7.f37918j;\n if (r0 != 0) goto L_0x0237;\n L_0x0230:\n r0 = new com.google.wireless.android.finsky.dfe.g.a.w;\n r0.<init>();\n r7.f37918j = r0;\n L_0x0237:\n r0 = r7.f37918j;\n r8.m33552a(r0);\n r0 = 2;\n r7.f37910a = r0;\n goto L_0x0001;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.wireless.android.finsky.dfe.g.a.r.b(com.google.protobuf.nano.a):com.google.wireless.android.finsky.dfe.g.a.r\");\n }", "public long mo915b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = -1;\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n if (r2 == 0) goto L_0x000d;\t Catch:{ NumberFormatException -> 0x000e }\n L_0x0006:\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n r2 = java.lang.Long.parseLong(r2);\t Catch:{ NumberFormatException -> 0x000e }\n r0 = r2;\n L_0x000d:\n return r0;\n L_0x000e:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.b.b():long\");\n }", "private static java.lang.String[] a(android.content.Context r3, com.xiaomi.xmpush.thrift.u r4) {\n /*\n java.lang.String r0 = r4.h()\n java.lang.String r1 = r4.j()\n java.util.Map r4 = r4.s()\n if (r4 == 0) goto L_0x0073\n android.content.res.Resources r2 = r3.getResources()\n android.util.DisplayMetrics r2 = r2.getDisplayMetrics()\n int r2 = r2.widthPixels\n android.content.res.Resources r3 = r3.getResources()\n android.util.DisplayMetrics r3 = r3.getDisplayMetrics()\n float r3 = r3.density\n float r2 = (float) r2\n float r2 = r2 / r3\n r3 = 1056964608(0x3f000000, float:0.5)\n float r2 = r2 + r3\n java.lang.Float r3 = java.lang.Float.valueOf(r2)\n int r3 = r3.intValue()\n r2 = 320(0x140, float:4.48E-43)\n if (r3 > r2) goto L_0x0051\n java.lang.String r3 = \"title_short\"\n java.lang.Object r3 = r4.get(r3)\n java.lang.String r3 = (java.lang.String) r3\n boolean r2 = android.text.TextUtils.isEmpty(r3)\n if (r2 != 0) goto L_0x0042\n r0 = r3\n L_0x0042:\n java.lang.String r3 = \"description_short\"\n java.lang.Object r3 = r4.get(r3)\n java.lang.String r3 = (java.lang.String) r3\n boolean r4 = android.text.TextUtils.isEmpty(r3)\n if (r4 != 0) goto L_0x0073\n goto L_0x0072\n L_0x0051:\n r2 = 360(0x168, float:5.04E-43)\n if (r3 <= r2) goto L_0x0073\n java.lang.String r3 = \"title_long\"\n java.lang.Object r3 = r4.get(r3)\n java.lang.String r3 = (java.lang.String) r3\n boolean r2 = android.text.TextUtils.isEmpty(r3)\n if (r2 != 0) goto L_0x0064\n r0 = r3\n L_0x0064:\n java.lang.String r3 = \"description_long\"\n java.lang.Object r3 = r4.get(r3)\n java.lang.String r3 = (java.lang.String) r3\n boolean r4 = android.text.TextUtils.isEmpty(r3)\n if (r4 != 0) goto L_0x0073\n L_0x0072:\n r1 = r3\n L_0x0073:\n r3 = 2\n java.lang.String[] r3 = new java.lang.String[r3]\n r4 = 0\n r3[r4] = r0\n r4 = 1\n r3[r4] = r1\n return r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.xiaomi.push.service.ah.a(android.content.Context, com.xiaomi.xmpush.thrift.u):java.lang.String[]\");\n }", "private static boolean method_2689(aji var0, ahb var1, int var2, int var3, int var4, boolean var5) {\r\n boolean var10;\r\n label123: {\r\n String[] var6 = class_752.method_4253();\r\n aji var10000 = var0;\r\n aji var10001 = class_1192.field_6076;\r\n if(var6 != null) {\r\n if(var0 == class_1192.field_6076) {\r\n break label123;\r\n }\r\n\r\n var10000 = var0;\r\n var10001 = class_1192.field_6088;\r\n }\r\n\r\n label124: {\r\n if(var6 != null) {\r\n if(var10000 == var10001) {\r\n break label123;\r\n }\r\n\r\n var10000 = var0;\r\n if(var6 == null) {\r\n break label124;\r\n }\r\n\r\n var10001 = class_1192.field_6109;\r\n }\r\n\r\n if(var10000 == var10001) {\r\n break label123;\r\n }\r\n\r\n var10000 = var0;\r\n }\r\n\r\n String var9 = var10000.method_2510();\r\n String[] var11 = field_2148;\r\n var10 = var9.equals(\"tile.pumpkinStem\");\r\n if(var6 == null) {\r\n return var10;\r\n }\r\n\r\n if(!var10) {\r\n label126: {\r\n label127: {\r\n var10000 = var0;\r\n var10001 = class_1192.field_6128;\r\n if(var6 != null) {\r\n if(var0 == class_1192.field_6128) {\r\n break label126;\r\n }\r\n\r\n var10000 = var0;\r\n if(var6 == null) {\r\n break label127;\r\n }\r\n\r\n var10001 = class_1192.field_6112;\r\n }\r\n\r\n if(var10000 == var10001) {\r\n break label126;\r\n }\r\n\r\n var10000 = var0;\r\n }\r\n\r\n int var8;\r\n label88: {\r\n label129: {\r\n label130: {\r\n label85: {\r\n class_420 var12 = class_1192.field_6060;\r\n if(var6 != null) {\r\n if(var10000 == class_1192.field_6060) {\r\n break label85;\r\n }\r\n\r\n var10000 = var0;\r\n if(var6 == null) {\r\n break label130;\r\n }\r\n\r\n var12 = class_1192.field_6056;\r\n }\r\n\r\n if(var10000 != var12) {\r\n var10000 = var0;\r\n break label130;\r\n }\r\n }\r\n\r\n var8 = method_2687(var1.method_33(var2, var3, var4));\r\n if(var6 == null) {\r\n break label88;\r\n }\r\n\r\n if(var8 != 0) {\r\n return false;\r\n }\r\n break label129;\r\n }\r\n\r\n float var13;\r\n var8 = (var13 = var10000.method_2439(var1, var2, var3, var4) - -1.0F) == 0.0F?0:(var13 < 0.0F?-1:1);\r\n if(var6 != null) {\r\n if(var8 == 0) {\r\n return false;\r\n }\r\n\r\n var8 = var0.method_2514();\r\n }\r\n\r\n byte var7 = 2;\r\n if(var6 != null) {\r\n if(var8 == 2) {\r\n return false;\r\n }\r\n\r\n var8 = var0.method_2514();\r\n if(var6 == null) {\r\n break label88;\r\n }\r\n\r\n var7 = 1;\r\n }\r\n\r\n if(var8 == var7) {\r\n var10 = var5;\r\n if(var6 != null) {\r\n if(!var5) {\r\n return false;\r\n }\r\n\r\n var10 = true;\r\n }\r\n\r\n return var10;\r\n }\r\n }\r\n\r\n var8 = var0 instanceof class_28;\r\n }\r\n\r\n if(var6 != null) {\r\n var8 = var8 == 0?1:0;\r\n }\r\n\r\n return (boolean)var8;\r\n }\r\n }\r\n }\r\n\r\n var10 = false;\r\n return var10;\r\n }", "public void test427827() throws Exception\n {\n // line 6 column 1 - Warning: missing </a> before <a>\n // line 7 column 6 - Warning: discarding unexpected </a>\n // 2 warnings, 0 errors were found!\n\n executeTidyTest(\"427827.html\");\n assertWarnings(2);\n }", "private void decompose(List<Object> elementPairs, List<Object> printerList, List<Object> parserList) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[692]++;\r\n int size = elementPairs.size();\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[693]++;\nbyte CodeCoverTryBranchHelper_L29 = 0;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[85]++;\n\n\nint CodeCoverConditionCoverageHelper_C205;\r\n for (int i=0;(((((CodeCoverConditionCoverageHelper_C205 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C205 |= (2)) == 0 || true) &&\n ((i<size) && \n ((CodeCoverConditionCoverageHelper_C205 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[205].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C205, 1) || true)) || (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[205].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C205, 1) && false); i+=2) {\nif (CodeCoverTryBranchHelper_L29 == 0) {\n CodeCoverTryBranchHelper_L29++;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[85]--;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[86]++;\n} else if (CodeCoverTryBranchHelper_L29 == 1) {\n CodeCoverTryBranchHelper_L29++;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[86]--;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[87]++;\n}\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[694]++;\r\n Object element = elementPairs.get(i);\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[695]++;\nint CodeCoverConditionCoverageHelper_C206;\r\n if ((((((CodeCoverConditionCoverageHelper_C206 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C206 |= (2)) == 0 || true) &&\n ((element instanceof DateTimePrinter) && \n ((CodeCoverConditionCoverageHelper_C206 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[206].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C206, 1) || true)) || (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[206].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C206, 1) && false)) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[422]++;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[696]++;\nint CodeCoverConditionCoverageHelper_C207;\r\n if ((((((CodeCoverConditionCoverageHelper_C207 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C207 |= (2)) == 0 || true) &&\n ((element instanceof Composite) && \n ((CodeCoverConditionCoverageHelper_C207 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[207].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C207, 1) || true)) || (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[207].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C207, 1) && false)) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[424]++;\r\n addArrayToList(printerList, ((Composite)element).iPrinters);\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[697]++;\n\r\n } else {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[425]++;\r\n printerList.add(element);\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[698]++;\r\n }\n\r\n } else {\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[423]++;}\r\n\r\n element = elementPairs.get(i + 1);\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[699]++;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[700]++;\nint CodeCoverConditionCoverageHelper_C208;\r\n if ((((((CodeCoverConditionCoverageHelper_C208 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C208 |= (2)) == 0 || true) &&\n ((element instanceof DateTimeParser) && \n ((CodeCoverConditionCoverageHelper_C208 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[208].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C208, 1) || true)) || (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[208].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C208, 1) && false)) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[426]++;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[701]++;\nint CodeCoverConditionCoverageHelper_C209;\r\n if ((((((CodeCoverConditionCoverageHelper_C209 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C209 |= (2)) == 0 || true) &&\n ((element instanceof Composite) && \n ((CodeCoverConditionCoverageHelper_C209 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[209].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C209, 1) || true)) || (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[209].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C209, 1) && false)) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[428]++;\r\n addArrayToList(parserList, ((Composite)element).iParsers);\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[702]++;\n\r\n } else {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[429]++;\r\n parserList.add(element);\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[703]++;\r\n }\n\r\n } else {\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[427]++;}\r\n }\r\n }", "private void m3011a(android.content.Context r6, int r7) {\n /*\n r5 = this;\n android.content.res.Resources r0 = r6.getResources()\n android.content.res.XmlResourceParser r7 = r0.getXml(r7)\n r0 = 0\n int r1 = r7.getEventType() // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n L_0x000d:\n r2 = 1\n if (r1 == r2) goto L_0x009f\n if (r1 == 0) goto L_0x008d\n switch(r1) {\n case 2: goto L_0x0017;\n case 3: goto L_0x0090;\n default: goto L_0x0015;\n } // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n L_0x0015:\n goto L_0x0090\n L_0x0017:\n java.lang.String r1 = r7.getName() // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n r3 = -1\n int r4 = r1.hashCode() // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n switch(r4) {\n case -1349929691: goto L_0x004b;\n case 80204913: goto L_0x0041;\n case 1382829617: goto L_0x0038;\n case 1657696882: goto L_0x002e;\n case 1901439077: goto L_0x0024;\n default: goto L_0x0023;\n } // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n L_0x0023:\n goto L_0x0055\n L_0x0024:\n java.lang.String r2 = \"Variant\"\n boolean r2 = r1.equals(r2) // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n if (r2 == 0) goto L_0x0055\n r2 = 3\n goto L_0x0056\n L_0x002e:\n java.lang.String r2 = \"layoutDescription\"\n boolean r2 = r1.equals(r2) // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n if (r2 == 0) goto L_0x0055\n r2 = 0\n goto L_0x0056\n L_0x0038:\n java.lang.String r4 = \"StateSet\"\n boolean r4 = r1.equals(r4) // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n if (r4 == 0) goto L_0x0055\n goto L_0x0056\n L_0x0041:\n java.lang.String r2 = \"State\"\n boolean r2 = r1.equals(r2) // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n if (r2 == 0) goto L_0x0055\n r2 = 2\n goto L_0x0056\n L_0x004b:\n java.lang.String r2 = \"ConstraintSet\"\n boolean r2 = r1.equals(r2) // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n if (r2 == 0) goto L_0x0055\n r2 = 4\n goto L_0x0056\n L_0x0055:\n r2 = -1\n L_0x0056:\n switch(r2) {\n case 0: goto L_0x0090;\n case 1: goto L_0x0090;\n case 2: goto L_0x006b;\n case 3: goto L_0x0060;\n case 4: goto L_0x005c;\n default: goto L_0x0059;\n } // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n L_0x0059:\n java.lang.String r2 = \"ConstraintLayoutStates\"\n goto L_0x0078\n L_0x005c:\n r5.m3012a(r6, r7) // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n goto L_0x0090\n L_0x0060:\n androidx.constraintlayout.widget.d$b r1 = new androidx.constraintlayout.widget.d$b // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n r1.<init>(r6, r7) // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n if (r0 == 0) goto L_0x0090\n r0.mo3288a(r1) // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n goto L_0x0090\n L_0x006b:\n androidx.constraintlayout.widget.d$a r0 = new androidx.constraintlayout.widget.d$a // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n r0.<init>(r6, r7) // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n android.util.SparseArray<androidx.constraintlayout.widget.d$a> r1 = r5.f2572e // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n int r2 = r0.f2575a // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n r1.put(r2, r0) // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n goto L_0x0090\n L_0x0078:\n java.lang.StringBuilder r3 = new java.lang.StringBuilder // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n r3.<init>() // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n java.lang.String r4 = \"unknown tag \"\n r3.append(r4) // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n r3.append(r1) // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n java.lang.String r1 = r3.toString() // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n android.util.Log.v(r2, r1) // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n goto L_0x0090\n L_0x008d:\n r7.getName() // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n L_0x0090:\n int r1 = r7.next() // Catch:{ XmlPullParserException -> 0x009b, IOException -> 0x0096 }\n goto L_0x000d\n L_0x0096:\n r6 = move-exception\n r6.printStackTrace()\n goto L_0x009f\n L_0x009b:\n r6 = move-exception\n r6.printStackTrace()\n L_0x009f:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: androidx.constraintlayout.widget.C0806d.m3011a(android.content.Context, int):void\");\n }", "private void m25427g() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19111m;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = r2.f19104f;\t Catch:{ Exception -> 0x000f }\n r0 = android.support.v4.content.C0396d.m1465a(r0);\t Catch:{ Exception -> 0x000f }\n r1 = r2.f19111m;\t Catch:{ Exception -> 0x000f }\n r0.m1468a(r1);\t Catch:{ Exception -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.w.g():void\");\n }", "static void m13383b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x000a }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x000a }\n r2 = 0;\t Catch:{ Exception -> 0x000a }\n r0.delete(r1, r2, r2);\t Catch:{ Exception -> 0x000a }\n L_0x000a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.b():void\");\n }", "public boolean mo3969a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f19005h;\n if (r0 != 0) goto L_0x0011;\n L_0x0004:\n r0 = r4.f19004g;\n if (r0 == 0) goto L_0x000f;\n L_0x0008:\n r0 = r4.f19004g;\n r1 = com.facebook.ads.C1700b.f5123e;\n r0.mo1313a(r4, r1);\n L_0x000f:\n r0 = 0;\n return r0;\n L_0x0011:\n r0 = new android.content.Intent;\n r1 = r4.f19002e;\n r2 = com.facebook.ads.AudienceNetworkActivity.class;\n r0.<init>(r1, r2);\n r1 = \"predefinedOrientationKey\";\n r2 = r4.m25306b();\n r0.putExtra(r1, r2);\n r1 = \"uniqueId\";\n r2 = r4.f18999b;\n r0.putExtra(r1, r2);\n r1 = \"placementId\";\n r2 = r4.f19000c;\n r0.putExtra(r1, r2);\n r1 = \"requestTime\";\n r2 = r4.f19001d;\n r0.putExtra(r1, r2);\n r1 = \"viewType\";\n r2 = r4.f19009l;\n r0.putExtra(r1, r2);\n r1 = \"useCache\";\n r2 = r4.f19010m;\n r0.putExtra(r1, r2);\n r1 = r4.f19008k;\n if (r1 == 0) goto L_0x0052;\n L_0x004a:\n r1 = \"ad_data_bundle\";\n r2 = r4.f19008k;\n r0.putExtra(r1, r2);\n goto L_0x005b;\n L_0x0052:\n r1 = r4.f19006i;\n if (r1 == 0) goto L_0x005b;\n L_0x0056:\n r1 = r4.f19006i;\n r1.m18953a(r0);\n L_0x005b:\n r1 = 268435456; // 0x10000000 float:2.5243549E-29 double:1.32624737E-315;\n r0.addFlags(r1);\n r1 = r4.f19002e;\t Catch:{ ActivityNotFoundException -> 0x0066 }\n r1.startActivity(r0);\t Catch:{ ActivityNotFoundException -> 0x0066 }\n goto L_0x0072;\n L_0x0066:\n r1 = r4.f19002e;\n r2 = com.facebook.ads.InterstitialAdActivity.class;\n r0.setClass(r1, r2);\n r1 = r4.f19002e;\n r1.startActivity(r0);\n L_0x0072:\n r0 = 1;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.k.a():boolean\");\n }", "@Override\r\n protected void parseIssues()\r\n {\n\r\n }", "private void m1654a(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m322b();\n r7 = r7.m321a();\n r1 = 0;\n L_0x0009:\n r2 = \"http.request\";\n r8.mo160a(r2, r7);\n r1 = r1 + 1;\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x002f }\n if (r2 != 0) goto L_0x0020;\t Catch:{ IOException -> 0x002f }\n L_0x0018:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r2.mo2023a(r0, r8, r3);\t Catch:{ IOException -> 0x002f }\n goto L_0x002b;\t Catch:{ IOException -> 0x002f }\n L_0x0020:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r3 = p000a.p001a.p002a.p003a.p032l.C0150c.m428a(r3);\t Catch:{ IOException -> 0x002f }\n r2.mo1931b(r3);\t Catch:{ IOException -> 0x002f }\n L_0x002b:\n r6.m1660a(r0, r8);\t Catch:{ IOException -> 0x002f }\n return;\n L_0x002f:\n r2 = move-exception;\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0035 }\n r3.close();\t Catch:{ IOException -> 0x0035 }\n L_0x0035:\n r3 = r6.f1520h;\n r3 = r3.retryRequest(r2, r1, r8);\n if (r3 == 0) goto L_0x00a0;\n L_0x003d:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x0009;\n L_0x0045:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when connecting to \";\n r4.append(r5);\n r4.append(r0);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x0088;\n L_0x007f:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x0088:\n r2 = r6.f1513a;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"Retrying connect to \";\n r3.append(r4);\n r3.append(r0);\n r3 = r3.toString();\n r2.m269d(r3);\n goto L_0x0009;\n L_0x00a0:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.a(a.a.a.a.i.b.x, a.a.a.a.n.e):void\");\n }", "private java.lang.String a(java.lang.String r6, com.google.b5 r7, com.google.e5 r8, java.lang.String r9) {\n /*\n r5 = this;\n r2 = F;\n r0 = r7.e();\n r1 = r5.o;\n r3 = r7.i();\n r1 = r1.a(r3);\n r3 = r1.matcher(r6);\n r1 = \"\";\n r1 = com.google.e5.NATIONAL;\t Catch:{ RuntimeException -> 0x0092 }\n if (r8 != r1) goto L_0x004b;\n L_0x001b:\n if (r9 == 0) goto L_0x004b;\n L_0x001d:\n r1 = r9.length();\t Catch:{ RuntimeException -> 0x0096 }\n if (r1 <= 0) goto L_0x004b;\n L_0x0023:\n r1 = r7.d();\t Catch:{ RuntimeException -> 0x0096 }\n r1 = r1.length();\t Catch:{ RuntimeException -> 0x0096 }\n if (r1 <= 0) goto L_0x004b;\n L_0x002d:\n r1 = r7.d();\n r4 = f;\n r1 = r4.matcher(r1);\n r1 = r1.replaceFirst(r9);\n r4 = z;\n r0 = r4.matcher(r0);\n r0 = r0.replaceFirst(r1);\n r1 = r3.replaceAll(r0);\n if (r2 == 0) goto L_0x009c;\n L_0x004b:\n r1 = r7.k();\n r4 = com.google.e5.NATIONAL;\t Catch:{ RuntimeException -> 0x0098 }\n if (r8 != r4) goto L_0x006b;\n L_0x0053:\n if (r1 == 0) goto L_0x006b;\n L_0x0055:\n r4 = r1.length();\t Catch:{ RuntimeException -> 0x009a }\n if (r4 <= 0) goto L_0x006b;\n L_0x005b:\n r4 = z;\n r4 = r4.matcher(r0);\n r1 = r4.replaceFirst(r1);\n r1 = r3.replaceAll(r1);\n if (r2 == 0) goto L_0x009c;\n L_0x006b:\n r0 = r3.replaceAll(r0);\n L_0x006f:\n r1 = com.google.e5.RFC3966;\n if (r8 != r1) goto L_0x0091;\n L_0x0073:\n r1 = p;\n r1 = r1.matcher(r0);\n r2 = r1.lookingAt();\n if (r2 == 0) goto L_0x0086;\n L_0x007f:\n r0 = \"\";\n r0 = r1.replaceFirst(r0);\n L_0x0086:\n r0 = r1.reset(r0);\n r1 = \"-\";\n r0 = r0.replaceAll(r1);\n L_0x0091:\n return r0;\n L_0x0092:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x0094 }\n L_0x0094:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x0096 }\n L_0x0096:\n r0 = move-exception;\n throw r0;\n L_0x0098:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x009a }\n L_0x009a:\n r0 = move-exception;\n throw r0;\n L_0x009c:\n r0 = r1;\n goto L_0x006f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, com.google.b5, com.google.e5, java.lang.String):java.lang.String\");\n }", "public static boolean m19464a(java.lang.String r3, int[] r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r3);\n r1 = 0;\n if (r0 == 0) goto L_0x0008;\n L_0x0007:\n return r1;\n L_0x0008:\n r0 = r4.length;\n r2 = 2;\n if (r0 == r2) goto L_0x000d;\n L_0x000c:\n return r1;\n L_0x000d:\n r0 = \"x\";\n r3 = r3.split(r0);\n r0 = r3.length;\n if (r0 == r2) goto L_0x0017;\n L_0x0016:\n return r1;\n L_0x0017:\n r0 = r3[r1];\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = java.lang.Integer.parseInt(r0);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r1] = r0;\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = 1;\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = r3[r0];\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = java.lang.Integer.parseInt(r3);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r0] = r3;\t Catch:{ NumberFormatException -> 0x0029 }\n return r0;\n L_0x0029:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.arp.a(java.lang.String, int[]):boolean\");\n }", "public final void m15744a(com.p111d.p112a.p114b.C5301g r9) {\n /*\n r8 = this;\n r0 = r8.f17783i;\n r1 = r8.f17781g;\n r2 = 0;\n r3 = 1;\n if (r1 == 0) goto L_0x0010;\n L_0x0008:\n r4 = r0.m4038b();\n if (r4 == 0) goto L_0x0010;\n L_0x000e:\n r4 = r3;\n goto L_0x0011;\n L_0x0010:\n r4 = r2;\n L_0x0011:\n r5 = -1;\n L_0x0012:\n r5 = r5 + r3;\n r6 = 16;\n if (r5 < r6) goto L_0x0029;\n L_0x0017:\n r0 = r0.m4032a();\n if (r0 == 0) goto L_0x0148;\n L_0x001d:\n if (r1 == 0) goto L_0x0027;\n L_0x001f:\n r4 = r0.m4038b();\n if (r4 == 0) goto L_0x0027;\n L_0x0025:\n r4 = r3;\n goto L_0x0028;\n L_0x0027:\n r4 = r2;\n L_0x0028:\n r5 = r2;\n L_0x0029:\n r6 = r0.m4031a(r5);\n if (r6 == 0) goto L_0x0148;\n L_0x002f:\n if (r4 == 0) goto L_0x0043;\n L_0x0031:\n r7 = r0.m4039c(r5);\n if (r7 == 0) goto L_0x003a;\n L_0x0037:\n r9.writeObjectId(r7);\n L_0x003a:\n r7 = r0.m4040d(r5);\n if (r7 == 0) goto L_0x0043;\n L_0x0040:\n r9.writeTypeId(r7);\n L_0x0043:\n r7 = com.p111d.p112a.p121c.p138m.C6523u.C15401.f4807a;\n r6 = r6.ordinal();\n r6 = r7[r6];\n switch(r6) {\n case 1: goto L_0x0143;\n case 2: goto L_0x013e;\n case 3: goto L_0x0139;\n case 4: goto L_0x0134;\n case 5: goto L_0x011e;\n case 6: goto L_0x0108;\n case 7: goto L_0x00c5;\n case 8: goto L_0x0074;\n case 9: goto L_0x0070;\n case 10: goto L_0x006c;\n case 11: goto L_0x0068;\n case 12: goto L_0x0056;\n default: goto L_0x004e;\n };\n L_0x004e:\n r9 = new java.lang.RuntimeException;\n r0 = \"Internal error: should never end up through this code path\";\n r9.<init>(r0);\n throw r9;\n L_0x0056:\n r6 = r0.m4037b(r5);\n r7 = r6 instanceof com.p111d.p112a.p121c.p138m.C5378q;\n if (r7 == 0) goto L_0x0064;\n L_0x005e:\n r6 = (com.p111d.p112a.p121c.p138m.C5378q) r6;\n r6.m11598a(r9);\n goto L_0x0012;\n L_0x0064:\n r9.writeObject(r6);\n goto L_0x0012;\n L_0x0068:\n r9.writeNull();\n goto L_0x0012;\n L_0x006c:\n r9.writeBoolean(r2);\n goto L_0x0012;\n L_0x0070:\n r9.writeBoolean(r3);\n goto L_0x0012;\n L_0x0074:\n r6 = r0.m4037b(r5);\n r7 = r6 instanceof java.lang.Double;\n if (r7 == 0) goto L_0x0086;\n L_0x007c:\n r6 = (java.lang.Double) r6;\n r6 = r6.doubleValue();\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x0086:\n r7 = r6 instanceof java.math.BigDecimal;\n if (r7 == 0) goto L_0x0090;\n L_0x008a:\n r6 = (java.math.BigDecimal) r6;\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x0090:\n r7 = r6 instanceof java.lang.Float;\n if (r7 == 0) goto L_0x009f;\n L_0x0094:\n r6 = (java.lang.Float) r6;\n r6 = r6.floatValue();\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x009f:\n if (r6 != 0) goto L_0x00a2;\n L_0x00a1:\n goto L_0x0068;\n L_0x00a2:\n r7 = r6 instanceof java.lang.String;\n if (r7 == 0) goto L_0x00ad;\n L_0x00a6:\n r6 = (java.lang.String) r6;\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x00ad:\n r0 = new com.d.a.b.f;\n r1 = \"Unrecognized value type for VALUE_NUMBER_FLOAT: %s, can not serialize\";\n r3 = new java.lang.Object[r3];\n r4 = r6.getClass();\n r4 = r4.getName();\n r3[r2] = r4;\n r1 = java.lang.String.format(r1, r3);\n r0.<init>(r1, r9);\n throw r0;\n L_0x00c5:\n r6 = r0.m4037b(r5);\n r7 = r6 instanceof java.lang.Integer;\n if (r7 == 0) goto L_0x00d8;\n L_0x00cd:\n r6 = (java.lang.Integer) r6;\n r6 = r6.intValue();\n L_0x00d3:\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x00d8:\n r7 = r6 instanceof java.math.BigInteger;\n if (r7 == 0) goto L_0x00e3;\n L_0x00dc:\n r6 = (java.math.BigInteger) r6;\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x00e3:\n r7 = r6 instanceof java.lang.Long;\n if (r7 == 0) goto L_0x00f2;\n L_0x00e7:\n r6 = (java.lang.Long) r6;\n r6 = r6.longValue();\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x00f2:\n r7 = r6 instanceof java.lang.Short;\n if (r7 == 0) goto L_0x0101;\n L_0x00f6:\n r6 = (java.lang.Short) r6;\n r6 = r6.shortValue();\n r9.writeNumber(r6);\n goto L_0x0012;\n L_0x0101:\n r6 = (java.lang.Number) r6;\n r6 = r6.intValue();\n goto L_0x00d3;\n L_0x0108:\n r6 = r0.m4037b(r5);\n r7 = r6 instanceof com.p111d.p112a.p114b.C1382p;\n if (r7 == 0) goto L_0x0117;\n L_0x0110:\n r6 = (com.p111d.p112a.p114b.C1382p) r6;\n r9.writeString(r6);\n goto L_0x0012;\n L_0x0117:\n r6 = (java.lang.String) r6;\n r9.writeString(r6);\n goto L_0x0012;\n L_0x011e:\n r6 = r0.m4037b(r5);\n r7 = r6 instanceof com.p111d.p112a.p114b.C1382p;\n if (r7 == 0) goto L_0x012d;\n L_0x0126:\n r6 = (com.p111d.p112a.p114b.C1382p) r6;\n r9.writeFieldName(r6);\n goto L_0x0012;\n L_0x012d:\n r6 = (java.lang.String) r6;\n r9.writeFieldName(r6);\n goto L_0x0012;\n L_0x0134:\n r9.writeEndArray();\n goto L_0x0012;\n L_0x0139:\n r9.writeStartArray();\n goto L_0x0012;\n L_0x013e:\n r9.writeEndObject();\n goto L_0x0012;\n L_0x0143:\n r9.writeStartObject();\n goto L_0x0012;\n L_0x0148:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.d.a.c.m.u.a(com.d.a.b.g):void\");\n }", "public static boolean a(android.content.Context r4, byte[] r5) {\n /*\n r1 = d;\n r0 = 0;\n L_0x0003:\n r2 = c();\t Catch:{ Exception -> 0x003a }\n if (r2 != 0) goto L_0x0010;\n L_0x0009:\n r2 = e;\t Catch:{ Exception -> 0x003a }\n r2.block();\t Catch:{ Exception -> 0x003a }\n if (r1 == 0) goto L_0x0003;\n L_0x0010:\n r1 = z;\t Catch:{ Exception -> 0x003a }\n r2 = 22;\n r1 = r1[r2];\t Catch:{ Exception -> 0x003a }\n com.whatsapp.util.Log.i(r1);\t Catch:{ Exception -> 0x003a }\n r1 = com.whatsapp.contact.o.NOTIFICATION_DELTA;\t Catch:{ Exception -> 0x003a }\n r0 = a(r4, r1, r5);\t Catch:{ Exception -> 0x003a }\n r1 = b();\t Catch:{ Exception -> 0x0038 }\n if (r1 != 0) goto L_0x002e;\n L_0x0025:\n r1 = z;\t Catch:{ Exception -> 0x0038 }\n r2 = 16;\n r1 = r1[r2];\t Catch:{ Exception -> 0x0038 }\n com.whatsapp.util.Log.e(r1);\t Catch:{ Exception -> 0x0038 }\n L_0x002e:\n r1 = z;\n r2 = 18;\n r1 = r1[r2];\n com.whatsapp.util.Log.i(r1);\n L_0x0037:\n return r0;\n L_0x0038:\n r0 = move-exception;\n throw r0;\n L_0x003a:\n r1 = move-exception;\n r2 = z;\t Catch:{ all -> 0x005d }\n r3 = 20;\n r2 = r2[r3];\t Catch:{ all -> 0x005d }\n com.whatsapp.util.Log.b(r2, r1);\t Catch:{ all -> 0x005d }\n r1 = b();\n if (r1 != 0) goto L_0x0053;\n L_0x004a:\n r1 = z;\n r2 = 19;\n r1 = r1[r2];\n com.whatsapp.util.Log.e(r1);\n L_0x0053:\n r1 = z;\n r2 = 23;\n r1 = r1[r2];\n com.whatsapp.util.Log.i(r1);\n goto L_0x0037;\n L_0x005d:\n r0 = move-exception;\n r1 = b();\t Catch:{ Exception -> 0x0077 }\n if (r1 != 0) goto L_0x006d;\n L_0x0064:\n r1 = z;\t Catch:{ Exception -> 0x0077 }\n r2 = 21;\n r1 = r1[r2];\t Catch:{ Exception -> 0x0077 }\n com.whatsapp.util.Log.e(r1);\t Catch:{ Exception -> 0x0077 }\n L_0x006d:\n r1 = z;\n r2 = 17;\n r1 = r1[r2];\n com.whatsapp.util.Log.i(r1);\n throw r0;\n L_0x0077:\n r0 = move-exception;\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.contact.i.a(android.content.Context, byte[]):boolean\");\n }", "public void mo2485a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = r2.f11863a;\n monitor-enter(r0);\n r1 = r2.f11873l;\t Catch:{ all -> 0x002a }\n if (r1 != 0) goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x0007:\n r1 = r2.f11872k;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x000c;\t Catch:{ all -> 0x002a }\n L_0x000b:\n goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x000c:\n r1 = r2.f11875n;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x0015;\n L_0x0010:\n r1 = r2.f11875n;\t Catch:{ RemoteException -> 0x0015 }\n r1.cancel();\t Catch:{ RemoteException -> 0x0015 }\n L_0x0015:\n r1 = r2.f11870i;\t Catch:{ all -> 0x002a }\n m14216b(r1);\t Catch:{ all -> 0x002a }\n r1 = 1;\t Catch:{ all -> 0x002a }\n r2.f11873l = r1;\t Catch:{ all -> 0x002a }\n r1 = com.google.android.gms.common.api.Status.zzfnm;\t Catch:{ all -> 0x002a }\n r1 = r2.mo3568a(r1);\t Catch:{ all -> 0x002a }\n r2.m14217c(r1);\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x0028:\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x002a:\n r1 = move-exception;\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a():void\");\n }", "private static void runTestCWE9() {\n}", "private static void runTestCWE9() {\n}", "private static java.lang.String m25224a(java.lang.String r7, java.lang.String r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = \"\";\n r1 = \"\\\\?\";\n r7 = r7.split(r1);\n r1 = r7.length;\n r2 = 1;\n if (r1 <= r2) goto L_0x0033;\n L_0x000c:\n r7 = r7[r2];\n r1 = \"&\";\n r7 = r7.split(r1);\n r1 = r7.length;\n r3 = 0;\n r4 = r0;\n r0 = 0;\n L_0x0018:\n if (r0 >= r1) goto L_0x0032;\n L_0x001a:\n r5 = r7[r0];\n r6 = \"=\";\n r5 = r5.split(r6);\n r6 = r5.length;\n if (r6 <= r2) goto L_0x002f;\n L_0x0025:\n r6 = r5[r3];\n r6 = r6.equals(r8);\n if (r6 == 0) goto L_0x002f;\n L_0x002d:\n r4 = r5[r2];\n L_0x002f:\n r0 = r0 + 1;\n goto L_0x0018;\n L_0x0032:\n r0 = r4;\n L_0x0033:\n r7 = \"UTF-8\";\t Catch:{ Exception -> 0x003a }\n r7 = java.net.URLDecoder.decode(r0, r7);\t Catch:{ Exception -> 0x003a }\n goto L_0x003b;\n L_0x003a:\n r7 = r0;\n L_0x003b:\n return r7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.leanplum.messagetemplates.BaseMessageDialog.a(java.lang.String, java.lang.String):java.lang.String\");\n }", "private void f(java.lang.String r8) {\n /*\n r7 = this;\n r6 = 1;\n r2 = F;\n r7.y = r8;\n r0 = r7.m;\n r0 = r0.entrySet();\n r3 = r0.iterator();\n L_0x000f:\n r0 = r3.hasNext();\n if (r0 == 0) goto L_0x004a;\n L_0x0015:\n r0 = r3.next();\n r0 = (java.util.Map.Entry) r0;\n r1 = r0.getValue();\n r1 = (java.util.List) r1;\n r4 = r1.size();\t Catch:{ RuntimeException -> 0x0077 }\n if (r4 != r6) goto L_0x0043;\n L_0x0027:\n r4 = J;\t Catch:{ RuntimeException -> 0x0079 }\n r5 = 28;\n r4 = r4[r5];\t Catch:{ RuntimeException -> 0x0079 }\n r5 = 0;\n r5 = r1.get(r5);\t Catch:{ RuntimeException -> 0x0079 }\n r4 = r4.equals(r5);\t Catch:{ RuntimeException -> 0x0079 }\n if (r4 == 0) goto L_0x0043;\n L_0x0038:\n r4 = r7.e;\t Catch:{ RuntimeException -> 0x007b }\n r0 = r0.getKey();\t Catch:{ RuntimeException -> 0x007b }\n r4.add(r0);\t Catch:{ RuntimeException -> 0x007b }\n if (r2 == 0) goto L_0x0048;\n L_0x0043:\n r0 = r7.x;\t Catch:{ RuntimeException -> 0x007b }\n r0.addAll(r1);\t Catch:{ RuntimeException -> 0x007b }\n L_0x0048:\n if (r2 == 0) goto L_0x000f;\n L_0x004a:\n r0 = r7.x;\t Catch:{ RuntimeException -> 0x007d }\n r1 = J;\t Catch:{ RuntimeException -> 0x007d }\n r2 = 29;\n r1 = r1[r2];\t Catch:{ RuntimeException -> 0x007d }\n r0 = r0.remove(r1);\t Catch:{ RuntimeException -> 0x007d }\n if (r0 == 0) goto L_0x0065;\n L_0x0058:\n r0 = B;\t Catch:{ RuntimeException -> 0x007d }\n r1 = java.util.logging.Level.WARNING;\t Catch:{ RuntimeException -> 0x007d }\n r2 = J;\t Catch:{ RuntimeException -> 0x007d }\n r3 = 30;\n r2 = r2[r3];\t Catch:{ RuntimeException -> 0x007d }\n r0.log(r1, r2);\t Catch:{ RuntimeException -> 0x007d }\n L_0x0065:\n r1 = r7.G;\n r0 = r7.m;\n r2 = java.lang.Integer.valueOf(r6);\n r0 = r0.get(r2);\n r0 = (java.util.Collection) r0;\n r1.addAll(r0);\n return;\n L_0x0077:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x0079 }\n L_0x0079:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x007b }\n L_0x007b:\n r0 = move-exception;\n throw r0;\n L_0x007d:\n r0 = move-exception;\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.f(java.lang.String):void\");\n }", "public void mo5832b(android.content.Context r4) {\n /*\n r3 = this;\n r0 = 1\n java.lang.String r1 = m3304x() // Catch:{ a -> 0x002f, IOException -> 0x0027 }\n r3.mo5830a(r0, r1) // Catch:{ a -> 0x002f, IOException -> 0x0027 }\n L_0x0008:\n r0 = 2\n java.lang.String r1 = m3302v() // Catch:{ a -> 0x002d, IOException -> 0x0027 }\n r3.mo5830a(r0, r1) // Catch:{ a -> 0x002d, IOException -> 0x0027 }\n L_0x0010:\n r0 = 25\n java.lang.Long r1 = m3303w() // Catch:{ a -> 0x002b, IOException -> 0x0027 }\n long r1 = r1.longValue() // Catch:{ a -> 0x002b, IOException -> 0x0027 }\n r3.mo5829a(r0, r1) // Catch:{ a -> 0x002b, IOException -> 0x0027 }\n L_0x001d:\n r0 = 24\n java.lang.String r1 = m3300d(r4) // Catch:{ a -> 0x0029, IOException -> 0x0027 }\n r3.mo5830a(r0, r1) // Catch:{ a -> 0x0029, IOException -> 0x0027 }\n L_0x0026:\n return\n L_0x0027:\n r0 = move-exception\n goto L_0x0026\n L_0x0029:\n r0 = move-exception\n goto L_0x0026\n L_0x002b:\n r0 = move-exception\n goto L_0x001d\n L_0x002d:\n r0 = move-exception\n goto L_0x0010\n L_0x002f:\n r0 = move-exception\n goto L_0x0008\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.C1107j.mo5832b(android.content.Context):void\");\n }", "private void bщ04490449щ0449щ(rrrrrr.rcccrr r6) {\n /*\n r5 = this;\n r4 = 0;\n r0 = r6.getJsonData();\t Catch:{ Exception -> 0x0056 }\n r1 = new rrrrrr.ccrcrc;\t Catch:{ Exception -> 0x0056 }\n r2 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0056 }\n r2.<init>();\t Catch:{ Exception -> 0x0056 }\n r3 = r5.bнн043Dннн;\t Catch:{ Exception -> 0x0056 }\n r3 = com.immersion.aws.analytics.ImmrAnalytics.b044C044C044C044Cьь(r3);\t Catch:{ Exception -> 0x0056 }\n r3 = r3.getFilesDir();\t Catch:{ Exception -> 0x0056 }\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0056 }\n r3 = java.io.File.separator;\t Catch:{ Exception -> 0x0056 }\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0056 }\n r3 = \"3HC4C-01.txt\";\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0056 }\n r2 = r2.toString();\t Catch:{ Exception -> 0x0056 }\n r1.<init>(r2);\t Catch:{ Exception -> 0x0056 }\n r2 = bЗ04170417ЗЗЗ;\n r3 = bЗЗЗ0417ЗЗ;\n r3 = r3 + r2;\n r2 = r2 * r3;\n r3 = b04170417З0417ЗЗ;\n r2 = r2 % r3;\n switch(r2) {\n case 0: goto L_0x0041;\n default: goto L_0x0039;\n };\n L_0x0039:\n r2 = 38;\n bЗ04170417ЗЗЗ = r2;\n r2 = 29;\n b041704170417ЗЗЗ = r2;\n L_0x0041:\n r1.load();\t Catch:{ Exception -> 0x0056 }\n L_0x0044:\n switch(r4) {\n case 0: goto L_0x004b;\n case 1: goto L_0x0044;\n default: goto L_0x0047;\n };\t Catch:{ Exception -> 0x0056 }\n L_0x0047:\n switch(r4) {\n case 0: goto L_0x004b;\n case 1: goto L_0x0044;\n default: goto L_0x004a;\n };\t Catch:{ Exception -> 0x0056 }\n L_0x004a:\n goto L_0x0047;\n L_0x004b:\n r0 = r0.toString();\t Catch:{ Exception -> 0x0056 }\n r1.push(r0);\t Catch:{ Exception -> 0x0056 }\n r1.save();\t Catch:{ Exception -> 0x0056 }\n L_0x0055:\n return;\n L_0x0056:\n r0 = move-exception;\n goto L_0x0055;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rrrrrr.cccccr.bщ04490449щ0449щ(rrrrrr.rcccrr):void\");\n }", "public final void a(com.tencent.mm.plugin.game.c.ai r12, java.lang.String r13, int r14, int r15) {\n /*\n r11 = this;\n if (r12 == 0) goto L_0x000a;\n L_0x0002:\n r0 = r12.nmz;\n r0 = com.tencent.mm.sdk.platformtools.bi.cC(r0);\n if (r0 == 0) goto L_0x0010;\n L_0x000a:\n r0 = 8;\n r11.setVisibility(r0);\n L_0x000f:\n return;\n L_0x0010:\n r11.mAppId = r13;\n r11.niV = r15;\n r0 = r12.nmz;\n r7 = r0.iterator();\n L_0x001a:\n r0 = r7.hasNext();\n if (r0 == 0) goto L_0x000f;\n L_0x0020:\n r0 = r7.next();\n r4 = r0;\n r4 = (com.tencent.mm.plugin.game.c.k) r4;\n if (r4 == 0) goto L_0x001a;\n L_0x0029:\n r5 = new com.tencent.mm.plugin.game.d.e$a$a;\n r5.<init>();\n r0 = r4.nlz;\n switch(r0) {\n case 1: goto L_0x004a;\n case 2: goto L_0x00e3;\n default: goto L_0x0033;\n };\n L_0x0033:\n r0 = 2;\n if (r14 != r0) goto L_0x001a;\n L_0x0036:\n r0 = r11.mContext;\n r1 = 10;\n r2 = 1002; // 0x3ea float:1.404E-42 double:4.95E-321;\n r3 = r4.nlw;\n r4 = r4.nlr;\n r6 = com.tencent.mm.plugin.game.model.ap.CD(r4);\n r4 = r13;\n r5 = r15;\n com.tencent.mm.plugin.game.model.ap.a(r0, r1, r2, r3, r4, r5, r6);\n goto L_0x001a;\n L_0x004a:\n r0 = r4.nlx;\n if (r0 == 0) goto L_0x001a;\n L_0x004e:\n r11.e(r11);\n r0 = r11.DF;\n r1 = com.tencent.mm.R.i.djD;\n r2 = 1;\n r6 = r0.inflate(r1, r11, r2);\n r0 = com.tencent.mm.R.h.cxP;\n r0 = r6.findViewById(r0);\n r0 = (android.widget.TextView) r0;\n r1 = com.tencent.mm.R.h.cxR;\n r1 = r6.findViewById(r1);\n r1 = (android.widget.TextView) r1;\n r2 = com.tencent.mm.R.h.cxO;\n r2 = r6.findViewById(r2);\n r2 = (com.tencent.mm.plugin.game.widget.EllipsizingTextView) r2;\n r3 = 2;\n r2.setMaxLines(r3);\n r3 = com.tencent.mm.R.h.cxQ;\n r3 = r6.findViewById(r3);\n r3 = (android.widget.ImageView) r3;\n r8 = r11.mContext;\n r9 = r4.nlv;\n r10 = r0.getTextSize();\n r8 = com.tencent.mm.pluginsdk.ui.d.i.b(r8, r9, r10);\n r0.setText(r8);\n r0 = r11.mContext;\n r8 = r4.nlx;\n r8 = r8.fpg;\n r9 = r1.getTextSize();\n r0 = com.tencent.mm.pluginsdk.ui.d.i.b(r0, r8, r9);\n r1.setText(r0);\n r0 = r11.mContext;\n r1 = r4.nlx;\n r1 = r1.nkL;\n r8 = r2.getTextSize();\n r0 = com.tencent.mm.pluginsdk.ui.d.i.b(r0, r1, r8);\n r2.setText(r0);\n r0 = r4.nlx;\n r0 = r0.nkM;\n r0 = com.tencent.mm.sdk.platformtools.bi.oN(r0);\n if (r0 != 0) goto L_0x00dd;\n L_0x00b9:\n r0 = com.tencent.mm.plugin.game.d.e.aSC();\n r1 = r4.nlx;\n r1 = r1.nkM;\n r2 = r5.aSD();\n r0.a(r3, r1, r2);\n L_0x00c8:\n r0 = new com.tencent.mm.plugin.game.ui.f$a;\n r1 = r4.nlw;\n r2 = r4.nlx;\n r2 = r2.nkN;\n r3 = r4.nlr;\n r0.<init>(r1, r2, r3);\n r6.setTag(r0);\n r6.setOnClickListener(r11);\n goto L_0x0033;\n L_0x00dd:\n r0 = 8;\n r3.setVisibility(r0);\n goto L_0x00c8;\n L_0x00e3:\n r0 = r4.nly;\n if (r0 == 0) goto L_0x001a;\n L_0x00e7:\n r11.e(r11);\n r0 = r11.DF;\n r1 = com.tencent.mm.R.i.djE;\n r2 = 1;\n r3 = r0.inflate(r1, r11, r2);\n r0 = com.tencent.mm.R.h.cOG;\n r0 = r3.findViewById(r0);\n r0 = (android.widget.TextView) r0;\n r1 = com.tencent.mm.R.h.cOI;\n r1 = r3.findViewById(r1);\n r1 = (android.widget.TextView) r1;\n r2 = com.tencent.mm.R.h.cOH;\n r2 = r3.findViewById(r2);\n r2 = (android.widget.ImageView) r2;\n r6 = r11.mContext;\n r8 = r4.nlv;\n r9 = r0.getTextSize();\n r6 = com.tencent.mm.pluginsdk.ui.d.i.b(r6, r8, r9);\n r0.setText(r6);\n r0 = r11.mContext;\n r6 = r4.nly;\n r6 = r6.fpg;\n r8 = r1.getTextSize();\n r0 = com.tencent.mm.pluginsdk.ui.d.i.b(r0, r6, r8);\n r1.setText(r0);\n r0 = r4.nly;\n r0 = r0.nkM;\n r0 = com.tencent.mm.sdk.platformtools.bi.oN(r0);\n if (r0 != 0) goto L_0x016f;\n L_0x0135:\n r0 = r4.nly;\n r0 = r0.npS;\n r1 = 1;\n if (r0 != r1) goto L_0x0167;\n L_0x013c:\n r0 = 1;\n r5.nDa = r0;\n r0 = com.tencent.mm.R.g.bCF;\n r5.nDd = r0;\n L_0x0143:\n r0 = com.tencent.mm.plugin.game.d.e.aSC();\n r1 = r4.nly;\n r1 = r1.nkM;\n r5 = r5.aSD();\n r0.a(r2, r1, r5);\n L_0x0152:\n r0 = new com.tencent.mm.plugin.game.ui.f$a;\n r1 = r4.nlw;\n r2 = r4.nly;\n r2 = r2.nkN;\n r5 = r4.nlr;\n r0.<init>(r1, r2, r5);\n r3.setTag(r0);\n r3.setOnClickListener(r11);\n goto L_0x0033;\n L_0x0167:\n r0 = 1;\n r5.hFJ = r0;\n r0 = com.tencent.mm.R.g.bCE;\n r5.nDd = r0;\n goto L_0x0143;\n L_0x016f:\n r0 = 8;\n r2.setVisibility(r0);\n goto L_0x0152;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.game.ui.f.a(com.tencent.mm.plugin.game.c.ai, java.lang.String, int, int):void\");\n }", "private void m14210a(java.io.IOException r4, java.io.IOException r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r3 = this;\n r0 = f12370a;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = f12370a;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = 1;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = new java.lang.Object[r1];\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r2 = 0;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1[r2] = r5;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r0.invoke(r4, r1);\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.connection.RouteException.a(java.io.IOException, java.io.IOException):void\");\n }", "void m14051a(okhttp3.aa r2, okhttp3.aa r3) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r1 = this;\n r0 = new okhttp3.c$c;\n r0.<init>(r3);\n r2 = r2.m14017h();\n r2 = (okhttp3.C2900c.C4340b) r2;\n r2 = r2.f18085a;\n r2 = r2.m14105a();\t Catch:{ IOException -> 0x001a }\n if (r2 == 0) goto L_0x001e;\n L_0x0013:\n r0.m14043a(r2);\t Catch:{ IOException -> 0x001b }\n r2.m14099b();\t Catch:{ IOException -> 0x001b }\n goto L_0x001e;\n L_0x001a:\n r2 = 0;\n L_0x001b:\n r1.m14047a(r2);\n L_0x001e:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a(okhttp3.aa, okhttp3.aa):void\");\n }", "public void a(int r16, int r17, int r18, int r19, boolean r20, o.j r21, o.u r22) {\n /*\n r15 = this;\n r7 = r15\n r8 = r21\n r9 = r22\n o.d0 r0 = r7.f5413g\n if (r0 != 0) goto L_0x0144\n o.m0 r0 = r7.c\n o.e r0 = r0.a\n java.util.List<o.o> r0 = r0.f5294f\n o.o0.g.c r10 = new o.o0.g.c\n r10.<init>(r0)\n o.m0 r1 = r7.c\n o.e r1 = r1.a\n javax.net.ssl.SSLSocketFactory r2 = r1.f5297i\n if (r2 != 0) goto L_0x0055\n o.o r1 = o.o.f5376h\n boolean r0 = r0.contains(r1)\n if (r0 == 0) goto L_0x0048\n o.m0 r0 = r7.c\n o.e r0 = r0.a\n o.y r0 = r0.a\n java.lang.String r0 = r0.d\n o.o0.k.f r1 = o.o0.k.f.a\n boolean r1 = r1.b((java.lang.String) r0)\n if (r1 == 0) goto L_0x0035\n goto L_0x005f\n L_0x0035:\n okhttp3.internal.connection.RouteException r1 = new okhttp3.internal.connection.RouteException\n java.net.UnknownServiceException r2 = new java.net.UnknownServiceException\n java.lang.String r3 = \"CLEARTEXT communication to \"\n java.lang.String r4 = \" not permitted by network security policy\"\n java.lang.String r0 = i.a.a.a.a.a((java.lang.String) r3, (java.lang.String) r0, (java.lang.String) r4)\n r2.<init>(r0)\n r1.<init>(r2)\n throw r1\n L_0x0048:\n okhttp3.internal.connection.RouteException r0 = new okhttp3.internal.connection.RouteException\n java.net.UnknownServiceException r1 = new java.net.UnknownServiceException\n java.lang.String r2 = \"CLEARTEXT communication not enabled for client\"\n r1.<init>(r2)\n r0.<init>(r1)\n throw r0\n L_0x0055:\n java.util.List<o.d0> r0 = r1.e\n o.d0 r1 = o.d0.H2_PRIOR_KNOWLEDGE\n boolean r0 = r0.contains(r1)\n if (r0 != 0) goto L_0x0137\n L_0x005f:\n r11 = 0\n r12 = r11\n L_0x0061:\n o.m0 r0 = r7.c // Catch:{ IOException -> 0x00cd }\n boolean r0 = r0.a() // Catch:{ IOException -> 0x00cd }\n if (r0 == 0) goto L_0x0081\n r1 = r15\n r2 = r16\n r3 = r17\n r4 = r18\n r5 = r21\n r6 = r22\n r1.a(r2, r3, r4, r5, r6) // Catch:{ IOException -> 0x00cd }\n java.net.Socket r0 = r7.d // Catch:{ IOException -> 0x00cd }\n if (r0 != 0) goto L_0x007c\n goto L_0x0097\n L_0x007c:\n r1 = r16\n r2 = r17\n goto L_0x0088\n L_0x0081:\n r1 = r16\n r2 = r17\n r15.a((int) r1, (int) r2, (o.j) r8, (o.u) r9) // Catch:{ IOException -> 0x00c9 }\n L_0x0088:\n r3 = r19\n r15.a((o.o0.g.c) r10, (int) r3, (o.j) r8, (o.u) r9) // Catch:{ IOException -> 0x00c7 }\n o.m0 r0 = r7.c // Catch:{ IOException -> 0x00c7 }\n java.net.InetSocketAddress r0 = r0.c // Catch:{ IOException -> 0x00c7 }\n o.m0 r0 = r7.c // Catch:{ IOException -> 0x00c7 }\n java.net.Proxy r0 = r0.f5367b // Catch:{ IOException -> 0x00c7 }\n if (r9 == 0) goto L_0x00c6\n L_0x0097:\n o.m0 r0 = r7.c\n boolean r0 = r0.a()\n if (r0 == 0) goto L_0x00b1\n java.net.Socket r0 = r7.d\n if (r0 == 0) goto L_0x00a4\n goto L_0x00b1\n L_0x00a4:\n java.net.ProtocolException r0 = new java.net.ProtocolException\n java.lang.String r1 = \"Too many tunnel connections attempted: 21\"\n r0.<init>(r1)\n okhttp3.internal.connection.RouteException r1 = new okhttp3.internal.connection.RouteException\n r1.<init>(r0)\n throw r1\n L_0x00b1:\n o.o0.j.e r0 = r7.f5414h\n if (r0 == 0) goto L_0x00c5\n o.o0.g.g r1 = r7.f5411b\n monitor-enter(r1)\n o.o0.j.e r0 = r7.f5414h // Catch:{ all -> 0x00c2 }\n int r0 = r0.a() // Catch:{ all -> 0x00c2 }\n r7.f5421o = r0 // Catch:{ all -> 0x00c2 }\n monitor-exit(r1) // Catch:{ all -> 0x00c2 }\n goto L_0x00c5\n L_0x00c2:\n r0 = move-exception\n monitor-exit(r1) // Catch:{ all -> 0x00c2 }\n throw r0\n L_0x00c5:\n return\n L_0x00c6:\n throw r11 // Catch:{ IOException -> 0x00c7 }\n L_0x00c7:\n r0 = move-exception\n goto L_0x00d3\n L_0x00c9:\n r0 = move-exception\n L_0x00ca:\n r3 = r19\n goto L_0x00d3\n L_0x00cd:\n r0 = move-exception\n r1 = r16\n r2 = r17\n goto L_0x00ca\n L_0x00d3:\n java.net.Socket r4 = r7.e\n o.o0.e.a((java.net.Socket) r4)\n java.net.Socket r4 = r7.d\n o.o0.e.a((java.net.Socket) r4)\n r7.e = r11\n r7.d = r11\n r7.f5415i = r11\n r7.f5416j = r11\n r7.f5412f = r11\n r7.f5413g = r11\n r7.f5414h = r11\n o.m0 r4 = r7.c\n java.net.InetSocketAddress r4 = r4.c\n if (r9 == 0) goto L_0x0136\n r4 = 0\n r5 = 1\n if (r12 != 0) goto L_0x00fb\n okhttp3.internal.connection.RouteException r12 = new okhttp3.internal.connection.RouteException\n r12.<init>(r0)\n goto L_0x010a\n L_0x00fb:\n java.io.IOException r6 = r12.e\n java.lang.reflect.Method r13 = o.o0.e.f5385j\n if (r13 == 0) goto L_0x0108\n java.lang.Object[] r14 = new java.lang.Object[r5] // Catch:{ IllegalAccessException | InvocationTargetException -> 0x0108 }\n r14[r4] = r0 // Catch:{ IllegalAccessException | InvocationTargetException -> 0x0108 }\n r13.invoke(r6, r14) // Catch:{ IllegalAccessException | InvocationTargetException -> 0x0108 }\n L_0x0108:\n r12.f5632f = r0\n L_0x010a:\n if (r20 == 0) goto L_0x0135\n r10.d = r5\n boolean r5 = r10.c\n if (r5 != 0) goto L_0x0113\n goto L_0x0131\n L_0x0113:\n boolean r5 = r0 instanceof java.net.ProtocolException\n if (r5 == 0) goto L_0x0118\n goto L_0x0131\n L_0x0118:\n boolean r5 = r0 instanceof java.io.InterruptedIOException\n if (r5 == 0) goto L_0x011d\n goto L_0x0131\n L_0x011d:\n boolean r5 = r0 instanceof javax.net.ssl.SSLHandshakeException\n if (r5 == 0) goto L_0x012a\n java.lang.Throwable r5 = r0.getCause()\n boolean r5 = r5 instanceof java.security.cert.CertificateException\n if (r5 == 0) goto L_0x012a\n goto L_0x0131\n L_0x012a:\n boolean r5 = r0 instanceof javax.net.ssl.SSLPeerUnverifiedException\n if (r5 == 0) goto L_0x012f\n goto L_0x0131\n L_0x012f:\n boolean r4 = r0 instanceof javax.net.ssl.SSLException\n L_0x0131:\n if (r4 == 0) goto L_0x0135\n goto L_0x0061\n L_0x0135:\n throw r12\n L_0x0136:\n throw r11\n L_0x0137:\n okhttp3.internal.connection.RouteException r0 = new okhttp3.internal.connection.RouteException\n java.net.UnknownServiceException r1 = new java.net.UnknownServiceException\n java.lang.String r2 = \"H2_PRIOR_KNOWLEDGE cannot be used with HTTPS\"\n r1.<init>(r2)\n r0.<init>(r1)\n throw r0\n L_0x0144:\n java.lang.IllegalStateException r0 = new java.lang.IllegalStateException\n java.lang.String r1 = \"already connected\"\n r0.<init>(r1)\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: o.o0.g.f.a(int, int, int, int, boolean, o.j, o.u):void\");\n }", "private void m2139m() {\n /*\n r18 = this;\n r3 = 0;\n r0 = r18;\n r15 = r0.f1119g;\t Catch:{ FileNotFoundException -> 0x0023 }\n r0 = r18;\n r0 = r0.f1120h;\t Catch:{ FileNotFoundException -> 0x0023 }\n r16 = r0;\n r3 = r15.openFileInput(r16);\t Catch:{ FileNotFoundException -> 0x0023 }\n r8 = android.util.Xml.newPullParser();\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r15 = 0;\n r8.setInput(r3, r15);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r12 = 0;\n L_0x0018:\n r15 = 1;\n if (r12 == r15) goto L_0x0025;\n L_0x001b:\n r15 = 2;\n if (r12 == r15) goto L_0x0025;\n L_0x001e:\n r12 = r8.next();\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n goto L_0x0018;\n L_0x0023:\n r4 = move-exception;\n L_0x0024:\n return;\n L_0x0025:\n r15 = \"historical-records\";\n r16 = r8.getName();\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r15 = r15.equals(r16);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n if (r15 != 0) goto L_0x0062;\n L_0x0031:\n r15 = new org.xmlpull.v1.XmlPullParserException;\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r16 = \"Share records file does not start with historical-records tag.\";\n r15.<init>(r16);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n throw r15;\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n L_0x0039:\n r14 = move-exception;\n r15 = f1113a;\t Catch:{ all -> 0x00e9 }\n r16 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00e9 }\n r16.<init>();\t Catch:{ all -> 0x00e9 }\n r17 = \"Error reading historical recrod file: \";\n r16 = r16.append(r17);\t Catch:{ all -> 0x00e9 }\n r0 = r18;\n r0 = r0.f1120h;\t Catch:{ all -> 0x00e9 }\n r17 = r0;\n r16 = r16.append(r17);\t Catch:{ all -> 0x00e9 }\n r16 = r16.toString();\t Catch:{ all -> 0x00e9 }\n r0 = r16;\n android.util.Log.e(r15, r0, r14);\t Catch:{ all -> 0x00e9 }\n if (r3 == 0) goto L_0x0024;\n L_0x005c:\n r3.close();\t Catch:{ IOException -> 0x0060 }\n goto L_0x0024;\n L_0x0060:\n r15 = move-exception;\n goto L_0x0024;\n L_0x0062:\n r0 = r18;\n r5 = r0.f1118f;\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r5.clear();\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n L_0x0069:\n r12 = r8.next();\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r15 = 1;\n if (r12 != r15) goto L_0x0078;\n L_0x0070:\n if (r3 == 0) goto L_0x0024;\n L_0x0072:\n r3.close();\t Catch:{ IOException -> 0x0076 }\n goto L_0x0024;\n L_0x0076:\n r15 = move-exception;\n goto L_0x0024;\n L_0x0078:\n r15 = 3;\n if (r12 == r15) goto L_0x0069;\n L_0x007b:\n r15 = 4;\n if (r12 == r15) goto L_0x0069;\n L_0x007e:\n r7 = r8.getName();\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r15 = \"historical-record\";\n r15 = r15.equals(r7);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n if (r15 != 0) goto L_0x00bd;\n L_0x008a:\n r15 = new org.xmlpull.v1.XmlPullParserException;\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r16 = \"Share records file not well-formed.\";\n r15.<init>(r16);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n throw r15;\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n L_0x0092:\n r6 = move-exception;\n r15 = f1113a;\t Catch:{ all -> 0x00e9 }\n r16 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00e9 }\n r16.<init>();\t Catch:{ all -> 0x00e9 }\n r17 = \"Error reading historical recrod file: \";\n r16 = r16.append(r17);\t Catch:{ all -> 0x00e9 }\n r0 = r18;\n r0 = r0.f1120h;\t Catch:{ all -> 0x00e9 }\n r17 = r0;\n r16 = r16.append(r17);\t Catch:{ all -> 0x00e9 }\n r16 = r16.toString();\t Catch:{ all -> 0x00e9 }\n r0 = r16;\n android.util.Log.e(r15, r0, r6);\t Catch:{ all -> 0x00e9 }\n if (r3 == 0) goto L_0x0024;\n L_0x00b5:\n r3.close();\t Catch:{ IOException -> 0x00ba }\n goto L_0x0024;\n L_0x00ba:\n r15 = move-exception;\n goto L_0x0024;\n L_0x00bd:\n r15 = 0;\n r16 = \"activity\";\n r0 = r16;\n r2 = r8.getAttributeValue(r15, r0);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r15 = 0;\n r16 = \"time\";\n r0 = r16;\n r15 = r8.getAttributeValue(r15, r0);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r10 = java.lang.Long.parseLong(r15);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r15 = 0;\n r16 = \"weight\";\n r0 = r16;\n r15 = r8.getAttributeValue(r15, r0);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r13 = java.lang.Float.parseFloat(r15);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r9 = new android.support.v7.internal.widget.b$d;\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r9.<init>(r2, r10, r13);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n r5.add(r9);\t Catch:{ XmlPullParserException -> 0x0039, IOException -> 0x0092 }\n goto L_0x0069;\n L_0x00e9:\n r15 = move-exception;\n if (r3 == 0) goto L_0x00ef;\n L_0x00ec:\n r3.close();\t Catch:{ IOException -> 0x00f0 }\n L_0x00ef:\n throw r15;\n L_0x00f0:\n r16 = move-exception;\n goto L_0x00ef;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.support.v7.internal.widget.b.m():void\");\n }", "private static void runTestCWE4() {\n}", "private static void runTestCWE4() {\n}", "public final synchronized java.lang.String m90f(java.lang.String r5) {\n /*\n r4 = this;\n r1 = 1;\n r0 = 0;\n monitor-enter(r4);\n if (r5 == 0) goto L_0x002c;\n L_0x0005:\n r2 = r5.trim();\t Catch:{ all -> 0x0037 }\n r2 = r2.length();\t Catch:{ all -> 0x0037 }\n if (r2 <= 0) goto L_0x002c;\n L_0x000f:\n if (r0 == 0) goto L_0x002e;\n L_0x0011:\n r0 = \"key should not be empty %s\";\n r1 = 1;\n r1 = new java.lang.Object[r1];\t Catch:{ all -> 0x0037 }\n r2 = 0;\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0037 }\n r3.<init>();\t Catch:{ all -> 0x0037 }\n r3 = r3.append(r5);\t Catch:{ all -> 0x0037 }\n r3 = r3.toString();\t Catch:{ all -> 0x0037 }\n r1[r2] = r3;\t Catch:{ all -> 0x0037 }\n com.tencent.bugly.legu.proguard.C0073w.m524d(r0, r1);\t Catch:{ all -> 0x0037 }\n r0 = 0;\n L_0x002a:\n monitor-exit(r4);\n return r0;\n L_0x002c:\n r0 = r1;\n goto L_0x000f;\n L_0x002e:\n r0 = r4.f112Y;\t Catch:{ all -> 0x0037 }\n r0 = r0.remove(r5);\t Catch:{ all -> 0x0037 }\n r0 = (java.lang.String) r0;\t Catch:{ all -> 0x0037 }\n goto L_0x002a;\n L_0x0037:\n r0 = move-exception;\n monitor-exit(r4);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.bugly.legu.crashreport.common.info.a.f(java.lang.String):java.lang.String\");\n }", "@Test\n public void test108() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.ul();\n Label label0 = (Label)errorPage0.big((Object) errorPage0);\n ActionExpression actionExpression0 = errorPage0.action(\"~Dci\");\n Label label1 = (Label)errorPage0.small((Object) actionExpression0);\n Block block1 = (Block)errorPage0.b();\n List<ActionExpression> list0 = errorPage0._getActions();\n block1._clear();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(block1._isGeneratedId());\n }", "static Certificate[] verifyBytes(byte[] var0, byte[] var1_3) throws GeneralSecurityException {\n block6 : {\n block5 : {\n var2_4 = null;\n var3_5 = null;\n var3_5 = var4_6 = Providers.startJarVerification();\n var2_4 = var4_6;\n var3_5 = var4_6;\n var2_4 = var4_6;\n var5_7 = new PKCS7((byte[])var0);\n var3_5 = var4_6;\n var2_4 = var4_6;\n var0 = var5_7.verify(var1_3 /* !! */ );\n if (var0 == null) ** GOTO lbl47\n var3_5 = var4_6;\n var2_4 = var4_6;\n if (((Object)var0).length == 0) ** GOTO lbl47\n var0 = var0[0];\n var3_5 = var4_6;\n var2_4 = var4_6;\n if ((var0 = var0.getCertificateChain(var5_7)) == null) ** GOTO lbl39\n var3_5 = var4_6;\n var2_4 = var4_6;\n if (var0.isEmpty()) break block5;\n var3_5 = var4_6;\n var2_4 = var4_6;\n var0 = var0.toArray(new X509Certificate[var0.size()]);\n Providers.stopJarVerification(var4_6);\n return var0;\n }\n var3_5 = var4_6;\n var2_4 = var4_6;\n try {\n var3_5 = var4_6;\n var2_4 = var4_6;\n var0 = new GeneralSecurityException(\"Verified SignerInfo certificate chain is emtpy\");\n var3_5 = var4_6;\n var2_4 = var4_6;\n throw var0;\nlbl39: // 1 sources:\n var3_5 = var4_6;\n var2_4 = var4_6;\n var3_5 = var4_6;\n var2_4 = var4_6;\n var0 = new GeneralSecurityException(\"Failed to find verified SignerInfo certificate chain\");\n var3_5 = var4_6;\n var2_4 = var4_6;\n throw var0;\nlbl47: // 2 sources:\n var3_5 = var4_6;\n var2_4 = var4_6;\n var3_5 = var4_6;\n var2_4 = var4_6;\n var0 = new GeneralSecurityException(\"Failed to verify signature: no verified SignerInfos\");\n var3_5 = var4_6;\n var2_4 = var4_6;\n throw var0;\n }\n catch (Throwable var0_1) {\n break block6;\n }\n catch (IOException var0_2) {\n var3_5 = var2_4;\n var3_5 = var2_4;\n var1_3 /* !! */ = new GeneralSecurityException(\"IO exception verifying jar cert\", var0_2);\n var3_5 = var2_4;\n throw var1_3 /* !! */ ;\n }\n }\n Providers.stopJarVerification(var3_5);\n throw var0_1;\n }", "@Override\n public void a() {\n block25 : {\n block24 : {\n block22 : {\n var17_1 = a.a;\n var3_2 = this.c.i();\n var4_3 = var3_2.a().a();\n this.d = new w();\n this.e = new y.f.h.D(this.d);\n this.h = M.a(new Object[this.b.e()]);\n this.i = M.b(new Object[this.b.g()]);\n var5_4 = this.b.o();\n while (var5_4.f()) {\n var6_5 = var5_4.e();\n if (var17_1 == 0) {\n if (var6_5.c() <= this.l) {\n var7_6 = this.d.d();\n this.h.a(var6_5, var7_6);\n }\n var5_4.g();\n if (var17_1 == 0) continue;\n }\n break block22;\n }\n this.j = M.b(new Object[this.b.g()]);\n this.k = M.b(new Object[this.b.g()]);\n this.a(this.j, this.k);\n }\n var2_8 = this.b.o();\n block3 : do {\n v0 = var2_8.f();\n block4 : while (v0 != 0) {\n var5_4 = var2_8.e();\n if (var5_4.c() != 0) {\n var1_9 = var5_4.l();\n var6_5 = var1_9.a();\n var7_6 = (y.c.q)this.j.b(var6_5);\n var1_9.b();\n while (var1_9.f()) {\n var8_10 = var1_9.a();\n var9_11 = (y.c.q)this.j.b(var8_10);\n var10_12 = (y.c.q)this.k.b(var8_10);\n var11_13 = this.a((y.c.q)var7_6, (y.c.q)var9_11);\n v0 = var5_4.c();\n if (var17_1 != 0) continue block4;\n if (v0 > this.l) {\n this.h.a(var5_4, var11_13);\n }\n var7_6 = (y.c.q)this.j.b(var8_10);\n var12_14 /* !! */ = this.d.a((y.c.q)var9_11, (y.c.q)var10_12);\n this.i.a(var8_10, var12_14 /* !! */ );\n if (var8_10 == var6_5) break;\n var1_9.b();\n if (var17_1 == 0) continue;\n }\n }\n var2_8.g();\n if (var17_1 == 0) continue block3;\n }\n break block3;\n break;\n } while (true);\n var1_9 = this.b.p();\n while (var1_9.f()) {\n var5_4 = var1_9.a();\n v1 = this;\n if (var17_1 == 0) {\n block23 : {\n if (v1.c.n((y.c.d)var5_4)) {\n this.e.m((y.c.d)this.i.b(var5_4));\n if (var17_1 == 0) break block23;\n }\n this.e.e((y.c.d)this.i.b(var5_4));\n }\n var6_5 = this.c.h((y.c.d)var5_4);\n this.e.b((y.c.d)this.i.b(var5_4), (y.c.d)this.i.b(var6_5));\n var1_9.g();\n if (var17_1 == 0) continue;\n }\n break block24;\n }\n v1 = this;\n }\n var5_4 = v1.e.m();\n this.d.a(\"y.layout.orthogonal.general.NodeSplitter.NODE_FACES\", (y.c.c)var5_4);\n var6_5 = this.e.m();\n this.d.a(\"y.layout.orthogonal.ring.FixedSizeNodeSplitter#NODE_SIZE\", (y.c.c)var6_5);\n this.m = this.e.g().t();\n this.d.a(\"y.layout.orthogonal.ring.FixedSizeNodeSplitter#NODE_SIZE\", new c((r)var6_5, this.m));\n try {\n this.e.l();\n var7_6 = (y.c.d)this.i.b(var4_3);\n this.e.b(this.e.i((y.c.d)var7_6));\n var8_10 = this.e.h();\n while (var8_10.f()) {\n var5_4.a(var8_10.a(), false);\n var8_10.g();\n if (var17_1 == 0) {\n if (var17_1 == 0) continue;\n }\n break block25;\n }\n var8_10 = this.b.o();\n while (var8_10.f()) {\n var9_11 = var8_10.e();\n if (var17_1 != 0) break;\n if (var9_11.c() <= this.l) ** GOTO lbl-1000\n var10_12 = (y.c.d)this.h.b(var9_11);\n var11_13 = this.e.i((y.c.d)var10_12);\n this.h.a(var9_11, var11_13);\n var5_4.a((p)var11_13, true);\n var12_14 /* !! */ = (y.c.d)this.b.p((y.c.q)var9_11);\n var14_15 = this.b.q((y.c.q)var9_11);\n var16_16 = new Dimension((int)var12_14 /* !! */ , (int)var14_15);\n var6_5.a((p)var11_13, var16_16);\n if (var17_1 != 0) lbl-1000: // 2 sources:\n {\n var10_12 = this.b.r((y.c.q)var9_11);\n if (var10_12.a > 0.0 || var10_12.b > 0.0) {\n var11_13 = (y.c.q)this.h.b(var9_11);\n this.m.a(var11_13, this.b.r((y.c.q)var9_11));\n }\n }\n var8_10.g();\n if (var17_1 == 0) continue;\n break;\n }\n }\n catch (Exception var7_7) {\n System.err.println(\"Internal Error in Face calculation !\");\n var7_7.printStackTrace(System.err);\n }\n }\n var7_6 = this.e.h();\n block9 : do {\n if (var7_6.f() == false) return;\n var8_10 = (p)var7_6.d();\n if (var5_4.d(var8_10)) {\n var9_11 = var8_10.a();\n while (var9_11.f()) {\n var10_12 = var9_11.a();\n this.e.m(this.e.h((y.c.d)var10_12));\n this.e.e((y.c.d)var10_12);\n var9_11.g();\n if (var17_1 != 0) continue block9;\n if (var17_1 == 0) continue;\n }\n }\n var7_6.g();\n } while (var17_1 == 0);\n }", "@Test(timeout = 4000)\n public void test081() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter((-4015));\n String string0 = \"dVw2Z7M){e/Y(#j\";\n String string1 = \"~)yCTRxQ#s$\\\\y[Ly%\";\n String[] stringArray0 = new String[0];\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-4015), \"~)yCTRxQ#s$y[Ly%\", \"dVw2Z7M){e/Y(#j\", \"D9*nqAA\", stringArray0, false, true);\n Label label0 = new Label();\n methodWriter0.visitJumpInsn(1, label0);\n classWriter0.newNameTypeItem(\"s\", \"dVwZ7M)Ke/Y(#j\");\n Label label1 = new Label();\n // Undeclared exception!\n try { \n methodWriter0.visitJumpInsn((-1134), label0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.Frame\", e);\n }\n }", "public static void m5820b(java.lang.String r3, java.lang.String r4, java.lang.String r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.StartCheckoutEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r1 = 1;\n r0.putItemCount(r1);\n r1 = java.lang.Long.parseLong(r3);\t Catch:{ Exception -> 0x001f }\n r3 = java.math.BigDecimal.valueOf(r1);\t Catch:{ Exception -> 0x001f }\n r0.putTotalPrice(r3);\t Catch:{ Exception -> 0x001f }\n L_0x001f:\n r3 = \"type\";\n r0.putCustomAttribute(r3, r4);\n r3 = \"cta\";\n r0.putCustomAttribute(r3, r5);\n r3 = com.crashlytics.android.answers.Answers.getInstance();\n r3.logStartCheckout(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.b(java.lang.String, java.lang.String, java.lang.String):void\");\n }", "public void mo3613a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f18081b;\n monitor-enter(r0);\n r1 = r4.f18080a;\t Catch:{ all -> 0x001f }\n if (r1 == 0) goto L_0x0009;\t Catch:{ all -> 0x001f }\n L_0x0007:\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n return;\t Catch:{ all -> 0x001f }\n L_0x0009:\n r1 = 1;\t Catch:{ all -> 0x001f }\n r4.f18080a = r1;\t Catch:{ all -> 0x001f }\n r2 = r4.f18081b;\t Catch:{ all -> 0x001f }\n r3 = r2.f12200d;\t Catch:{ all -> 0x001f }\n r3 = r3 + r1;\t Catch:{ all -> 0x001f }\n r2.f12200d = r3;\t Catch:{ all -> 0x001f }\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n r0 = r4.f18083d;\n okhttp3.internal.C2933c.m14194a(r0);\n r0 = r4.f18082c;\t Catch:{ IOException -> 0x001e }\n r0.m14100c();\t Catch:{ IOException -> 0x001e }\n L_0x001e:\n return;\n L_0x001f:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a.a():void\");\n }", "@Test\n public void issue4274() throws IOException {\n Collection<FileAnnotation> warnings = new GccParser().parse(openFile(\"issue4274.txt\"));\n\n assertEquals(WRONG_NUMBER_OF_WARNINGS_DETECTED, 4, warnings.size());\n Iterator<FileAnnotation> iterator = warnings.iterator();\n checkWarning(iterator.next(),\n 638,\n \"local declaration of &quot;command&quot; hides instance variable\",\n \"folder1/file1.m\",\n TYPE, GCC_WARNING, Priority.NORMAL);\n checkWarning(iterator.next(),\n 640,\n \"instance variable &quot;command&quot; accessed in class method\",\n \"folder1/file1.m\",\n TYPE, GCC_WARNING, Priority.NORMAL);\n checkWarning(iterator.next(),\n 47,\n \"&quot;oldGeb&quot; might be used uninitialized in this function\",\n \"file1.m\",\n TYPE, GCC_WARNING, Priority.NORMAL);\n checkWarning(iterator.next(),\n 640,\n \"local declaration of &quot;command&quot; hides instance variable\",\n \"file1.m\",\n TYPE, GCC_WARNING, Priority.NORMAL);\n }", "private static void a(com.bytedance.crash.nativecrash.c r10) {\n /*\n java.lang.String r0 = \".info\"\n java.io.File r10 = r10.a((java.lang.String) r0)\n boolean r0 = r10.isFile()\n if (r0 == 0) goto L_0x009b\n java.util.Properties r0 = new java.util.Properties\n r0.<init>()\n r1 = 0\n java.io.FileInputStream r2 = new java.io.FileInputStream // Catch:{ Throwable -> 0x0094 }\n r2.<init>(r10) // Catch:{ Throwable -> 0x0094 }\n r0.load(r2) // Catch:{ Throwable -> 0x0093 }\n r2.close() // Catch:{ Throwable -> 0x0093 }\n java.lang.String r2 = \"alogJsonGenerated\"\n java.lang.String r2 = r0.getProperty(r2)\n if (r2 != 0) goto L_0x009b\n java.lang.String r2 = \"aloglogdir\"\n java.lang.String r2 = r0.getProperty(r2)\n if (r2 == 0) goto L_0x009b\n java.lang.String r3 = \"crash_time\"\n java.lang.String r3 = r0.getProperty(r3)\n r4 = 0\n if (r3 == 0) goto L_0x0042\n java.lang.Long r3 = java.lang.Long.valueOf(r3) // Catch:{ NumberFormatException -> 0x0041 }\n long r6 = r3.longValue() // Catch:{ NumberFormatException -> 0x0041 }\n r4 = r6\n goto L_0x0042\n L_0x0041:\n L_0x0042:\n java.lang.String r3 = \"process_name\"\n java.lang.String r3 = r0.getProperty(r3)\n if (r3 != 0) goto L_0x004c\n java.lang.String r3 = \"\"\n L_0x004c:\n com.bytedance.crash.a.e r6 = new com.bytedance.crash.a.e\n r6.<init>(r3)\n java.util.List r2 = r6.a(r2, r4)\n com.bytedance.crash.e.d r2 = com.bytedance.crash.a.a.a((java.util.List<java.lang.String>) r2)\n boolean r3 = com.bytedance.crash.a.a.a((com.bytedance.crash.e.d) r2)\n if (r3 != 0) goto L_0x0060\n return\n L_0x0060:\n android.content.Context r3 = com.bytedance.crash.j.d()\n java.io.File r4 = com.bytedance.crash.i.h.c(r3)\n java.lang.String r5 = com.bytedance.crash.i.h.a()\n java.lang.String r6 = r2.f19427e\n java.lang.String r7 = r2.f19428f\n java.lang.String r8 = r2.g\n java.util.List<java.lang.String> r9 = r2.h\n com.bytedance.crash.i.d.a((java.io.File) r4, (java.lang.String) r5, (java.lang.String) r6, (java.lang.String) r7, (java.lang.String) r8, (java.util.List<java.lang.String>) r9)\n java.io.FileOutputStream r2 = new java.io.FileOutputStream // Catch:{ Throwable -> 0x008d }\n r2.<init>(r10) // Catch:{ Throwable -> 0x008d }\n java.lang.String r10 = \"alogJsonGenerated\"\n java.lang.String r1 = \"true\"\n r0.setProperty(r10, r1) // Catch:{ Throwable -> 0x008c }\n java.lang.String r10 = \"\"\n r0.store(r2, r10) // Catch:{ Throwable -> 0x008c }\n r2.close() // Catch:{ Throwable -> 0x008c }\n return\n L_0x008c:\n r1 = r2\n L_0x008d:\n if (r1 == 0) goto L_0x009b\n r1.close() // Catch:{ Throwable -> 0x009b }\n return\n L_0x0093:\n r1 = r2\n L_0x0094:\n if (r1 == 0) goto L_0x009a\n r1.close() // Catch:{ Throwable -> 0x009a }\n return\n L_0x009a:\n return\n L_0x009b:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bytedance.crash.runtime.d.a(com.bytedance.crash.nativecrash.c):void\");\n }", "@androidx.annotation.WorkerThread\n /* Code decompiled incorrectly, please refer to instructions dump. */\n private static boolean zza(com.google.firebase.iid.FirebaseInstanceId r6, java.lang.String r7) {\n /*\n java.lang.String r0 = \"!\"\n java.lang.String[] r7 = r7.split(r0)\n int r0 = r7.length\n r1 = 1\n r2 = 2\n if (r0 != r2) goto L_0x0075\n r0 = 0\n r2 = r7[r0]\n r7 = r7[r1]\n r3 = -1\n int r4 = r2.hashCode() // Catch:{ IOException -> 0x0054 }\n r5 = 83\n if (r4 == r5) goto L_0x0028\n r5 = 85\n if (r4 == r5) goto L_0x001e\n goto L_0x0031\n L_0x001e:\n java.lang.String r4 = \"U\"\n boolean r2 = r2.equals(r4) // Catch:{ IOException -> 0x0054 }\n if (r2 == 0) goto L_0x0031\n r3 = 1\n goto L_0x0031\n L_0x0028:\n java.lang.String r4 = \"S\"\n boolean r2 = r2.equals(r4) // Catch:{ IOException -> 0x0054 }\n if (r2 == 0) goto L_0x0031\n r3 = 0\n L_0x0031:\n switch(r3) {\n case 0: goto L_0x0046;\n case 1: goto L_0x0035;\n default: goto L_0x0034;\n } // Catch:{ IOException -> 0x0054 }\n L_0x0034:\n goto L_0x0075\n L_0x0035:\n r6.zzc(r7) // Catch:{ IOException -> 0x0054 }\n boolean r6 = com.google.firebase.iid.FirebaseInstanceId.zzm() // Catch:{ IOException -> 0x0054 }\n if (r6 == 0) goto L_0x0075\n java.lang.String r6 = \"FirebaseInstanceId\"\n java.lang.String r7 = \"unsubscribe operation succeeded\"\n L_0x0042:\n android.util.Log.d(r6, r7) // Catch:{ IOException -> 0x0054 }\n goto L_0x0075\n L_0x0046:\n r6.zzb((java.lang.String) r7) // Catch:{ IOException -> 0x0054 }\n boolean r6 = com.google.firebase.iid.FirebaseInstanceId.zzm() // Catch:{ IOException -> 0x0054 }\n if (r6 == 0) goto L_0x0075\n java.lang.String r6 = \"FirebaseInstanceId\"\n java.lang.String r7 = \"subscribe operation succeeded\"\n goto L_0x0042\n L_0x0054:\n r6 = move-exception\n java.lang.String r7 = \"FirebaseInstanceId\"\n java.lang.String r1 = \"Topic sync failed: \"\n java.lang.String r6 = r6.getMessage()\n java.lang.String r6 = java.lang.String.valueOf(r6)\n int r2 = r6.length()\n if (r2 == 0) goto L_0x006c\n java.lang.String r6 = r1.concat(r6)\n goto L_0x0071\n L_0x006c:\n java.lang.String r6 = new java.lang.String\n r6.<init>(r1)\n L_0x0071:\n android.util.Log.e(r7, r6)\n return r0\n L_0x0075:\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.firebase.iid.zzba.zza(com.google.firebase.iid.FirebaseInstanceId, java.lang.String):boolean\");\n }", "private static void runTestCWE5() {\n}", "private static void runTestCWE5() {\n}", "public void zzbr() {\n /*\n r8 = this;\n r0 = 0;\n r2 = r8.zzF;\n L_0x0003:\n r1 = 10;\n if (r0 >= r1) goto L_0x0119;\n L_0x0007:\n r4 = r0 + 1;\n r0 = new java.net.URL;\t Catch:{ IndexOutOfBoundsException -> 0x00b6, IOException -> 0x00d1, RuntimeException -> 0x00ec }\n r0.<init>(r2);\t Catch:{ IndexOutOfBoundsException -> 0x00b6, IOException -> 0x00d1, RuntimeException -> 0x00ec }\n r1 = \"play.google.com\";\n r3 = r0.getHost();\t Catch:{ IndexOutOfBoundsException -> 0x00b6, IOException -> 0x00d1, RuntimeException -> 0x00ec }\n r1 = r1.equalsIgnoreCase(r3);\t Catch:{ IndexOutOfBoundsException -> 0x00b6, IOException -> 0x00d1, RuntimeException -> 0x00ec }\n if (r1 == 0) goto L_0x002d;\n L_0x001a:\n r0 = r2;\n L_0x001b:\n r0 = r8.zzT(r0);\n r1 = com.google.android.gms.ads.internal.zzr.zzbC();\n r2 = r8.zzpD;\n r2 = r2.getContext();\n r1.zzb(r2, r0);\n return;\n L_0x002d:\n r1 = \"market\";\n r3 = r0.getProtocol();\t Catch:{ IndexOutOfBoundsException -> 0x00b6, IOException -> 0x00d1, RuntimeException -> 0x00ec }\n r1 = r1.equalsIgnoreCase(r3);\t Catch:{ IndexOutOfBoundsException -> 0x00b6, IOException -> 0x00d1, RuntimeException -> 0x00ec }\n if (r1 == 0) goto L_0x003b;\n L_0x0039:\n r0 = r2;\n goto L_0x001b;\n L_0x003b:\n r0 = r0.openConnection();\t Catch:{ IndexOutOfBoundsException -> 0x00b6, IOException -> 0x00d1, RuntimeException -> 0x00ec }\n r0 = (java.net.HttpURLConnection) r0;\t Catch:{ IndexOutOfBoundsException -> 0x00b6, IOException -> 0x00d1, RuntimeException -> 0x00ec }\n r1 = com.google.android.gms.ads.internal.zzr.zzbC();\t Catch:{ all -> 0x00b1 }\n r3 = r8.zzpD;\t Catch:{ all -> 0x00b1 }\n r3 = r3.getContext();\t Catch:{ all -> 0x00b1 }\n r5 = r8.zzpD;\t Catch:{ all -> 0x00b1 }\n r5 = r5.zzhX();\t Catch:{ all -> 0x00b1 }\n r5 = r5.afmaVersion;\t Catch:{ all -> 0x00b1 }\n r6 = 0;\n r1.zza(r3, r5, r6, r0);\t Catch:{ all -> 0x00b1 }\n r1 = r0.getResponseCode();\t Catch:{ all -> 0x00b1 }\n r5 = r0.getHeaderFields();\t Catch:{ all -> 0x00b1 }\n r3 = \"\";\n r6 = 300; // 0x12c float:4.2E-43 double:1.48E-321;\n if (r1 < r6) goto L_0x0116;\n L_0x0065:\n r6 = 399; // 0x18f float:5.59E-43 double:1.97E-321;\n if (r1 > r6) goto L_0x0116;\n L_0x0069:\n r1 = 0;\n r6 = \"Location\";\n r6 = r5.containsKey(r6);\t Catch:{ all -> 0x00b1 }\n if (r6 == 0) goto L_0x0099;\n L_0x0072:\n r1 = \"Location\";\n r1 = r5.get(r1);\t Catch:{ all -> 0x00b1 }\n r1 = (java.util.List) r1;\t Catch:{ all -> 0x00b1 }\n L_0x007a:\n if (r1 == 0) goto L_0x0116;\n L_0x007c:\n r5 = r1.size();\t Catch:{ all -> 0x00b1 }\n if (r5 <= 0) goto L_0x0116;\n L_0x0082:\n r3 = 0;\n r1 = r1.get(r3);\t Catch:{ all -> 0x00b1 }\n r1 = (java.lang.String) r1;\t Catch:{ all -> 0x00b1 }\n L_0x0089:\n r3 = android.text.TextUtils.isEmpty(r1);\t Catch:{ all -> 0x00b1 }\n if (r3 == 0) goto L_0x00aa;\n L_0x008f:\n r1 = \"Arrived at landing page, this ideally should not happen. Will open it in browser.\";\n com.google.android.gms.ads.internal.util.client.zzb.zzaK(r1);\t Catch:{ all -> 0x00b1 }\n r0.disconnect();\t Catch:{ IndexOutOfBoundsException -> 0x00b6, IOException -> 0x00d1, RuntimeException -> 0x00ec }\n r0 = r2;\n goto L_0x001b;\n L_0x0099:\n r6 = \"location\";\n r6 = r5.containsKey(r6);\t Catch:{ all -> 0x00b1 }\n if (r6 == 0) goto L_0x007a;\n L_0x00a1:\n r1 = \"location\";\n r1 = r5.get(r1);\t Catch:{ all -> 0x00b1 }\n r1 = (java.util.List) r1;\t Catch:{ all -> 0x00b1 }\n goto L_0x007a;\n L_0x00aa:\n r0.disconnect();\t Catch:{ IndexOutOfBoundsException -> 0x0111, IOException -> 0x010c, RuntimeException -> 0x0107 }\n r0 = r4;\n r2 = r1;\n goto L_0x0003;\n L_0x00b1:\n r1 = move-exception;\n r0.disconnect();\t Catch:{ IndexOutOfBoundsException -> 0x00b6, IOException -> 0x00d1, RuntimeException -> 0x00ec }\n throw r1;\t Catch:{ IndexOutOfBoundsException -> 0x00b6, IOException -> 0x00d1, RuntimeException -> 0x00ec }\n L_0x00b6:\n r0 = move-exception;\n r1 = r0;\n r0 = r2;\n L_0x00b9:\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"Error while parsing ping URL: \";\n r2 = r2.append(r3);\n r2 = r2.append(r0);\n r2 = r2.toString();\n com.google.android.gms.ads.internal.util.client.zzb.zzd(r2, r1);\n goto L_0x001b;\n L_0x00d1:\n r0 = move-exception;\n r1 = r0;\n r0 = r2;\n L_0x00d4:\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"Error while pinging URL: \";\n r2 = r2.append(r3);\n r2 = r2.append(r0);\n r2 = r2.toString();\n com.google.android.gms.ads.internal.util.client.zzb.zzd(r2, r1);\n goto L_0x001b;\n L_0x00ec:\n r0 = move-exception;\n r1 = r0;\n r0 = r2;\n L_0x00ef:\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"Error while pinging URL: \";\n r2 = r2.append(r3);\n r2 = r2.append(r0);\n r2 = r2.toString();\n com.google.android.gms.ads.internal.util.client.zzb.zzd(r2, r1);\n goto L_0x001b;\n L_0x0107:\n r0 = move-exception;\n r7 = r0;\n r0 = r1;\n r1 = r7;\n goto L_0x00ef;\n L_0x010c:\n r0 = move-exception;\n r7 = r0;\n r0 = r1;\n r1 = r7;\n goto L_0x00d4;\n L_0x0111:\n r0 = move-exception;\n r7 = r0;\n r0 = r1;\n r1 = r7;\n goto L_0x00b9;\n L_0x0116:\n r1 = r3;\n goto L_0x0089;\n L_0x0119:\n r0 = r2;\n goto L_0x001b;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.zzdm.zza.zzbr():void\");\n }", "public void test431874() throws Exception\n {\n executeTidyTest(\"431874.html\");\n assertWarnings(2);\n }", "private final java.util.Map<java.lang.String, java.lang.String> m11967c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r7 = this;\n r0 = new java.util.HashMap;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r0.<init>();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r7.f10169c;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r2 = r7.f10170d;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r3 = f10168i;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r4 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r5 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r6 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r1.query(r2, r3, r4, r5, r6);\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n if (r1 == 0) goto L_0x0031;\n L_0x0014:\n r2 = r1.moveToNext();\t Catch:{ all -> 0x002c }\n if (r2 == 0) goto L_0x0028;\t Catch:{ all -> 0x002c }\n L_0x001a:\n r2 = 0;\t Catch:{ all -> 0x002c }\n r2 = r1.getString(r2);\t Catch:{ all -> 0x002c }\n r3 = 1;\t Catch:{ all -> 0x002c }\n r3 = r1.getString(r3);\t Catch:{ all -> 0x002c }\n r0.put(r2, r3);\t Catch:{ all -> 0x002c }\n goto L_0x0014;\n L_0x0028:\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n goto L_0x0031;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x002c:\n r0 = move-exception;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n throw r0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x0031:\n return r0;\n L_0x0032:\n r0 = \"ConfigurationContentLoader\";\n r1 = \"PhenotypeFlag unable to load ContentProvider, using default values\";\n android.util.Log.e(r0, r1);\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzsi.c():java.util.Map<java.lang.String, java.lang.String>\");\n }", "@kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000T\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\t\\n\\u0002\\b\\u0007\\n\\u0002\\u0010\\u000b\\n\\u0002\\b\\u0005\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0005\\n\\u0002\\u0010 \\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\n\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\bv\\u0018\\u00002\\u00020\\u0001:\\u0004./01J\\b\\u0010,\\u001a\\u00020\\u000fH&J\\b\\u0010-\\u001a\\u00020\\u000fH&R\\u0014\\u0010\\u0002\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0004\\u0010\\u0005R\\u0012\\u0010\\u0006\\u001a\\u00020\\u0007X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\b\\u0010\\tR\\u0014\\u0010\\n\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u000b\\u0010\\u0005R\\u0014\\u0010\\f\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\r\\u0010\\u0005R\\u0012\\u0010\\u000e\\u001a\\u00020\\u000fX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u000e\\u0010\\u0010R\\u0012\\u0010\\u0011\\u001a\\u00020\\u000fX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0011\\u0010\\u0010R\\u0014\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0013\\u0010\\u0005R\\u0014\\u0010\\u0014\\u001a\\u0004\\u0018\\u00010\\u0015X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0016\\u0010\\u0017R\\u0014\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u001a\\u0010\\u001bR\\u0014\\u0010\\u001c\\u001a\\u0004\\u0018\\u00010\\u001dX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u001e\\u0010\\u001fR\\u0014\\u0010 \\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b!\\u0010\\u0005R\\u0018\\u0010\\\"\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030#X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b$\\u0010%R\\u0014\\u0010&\\u001a\\u0004\\u0018\\u00010\\'X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b(\\u0010)R\\u0018\\u0010*\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030#X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b+\\u0010%\\u0082\\u0001\\u000223\\u00a8\\u00064\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent;\", \"Lcom/stripe/android/model/StripeModel;\", \"clientSecret\", \"\", \"getClientSecret\", \"()Ljava/lang/String;\", \"created\", \"\", \"getCreated\", \"()J\", \"description\", \"getDescription\", \"id\", \"getId\", \"isConfirmed\", \"\", \"()Z\", \"isLiveMode\", \"lastErrorMessage\", \"getLastErrorMessage\", \"nextActionData\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"getNextActionData\", \"()Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"nextActionType\", \"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"getNextActionType\", \"()Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"paymentMethod\", \"Lcom/stripe/android/model/PaymentMethod;\", \"getPaymentMethod\", \"()Lcom/stripe/android/model/PaymentMethod;\", \"paymentMethodId\", \"getPaymentMethodId\", \"paymentMethodTypes\", \"\", \"getPaymentMethodTypes\", \"()Ljava/util/List;\", \"status\", \"Lcom/stripe/android/model/StripeIntent$Status;\", \"getStatus\", \"()Lcom/stripe/android/model/StripeIntent$Status;\", \"unactivatedPaymentMethods\", \"getUnactivatedPaymentMethods\", \"requiresAction\", \"requiresConfirmation\", \"NextActionData\", \"NextActionType\", \"Status\", \"Usage\", \"Lcom/stripe/android/model/PaymentIntent;\", \"Lcom/stripe/android/model/SetupIntent;\", \"payments-core_release\"})\npublic abstract interface StripeIntent extends com.stripe.android.model.StripeModel {\n \n /**\n * Unique identifier for the object.\n */\n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getId();\n \n /**\n * Time at which the object was created. Measured in seconds since the Unix epoch.\n */\n public abstract long getCreated();\n \n /**\n * An arbitrary string attached to the object. Often useful for displaying to users.\n */\n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getDescription();\n \n /**\n * Has the value true if the object exists in live mode or the value false if the object exists\n * in test mode.\n */\n public abstract boolean isLiveMode();\n \n /**\n * The expanded [PaymentMethod] represented by [paymentMethodId].\n */\n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.PaymentMethod getPaymentMethod();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getPaymentMethodId();\n \n /**\n * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.\n */\n @org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getPaymentMethodTypes();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.NextActionType getNextActionType();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getClientSecret();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.Status getStatus();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.NextActionData getNextActionData();\n \n /**\n * Whether confirmation has succeeded and all required actions have been handled.\n */\n public abstract boolean isConfirmed();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getLastErrorMessage();\n \n /**\n * Payment types that have not been activated in livemode, but have been activated in testmode.\n */\n @org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getUnactivatedPaymentMethods();\n \n public abstract boolean requiresAction();\n \n public abstract boolean requiresConfirmation();\n \n /**\n * Type of the next action to perform.\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\f\\b\\u0086\\u0001\\u0018\\u0000 \\u000e2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000eB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\nj\\u0002\\b\\u000bj\\u0002\\b\\fj\\u0002\\b\\r\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"RedirectToUrl\", \"UseStripeSdk\", \"DisplayOxxoDetails\", \"AlipayRedirect\", \"BlikAuthorize\", \"WeChatPayRedirect\", \"Companion\", \"payments-core_release\"})\n public static enum NextActionType {\n /*public static final*/ RedirectToUrl /* = new RedirectToUrl(null) */,\n /*public static final*/ UseStripeSdk /* = new UseStripeSdk(null) */,\n /*public static final*/ DisplayOxxoDetails /* = new DisplayOxxoDetails(null) */,\n /*public static final*/ AlipayRedirect /* = new AlipayRedirect(null) */,\n /*public static final*/ BlikAuthorize /* = new BlikAuthorize(null) */,\n /*public static final*/ WeChatPayRedirect /* = new WeChatPayRedirect(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.NextActionType.Companion Companion = null;\n \n NextActionType(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionType$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.NextActionType fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n /**\n * - [The Intent State Machine - Intent statuses](https://stripe.com/docs/payments/intents#intent-statuses)\n * - [PaymentIntent.status API reference](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-status)\n * - [SetupIntent.status API reference](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-status)\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\r\\b\\u0086\\u0001\\u0018\\u0000 \\u000f2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000fB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\nj\\u0002\\b\\u000bj\\u0002\\b\\fj\\u0002\\b\\rj\\u0002\\b\\u000e\\u00a8\\u0006\\u0010\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Status;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"Canceled\", \"Processing\", \"RequiresAction\", \"RequiresConfirmation\", \"RequiresPaymentMethod\", \"Succeeded\", \"RequiresCapture\", \"Companion\", \"payments-core_release\"})\n public static enum Status {\n /*public static final*/ Canceled /* = new Canceled(null) */,\n /*public static final*/ Processing /* = new Processing(null) */,\n /*public static final*/ RequiresAction /* = new RequiresAction(null) */,\n /*public static final*/ RequiresConfirmation /* = new RequiresConfirmation(null) */,\n /*public static final*/ RequiresPaymentMethod /* = new RequiresPaymentMethod(null) */,\n /*public static final*/ Succeeded /* = new Succeeded(null) */,\n /*public static final*/ RequiresCapture /* = new RequiresCapture(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.Status.Companion Companion = null;\n \n Status(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Status$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$Status;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.Status fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n /**\n * See [setup_intent.usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) and\n * [Reusing Cards](https://stripe.com/docs/payments/cards/reusing-cards).\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\t\\b\\u0086\\u0001\\u0018\\u0000 \\u000b2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000bB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\n\\u00a8\\u0006\\f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Usage;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"OnSession\", \"OffSession\", \"OneTime\", \"Companion\", \"payments-core_release\"})\n public static enum Usage {\n /*public static final*/ OnSession /* = new OnSession(null) */,\n /*public static final*/ OffSession /* = new OffSession(null) */,\n /*public static final*/ OneTime /* = new OneTime(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.Usage.Companion Companion = null;\n \n Usage(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Usage$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$Usage;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.Usage fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000&\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0007\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\b6\\u0018\\u00002\\u00020\\u0001:\\u0006\\u0003\\u0004\\u0005\\u0006\\u0007\\bB\\u0007\\b\\u0004\\u00a2\\u0006\\u0002\\u0010\\u0002\\u0082\\u0001\\u0006\\t\\n\\u000b\\f\\r\\u000e\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"Lcom/stripe/android/model/StripeModel;\", \"()V\", \"AlipayRedirect\", \"BlikAuthorize\", \"DisplayOxxoDetails\", \"RedirectToUrl\", \"SdkData\", \"WeChatPayRedirect\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$DisplayOxxoDetails;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$RedirectToUrl;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$BlikAuthorize;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$WeChatPayRedirect;\", \"payments-core_release\"})\n public static abstract class NextActionData implements com.stripe.android.model.StripeModel {\n \n private NextActionData() {\n super();\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u00004\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\r\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\'\\u0012\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u0012\\n\\b\\u0002\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\u0002\\u0010\\u0007J\\t\\u0010\\r\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\u000e\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J\\u000b\\u0010\\u000f\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J+\\u0010\\u0010\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u00052\\n\\b\\u0002\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0001J\\t\\u0010\\u0011\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0013\\u0010\\u0012\\u001a\\u00020\\u00132\\b\\u0010\\u0014\\u001a\\u0004\\u0018\\u00010\\u0015H\\u00d6\\u0003J\\t\\u0010\\u0016\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\t\\u0010\\u0017\\u001a\\u00020\\u0005H\\u00d6\\u0001J\\u0019\\u0010\\u0018\\u001a\\u00020\\u00192\\u0006\\u0010\\u001a\\u001a\\u00020\\u001b2\\u0006\\u0010\\u001c\\u001a\\u00020\\u0003H\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\b\\u0010\\tR\\u0013\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\n\\u0010\\u000bR\\u0013\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\u000b\\u00a8\\u0006\\u001d\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$DisplayOxxoDetails;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"expiresAfter\", \"\", \"number\", \"\", \"hostedVoucherUrl\", \"(ILjava/lang/String;Ljava/lang/String;)V\", \"getExpiresAfter\", \"()I\", \"getHostedVoucherUrl\", \"()Ljava/lang/String;\", \"getNumber\", \"component1\", \"component2\", \"component3\", \"copy\", \"describeContents\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class DisplayOxxoDetails extends com.stripe.android.model.StripeIntent.NextActionData {\n \n /**\n * The timestamp after which the OXXO expires.\n */\n private final int expiresAfter = 0;\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String number = null;\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String hostedVoucherUrl = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails copy(int expiresAfter, @org.jetbrains.annotations.Nullable()\n java.lang.String number, @org.jetbrains.annotations.Nullable()\n java.lang.String hostedVoucherUrl) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public DisplayOxxoDetails() {\n super();\n }\n \n public DisplayOxxoDetails(int expiresAfter, @org.jetbrains.annotations.Nullable()\n java.lang.String number, @org.jetbrains.annotations.Nullable()\n java.lang.String hostedVoucherUrl) {\n super();\n }\n \n /**\n * The timestamp after which the OXXO expires.\n */\n public final int component1() {\n return 0;\n }\n \n /**\n * The timestamp after which the OXXO expires.\n */\n public final int getExpiresAfter() {\n return 0;\n }\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getNumber() {\n return null;\n }\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component3() {\n return null;\n }\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getHostedVoucherUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails[] newArray(int size) {\n return null;\n }\n }\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000:\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\t\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\u0017\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\b\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\u0002\\u0010\\u0006J\\t\\u0010\\u000b\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\f\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J\\u001f\\u0010\\r\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0001J\\t\\u0010\\u000e\\u001a\\u00020\\u000fH\\u00d6\\u0001J\\u0013\\u0010\\u0010\\u001a\\u00020\\u00112\\b\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0013H\\u00d6\\u0003J\\t\\u0010\\u0014\\u001a\\u00020\\u000fH\\u00d6\\u0001J\\t\\u0010\\u0015\\u001a\\u00020\\u0005H\\u00d6\\u0001J\\u0019\\u0010\\u0016\\u001a\\u00020\\u00172\\u0006\\u0010\\u0018\\u001a\\u00020\\u00192\\u0006\\u0010\\u001a\\u001a\\u00020\\u000fH\\u00d6\\u0001R\\u0013\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0007\\u0010\\bR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\n\\u00a8\\u0006\\u001b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$RedirectToUrl;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"url\", \"Landroid/net/Uri;\", \"returnUrl\", \"\", \"(Landroid/net/Uri;Ljava/lang/String;)V\", \"getReturnUrl\", \"()Ljava/lang/String;\", \"getUrl\", \"()Landroid/net/Uri;\", \"component1\", \"component2\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class RedirectToUrl extends com.stripe.android.model.StripeIntent.NextActionData {\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n private final android.net.Uri url = null;\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String returnUrl = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl> CREATOR = null;\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl copy(@org.jetbrains.annotations.NotNull()\n android.net.Uri url, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n return null;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public RedirectToUrl(@org.jetbrains.annotations.NotNull()\n android.net.Uri url, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri component1() {\n return null;\n }\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri getUrl() {\n return null;\n }\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getReturnUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0004\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\r\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\b\\u0081\\b\\u0018\\u0000 \\\"2\\u00020\\u0001:\\u0001\\\"B#\\b\\u0010\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0006B+\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\b\\u0012\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\tJ\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\u0011\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0012\\u001a\\u00020\\bH\\u00c6\\u0003J\\u000b\\u0010\\u0013\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J5\\u0010\\u0014\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\b2\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0001J\\t\\u0010\\u0015\\u001a\\u00020\\u0016H\\u00d6\\u0001J\\u0013\\u0010\\u0017\\u001a\\u00020\\u00182\\b\\u0010\\u0019\\u001a\\u0004\\u0018\\u00010\\u001aH\\u00d6\\u0003J\\t\\u0010\\u001b\\u001a\\u00020\\u0016H\\u00d6\\u0001J\\t\\u0010\\u001c\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001d\\u001a\\u00020\\u001e2\\u0006\\u0010\\u001f\\u001a\\u00020 2\\u0006\\u0010!\\u001a\\u00020\\u0016H\\u00d6\\u0001R\\u0013\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\n\\u0010\\u000bR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\u000bR\\u0013\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\u000bR\\u0011\\u0010\\u0004\\u001a\\u00020\\b\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000e\\u0010\\u000f\\u00a8\\u0006#\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"data\", \"\", \"webViewUrl\", \"returnUrl\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V\", \"authCompleteUrl\", \"Landroid/net/Uri;\", \"(Ljava/lang/String;Ljava/lang/String;Landroid/net/Uri;Ljava/lang/String;)V\", \"getAuthCompleteUrl\", \"()Ljava/lang/String;\", \"getData\", \"getReturnUrl\", \"getWebViewUrl\", \"()Landroid/net/Uri;\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"Companion\", \"payments-core_release\"})\n public static final class AlipayRedirect extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String data = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String authCompleteUrl = null;\n @org.jetbrains.annotations.NotNull()\n private final android.net.Uri webViewUrl = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String returnUrl = null;\n @org.jetbrains.annotations.NotNull()\n private static final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect.Companion Companion = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect copy(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.Nullable()\n java.lang.String authCompleteUrl, @org.jetbrains.annotations.NotNull()\n android.net.Uri webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public AlipayRedirect(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.Nullable()\n java.lang.String authCompleteUrl, @org.jetbrains.annotations.NotNull()\n android.net.Uri webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getData() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getAuthCompleteUrl() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri getWebViewUrl() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component4() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getReturnUrl() {\n return null;\n }\n \n public AlipayRedirect(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.NotNull()\n java.lang.String webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect[] newArray(int size) {\n return null;\n }\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0014\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0082\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0012\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\u0006\\u0010\\u0005\\u001a\\u00020\\u0004H\\u0002\\u00a8\\u0006\\u0006\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect$Companion;\", \"\", \"()V\", \"extractReturnUrl\", \"\", \"data\", \"payments-core_release\"})\n static final class Companion {\n \n private Companion() {\n super();\n }\n \n /**\n * The alipay data string is formatted as query parameters.\n * When authenticate is complete, we make a request to the\n * return_url param, as a hint to the backend to ping Alipay for\n * the updated state\n */\n private final java.lang.String extractReturnUrl(java.lang.String data) {\n return null;\n }\n }\n }\n \n /**\n * When confirming a [PaymentIntent] or [SetupIntent] with the Stripe SDK, the Stripe SDK\n * depends on this property to invoke authentication flows. The shape of the contents is subject\n * to change and is only intended to be used by the Stripe SDK.\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0016\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\b6\\u0018\\u00002\\u00020\\u0001:\\u0002\\u0003\\u0004B\\u0007\\b\\u0004\\u00a2\\u0006\\u0002\\u0010\\u0002\\u0082\\u0001\\u0002\\u0005\\u0006\\u00a8\\u0006\\u0007\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"()V\", \"Use3DS1\", \"Use3DS2\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS1;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2;\", \"payments-core_release\"})\n public static abstract class SdkData extends com.stripe.android.model.StripeIntent.NextActionData {\n \n private SdkData() {\n super();\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u00004\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0006\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\r\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\t\\u0010\\u0007\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u0013\\u0010\\b\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003H\\u00c6\\u0001J\\t\\u0010\\t\\u001a\\u00020\\nH\\u00d6\\u0001J\\u0013\\u0010\\u000b\\u001a\\u00020\\f2\\b\\u0010\\r\\u001a\\u0004\\u0018\\u00010\\u000eH\\u00d6\\u0003J\\t\\u0010\\u000f\\u001a\\u00020\\nH\\u00d6\\u0001J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u0011\\u001a\\u00020\\u00122\\u0006\\u0010\\u0013\\u001a\\u00020\\u00142\\u0006\\u0010\\u0015\\u001a\\u00020\\nH\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006\\u00a8\\u0006\\u0016\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS1;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"url\", \"\", \"(Ljava/lang/String;)V\", \"getUrl\", \"()Ljava/lang/String;\", \"component1\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class Use3DS1 extends com.stripe.android.model.StripeIntent.NextActionData.SdkData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String url = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1 copy(@org.jetbrains.annotations.NotNull()\n java.lang.String url) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public Use3DS1(@org.jetbrains.annotations.NotNull()\n java.lang.String url) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1 createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\r\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001:\\u0001!B%\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0005\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0006\\u001a\\u00020\\u0007\\u00a2\\u0006\\u0002\\u0010\\bJ\\t\\u0010\\u000f\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0011\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0012\\u001a\\u00020\\u0007H\\u00c6\\u0003J1\\u0010\\u0013\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0005\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0006\\u001a\\u00020\\u0007H\\u00c6\\u0001J\\t\\u0010\\u0014\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\u0013\\u0010\\u0016\\u001a\\u00020\\u00172\\b\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019H\\u00d6\\u0003J\\t\\u0010\\u001a\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\t\\u0010\\u001b\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001c\\u001a\\u00020\\u001d2\\u0006\\u0010\\u001e\\u001a\\u00020\\u001f2\\u0006\\u0010 \\u001a\\u00020\\u0015H\\u00d6\\u0001R\\u0011\\u0010\\u0006\\u001a\\u00020\\u0007\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\nR\\u0011\\u0010\\u0004\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000b\\u0010\\fR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\fR\\u0011\\u0010\\u0005\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000e\\u0010\\f\\u00a8\\u0006\\\"\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"source\", \"\", \"serverName\", \"transactionId\", \"serverEncryption\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;)V\", \"getServerEncryption\", \"()Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"getServerName\", \"()Ljava/lang/String;\", \"getSource\", \"getTransactionId\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"DirectoryServerEncryption\", \"payments-core_release\"})\n public static final class Use3DS2 extends com.stripe.android.model.StripeIntent.NextActionData.SdkData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String source = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String serverName = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String transactionId = null;\n @org.jetbrains.annotations.NotNull()\n private final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2 copy(@org.jetbrains.annotations.NotNull()\n java.lang.String source, @org.jetbrains.annotations.NotNull()\n java.lang.String serverName, @org.jetbrains.annotations.NotNull()\n java.lang.String transactionId, @org.jetbrains.annotations.NotNull()\n com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public Use3DS2(@org.jetbrains.annotations.NotNull()\n java.lang.String source, @org.jetbrains.annotations.NotNull()\n java.lang.String serverName, @org.jetbrains.annotations.NotNull()\n java.lang.String transactionId, @org.jetbrains.annotations.NotNull()\n com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getSource() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getServerName() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getTransactionId() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption component4() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption getServerEncryption() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2 createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2[] newArray(int size) {\n return null;\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\n\\u0002\\u0010 \\n\\u0002\\b\\u000e\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B-\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\f\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006\\u0012\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\bJ\\t\\u0010\\u000f\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000f\\u0010\\u0011\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006H\\u00c6\\u0003J\\u000b\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J9\\u0010\\u0013\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\u00032\\u000e\\b\\u0002\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u00062\\n\\b\\u0002\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0001J\\t\\u0010\\u0014\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\u0013\\u0010\\u0016\\u001a\\u00020\\u00172\\b\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019H\\u00d6\\u0003J\\t\\u0010\\u001a\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\t\\u0010\\u001b\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001c\\u001a\\u00020\\u001d2\\u0006\\u0010\\u001e\\u001a\\u00020\\u001f2\\u0006\\u0010 \\u001a\\u00020\\u0015H\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\nR\\u0011\\u0010\\u0004\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000b\\u0010\\nR\\u0013\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\nR\\u0017\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\u000e\\u00a8\\u0006!\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"Landroid/os/Parcelable;\", \"directoryServerId\", \"\", \"dsCertificateData\", \"rootCertsData\", \"\", \"keyId\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)V\", \"getDirectoryServerId\", \"()Ljava/lang/String;\", \"getDsCertificateData\", \"getKeyId\", \"getRootCertsData\", \"()Ljava/util/List;\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class DirectoryServerEncryption implements android.os.Parcelable {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String directoryServerId = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String dsCertificateData = null;\n @org.jetbrains.annotations.NotNull()\n private final java.util.List<java.lang.String> rootCertsData = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String keyId = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption copy(@org.jetbrains.annotations.NotNull()\n java.lang.String directoryServerId, @org.jetbrains.annotations.NotNull()\n java.lang.String dsCertificateData, @org.jetbrains.annotations.NotNull()\n java.util.List<java.lang.String> rootCertsData, @org.jetbrains.annotations.Nullable()\n java.lang.String keyId) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public DirectoryServerEncryption(@org.jetbrains.annotations.NotNull()\n java.lang.String directoryServerId, @org.jetbrains.annotations.NotNull()\n java.lang.String dsCertificateData, @org.jetbrains.annotations.NotNull()\n java.util.List<java.lang.String> rootCertsData, @org.jetbrains.annotations.Nullable()\n java.lang.String keyId) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getDirectoryServerId() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getDsCertificateData() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.util.List<java.lang.String> component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.util.List<java.lang.String> getRootCertsData() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component4() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getKeyId() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption[] newArray(int size) {\n return null;\n }\n }\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000.\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u00c7\\u0002\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\t\\u0010\\u0003\\u001a\\u00020\\u0004H\\u00d6\\u0001J\\u0013\\u0010\\u0005\\u001a\\u00020\\u00062\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\bH\\u0096\\u0002J\\b\\u0010\\t\\u001a\\u00020\\u0004H\\u0016J\\u0019\\u0010\\n\\u001a\\u00020\\u000b2\\u0006\\u0010\\f\\u001a\\u00020\\r2\\u0006\\u0010\\u000e\\u001a\\u00020\\u0004H\\u00d6\\u0001\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$BlikAuthorize;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"()V\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class BlikAuthorize extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize INSTANCE = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize> CREATOR = null;\n \n private BlikAuthorize() {\n super();\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @androidx.annotation.RestrictTo(value = {androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP})\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000:\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0006\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u000e\\n\\u0000\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\r\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\t\\u0010\\u0007\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u0013\\u0010\\b\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003H\\u00c6\\u0001J\\t\\u0010\\t\\u001a\\u00020\\nH\\u00d6\\u0001J\\u0013\\u0010\\u000b\\u001a\\u00020\\f2\\b\\u0010\\r\\u001a\\u0004\\u0018\\u00010\\u000eH\\u00d6\\u0003J\\t\\u0010\\u000f\\u001a\\u00020\\nH\\u00d6\\u0001J\\t\\u0010\\u0010\\u001a\\u00020\\u0011H\\u00d6\\u0001J\\u0019\\u0010\\u0012\\u001a\\u00020\\u00132\\u0006\\u0010\\u0014\\u001a\\u00020\\u00152\\u0006\\u0010\\u0016\\u001a\\u00020\\nH\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006\\u00a8\\u0006\\u0017\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$WeChatPayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"weChat\", \"Lcom/stripe/android/model/WeChat;\", \"(Lcom/stripe/android/model/WeChat;)V\", \"getWeChat\", \"()Lcom/stripe/android/model/WeChat;\", \"component1\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class WeChatPayRedirect extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n private final com.stripe.android.model.WeChat weChat = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect copy(@org.jetbrains.annotations.NotNull()\n com.stripe.android.model.WeChat weChat) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public WeChatPayRedirect(@org.jetbrains.annotations.NotNull()\n com.stripe.android.model.WeChat weChat) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.WeChat component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.WeChat getWeChat() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect[] newArray(int size) {\n return null;\n }\n }\n }\n }\n}", "public static int m60268b(java.lang.String r3, int r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = java.lang.Long.parseLong(r3);\t Catch:{ NumberFormatException -> 0x0019 }\n r3 = 2147483647; // 0x7fffffff float:NaN double:1.060997895E-314;\n r2 = (r0 > r3 ? 1 : (r0 == r3 ? 0 : -1));\n if (r2 <= 0) goto L_0x000f;\n L_0x000b:\n r3 = 2147483647; // 0x7fffffff float:NaN double:1.060997895E-314;\n return r3;\n L_0x000f:\n r3 = 0;\n r2 = (r0 > r3 ? 1 : (r0 == r3 ? 0 : -1));\n if (r2 >= 0) goto L_0x0017;\n L_0x0015:\n r3 = 0;\n return r3;\n L_0x0017:\n r3 = (int) r0;\n return r3;\n L_0x0019:\n return r4;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.http.d.b(java.lang.String, int):int\");\n }", "public boolean mo9310a(java.lang.Exception r4) {\n /*\n r3 = this;\n java.lang.Object r0 = r3.f8650a\n monitor-enter(r0)\n boolean r1 = r3.f8651b // Catch:{ all -> 0x002c }\n r2 = 0\n if (r1 == 0) goto L_0x000a\n monitor-exit(r0) // Catch:{ all -> 0x002c }\n return r2\n L_0x000a:\n r1 = 1\n r3.f8651b = r1 // Catch:{ all -> 0x002c }\n r3.f8654e = r4 // Catch:{ all -> 0x002c }\n r3.f8655f = r2 // Catch:{ all -> 0x002c }\n java.lang.Object r4 = r3.f8650a // Catch:{ all -> 0x002c }\n r4.notifyAll() // Catch:{ all -> 0x002c }\n r3.m11250m() // Catch:{ all -> 0x002c }\n boolean r4 = r3.f8655f // Catch:{ all -> 0x002c }\n if (r4 != 0) goto L_0x002a\n bolts.n$q r4 = m11249l() // Catch:{ all -> 0x002c }\n if (r4 == 0) goto L_0x002a\n bolts.p r4 = new bolts.p // Catch:{ all -> 0x002c }\n r4.<init>(r3) // Catch:{ all -> 0x002c }\n r3.f8656g = r4 // Catch:{ all -> 0x002c }\n L_0x002a:\n monitor-exit(r0) // Catch:{ all -> 0x002c }\n return r1\n L_0x002c:\n r4 = move-exception\n monitor-exit(r0) // Catch:{ all -> 0x002c }\n throw r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: bolts.C2177n.mo9310a(java.lang.Exception):boolean\");\n }", "private static void runTestCWE7() {\n}", "private static void runTestCWE7() {\n}", "public final synchronized com.google.android.m4b.maps.bu.C4910a m21843a(java.lang.String r10) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r9 = this;\n monitor-enter(r9);\n r0 = r9.f17909e;\t Catch:{ all -> 0x0056 }\n r1 = 0;\n if (r0 != 0) goto L_0x0008;\n L_0x0006:\n monitor-exit(r9);\n return r1;\n L_0x0008:\n r0 = r9.f17907c;\t Catch:{ all -> 0x0056 }\n r2 = com.google.android.m4b.maps.az.C4733b.m21060a(r10);\t Catch:{ all -> 0x0056 }\n r0 = r0.m21933a(r2, r1);\t Catch:{ all -> 0x0056 }\n if (r0 == 0) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0014:\n r2 = r0.length;\t Catch:{ all -> 0x0056 }\n r3 = 9;\t Catch:{ all -> 0x0056 }\n if (r2 <= r3) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0019:\n r2 = 0;\t Catch:{ all -> 0x0056 }\n r2 = r0[r2];\t Catch:{ all -> 0x0056 }\n r4 = 1;\t Catch:{ all -> 0x0056 }\n if (r2 == r4) goto L_0x0020;\t Catch:{ all -> 0x0056 }\n L_0x001f:\n goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0020:\n r5 = com.google.android.m4b.maps.bs.C4891e.m21914c(r0, r4);\t Catch:{ all -> 0x0056 }\n r2 = new com.google.android.m4b.maps.ar.a;\t Catch:{ all -> 0x0056 }\n r7 = com.google.android.m4b.maps.de.C5350x.f20104b;\t Catch:{ all -> 0x0056 }\n r2.<init>(r7);\t Catch:{ all -> 0x0056 }\n r7 = new java.io.ByteArrayInputStream;\t Catch:{ IOException -> 0x0052 }\n r8 = r0.length;\t Catch:{ IOException -> 0x0052 }\n r8 = r8 - r3;\t Catch:{ IOException -> 0x0052 }\n r7.<init>(r0, r3, r8);\t Catch:{ IOException -> 0x0052 }\n r2.m20818a(r7);\t Catch:{ IOException -> 0x0052 }\n r0 = 2;\n r0 = r2.m20843h(r0);\t Catch:{ all -> 0x0056 }\n r10 = r10.equals(r0);\t Catch:{ all -> 0x0056 }\n if (r10 != 0) goto L_0x0042;\n L_0x0040:\n monitor-exit(r9);\n return r1;\n L_0x0042:\n r10 = new com.google.android.m4b.maps.bu.a;\t Catch:{ all -> 0x0056 }\n r10.<init>();\t Catch:{ all -> 0x0056 }\n r10.m22018a(r4);\t Catch:{ all -> 0x0056 }\n r10.m22020a(r2);\t Catch:{ all -> 0x0056 }\n r10.m22016a(r5);\t Catch:{ all -> 0x0056 }\n monitor-exit(r9);\n return r10;\n L_0x0052:\n monitor-exit(r9);\n return r1;\n L_0x0054:\n monitor-exit(r9);\n return r1;\n L_0x0056:\n r10 = move-exception;\n monitor-exit(r9);\n throw r10;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.bs.b.a(java.lang.String):com.google.android.m4b.maps.bu.a\");\n }", "@Override // X.AnonymousClass0PN\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void A0D() {\n /*\n r5 = this;\n super.A0D()\n X.08d r0 = r5.A05\n X.0OQ r4 = r0.A04()\n X.0Rk r3 = r4.A00() // Catch:{ all -> 0x003d }\n X.0BK r2 = r4.A04 // Catch:{ all -> 0x0036 }\n java.lang.String r1 = \"DELETE FROM receipt_device\"\n java.lang.String r0 = \"CLEAR_TABLE_RECEIPT_DEVICE\"\n r2.A0C(r1, r0) // Catch:{ all -> 0x0036 }\n X.08m r1 = r5.A03 // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"receipt_device_migration_complete\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_index\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_retry\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n r3.A00() // Catch:{ all -> 0x0036 }\n r3.close()\n r4.close()\n java.lang.String r0 = \"ReceiptDeviceStore/ReceiptDeviceDatabaseMigration/resetMigration/done\"\n com.whatsapp.util.Log.i(r0)\n return\n L_0x0036:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x0038 }\n L_0x0038:\n r0 = move-exception\n r3.close() // Catch:{ all -> 0x003c }\n L_0x003c:\n throw r0\n L_0x003d:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x003f }\n L_0x003f:\n r0 = move-exception\n r4.close() // Catch:{ all -> 0x0043 }\n L_0x0043:\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: X.C43661yk.A0D():void\");\n }", "public void test427810() throws Exception\n {\n // line 1 column 1 - Warning: missing <!DOCTYPE> declaration\n // line 8 column 1 - Warning: <blink> is not approved by W3C\n // line 9 column 1 - Warning: <wbr> is not approved by W3C\n // line 10 column 1 - Warning: <nobr> is not approved by W3C\n // Info: Document content looks like HTML Proprietary\n // 4 warnings, 0 errors were found!\n\n executeTidyTest(\"427810.html\");\n assertWarnings(4);\n }", "static com.tencent.mm.plugin.appbrand.jsapi.b.a.a nI(java.lang.String r4) {\n /*\n r0 = 0;\n r1 = r4.length();\n r2 = 5;\n r1 = java.lang.Math.min(r1, r2);\n r1 = java.lang.Math.max(r0, r1);\n r1 = r4.substring(r0, r1);\n r2 = r1.toLowerCase();\n r1 = -1;\n r3 = r2.hashCode();\n switch(r3) {\n case 99228: goto L_0x003a;\n case 3704893: goto L_0x0025;\n case 104080000: goto L_0x002f;\n default: goto L_0x001e;\n };\n L_0x001e:\n r0 = r1;\n L_0x001f:\n switch(r0) {\n case 0: goto L_0x0045;\n case 1: goto L_0x0048;\n case 2: goto L_0x004b;\n default: goto L_0x0022;\n };\n L_0x0022:\n r0 = MONTH;\n L_0x0024:\n return r0;\n L_0x0025:\n r3 = \"year\";\n r2 = r2.equals(r3);\n if (r2 == 0) goto L_0x001e;\n L_0x002e:\n goto L_0x001f;\n L_0x002f:\n r0 = \"month\";\n r0 = r2.equals(r0);\n if (r0 == 0) goto L_0x001e;\n L_0x0038:\n r0 = 1;\n goto L_0x001f;\n L_0x003a:\n r0 = \"day\";\n r0 = r2.equals(r0);\n if (r0 == 0) goto L_0x001e;\n L_0x0043:\n r0 = 2;\n goto L_0x001f;\n L_0x0045:\n r0 = YEAR;\n goto L_0x0024;\n L_0x0048:\n r0 = MONTH;\n goto L_0x0024;\n L_0x004b:\n r0 = DAY;\n goto L_0x0024;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.appbrand.jsapi.b.a.a.nI(java.lang.String):com.tencent.mm.plugin.appbrand.jsapi.b.a$a\");\n }", "public void mo38098a(int r9, boolean r10, okio.C13342c r11, long r12) throws java.io.IOException {\n /*\n r8 = this;\n r0 = 0\n r1 = 0\n int r3 = (r12 > r1 ? 1 : (r12 == r1 ? 0 : -1))\n if (r3 != 0) goto L_0x000d\n okhttp3.internal.http2.i r12 = r8.f34208v\n r12.mo38161a(r10, r9, r11, r0)\n return\n L_0x000d:\n int r3 = (r12 > r1 ? 1 : (r12 == r1 ? 0 : -1))\n if (r3 <= 0) goto L_0x0069\n monitor-enter(r8)\n L_0x0012:\n long r3 = r8.f34203q // Catch:{ InterruptedException -> 0x005a }\n int r5 = (r3 > r1 ? 1 : (r3 == r1 ? 0 : -1))\n if (r5 > 0) goto L_0x0030\n java.util.Map<java.lang.Integer, okhttp3.internal.http2.h> r3 = r8.f34193g // Catch:{ InterruptedException -> 0x005a }\n java.lang.Integer r4 = java.lang.Integer.valueOf(r9) // Catch:{ InterruptedException -> 0x005a }\n boolean r3 = r3.containsKey(r4) // Catch:{ InterruptedException -> 0x005a }\n if (r3 == 0) goto L_0x0028\n r8.wait() // Catch:{ InterruptedException -> 0x005a }\n goto L_0x0012\n L_0x0028:\n java.io.IOException r9 = new java.io.IOException // Catch:{ InterruptedException -> 0x005a }\n java.lang.String r10 = \"stream closed\"\n r9.<init>(r10) // Catch:{ InterruptedException -> 0x005a }\n throw r9 // Catch:{ InterruptedException -> 0x005a }\n L_0x0030:\n long r3 = r8.f34203q // Catch:{ all -> 0x0058 }\n long r3 = java.lang.Math.min(r12, r3) // Catch:{ all -> 0x0058 }\n int r4 = (int) r3 // Catch:{ all -> 0x0058 }\n okhttp3.internal.http2.i r3 = r8.f34208v // Catch:{ all -> 0x0058 }\n int r3 = r3.mo38162b() // Catch:{ all -> 0x0058 }\n int r3 = java.lang.Math.min(r4, r3) // Catch:{ all -> 0x0058 }\n long r4 = r8.f34203q // Catch:{ all -> 0x0058 }\n long r6 = (long) r3 // Catch:{ all -> 0x0058 }\n long r4 = r4 - r6\n r8.f34203q = r4 // Catch:{ all -> 0x0058 }\n monitor-exit(r8) // Catch:{ all -> 0x0058 }\n long r12 = r12 - r6\n okhttp3.internal.http2.i r4 = r8.f34208v\n if (r10 == 0) goto L_0x0053\n int r5 = (r12 > r1 ? 1 : (r12 == r1 ? 0 : -1))\n if (r5 != 0) goto L_0x0053\n r5 = 1\n goto L_0x0054\n L_0x0053:\n r5 = 0\n L_0x0054:\n r4.mo38161a(r5, r9, r11, r3)\n goto L_0x000d\n L_0x0058:\n r9 = move-exception\n goto L_0x0067\n L_0x005a:\n java.lang.Thread r9 = java.lang.Thread.currentThread() // Catch:{ all -> 0x0058 }\n r9.interrupt() // Catch:{ all -> 0x0058 }\n java.io.InterruptedIOException r9 = new java.io.InterruptedIOException // Catch:{ all -> 0x0058 }\n r9.<init>() // Catch:{ all -> 0x0058 }\n throw r9 // Catch:{ all -> 0x0058 }\n L_0x0067:\n monitor-exit(r8) // Catch:{ all -> 0x0058 }\n throw r9\n L_0x0069:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.http2.C13262e.mo38098a(int, boolean, okio.c, long):void\");\n }", "public void test427844() throws Exception\n {\n executeTidyTest(\"427844.html\");\n\n assertNoWarnings();\n }", "private static void runTestCWE6() {\n}", "private static void runTestCWE6() {\n}", "public static int m22557b(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = com.google.android.gms.internal.measurement.dr.m11788a(r1);\t Catch:{ zzyn -> 0x0005 }\n goto L_0x000c;\n L_0x0005:\n r0 = com.google.android.gms.internal.measurement.zzvo.f10281a;\n r1 = r1.getBytes(r0);\n r0 = r1.length;\n L_0x000c:\n r1 = m22576g(r0);\n r1 = r1 + r0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzut.b(java.lang.String):int\");\n }", "private static java.lang.String a(java.lang.String r5, java.util.Map r6, boolean r7) {\n /*\n r2 = F;\n r3 = new java.lang.StringBuilder;\n r0 = r5.length();\n r3.<init>(r0);\n r0 = 0;\n r1 = r0;\n L_0x000d:\n r0 = r5.length();\n if (r1 >= r0) goto L_0x0035;\n L_0x0013:\n r4 = r5.charAt(r1);\n r0 = java.lang.Character.toUpperCase(r4);\n r0 = java.lang.Character.valueOf(r0);\n r0 = r6.get(r0);\n r0 = (java.lang.Character) r0;\n if (r0 == 0) goto L_0x002c;\n L_0x0027:\n r3.append(r0);\t Catch:{ RuntimeException -> 0x003a }\n if (r2 == 0) goto L_0x0031;\n L_0x002c:\n if (r7 != 0) goto L_0x0031;\n L_0x002e:\n r3.append(r4);\t Catch:{ RuntimeException -> 0x003c }\n L_0x0031:\n r0 = r1 + 1;\n if (r2 == 0) goto L_0x003e;\n L_0x0035:\n r0 = r3.toString();\n return r0;\n L_0x003a:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x003c }\n L_0x003c:\n r0 = move-exception;\n throw r0;\n L_0x003e:\n r1 = r0;\n goto L_0x000d;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, java.util.Map, boolean):java.lang.String\");\n }", "public synchronized void m6495a(int r6, int r7) throws fr.pcsoft.wdjava.geo.C0918i {\n /* JADX: method processing error */\n/*\nError: jadx.core.utils.exceptions.JadxRuntimeException: Exception block dominator not found, method:fr.pcsoft.wdjava.geo.a.b.a(int, int):void. bs: [B:13:0x001d, B:18:0x0027, B:23:0x0031, B:28:0x003a, B:44:0x005d, B:55:0x006c, B:64:0x0079]\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:86)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/70807318.run(Unknown Source)\n*/\n /*\n r5 = this;\n r4 = 2;\n r1 = 0;\n r0 = 1;\n monitor-enter(r5);\n r5.m6487e();\t Catch:{ all -> 0x0053 }\n switch(r6) {\n case 2: goto L_0x0089;\n case 3: goto L_0x000a;\n case 4: goto L_0x0013;\n default: goto L_0x000a;\n };\t Catch:{ all -> 0x0053 }\n L_0x000a:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 3;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n L_0x0011:\n monitor-exit(r5);\n return;\n L_0x0013:\n r3 = new android.location.Criteria;\t Catch:{ all -> 0x0053 }\n r3.<init>();\t Catch:{ all -> 0x0053 }\n r2 = r7 & 2;\n if (r2 != r4) goto L_0x0058;\n L_0x001c:\n r2 = 1;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0056 }\n L_0x0020:\n r2 = r7 & 128;\n r4 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n if (r2 != r4) goto L_0x0065;\n L_0x0026:\n r2 = 3;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0063 }\n L_0x002a:\n r2 = r7 & 8;\n r4 = 8;\n if (r2 != r4) goto L_0x007f;\n L_0x0030:\n r2 = r0;\n L_0x0031:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0081 }\n r2 = r7 & 4;\n r4 = 4;\n if (r2 != r4) goto L_0x0083;\n L_0x0039:\n r2 = r0;\n L_0x003a:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0085 }\n r2 = r7 & 16;\n r4 = 16;\n if (r2 != r4) goto L_0x0087;\n L_0x0043:\n r3.setAltitudeRequired(r0);\t Catch:{ all -> 0x0053 }\n r0 = 0;\t Catch:{ all -> 0x0053 }\n r0 = r5.m6485a(r0);\t Catch:{ all -> 0x0053 }\n r1 = 1;\t Catch:{ all -> 0x0053 }\n r0 = r0.getBestProvider(r3, r1);\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n L_0x0053:\n r0 = move-exception;\n monitor-exit(r5);\n throw r0;\n L_0x0056:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0058:\n r2 = r7 & 1;\n if (r2 != r0) goto L_0x0020;\n L_0x005c:\n r2 = 2;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0061 }\n goto L_0x0020;\n L_0x0061:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0063:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0065:\n r2 = r7 & 64;\n r4 = 64;\n if (r2 != r4) goto L_0x0072;\n L_0x006b:\n r2 = 2;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0070 }\n goto L_0x002a;\n L_0x0070:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0072:\n r2 = r7 & 32;\n r4 = 32;\n if (r2 != r4) goto L_0x002a;\n L_0x0078:\n r2 = 1;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x007d }\n goto L_0x002a;\n L_0x007d:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x007f:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0031;\t Catch:{ all -> 0x0053 }\n L_0x0081:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0083:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x003a;\t Catch:{ all -> 0x0053 }\n L_0x0085:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0087:\n r0 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0043;\t Catch:{ all -> 0x0053 }\n L_0x0089:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 2;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: fr.pcsoft.wdjava.geo.a.b.a(int, int):void\");\n }", "private void zzbJ(int r6) {\n /*\n r5 = this;\n r0 = 8;\n if (r6 != r0) goto L_0x0035;\n L_0x0004:\n r1 = com.google.android.gms.internal.zzld.class;\n monitor-enter(r1);\n r0 = mTwiceBaseCache;\t Catch:{ all -> 0x0067 }\n if (r0 == 0) goto L_0x0030;\n L_0x000b:\n r2 = mTwiceBaseCache;\t Catch:{ all -> 0x0067 }\n r5.mArray = r2;\t Catch:{ all -> 0x0067 }\n r0 = 0;\n r0 = r2[r0];\t Catch:{ all -> 0x0067 }\n r0 = (java.lang.Object[]) r0;\t Catch:{ all -> 0x0067 }\n r0 = (java.lang.Object[]) r0;\t Catch:{ all -> 0x0067 }\n mTwiceBaseCache = r0;\t Catch:{ all -> 0x0067 }\n r0 = 1;\n r0 = r2[r0];\t Catch:{ all -> 0x0067 }\n r0 = (int[]) r0;\t Catch:{ all -> 0x0067 }\n r0 = (int[]) r0;\t Catch:{ all -> 0x0067 }\n r5.mHashes = r0;\t Catch:{ all -> 0x0067 }\n r0 = 0;\n r3 = 1;\n r4 = 0;\n r2[r3] = r4;\t Catch:{ all -> 0x0067 }\n r2[r0] = r4;\t Catch:{ all -> 0x0067 }\n r0 = mTwiceBaseCacheSize;\t Catch:{ all -> 0x0067 }\n r0 = r0 + -1;\n mTwiceBaseCacheSize = r0;\t Catch:{ all -> 0x0067 }\n monitor-exit(r1);\t Catch:{ all -> 0x0067 }\n L_0x002f:\n return;\n L_0x0030:\n monitor-exit(r1);\t Catch:{ all -> 0x0067 }\n r0 = com.google.android.gms.internal.zzkq.a;\t Catch:{ ClassCastException -> 0x006a }\n if (r0 == 0) goto L_0x006d;\n L_0x0035:\n r0 = 4;\n if (r6 != r0) goto L_0x006d;\n L_0x0038:\n r1 = com.google.android.gms.internal.zzld.class;\n monitor-enter(r1);\n r0 = mBaseCache;\t Catch:{ all -> 0x0064 }\n if (r0 == 0) goto L_0x006c;\n L_0x003f:\n r2 = mBaseCache;\t Catch:{ all -> 0x0064 }\n r5.mArray = r2;\t Catch:{ all -> 0x0064 }\n r0 = 0;\n r0 = r2[r0];\t Catch:{ all -> 0x0064 }\n r0 = (java.lang.Object[]) r0;\t Catch:{ all -> 0x0064 }\n r0 = (java.lang.Object[]) r0;\t Catch:{ all -> 0x0064 }\n mBaseCache = r0;\t Catch:{ all -> 0x0064 }\n r0 = 1;\n r0 = r2[r0];\t Catch:{ all -> 0x0064 }\n r0 = (int[]) r0;\t Catch:{ all -> 0x0064 }\n r0 = (int[]) r0;\t Catch:{ all -> 0x0064 }\n r5.mHashes = r0;\t Catch:{ all -> 0x0064 }\n r0 = 0;\n r3 = 1;\n r4 = 0;\n r2[r3] = r4;\t Catch:{ all -> 0x0064 }\n r2[r0] = r4;\t Catch:{ all -> 0x0064 }\n r0 = mBaseCacheSize;\t Catch:{ all -> 0x0064 }\n r0 = r0 + -1;\n mBaseCacheSize = r0;\t Catch:{ all -> 0x0064 }\n monitor-exit(r1);\t Catch:{ all -> 0x0064 }\n goto L_0x002f;\n L_0x0064:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x0064 }\n throw r0;\n L_0x0067:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x0067 }\n throw r0;\n L_0x006a:\n r0 = move-exception;\n throw r0;\n L_0x006c:\n monitor-exit(r1);\t Catch:{ all -> 0x0064 }\n L_0x006d:\n r0 = new int[r6];\n r5.mHashes = r0;\n r0 = r6 << 1;\n r0 = new java.lang.Object[r0];\n r5.mArray = r0;\n goto L_0x002f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.zzlh.zzbJ(int):void\");\n }", "private void repairGenome() {\n if (checkGenome(this.code)) {\n return;\n }\n int[] counters = new int[8];\n for (int c : code) { counters[c]++; }\n for (int i = 0; i < 8; ++i) {\n if (counters[i] == 0) {\n while (true) {\n int newPos = r.nextInt(GENOME_SIZE);\n if (counters[this.code[newPos]] > 1) {\n counters[this.code[newPos]]--;\n this.code[newPos] = i;\n break;\n }\n }\n }\n }\n }", "public boolean a(com.google.ae r7, java.lang.String r8) {\n /*\n r6 = this;\n r0 = 1;\n r1 = 0;\n r2 = r7.n();\n r3 = r6.a(r2, r8);\n if (r3 == 0) goto L_0x001e;\n L_0x000c:\n r4 = J;\t Catch:{ RuntimeException -> 0x0020 }\n r5 = 31;\n r4 = r4[r5];\t Catch:{ RuntimeException -> 0x0020 }\n r4 = r4.equals(r8);\t Catch:{ RuntimeException -> 0x0020 }\n if (r4 != 0) goto L_0x0024;\n L_0x0018:\n r4 = r6.k(r8);\t Catch:{ RuntimeException -> 0x0022 }\n if (r2 == r4) goto L_0x0024;\n L_0x001e:\n r0 = r1;\n L_0x001f:\n return r0;\n L_0x0020:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x0022 }\n L_0x0022:\n r0 = move-exception;\n throw r0;\n L_0x0024:\n r2 = r3.X();\n r4 = r6.b(r7);\n r2 = r2.e();\n if (r2 != 0) goto L_0x003f;\n L_0x0032:\n r2 = r4.length();\n r3 = 2;\n if (r2 <= r3) goto L_0x003d;\n L_0x0039:\n r3 = 16;\n if (r2 <= r3) goto L_0x001f;\n L_0x003d:\n r0 = r1;\n goto L_0x001f;\n L_0x003f:\n r2 = r6.a(r4, r3);\t Catch:{ RuntimeException -> 0x0049 }\n r3 = com.google.bw.UNKNOWN;\t Catch:{ RuntimeException -> 0x0049 }\n if (r2 != r3) goto L_0x001f;\n L_0x0047:\n r0 = r1;\n goto L_0x001f;\n L_0x0049:\n r0 = move-exception;\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(com.google.ae, java.lang.String):boolean\");\n }", "@Converted(kind = Converted.Kind.MANUAL_SEMANTIC,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp\", line = 324,\n old_source = \"${LLVM_SRC}/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp\", old_line = 323,\n FQN=\"EmitBlockID\", NM=\"_ZL11EmitBlockIDjPKcRN4llvm15BitstreamWriterERNS1_15SmallVectorImplIyEE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.frontend/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp -nm=_ZL11EmitBlockIDjPKcRN4llvm15BitstreamWriterERNS1_15SmallVectorImplIyEE\")\n//</editor-fold>\npublic static void EmitBlockID(/*uint*/int ID, /*const*/char$ptr/*char P*/ Name, \n BitstreamWriter /*&*/ Stream, \n SmallVectorImplULong /*&*/ Record) {\n Record.clear();\n Record.push_back($uint2ullong(ID));\n Stream.EmitRecord(BlockInfoCodes.BLOCKINFO_CODE_SETBID.getValue(), Record);\n \n // Emit the block name if present.\n if (!(Name != null) || Name.$at(0) == 0) {\n return;\n }\n \n Record.clear();\n Name = Native.$tryClone(Name);\n while ((Name.$star() != 0)) {\n Record.push_back($char2ullong(Name.$postInc().$star()));\n }\n \n Stream.EmitRecord(BlockInfoCodes.BLOCKINFO_CODE_BLOCKNAME.getValue(), Record);\n}", "private static long m60262a(java.lang.String r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = -1;\n if (r4 != 0) goto L_0x0005;\n L_0x0004:\n return r0;\n L_0x0005:\n r2 = java.lang.Long.parseLong(r4);\t Catch:{ NumberFormatException -> 0x000a }\n return r2;\n L_0x000a:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.http.d.a(java.lang.String):long\");\n }", "private boolean method_4323(class_1343 var1) {\r\n int var3 = class_1715.method_9561(var1.field_6909);\r\n String[] var10000 = class_752.method_4253();\r\n int var4 = class_1715.method_9561(var1.field_6910);\r\n String[] var2 = var10000;\r\n int var5 = class_1715.method_9561(var1.field_6911);\r\n int var6 = class_1715.method_9561(var1.field_6912);\r\n int var7 = class_1715.method_9561(var1.field_6913);\r\n int var8 = class_1715.method_9561(var1.field_6914);\r\n byte var9 = 0;\r\n byte var10 = 0;\r\n int var11 = var3;\r\n\r\n int var20;\r\n label109:\r\n while(true) {\r\n var20 = var11;\r\n\r\n label106:\r\n while(var20 <= var6) {\r\n var20 = var4;\r\n if(var2 == null) {\r\n break label109;\r\n }\r\n\r\n int var12 = var4;\r\n\r\n while(var12 <= var7) {\r\n var20 = var5;\r\n if(var2 == null) {\r\n continue label106;\r\n }\r\n\r\n int var13 = var5;\r\n\r\n while(true) {\r\n if(var13 <= var8) {\r\n aji var14 = this.field_2990.getBlock(var11, var12, var13);\r\n if(var2 == null) {\r\n break;\r\n }\r\n\r\n if(var2 != null) {\r\n if(var14.method_2424() != awt.field_4170) {\r\n label92: {\r\n byte var24;\r\n label91: {\r\n label117: {\r\n aji var21 = var14;\r\n aji var10001 = class_1192.field_6076;\r\n if(var2 != null) {\r\n if(var14 == class_1192.field_6076) {\r\n break label117;\r\n }\r\n\r\n var21 = var14;\r\n var10001 = class_1192.field_6145;\r\n }\r\n\r\n if(var2 != null) {\r\n if(var21 == var10001) {\r\n break label117;\r\n }\r\n\r\n var21 = var14;\r\n var10001 = class_1192.field_6032;\r\n }\r\n\r\n if(var21 != var10001) {\r\n class_1038 var23 = this.field_2990.method_2196();\r\n String[] var17 = field_3418;\r\n var24 = var23.method_5878(\"mobGriefing\");\r\n if(var2 == null) {\r\n break label91;\r\n }\r\n\r\n if(var24 != 0) {\r\n var24 = this.field_2990.method_2056(var11, var12, var13);\r\n if(var2 != null) {\r\n label71: {\r\n if(var24 == 0) {\r\n var24 = var10;\r\n if(var2 == null) {\r\n break label71;\r\n }\r\n\r\n if(var10 == 0) {\r\n var24 = 0;\r\n break label71;\r\n }\r\n }\r\n\r\n var24 = 1;\r\n }\r\n }\r\n\r\n var10 = var24;\r\n if(var2 != null) {\r\n break label92;\r\n }\r\n }\r\n }\r\n }\r\n\r\n var24 = 1;\r\n }\r\n\r\n var9 = var24;\r\n }\r\n }\r\n\r\n ++var13;\r\n }\r\n\r\n if(var2 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n ++var12;\r\n break;\r\n }\r\n\r\n if(var2 == null) {\r\n break;\r\n }\r\n }\r\n\r\n ++var11;\r\n if(var2 != null) {\r\n continue label109;\r\n }\r\n break;\r\n }\r\n\r\n var20 = var10;\r\n break;\r\n }\r\n\r\n if(var2 != null) {\r\n if(var20 != 0) {\r\n double var18 = var1.field_6909 + (var1.field_6912 - var1.field_6909) * (double)this.field_3028.nextFloat();\r\n double var19 = var1.field_6910 + (var1.field_6913 - var1.field_6910) * (double)this.field_3028.nextFloat();\r\n double var15 = var1.field_6911 + (var1.field_6914 - var1.field_6911) * (double)this.field_3028.nextFloat();\r\n String[] var22 = field_3418;\r\n this.field_2990.method_2087(\"largeexplode\", var18, var19, var15, 0.0D, 0.0D, 0.0D);\r\n }\r\n\r\n var20 = var9;\r\n }\r\n\r\n return (boolean)var20;\r\n }", "private void a(java.lang.String r11, java.lang.String r12, boolean r13, boolean r14, com.google.ae r15) {\n /*\n r10 = this;\n r9 = 48;\n r8 = 2;\n r6 = F;\n if (r11 != 0) goto L_0x0017;\n L_0x0007:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x0015 }\n r1 = com.google.dk.NOT_A_NUMBER;\t Catch:{ ao -> 0x0015 }\n r2 = J;\t Catch:{ ao -> 0x0015 }\n r3 = 47;\n r2 = r2[r3];\t Catch:{ ao -> 0x0015 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x0015 }\n throw r0;\t Catch:{ ao -> 0x0015 }\n L_0x0015:\n r0 = move-exception;\n throw r0;\n L_0x0017:\n r0 = r11.length();\t Catch:{ ao -> 0x002d }\n r1 = 250; // 0xfa float:3.5E-43 double:1.235E-321;\n if (r0 <= r1) goto L_0x002f;\n L_0x001f:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x002d }\n r1 = com.google.dk.TOO_LONG;\t Catch:{ ao -> 0x002d }\n r2 = J;\t Catch:{ ao -> 0x002d }\n r3 = 41;\n r2 = r2[r3];\t Catch:{ ao -> 0x002d }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x002d }\n throw r0;\t Catch:{ ao -> 0x002d }\n L_0x002d:\n r0 = move-exception;\n throw r0;\n L_0x002f:\n r7 = new java.lang.StringBuilder;\n r7.<init>();\n r10.a(r11, r7);\t Catch:{ ao -> 0x004f }\n r0 = r7.toString();\t Catch:{ ao -> 0x004f }\n r0 = b(r0);\t Catch:{ ao -> 0x004f }\n if (r0 != 0) goto L_0x0051;\n L_0x0041:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x004f }\n r1 = com.google.dk.NOT_A_NUMBER;\t Catch:{ ao -> 0x004f }\n r2 = J;\t Catch:{ ao -> 0x004f }\n r3 = 48;\n r2 = r2[r3];\t Catch:{ ao -> 0x004f }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x004f }\n throw r0;\t Catch:{ ao -> 0x004f }\n L_0x004f:\n r0 = move-exception;\n throw r0;\n L_0x0051:\n if (r14 == 0) goto L_0x006f;\n L_0x0053:\n r0 = r7.toString();\t Catch:{ ao -> 0x006d }\n r0 = r10.a(r0, r12);\t Catch:{ ao -> 0x006d }\n if (r0 != 0) goto L_0x006f;\n L_0x005d:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x006b }\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x006b }\n r2 = J;\t Catch:{ ao -> 0x006b }\n r3 = 46;\n r2 = r2[r3];\t Catch:{ ao -> 0x006b }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x006b }\n throw r0;\t Catch:{ ao -> 0x006b }\n L_0x006b:\n r0 = move-exception;\n throw r0;\n L_0x006d:\n r0 = move-exception;\n throw r0;\t Catch:{ ao -> 0x006b }\n L_0x006f:\n if (r13 == 0) goto L_0x0074;\n L_0x0071:\n r15.b(r11);\t Catch:{ ao -> 0x00d3 }\n L_0x0074:\n r0 = r10.b(r7);\n r1 = r0.length();\t Catch:{ ao -> 0x00d5 }\n if (r1 <= 0) goto L_0x0081;\n L_0x007e:\n r15.a(r0);\t Catch:{ ao -> 0x00d5 }\n L_0x0081:\n r2 = r10.e(r12);\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r1 = r7.toString();\t Catch:{ ao -> 0x00d7 }\n r0 = r10;\n r4 = r13;\n r5 = r15;\n r0 = r0.a(r1, r2, r3, r4, r5);\t Catch:{ ao -> 0x00d7 }\n L_0x0095:\n if (r0 == 0) goto L_0x0182;\n L_0x0097:\n r1 = r10.b(r0);\n r4 = r1.equals(r12);\n if (r4 != 0) goto L_0x017f;\n L_0x00a1:\n r0 = r10.a(r0, r1);\n L_0x00a5:\n if (r6 == 0) goto L_0x00bd;\n L_0x00a7:\n a(r7);\t Catch:{ ao -> 0x0121 }\n r3.append(r7);\t Catch:{ ao -> 0x0121 }\n if (r12 == 0) goto L_0x00b8;\n L_0x00af:\n r1 = r0.L();\n r15.a(r1);\t Catch:{ ao -> 0x0123 }\n if (r6 == 0) goto L_0x00bd;\n L_0x00b8:\n if (r13 == 0) goto L_0x00bd;\n L_0x00ba:\n r15.l();\t Catch:{ ao -> 0x0125 }\n L_0x00bd:\n r1 = r3.length();\t Catch:{ ao -> 0x00d1 }\n if (r1 >= r8) goto L_0x0127;\n L_0x00c3:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x00d1 }\n r1 = com.google.dk.TOO_SHORT_NSN;\t Catch:{ ao -> 0x00d1 }\n r2 = J;\t Catch:{ ao -> 0x00d1 }\n r3 = 44;\n r2 = r2[r3];\t Catch:{ ao -> 0x00d1 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x00d1 }\n throw r0;\t Catch:{ ao -> 0x00d1 }\n L_0x00d1:\n r0 = move-exception;\n throw r0;\n L_0x00d3:\n r0 = move-exception;\n throw r0;\n L_0x00d5:\n r0 = move-exception;\n throw r0;\n L_0x00d7:\n r0 = move-exception;\n r1 = g;\n r4 = r7.toString();\n r1 = r1.matcher(r4);\n r4 = r0.a();\t Catch:{ ao -> 0x0111 }\n r5 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x0111 }\n if (r4 != r5) goto L_0x0113;\n L_0x00ea:\n r4 = r1.lookingAt();\t Catch:{ ao -> 0x0111 }\n if (r4 == 0) goto L_0x0113;\n L_0x00f0:\n r0 = r1.end();\n r1 = r7.substring(r0);\n r0 = r10;\n r4 = r13;\n r5 = r15;\n r0 = r0.a(r1, r2, r3, r4, r5);\n if (r0 != 0) goto L_0x0095;\n L_0x0101:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x010f }\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x010f }\n r2 = J;\t Catch:{ ao -> 0x010f }\n r3 = 43;\n r2 = r2[r3];\t Catch:{ ao -> 0x010f }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x010f }\n throw r0;\t Catch:{ ao -> 0x010f }\n L_0x010f:\n r0 = move-exception;\n throw r0;\n L_0x0111:\n r0 = move-exception;\n throw r0;\n L_0x0113:\n r1 = new com.google.ao;\n r2 = r0.a();\n r0 = r0.getMessage();\n r1.<init>(r2, r0);\n throw r1;\n L_0x0121:\n r0 = move-exception;\n throw r0;\n L_0x0123:\n r0 = move-exception;\n throw r0;\t Catch:{ ao -> 0x0125 }\n L_0x0125:\n r0 = move-exception;\n throw r0;\n L_0x0127:\n if (r0 == 0) goto L_0x013a;\n L_0x0129:\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r10.a(r3, r0, r1);\t Catch:{ ao -> 0x0150 }\n if (r13 == 0) goto L_0x013a;\n L_0x0133:\n r0 = r1.toString();\t Catch:{ ao -> 0x0150 }\n r15.c(r0);\t Catch:{ ao -> 0x0150 }\n L_0x013a:\n r0 = r3.length();\n if (r0 >= r8) goto L_0x0152;\n L_0x0140:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x014e }\n r1 = com.google.dk.TOO_SHORT_NSN;\t Catch:{ ao -> 0x014e }\n r2 = J;\t Catch:{ ao -> 0x014e }\n r3 = 42;\n r2 = r2[r3];\t Catch:{ ao -> 0x014e }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x014e }\n throw r0;\t Catch:{ ao -> 0x014e }\n L_0x014e:\n r0 = move-exception;\n throw r0;\n L_0x0150:\n r0 = move-exception;\n throw r0;\n L_0x0152:\n r1 = 16;\n if (r0 <= r1) goto L_0x0166;\n L_0x0156:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x0164 }\n r1 = com.google.dk.TOO_LONG;\t Catch:{ ao -> 0x0164 }\n r2 = J;\t Catch:{ ao -> 0x0164 }\n r3 = 45;\n r2 = r2[r3];\t Catch:{ ao -> 0x0164 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x0164 }\n throw r0;\t Catch:{ ao -> 0x0164 }\n L_0x0164:\n r0 = move-exception;\n throw r0;\n L_0x0166:\n r0 = 0;\n r0 = r3.charAt(r0);\t Catch:{ ao -> 0x017d }\n if (r0 != r9) goto L_0x0171;\n L_0x016d:\n r0 = 1;\n r15.a(r0);\t Catch:{ ao -> 0x017d }\n L_0x0171:\n r0 = r3.toString();\n r0 = java.lang.Long.parseLong(r0);\n r15.a(r0);\n return;\n L_0x017d:\n r0 = move-exception;\n throw r0;\n L_0x017f:\n r0 = r2;\n goto L_0x00a5;\n L_0x0182:\n r0 = r2;\n goto L_0x00a7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, java.lang.String, boolean, boolean, com.google.ae):void\");\n }", "private static boolean m31448a(C32519bf c32519bf) {\n Exception e;\n Throwable th;\n AppMethodBeat.m2504i(52813);\n if (c32519bf instanceof C32519bf) {\n if (c32519bf.cus.cut == 33) {\n C5728b c5728b = new C5728b(c32519bf.cus.filePath);\n if (c5728b.exists()) {\n C4990ab.m7417i(\"MicroMsg.emoji.EmojiResUpdateListener\", \"checkResUpdateListener callback to update %s\", c5728b.dME());\n C5728b c5728b2 = new C5728b(C37462a.afU(), \"temp\");\n C5728b c5728b3 = new C5728b(c5728b2, \"emoji_template.zip\");\n c5728b2.mkdirs();\n C5730e.m8644y(C5736j.m8649w(c5728b.dMD()), C5736j.m8649w(c5728b3.dMD()));\n int i = 1;\n if (C5730e.m8636iu(C5736j.m8649w(c5728b3.dMD()), C5736j.m8649w(c5728b2.dMD())) >= 0) {\n Closeable closeable = null;\n Closeable inputStreamReader;\n Closeable bufferedReader;\n try {\n closeable = C5730e.m8638p(new C5728b(c5728b2, \"config.conf\"));\n inputStreamReader = new InputStreamReader(closeable);\n try {\n bufferedReader = new BufferedReader(inputStreamReader);\n try {\n String str = \"\";\n while (true) {\n String readLine = bufferedReader.readLine();\n if (readLine == null) {\n break;\n }\n str = str + readLine;\n }\n i = new JSONObject(str).getInt(\"version\");\n C4990ab.m7411d(\"MicroMsg.emoji.EmojiResUpdateListener\", \"config file content:%s version:%d\", str, Integer.valueOf(i));\n C5046bo.m7527b(closeable);\n C5046bo.m7527b(inputStreamReader);\n C5046bo.m7527b(bufferedReader);\n } catch (Exception e2) {\n e = e2;\n try {\n C4990ab.printErrStackTrace(\"MicroMsg.emoji.EmojiResUpdateListener\", e, e.getMessage(), new Object[0]);\n C5046bo.m7527b(closeable);\n C5046bo.m7527b(inputStreamReader);\n C5046bo.m7527b(bufferedReader);\n C5730e.m8618N(C5736j.m8649w(c5728b2.mUri), true);\n C5730e.deleteFile(C5736j.m8649w(c5728b3.mUri));\n if (C37462a.fAH >= i) {\n }\n AppMethodBeat.m2505o(52813);\n return false;\n } catch (Throwable th2) {\n th = th2;\n C5046bo.m7527b(closeable);\n C5046bo.m7527b(inputStreamReader);\n C5046bo.m7527b(bufferedReader);\n AppMethodBeat.m2505o(52813);\n throw th;\n }\n }\n } catch (Exception e3) {\n e = e3;\n bufferedReader = null;\n C4990ab.printErrStackTrace(\"MicroMsg.emoji.EmojiResUpdateListener\", e, e.getMessage(), new Object[0]);\n C5046bo.m7527b(closeable);\n C5046bo.m7527b(inputStreamReader);\n C5046bo.m7527b(bufferedReader);\n C5730e.m8618N(C5736j.m8649w(c5728b2.mUri), true);\n C5730e.deleteFile(C5736j.m8649w(c5728b3.mUri));\n if (C37462a.fAH >= i) {\n }\n AppMethodBeat.m2505o(52813);\n return false;\n } catch (Throwable th3) {\n th = th3;\n bufferedReader = null;\n C5046bo.m7527b(closeable);\n C5046bo.m7527b(inputStreamReader);\n C5046bo.m7527b(bufferedReader);\n AppMethodBeat.m2505o(52813);\n throw th;\n }\n } catch (Exception e4) {\n e = e4;\n bufferedReader = null;\n inputStreamReader = null;\n C4990ab.printErrStackTrace(\"MicroMsg.emoji.EmojiResUpdateListener\", e, e.getMessage(), new Object[0]);\n C5046bo.m7527b(closeable);\n C5046bo.m7527b(inputStreamReader);\n C5046bo.m7527b(bufferedReader);\n C5730e.m8618N(C5736j.m8649w(c5728b2.mUri), true);\n C5730e.deleteFile(C5736j.m8649w(c5728b3.mUri));\n if (C37462a.fAH >= i) {\n }\n AppMethodBeat.m2505o(52813);\n return false;\n } catch (Throwable th4) {\n th = th4;\n bufferedReader = null;\n inputStreamReader = null;\n C5046bo.m7527b(closeable);\n C5046bo.m7527b(inputStreamReader);\n C5046bo.m7527b(bufferedReader);\n AppMethodBeat.m2505o(52813);\n throw th;\n }\n }\n C5730e.m8618N(C5736j.m8649w(c5728b2.mUri), true);\n C5730e.deleteFile(C5736j.m8649w(c5728b3.mUri));\n if (C37462a.fAH >= i) {\n C4990ab.m7417i(\"MicroMsg.emoji.EmojiResUpdateListener\", \"res update template currentVersion:%d resVersion:%d\", Integer.valueOf(C37462a.fAH), Integer.valueOf(i));\n C37462a.m63177d(c5728b);\n } else {\n C4990ab.m7417i(\"MicroMsg.emoji.EmojiResUpdateListener\", \"res no need update template currentVersion:%d resVersion:%d\", Integer.valueOf(C37462a.fAH), Integer.valueOf(i));\n }\n } else {\n C4990ab.m7412e(\"MicroMsg.emoji.EmojiResUpdateListener\", \"checkResUpdateListener file not exist\");\n }\n } else if (c32519bf.cus.cut == 37) {\n C5728b c5728b4;\n if (c32519bf.cus.cuu == 1) {\n C45852j.bkb();\n C45852j.m84893a(c32519bf, false);\n } else if (c32519bf.cus.cuu == 2) {\n C45852j.bkb();\n C45852j.m84896b(c32519bf, false);\n } else if (c32519bf.cus.cuu == 3) {\n C45852j.bkb();\n if (!C45852j.m84894a(c32519bf, C27735a.SUGGEST)) {\n C4990ab.m7416i(\"MicroMsg.emoji.EmojiResUpdateMgr\", \"updateEmojiSuggest need no update.\");\n } else if (C45852j.m84895a(c32519bf, C27735a.SUGGEST, C45852j.kUc)) {\n c5728b4 = new C5728b(new C5728b(C45852j.getDataEmojiPath(), C45852j.kUc), C45852j.kUn);\n if (c5728b4.exists()) {\n C45852j.m84899h(c5728b4);\n } else {\n C4990ab.m7416i(\"MicroMsg.emoji.EmojiResUpdateMgr\", \"updateEmojiSuggest config don't exist.\");\n }\n } else {\n C4990ab.m7416i(\"MicroMsg.emoji.EmojiResUpdateMgr\", \"updateEmojiSuggest unzip file failed.\");\n }\n } else if (c32519bf.cus.cuu == 5) {\n C45852j.bkb();\n if (C45852j.m84894a(c32519bf, C27735a.EGG)) {\n if (C45852j.m84895a(c32519bf, C27735a.EGG, C45852j.kUd)) {\n c5728b4 = new C5728b(new C5728b(C45852j.getDataEmojiPath(), C45852j.kUd), C45852j.kUo);\n if (c5728b4.exists()) {\n C45852j.m84900i(c5728b4);\n } else {\n C4990ab.m7416i(\"MicroMsg.emoji.EmojiResUpdateMgr\", \"updateEmojiEgg unzip file failed.\");\n }\n } else {\n C4990ab.m7416i(\"MicroMsg.emoji.EmojiResUpdateMgr\", \"updateEmojiEgg unzip file failed.\");\n }\n }\n } else if (c32519bf.cus.cuu == 4) {\n C45852j.bkb();\n C4990ab.m7410d(\"MicroMsg.emoji.EmojiResUpdateMgr\", \"updateAppleColorEmoji\");\n if (C45852j.m84897b(c32519bf)) {\n C37626b.dqD();\n String str2 = c32519bf.cus.filePath;\n C37626b.dqE();\n C5730e.m8644y(str2, C37626b.xFA);\n C37626b.dqD().init();\n }\n }\n }\n }\n AppMethodBeat.m2505o(52813);\n return false;\n }", "public void zzg(java.util.Map<java.lang.String, java.lang.String> r13) {\n /*\n r12 = this;\n r4 = -1;\n r5 = 1;\n r3 = 0;\n r6 = r12.zznh;\n monitor-enter(r6);\n r1 = r12.zztn;\t Catch:{ all -> 0x0020 }\n if (r1 != 0) goto L_0x0011;\n L_0x000a:\n r1 = \"Not an activity context. Cannot resize.\";\n r12.zzH(r1);\t Catch:{ all -> 0x0020 }\n monitor-exit(r6);\t Catch:{ all -> 0x0020 }\n L_0x0010:\n return;\n L_0x0011:\n r1 = r12.zzmu;\t Catch:{ all -> 0x0020 }\n r1 = r1.zzad();\t Catch:{ all -> 0x0020 }\n if (r1 != 0) goto L_0x0023;\n L_0x0019:\n r1 = \"Webview is not yet available, size is not set.\";\n r12.zzH(r1);\t Catch:{ all -> 0x0020 }\n monitor-exit(r6);\t Catch:{ all -> 0x0020 }\n goto L_0x0010;\n L_0x0020:\n r1 = move-exception;\n monitor-exit(r6);\t Catch:{ all -> 0x0020 }\n throw r1;\n L_0x0023:\n r1 = r12.zzmu;\t Catch:{ all -> 0x0020 }\n r1 = r1.zzad();\t Catch:{ all -> 0x0020 }\n r1 = r1.zzpb;\t Catch:{ all -> 0x0020 }\n if (r1 == 0) goto L_0x0034;\n L_0x002d:\n r1 = \"Is interstitial. Cannot resize an interstitial.\";\n r12.zzH(r1);\t Catch:{ all -> 0x0020 }\n monitor-exit(r6);\t Catch:{ all -> 0x0020 }\n goto L_0x0010;\n L_0x0034:\n r1 = r12.zzmu;\t Catch:{ all -> 0x0020 }\n r1 = r1.zzeK();\t Catch:{ all -> 0x0020 }\n if (r1 == 0) goto L_0x0043;\n L_0x003c:\n r1 = \"Cannot resize an expanded banner.\";\n r12.zzH(r1);\t Catch:{ all -> 0x0020 }\n monitor-exit(r6);\t Catch:{ all -> 0x0020 }\n goto L_0x0010;\n L_0x0043:\n r12.zzf(r13);\t Catch:{ all -> 0x0020 }\n r1 = r12.zzcN();\t Catch:{ all -> 0x0020 }\n if (r1 != 0) goto L_0x0053;\n L_0x004c:\n r1 = \"Invalid width and height options. Cannot resize.\";\n r12.zzH(r1);\t Catch:{ all -> 0x0020 }\n monitor-exit(r6);\t Catch:{ all -> 0x0020 }\n goto L_0x0010;\n L_0x0053:\n r1 = r12.zztn;\t Catch:{ all -> 0x0020 }\n r7 = r1.getWindow();\t Catch:{ all -> 0x0020 }\n if (r7 == 0) goto L_0x0061;\n L_0x005b:\n r1 = r7.getDecorView();\t Catch:{ all -> 0x0020 }\n if (r1 != 0) goto L_0x0068;\n L_0x0061:\n r1 = \"Activity context is not ready, cannot get window or decor view.\";\n r12.zzH(r1);\t Catch:{ all -> 0x0020 }\n monitor-exit(r6);\t Catch:{ all -> 0x0020 }\n goto L_0x0010;\n L_0x0068:\n r8 = r12.zzcO();\t Catch:{ all -> 0x0020 }\n if (r8 != 0) goto L_0x0075;\n L_0x006e:\n r1 = \"Resize location out of screen or close button is not visible.\";\n r12.zzH(r1);\t Catch:{ all -> 0x0020 }\n monitor-exit(r6);\t Catch:{ all -> 0x0020 }\n goto L_0x0010;\n L_0x0075:\n r1 = com.google.android.gms.internal.zzbe.zzbD();\t Catch:{ all -> 0x0020 }\n r2 = r12.zztn;\t Catch:{ all -> 0x0020 }\n r9 = r12.zzli;\t Catch:{ all -> 0x0020 }\n r9 = r1.zzb(r2, r9);\t Catch:{ all -> 0x0020 }\n r1 = com.google.android.gms.internal.zzbe.zzbD();\t Catch:{ all -> 0x0020 }\n r2 = r12.zztn;\t Catch:{ all -> 0x0020 }\n r10 = r12.zzlj;\t Catch:{ all -> 0x0020 }\n r10 = r1.zzb(r2, r10);\t Catch:{ all -> 0x0020 }\n r1 = r12.zzmu;\t Catch:{ all -> 0x0020 }\n r1 = r1.getWebView();\t Catch:{ all -> 0x0020 }\n r2 = r1.getParent();\t Catch:{ all -> 0x0020 }\n if (r2 == 0) goto L_0x01d5;\n L_0x0099:\n r1 = r2 instanceof android.view.ViewGroup;\t Catch:{ all -> 0x0020 }\n if (r1 == 0) goto L_0x01d5;\n L_0x009d:\n r0 = r2;\n r0 = (android.view.ViewGroup) r0;\t Catch:{ all -> 0x0020 }\n r1 = r0;\n r11 = r12.zzmu;\t Catch:{ all -> 0x0020 }\n r11 = r11.getWebView();\t Catch:{ all -> 0x0020 }\n r1.removeView(r11);\t Catch:{ all -> 0x0020 }\n r1 = r12.zztr;\t Catch:{ all -> 0x0020 }\n if (r1 != 0) goto L_0x01ce;\n L_0x00ae:\n r2 = (android.view.ViewGroup) r2;\t Catch:{ all -> 0x0020 }\n r12.zztt = r2;\t Catch:{ all -> 0x0020 }\n r1 = com.google.android.gms.internal.zzab.zzaM();\t Catch:{ all -> 0x0020 }\n r2 = r12.zzmu;\t Catch:{ all -> 0x0020 }\n r2 = r2.getWebView();\t Catch:{ all -> 0x0020 }\n r1 = r1.zzh(r2);\t Catch:{ all -> 0x0020 }\n r2 = new android.widget.ImageView;\t Catch:{ all -> 0x0020 }\n r11 = r12.zztn;\t Catch:{ all -> 0x0020 }\n r2.<init>(r11);\t Catch:{ all -> 0x0020 }\n r12.zzto = r2;\t Catch:{ all -> 0x0020 }\n r2 = r12.zzto;\t Catch:{ all -> 0x0020 }\n r2.setImageBitmap(r1);\t Catch:{ all -> 0x0020 }\n r1 = r12.zzmu;\t Catch:{ all -> 0x0020 }\n r1 = r1.zzad();\t Catch:{ all -> 0x0020 }\n r12.zzsF = r1;\t Catch:{ all -> 0x0020 }\n r1 = r12.zztt;\t Catch:{ all -> 0x0020 }\n r2 = r12.zzto;\t Catch:{ all -> 0x0020 }\n r1.addView(r2);\t Catch:{ all -> 0x0020 }\n L_0x00dd:\n r1 = new android.widget.RelativeLayout;\t Catch:{ all -> 0x0020 }\n r2 = r12.zztn;\t Catch:{ all -> 0x0020 }\n r1.<init>(r2);\t Catch:{ all -> 0x0020 }\n r12.zzts = r1;\t Catch:{ all -> 0x0020 }\n r1 = r12.zzts;\t Catch:{ all -> 0x0020 }\n r2 = 0;\n r1.setBackgroundColor(r2);\t Catch:{ all -> 0x0020 }\n r1 = r12.zzts;\t Catch:{ all -> 0x0020 }\n r2 = new android.view.ViewGroup$LayoutParams;\t Catch:{ all -> 0x0020 }\n r2.<init>(r9, r10);\t Catch:{ all -> 0x0020 }\n r1.setLayoutParams(r2);\t Catch:{ all -> 0x0020 }\n r1 = com.google.android.gms.internal.zzab.zzaM();\t Catch:{ all -> 0x0020 }\n r2 = r12.zzts;\t Catch:{ all -> 0x0020 }\n r11 = 0;\n r1 = r1.zza(r2, r9, r10, r11);\t Catch:{ all -> 0x0020 }\n r12.zztr = r1;\t Catch:{ all -> 0x0020 }\n r1 = r12.zztr;\t Catch:{ all -> 0x0020 }\n r2 = 1;\n r1.setOutsideTouchable(r2);\t Catch:{ all -> 0x0020 }\n r1 = r12.zztr;\t Catch:{ all -> 0x0020 }\n r2 = 1;\n r1.setTouchable(r2);\t Catch:{ all -> 0x0020 }\n r2 = r12.zztr;\t Catch:{ all -> 0x0020 }\n r1 = r12.zzti;\t Catch:{ all -> 0x0020 }\n if (r1 != 0) goto L_0x01dd;\n L_0x0115:\n r1 = r5;\n L_0x0116:\n r2.setClippingEnabled(r1);\t Catch:{ all -> 0x0020 }\n r1 = r12.zzts;\t Catch:{ all -> 0x0020 }\n r2 = r12.zzmu;\t Catch:{ all -> 0x0020 }\n r2 = r2.getWebView();\t Catch:{ all -> 0x0020 }\n r9 = -1;\n r10 = -1;\n r1.addView(r2, r9, r10);\t Catch:{ all -> 0x0020 }\n r1 = new android.widget.LinearLayout;\t Catch:{ all -> 0x0020 }\n r2 = r12.zztn;\t Catch:{ all -> 0x0020 }\n r1.<init>(r2);\t Catch:{ all -> 0x0020 }\n r12.zztp = r1;\t Catch:{ all -> 0x0020 }\n r2 = new android.widget.RelativeLayout$LayoutParams;\t Catch:{ all -> 0x0020 }\n r1 = com.google.android.gms.internal.zzbe.zzbD();\t Catch:{ all -> 0x0020 }\n r9 = r12.zztn;\t Catch:{ all -> 0x0020 }\n r10 = 50;\n r1 = r1.zzb(r9, r10);\t Catch:{ all -> 0x0020 }\n r9 = com.google.android.gms.internal.zzbe.zzbD();\t Catch:{ all -> 0x0020 }\n r10 = r12.zztn;\t Catch:{ all -> 0x0020 }\n r11 = 50;\n r9 = r9.zzb(r10, r11);\t Catch:{ all -> 0x0020 }\n r2.<init>(r1, r9);\t Catch:{ all -> 0x0020 }\n r1 = r12.zzth;\t Catch:{ all -> 0x0020 }\n r9 = r1.hashCode();\t Catch:{ all -> 0x0020 }\n switch(r9) {\n case -1364013995: goto L_0x01f6;\n case -1012429441: goto L_0x01e0;\n case -655373719: goto L_0x0201;\n case 1163912186: goto L_0x0217;\n case 1288627767: goto L_0x020c;\n case 1755462605: goto L_0x01eb;\n default: goto L_0x0155;\n };\t Catch:{ all -> 0x0020 }\n L_0x0155:\n r1 = r4;\n L_0x0156:\n switch(r1) {\n case 0: goto L_0x0222;\n case 1: goto L_0x022e;\n case 2: goto L_0x023a;\n case 3: goto L_0x0241;\n case 4: goto L_0x024d;\n case 5: goto L_0x0259;\n default: goto L_0x0159;\n };\t Catch:{ all -> 0x0020 }\n L_0x0159:\n r1 = 10;\n r2.addRule(r1);\t Catch:{ all -> 0x0020 }\n r1 = 11;\n r2.addRule(r1);\t Catch:{ all -> 0x0020 }\n L_0x0163:\n r1 = r12.zztp;\t Catch:{ all -> 0x0020 }\n r3 = new com.google.android.gms.internal.zzeb$1;\t Catch:{ all -> 0x0020 }\n r3.<init>(r12);\t Catch:{ all -> 0x0020 }\n r1.setOnClickListener(r3);\t Catch:{ all -> 0x0020 }\n r1 = r12.zztp;\t Catch:{ all -> 0x0020 }\n r3 = \"Close button\";\n r1.setContentDescription(r3);\t Catch:{ all -> 0x0020 }\n r1 = r12.zzts;\t Catch:{ all -> 0x0020 }\n r3 = r12.zztp;\t Catch:{ all -> 0x0020 }\n r1.addView(r3, r2);\t Catch:{ all -> 0x0020 }\n r1 = r12.zztr;\t Catch:{ RuntimeException -> 0x0265 }\n r2 = r7.getDecorView();\t Catch:{ RuntimeException -> 0x0265 }\n r3 = 0;\n r4 = com.google.android.gms.internal.zzbe.zzbD();\t Catch:{ RuntimeException -> 0x0265 }\n r5 = r12.zztn;\t Catch:{ RuntimeException -> 0x0265 }\n r7 = 0;\n r7 = r8[r7];\t Catch:{ RuntimeException -> 0x0265 }\n r4 = r4.zzb(r5, r7);\t Catch:{ RuntimeException -> 0x0265 }\n r5 = com.google.android.gms.internal.zzbe.zzbD();\t Catch:{ RuntimeException -> 0x0265 }\n r7 = r12.zztn;\t Catch:{ RuntimeException -> 0x0265 }\n r9 = 1;\n r9 = r8[r9];\t Catch:{ RuntimeException -> 0x0265 }\n r5 = r5.zzb(r7, r9);\t Catch:{ RuntimeException -> 0x0265 }\n r1.showAtLocation(r2, r3, r4, r5);\t Catch:{ RuntimeException -> 0x0265 }\n r1 = 0;\n r1 = r8[r1];\t Catch:{ all -> 0x0020 }\n r2 = 1;\n r2 = r8[r2];\t Catch:{ all -> 0x0020 }\n r12.zzc(r1, r2);\t Catch:{ all -> 0x0020 }\n r1 = r12.zzmu;\t Catch:{ all -> 0x0020 }\n r2 = new com.google.android.gms.internal.zzba;\t Catch:{ all -> 0x0020 }\n r3 = r12.zztn;\t Catch:{ all -> 0x0020 }\n r4 = new com.google.android.gms.ads.AdSize;\t Catch:{ all -> 0x0020 }\n r5 = r12.zzli;\t Catch:{ all -> 0x0020 }\n r7 = r12.zzlj;\t Catch:{ all -> 0x0020 }\n r4.<init>(r5, r7);\t Catch:{ all -> 0x0020 }\n r2.<init>(r3, r4);\t Catch:{ all -> 0x0020 }\n r1.zza(r2);\t Catch:{ all -> 0x0020 }\n r1 = 0;\n r1 = r8[r1];\t Catch:{ all -> 0x0020 }\n r2 = 1;\n r2 = r8[r2];\t Catch:{ all -> 0x0020 }\n r12.zzd(r1, r2);\t Catch:{ all -> 0x0020 }\n r1 = \"resized\";\n r12.zzJ(r1);\t Catch:{ all -> 0x0020 }\n monitor-exit(r6);\t Catch:{ all -> 0x0020 }\n goto L_0x0010;\n L_0x01ce:\n r1 = r12.zztr;\t Catch:{ all -> 0x0020 }\n r1.dismiss();\t Catch:{ all -> 0x0020 }\n goto L_0x00dd;\n L_0x01d5:\n r1 = \"Webview is detached, probably in the middle of a resize or expand.\";\n r12.zzH(r1);\t Catch:{ all -> 0x0020 }\n monitor-exit(r6);\t Catch:{ all -> 0x0020 }\n goto L_0x0010;\n L_0x01dd:\n r1 = r3;\n goto L_0x0116;\n L_0x01e0:\n r5 = \"top-left\";\n r1 = r1.equals(r5);\t Catch:{ all -> 0x0020 }\n if (r1 == 0) goto L_0x0155;\n L_0x01e8:\n r1 = r3;\n goto L_0x0156;\n L_0x01eb:\n r3 = \"top-center\";\n r1 = r1.equals(r3);\t Catch:{ all -> 0x0020 }\n if (r1 == 0) goto L_0x0155;\n L_0x01f3:\n r1 = r5;\n goto L_0x0156;\n L_0x01f6:\n r3 = \"center\";\n r1 = r1.equals(r3);\t Catch:{ all -> 0x0020 }\n if (r1 == 0) goto L_0x0155;\n L_0x01fe:\n r1 = 2;\n goto L_0x0156;\n L_0x0201:\n r3 = \"bottom-left\";\n r1 = r1.equals(r3);\t Catch:{ all -> 0x0020 }\n if (r1 == 0) goto L_0x0155;\n L_0x0209:\n r1 = 3;\n goto L_0x0156;\n L_0x020c:\n r3 = \"bottom-center\";\n r1 = r1.equals(r3);\t Catch:{ all -> 0x0020 }\n if (r1 == 0) goto L_0x0155;\n L_0x0214:\n r1 = 4;\n goto L_0x0156;\n L_0x0217:\n r3 = \"bottom-right\";\n r1 = r1.equals(r3);\t Catch:{ all -> 0x0020 }\n if (r1 == 0) goto L_0x0155;\n L_0x021f:\n r1 = 5;\n goto L_0x0156;\n L_0x0222:\n r1 = 10;\n r2.addRule(r1);\t Catch:{ all -> 0x0020 }\n r1 = 9;\n r2.addRule(r1);\t Catch:{ all -> 0x0020 }\n goto L_0x0163;\n L_0x022e:\n r1 = 10;\n r2.addRule(r1);\t Catch:{ all -> 0x0020 }\n r1 = 14;\n r2.addRule(r1);\t Catch:{ all -> 0x0020 }\n goto L_0x0163;\n L_0x023a:\n r1 = 13;\n r2.addRule(r1);\t Catch:{ all -> 0x0020 }\n goto L_0x0163;\n L_0x0241:\n r1 = 12;\n r2.addRule(r1);\t Catch:{ all -> 0x0020 }\n r1 = 9;\n r2.addRule(r1);\t Catch:{ all -> 0x0020 }\n goto L_0x0163;\n L_0x024d:\n r1 = 12;\n r2.addRule(r1);\t Catch:{ all -> 0x0020 }\n r1 = 14;\n r2.addRule(r1);\t Catch:{ all -> 0x0020 }\n goto L_0x0163;\n L_0x0259:\n r1 = 12;\n r2.addRule(r1);\t Catch:{ all -> 0x0020 }\n r1 = 11;\n r2.addRule(r1);\t Catch:{ all -> 0x0020 }\n goto L_0x0163;\n L_0x0265:\n r1 = move-exception;\n r2 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0020 }\n r2.<init>();\t Catch:{ all -> 0x0020 }\n r3 = \"Cannot show popup window: \";\n r2 = r2.append(r3);\t Catch:{ all -> 0x0020 }\n r1 = r1.getMessage();\t Catch:{ all -> 0x0020 }\n r1 = r2.append(r1);\t Catch:{ all -> 0x0020 }\n r1 = r1.toString();\t Catch:{ all -> 0x0020 }\n r12.zzH(r1);\t Catch:{ all -> 0x0020 }\n r1 = r12.zzts;\t Catch:{ all -> 0x0020 }\n r2 = r12.zzmu;\t Catch:{ all -> 0x0020 }\n r2 = r2.getWebView();\t Catch:{ all -> 0x0020 }\n r1.removeView(r2);\t Catch:{ all -> 0x0020 }\n r1 = r12.zztt;\t Catch:{ all -> 0x0020 }\n if (r1 == 0) goto L_0x02a8;\n L_0x028f:\n r1 = r12.zztt;\t Catch:{ all -> 0x0020 }\n r2 = r12.zzto;\t Catch:{ all -> 0x0020 }\n r1.removeView(r2);\t Catch:{ all -> 0x0020 }\n r1 = r12.zztt;\t Catch:{ all -> 0x0020 }\n r2 = r12.zzmu;\t Catch:{ all -> 0x0020 }\n r2 = r2.getWebView();\t Catch:{ all -> 0x0020 }\n r1.addView(r2);\t Catch:{ all -> 0x0020 }\n r1 = r12.zzmu;\t Catch:{ all -> 0x0020 }\n r2 = r12.zzsF;\t Catch:{ all -> 0x0020 }\n r1.zza(r2);\t Catch:{ all -> 0x0020 }\n L_0x02a8:\n monitor-exit(r6);\t Catch:{ all -> 0x0020 }\n goto L_0x0010;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.zzeb.zzg(java.util.Map):void\");\n }" ]
[ "0.5871857", "0.58576524", "0.5680457", "0.5618195", "0.5596877", "0.5586482", "0.5573312", "0.5567709", "0.5553075", "0.5539006", "0.55133164", "0.55091476", "0.5509008", "0.54771584", "0.54647833", "0.5445075", "0.53735876", "0.5370486", "0.53410846", "0.53280234", "0.53069913", "0.5300785", "0.52669346", "0.5254818", "0.52525866", "0.5249524", "0.5236112", "0.5233257", "0.5231977", "0.5208021", "0.52075046", "0.5192189", "0.5186755", "0.5181309", "0.5177194", "0.51719654", "0.5167843", "0.5164958", "0.51639205", "0.51637536", "0.5158171", "0.5154917", "0.51535344", "0.51360255", "0.5117992", "0.5113028", "0.5106927", "0.5103347", "0.5100836", "0.5100836", "0.51002806", "0.50943273", "0.5093502", "0.50898653", "0.5085314", "0.5076677", "0.5061782", "0.50616926", "0.5061437", "0.5051104", "0.5051104", "0.50434005", "0.5026078", "0.5025888", "0.50163853", "0.5001472", "0.49994293", "0.4998561", "0.49962288", "0.4990381", "0.49897468", "0.49887362", "0.49887362", "0.49809697", "0.4976224", "0.49761343", "0.49761268", "0.49711552", "0.49665532", "0.49654627", "0.49654627", "0.49647173", "0.49640363", "0.4960223", "0.49537766", "0.49486682", "0.49458525", "0.4940191", "0.4940191", "0.49392524", "0.49377495", "0.4937408", "0.49320787", "0.49302927", "0.49108076", "0.49104175", "0.49063855", "0.48939434", "0.4892376", "0.48918673", "0.48888424" ]
0.0
-1
1 / \ 2 3 / / \ 4 5 6 / \ 7 8 7 > 4 > 8 > 2 > 1 > 5 > 3 > 6
public static void main(String[] args) { Node<Integer> node1 = new Node<>(1); Node<Integer> node2 = new Node<>(2); Node<Integer> node3 = new Node<>(3); Node<Integer> node4 = new Node<>(4); node1.setLeftChild(node2); node1.setRightChild(node3); node2.setLeftChild(node4); node3.setLeftChild(new Node<>(5)); node3.setRightChild(new Node<>(6)); node4.setLeftChild(new Node<>(7)); node4.setRightChild(new Node<>(8)); traverse(node1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int parent(int i){return (i-1)/2;}", "private int first_leaf() { return n/2; }", "private int leftChild(int i){return 2*i+1;}", "public String run() {\r\n\t// divisorSum[n] is the sum of all the proper divisors of n\r\n int divisorSum[]= new int[LIMIT+1];\r\n for(int i=1;i<=LIMIT;i++)\r\n {\r\n for(int j=i+i;j<=LIMIT;j+=i)\r\n divisorSum[j]+=i;\r\n }\r\n // Analyze the amicable chain length for each number in ascending order\r\n int maxChainLen=0;\r\n int minChainElem=-1;\r\n for(int i=0;i<=LIMIT;i++){\r\n Set<Integer> visited=new HashSet<>();\r\n for(int count=1,cur=i;;count++){\r\n visited.add(cur);\r\n int next=divisorSum[cur];\r\n if(next==i)\r\n {\r\n if(count>maxChainLen){\r\n minChainElem=i;\r\n maxChainLen=count;\r\n \r\n }\r\n break;\r\n }\r\n // Exceeds limit or not a chain (a rho shape instead)\r\n else if(next>LIMIT || visited.contains(next))\r\n break;\r\n else\r\n cur=next;\r\n }\r\n }\r\n return Integer.toString(minChainElem);\r\n }", "protected int parent(int i) { return (i - 1) / 2; }", "static int parent(int i)\n {\n return (i-1)/2;\n }", "private int rightChild(int i){return 2*i+2;}", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int[] numbers = new int [5];\n\n for (int i = 0; i < 5; i ++) {\n System.out.print(i+1 + \". \");\n numbers[i]=input.nextInt();\n }\n for(int num : numbers){\n int rootNumber = num / num;\n System.out.println(rootNumber + \"\\t\");\n }\n }", "public static void main(String[] args) {\n\t\tint length = 9;\n\t\tint counter = 1;\n\t\t\tfor ( int x = (length+1)/2; x<=length;x++){\n\t\t\t\tfor (int j = x-counter; j>=0; j--){\n\t\t\t\t\t//System.out.println(\"j is \"+ j);\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\n\t\t\t\tfor (int i =1;i<=counter;i++){\n\t\t\t\t\t\t\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println();\n\t\t\t\tcounter+=2;\n\t\t\t}\n\t\t\tcounter = length-2;\n\t\t\t\n\t\t\t// length = 9, counter is 7 , j = 1, i = 7, x=8\n\t\t\tfor ( int x = (length-1); x>=(length+1)/2; x--){\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tfor (int j = 1; j<=x-counter; j++){\n\t\t\t\t\t//System.out.println(\"j is \"+ j);\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tfor (int i =counter;i>=1;i--){\n\t\t\t\t\t\t\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}\n\t\t\t\tcounter-=2;\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t}", "public int mountainSequence(int[] nums) {\n // write your code here\n int left = 0, right = nums.length - 1;\n while (left + 1 < right) {\n int mid = left + (right - left) / 2;\n if (nums[mid] > nums[mid + 1]) {\n right = mid;\n } else {\n left = mid;\n }\n }\n return nums[left] > nums[right] ? nums[left] : nums[right];\n }", "public List<String> generateParenthesis(int n) {\n List<String> res = new LinkedList<>();\n backTrack(n, n, \"\", res);\n return res;\n}", "public static String optimalDivision(int[] nums) {\n if(nums.length==1) return nums[0]+\"\";\n if(nums.length==2) return nums[0]+\"/\"+nums[1];\n StringBuilder res=new StringBuilder();\n res.append(nums[0]); res.append(\"/(\"); res.append(nums[1]);\n for(int i=2;i<nums.length;i++){\n res.append(\"/\"+nums[i]);\n }\n res.append(\")\");\n return res.toString();\n }", "public static void main(String[] args) {\n\r\n for (int x = 1; x < 10; x++) {// x=1\r\n\r\n for (int h = 1; h < 10; h++) { // h=1+1+1...8+1\r\n\r\n System.out.println(x + \"*\" + h \"=\" +x*h);// 1-2-3....8-9\r\n\r\n if(h==2){\r\n break;\r\n }\r\n }\r\n\r\n if(x==4){\r\n continue;\r\n }\r\n\r\n }\r\n\r\n }", "public static void ninethProgram() {\n\t\tfor(int i=1;i<=4;i++) {\n\t\t\tfor(int j=4-1;j>=i;j--) {\n\t\t\t\tSystem.out.print(\" \");\t\n\t\t\t}for(int k=1;k<=4;k++) {\n\t\t\t\tSystem.out.print(\"*\");\t\t\n\t\t\t}System.out.println();\n\t\t}\n\t}", "public static void main(String[] args) {\n Node a = new Node(50);\n Node b = new Node(20);\n Node c = new Node(60);\n Node d = new Node(10);\n Node e = new Node(25);\n Node f = new Node(70);\n Node g = new Node(5);\n Node h = new Node(15);\n Node i = new Node(65);\n Node j = new Node(80);\n a.left = b;\n a.right = c;\n b.left = d;\n b.right = e;\n c.right = f;\n d.left = g;\n d.right = h;\n f.left = i;\n f.right = j;\n ArrayList<LinkedList<Integer>> lists = bstSequences(a);\n for (LinkedList sequence : lists)\n System.out.println(sequence);\n\n /*\n * 2 / \\ 1 3\n */\n a = new Node(2);\n b = new Node(1);\n c = new Node(3);\n a.left = b;\n a.right = c;\n lists = bstSequences(a);\n for (LinkedList sequence : lists)\n System.out.println(sequence);\n }", "public static void main(String[] args) {\n// TreeNode node1 = new TreeNode(0);\n// TreeNode node2l = new TreeNode(3);\n// TreeNode node2r = new TreeNode(5);\n//// TreeNode node3l = new TreeNode(2);\n// TreeNode node3r = new TreeNode(2);\n//// TreeNode node4l = new TreeNode(4);\n// TreeNode node4r = new TreeNode(1);\n//\n// node1.left = node2l;\n// node1.right = node2r;\n//// node2l.left = node3l;\n// node2l.right = node3r;\n// node3r.right = node4r;\n//\n\n int[] nums = {3, 2, 1, 6, 0, 5};\n\n }", "public static void highlyDivisibleTriangularNumber(){\n\n int position = 1;\n long triangleNumber;\n Long[] factors;\n do{\n position ++;\n triangleNumber = getTriangleNumber(position);\n factors = getFactors(triangleNumber); \n }while(factors.length <= 500);\n\n System.out.println(triangleNumber);\n}", "private int get_left_child(int index){\r\n return 2 * index + 1;\r\n }", "public static void main(String[] args) {\n\n\n for(int a=0; a<7;a++){\n for(int b=0;b<7-a;b++){\n System.out.print(\" \");\n }\n for(int c=0; c<=a;c++){\n System.out.print(\"* \");\n }\n System.out.println(\" \");\n }\n\n }", "private static int trailzerofun(int num) {\n\t\tint count=0;\n\t\tif(num<0)\n\t\t\treturn -1;\n\t\tfor(int i=5;num/i>=1;i*=5)\n\t\t{\n\t\t\tcount+=num/i;\n\t\t}\n\t\treturn count;\n\t}", "static int recursiva1(int n)\n\t\t{\n\t\tif (n==0)\n\t\t\treturn 10; \n\t\tif (n==1)\n\t\t\treturn 20; \n\t\treturn recursiva1(n-1) - recursiva1 (n-2);\t\t\n\t\t}", "void h(List<List<Integer>> r, List<Integer> t, int n, int s){ \n for(int i = s; i*i <= n; i++){\n if(n % i != 0) continue; \n t.add(i);\n t.add(n / i);\n r.add(new ArrayList<>(t));\n t.remove(t.size() - 1);\n h(r, t, n/i, i);\n t.remove(t.size() - 1);\n }\n }", "public static void main(String[] args) {\nint i,j,k;\r\nint num=5;\r\nfor(i=0;i<num;i++){\r\n\tfor(j=0;j<i;j++){\r\n\t\tSystem.out.print(\" \");\r\n\t}\r\n\tfor(k=num; k>=2*i-1; k--){\r\n\t\tSystem.out.print(\"*\");\r\n\t}\r\n\t\r\n\tSystem.out.println();\r\n}\r\n\t}", "public static void main(String args[]) {\n\tSystem.out.println(\"1 2 + 4 * 4 2 - + = \" + execute(\"1 2 + 4 * 4 2 - +\"));\r\n\t\r\n\t// (1 + 4) * (3 + 7) / 5 == 10\r\n\t/*System.out.println(\"1 4 + 3 7 + * 5 / = \" \r\n\t\t\t + execute(\"1 4 + 3 7 + * 5 /\"));\r\n\t\r\n\t// 10 + 2 == 12\r\n\tSystem.out.println(\"10 2 + = \" \r\n\t\t\t + execute(\"10 2 +\"));\r\n\t\r\n\t// 10 / 2 == 5\r\n\tSystem.out.println(\"10 2 / = \"\r\n\t\t\t + execute(\"10 2 /\"));*/\r\n }", "private static BigInteger singleTree(int n) {\n \tif (T[n] != null) {\n \t\treturn T[n];\n \t}\n \tBigInteger ret = BigInteger.ZERO;\n \tfor (int i = 1; i < n; i++) {\n \t\tret = ret.add(binomial(n, i).multiply(BigInteger.valueOf(n - i).pow(n - i))\n \t\t\t\t .multiply(BigInteger.valueOf(i).pow(i)));\n \t}\n \treturn T[n] = ret.divide(BigInteger.valueOf(n));\n }", "public static int distinctPaths4(int n) {\n\t\tint[][] mem = new int[n+1][n+1];\n\t\tfor(int j = 1; j <= n; ++j) {\n\t\t\tmem[1][j] = 1;\n\t\t\tmem[j][1] = 1;\n\t\t}\n\t\tfor(int i = 2; i <= n; ++i) {\n\t\t\tfor(int j = 2; j <= n; ++j) {\n\t\t\t\tmem[i][j] = mem[i-1][j] + mem[i][j-1];\n\t\t\t}\n\t\t}\n\t\treturn mem[n][n];\n\t}", "@Test public void testPublic8() {\n Graph<Integer> graph= TestGraphs.testGraph4();\n String[] results= {\"1 4\", \"2 4\", \"3 4\", \"0 4\", \"\"};\n Integer i;\n\n for (i= 0; i <= 4; i++)\n assertEquals(results[i],\n TestGraphs.collToString(graph.getNeighbors(i)));\n }", "static int count8(int n) {\n if (n == 0)\n return 0;\n if (n % 10 == 8) {\n // RC1: if two rightmost digits is 88, count as 2, and recurse on rest\n if (n % 100 == 88)\n return 2 + count8(n / 10);\n else\n // RC2: if rightmost digit is just one 8, standard--count as 1 and recurse on rest\n return 1 + count8(n / 10);\n } else\n // RC3: if rightmost not 8, recurse on rest\n return count8(n / 10);\n }", "@Test\n\tpublic void testStartingIndicesRegression(){\n\t\tassertLeftmostStartingIndices(\"5,1,7,3,2|-..xxx$1..x...xxx$3....-xx........\", 0, 6, 8, 18, 22);\n\t\tassertRightmostStartingIndices(\"7,5|.......xxx$1....xxx$2..-\", 6, 14);\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tint n=5;\n\t\tfor(int i=n-1;i>=0;i--)\n\t\t{\n\t\t\tfor(int space=0;space<n-1-i;space++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int j=0;j<=i*2;j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}\n\n}", "int depth();", "int depth();", "public static void main(String[] args) {\n TreeNode n0 = new TreeNode('R');\n TreeNode n1 = new TreeNode('R');\n n0.left = n1;\n TreeNode n2 = new TreeNode('R');\n n0.right = n2;\n TreeNode n3 = new TreeNode('B');\n n1.left = n3;\n TreeNode n4 = new TreeNode('B');\n n1.right = n4;\n TreeNode n5 = new TreeNode('R');\n n2.left = n5;\n TreeNode n6 = new TreeNode('G');\n n2.right = n6;\n TreeNode n7 = new TreeNode('B');\n n4.left = n7;\n TreeNode n8 = new TreeNode('B');\n n4.right = n8;\n TreeNode n9 = new TreeNode('G');\n n6.left = n9;\n TreeNode n10 = new TreeNode('G');\n n6.right = n10;\n TreeNode n11 = new TreeNode('G');\n n10.right = n11;\n\n System.out.println(getClump(n0));\n }", "@Test\n public void whenAddNineNodesOnDifferentLevelsThenResultNineNodesFromBottomToTop() {\n tree.addChild(nodeOne, \"1\");\n tree.addChild(new TreeNode(), \"1\");\n tree.addChild(new TreeNode(), \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n nodeOne.addChild(new TreeNode(), \"2\");\n nodeOne.addChild(new TreeNode(), \"2\");\n nodeTwo.addChild(nodeThree, \"3\");\n nodeTwo.addChild(new TreeNode(), \"3\");\n nodeTwo.addChild(new TreeNode(), \"3\");\n assertThat(tree.getChildren().toString(), is(\"[3, 3, 3, 2, 2, 2, 1, 1, 1]\"));\n }", "public List<String> generateParen(int n){\n int count = 0; //cannot be smaller than 0 \n int left = n;\n int right = n;\n List<String> res = new ArrayList<>();\n dfs(left, right, count, \"\", res);\n return res;\n }", "public static void main(String[] args) {\n\n\n\n System.out.println(4 * (1.0 - (1 / 3) + (1 / 5) - (1 / 7) + (1 / 9) - (1 / 11)));\n\n System.out.println(4 * (1.0 - (1/3) + (1/5) - (1/7)\n + (1 / 9) - (1/11) + (1/13)));\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tint n = 7;\r\n\t\tfor (int i = n; i >= 0; i--) {\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t for(int j=0; j<n-i; j++) {\r\n\t\t\t \r\n\t\t\t System.out.print(\" \");\r\n\t\t\t \r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\r\n\t\t\tfor (int j = n; j >= n-i; j--) {\r\n\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t}\r\n\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tint n = 8;\n\t\tArrayList<String> res = getAllParenthesis(n);\n\t\tfor (String x : res) {\n\t\t\tSystem.out.println(x);\n\t\t}\n\t}", "private static void drawNumDiamondRec(int h) {\n double hd = h;\r\n boolean odd = hd % 2 == 1;\r\n int middle = (int) Math.ceil(hd / 2);\r\n\r\n actual_recursion(h, middle, odd, 1, 0);\r\n\r\n }", "static int getNumPatterns() { return 64; }", "private int get_parent(int index){\r\n return (index-1)/2;\r\n }", "public static void main(String[] args) {\n\t\tint[] arr = {7,3,10,12,5,1,9};\n\t\tNode root = null;\n\t\tfor(int n:arr) {\n\t\t\tif(root == null) {\n\t\t\t\troot = new Node(n);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tNode cur = root;\n\t\t\tNode par = null;\n\t\t\twhile(cur != null) {\n\t\t\t\tpar = cur;\n\t\t\t\tif(n < cur.val) cur = cur.left;\n\t\t\t\telse cur = cur.right;\n\t\t\t}\n\t\t\tif(n < par.val) par.left = new Node(n);\n\t\t\telse par.right = new Node(n);\n\t\t\tif(height(root.left) - height(root.right) > 1) {\n\t\t\t\tif(height(root.left.right) > height(root.left.left)) leftRotate(root.left);\n\t\t\t\trightRotate(root);\n\t\t\t}\n\t\t\tif(height(root.right) - height(root.left) > 1) {\n\t\t\t\tif(height(root.right.left) > height(root.right.right)) rightRotate(root.right);\n\t\t\t\tleftRotate(root);\n\t\t\t}\n\t\t}\n\t\t//infixOrder(root);\n//\t\tdel(root,7);\n//\t\tinfixOrder(root);\n\t\t//del(root,5);\n\t\t//del(root,5);\n\t\tinfixOrder(root);\n\t}", "protected static int parent(int i){\n return (i-1)/2;\n }", "public void Series() {\n\t\tint n=8,i=1,k=2,count=0;\n\t\tSystem.out.print(n+\" \");\n\t\twhile (count<5) {\n\t\t\tn=n*i;//12\n\t\t\tn=n-k;//9\n\t\t\tSystem.out.print(n+\" \");//9\n\t\t\ti++;\n\t\t\tk++;\n\t\t\tcount++;\n\t\t}\n\t\t/*System.out.println(n);//8\n\t\tn=n*1;//8\n\t\tn=n-2;//6\n\t\t\n\t\tSystem.out.println(n);//6\n\t\tn=n*2;//12\n\t\tn=n-3;//9\n\t\tSystem.out.println(n);//9\n\t\tn=n*3;//27\n\t\tn=n-4;//23\n\t\tSystem.out.println(n);\n\t\tn=n*4;//12\n\t\tn=n-5;*/\n\t\t\n\t\t/*System.out.println(n);\n\t\tn=n*5;//12\n\t\tn=n-6;\n\t\tSystem.out.println(n);*/\n\t\t\n\t}", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "static void pyramid(){\n\t}", "public static void main(String[] args) {\n System.out.println(partition(new int[]{1,2,3,4,5,6,7,8,9}, 2));\n // 1 1 1 | 1 1 1 | 1 1 1\n System.out.println(partition(new int[]{1,1,1,1,1,1,1,1,1}, 2));\n }", "static void print4(int n) {\n\t\tint blank = 0;\n\t\tint star = (n/2) + 1;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < blank; j++) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int j = 0; j < Math.abs(star); j++) {\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tstar--;\n\t\t\tif(star == 0) {\n\t\t\t\tstar = -2;\n\t\t\t}\n\t\t\tblank++;\n\t\t\tif(blank > n/2)\n\t\t\t\tblank = n >> 1;\n\t\t}\n\t}", "private static int parent(int i) {\n\t\treturn (i-1)/2;\n\t}", "private static int parent(int i) {\n\t\treturn (i-1)/2;\n\t}", "public static void main(String[] args) {\n int i= 1; int j=1;\r\n\t\t/*for(i=1; i<=6; i++){\r\n\t\t\tfor(j=1; j<=6-i; j++){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t }\r\n\t\t\t for(j=1; j<=i; j++){\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t } for(j=1; j<=6; j++){\r\n\t\t} System.out.print(\"*\");\r\n\t\t System.out.println();\r\n\t\t}\r\n\t\t*/\r\n\t\r\nfor(i=1; i<=7;i++){\r\n\tfor(j=1; j<=7-i; j++){\r\n\t\tSystem.out.println(\" \");\r\n\t}\r\n\tfor(j=1; j<=i; j++){\r\n\t\tSystem.out.print(\"*\");\r\n\t\r\n\t}\r\n}\r\n\r\n\t\t\r\n\t\t/*int num = 6;\r\n\t\tfor(i=1; i<=num; i++){\r\n\t\t\tfor(j=1; j<=num+1-i; j++){\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\tint num = 6;\r\n\t\tfor(i=1; i<=num; i++){\r\n\t\t\tfor(j=1; j<=num+6-i; j++){\r\n\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t/******* i=1 *=6\r\n\t\t***** i=2 *=5\r\n\t\t**** i=3 *=4\r\n\t\t*** i=4 *=3\r\n\t\t** i=5 *=2\r\n\t\t* i=6 *=1\r\n\t\t *=7 -i=6+1-i=num+1-i\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t/*\t****** i=1 * =6\r\n\t\t ***** i=2 * = 5\r\n\t\t ***\r\n\t\t **\r\n\t\t *\r\n\t\t\r\n\t*/\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfor(i=1; i<=num; i++){\r\n\t\t\tfor(j=1; j<=i-1; j++){\r\n\t\t\t\tSystem.out.println(\" \");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private int get_right_child(int index){\r\n return 2 * index + 2;\r\n }", "public static int Main()\n\t{\n\t\tint x;\n\t\tint y;\n\t\tint i;\n\t\tint j;\n\t\tx = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\ty = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tfor (i = 1;x / i > 0;i = i * 2)\n\t\t{\n\t\t;\n\t\t}\n\t\tfor (j = 1;y / j > 0;j = j * 2)\n\t\t{\n\t\t;\n\t\t}\n\t\ti = i / 2;\n\t\tj = j / 2; //i,j????2?????\n\t\tif (i > j)\n\t\t{\n\t\t\tx = x * j / i;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ty = y * i / j;\n\t\t}\n\t\twhile (x != y)\n\t\t{\n\t\t\tx = x / 2;\n\t\t\ty = y / 2;\n\t\t}\n\t\tSystem.out.print(x);\n\n\n\n\n\n\n\t}", "public List<Long> depthTraverse(){\n return depthTraverseGen(null);\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint i, x=4,w=9,q;\r\n\t\tfor(i=-1;i<20;i+=3) {\r\n\t\t\tx++;\r\n\t\t\tfor(q=4;q<11;q++) {\r\n\t\t\t\tdo {\r\n\t\t\t\t\ti=+3;\r\n\t\t\t\t\tw=sizeof(i);\r\n\t\t\t\t\ti=x+w;\r\n\t\t\t\t\tx=w+i;\r\n\t\t\t\t\t\t\r\n\t\t\t\t} while (x<15);\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"x:\"+x+\"i:\"+i);\r\n\r\n\t}", "public static void main(String[] args) {\n TreeNode n20 = new TreeNode(20);\n TreeNode n8 = new TreeNode(8);\n TreeNode n4 = new TreeNode(4);\n TreeNode n7 = new TreeNode(7);\n TreeNode n12 = new TreeNode(12);\n TreeNode n14 = new TreeNode(14);\n TreeNode n21 = new TreeNode(21);\n TreeNode n22 = new TreeNode(22);\n TreeNode n25 = new TreeNode(25);\n TreeNode n24 = new TreeNode(24);\n n20.left = n8;\n n20.right = n22;\n n8.left = n4;\n n8.right = n12;\n n4.right = n7;\n n12.right = n14;\n n22.left = n21;\n n22.right = n25;\n n25.left = n24;\n\n for (Integer i : printBoundary(n20)) {\n System.out.println(i);\n }\n }", "private int ls(final int x) {\n assert(! leaf(x));\n return 2*x+1;\n }", "private static int path1(int n) {\n int[] path = new int[n+1];\n path[0] = 0;\n path[1] = 1;\n path[2] = 2;\n for (int i=3;i<=n;i++) {\n path[i] = path[i-1] + path[i-2];\n }\n return path[n];\n }", "public String tri4(int h){\n\t\tString S = \"\";\n\t\tint H = h;\n\t\tint HH = H;\n\t\tint Counter = 0;\n\t\tint UsingCounter = Counter;\n\n\t\twhile (H > 0){\n\t\t\tHH = H;\n\t\t\twhile (UsingCounter > 0){\n\t\t\t\tS = S + \" \";\n\t\t\t\tUsingCounter = UsingCounter - 1;}\n\t\t\twhile (HH > 0) {\n\t\t\t\tS = S + \"*\";\n\t\t\t\tHH = HH - 1;}\n\t\t\tCounter = Counter + 1;\n\t\t\tUsingCounter = Counter;\n\t\t\tS = S + \"\\n\";\n\t\t\tH = H - 1;}\n\n\t\treturn S; }", "private static String subProcess(int[] n1, int[] n2) {\n\n\t\t// if n1.length is smaller than n2.length, we are going to be too small.\n\t\tif (n1.length < n2.length) {\n\t\t\treturn \"+\" + toString (n1);\n\t\t}\n\t\t\n\t\t// we have to extend, and reduce length. Note that this WILL terminate because\n\t\t// we would have left earlier if n2 were greater than n1.\n\t\tint off = 0;\n\t\tint length = n2.length;\n\t\twhile (compareTo(n2,0,length,n1,off) > 0) {\n\t\t\tn2 = expand(n2);\n\t\t\tlength = n2.length;\n\t\t\t\n\t\t\tif (length > n1.length) {\n\t\t\t\t// gone too far! We at last have our remainder! Return as \"+remainder\".\n\t\t\t\treturn \"+\" + toString(n1);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tint []innerSum = new int[n1.length+1]; // add 1 just in case we get too high\n\t\tint []result = new int[length]; \n\t\tint start;\n\t\t\n\t\t// initial set.\n\t\tif (n2[0] == 0) { start = 9; } else { start = n1[0]/n2[0]; }\n\t\t\n\t\tmultiply(n2, start, innerSum);\n\t\tinnerSum = reduce(innerSum);\n\t\t\n\t\tif (innerSum.length < n2.length) {\n\t\t\t// perfect fit. Expand back out to work with subtractDown. REALLY UGLY CODE\n\t\t\tinnerSum = expand(innerSum);\n\t\t} else {\n\t\t\t// must reduce and continue....\n\t\t\twhile (n2.length < innerSum.length) {\n\t\t\t\tstart--; // had gone too far! Back down.\n\t\t\t\tinnerSum = new int[n1.length+1];\n\t\t\t\tmultiply (n2, start, innerSum);\n\t\t\t\tinnerSum = reduce(innerSum);\n\t\t\t}\n\t\t}\n\t\t\n\t\tboolean subtractDown = compareTo(innerSum, n1, innerSum.length) > 0; // if false, we have to add up\n\t\twhile (true) {\n\t\t\tif (subtractDown) {\n\t\t\t\tstart--;\n\t\t\t\tsubtract(innerSum, n2, result, subProcessSign);\n\t\t\t\tassign(innerSum, result);\n\t\t\t\t\n\t\t\t\tsubtractDown = compareTo(innerSum, n1, innerSum.length) > 0;\n\t\t\t} else {\n\t\t\t\t// found. Note that 'start' is the digit in the quotient. Subtract from and replace.\n\t\t\t\tint []newTop = new int[innerSum.length];\n\t\t\t\textract(newTop,0,n1,0,innerSum.length);\n\t\t\t\t\n\t\t\t\tresult = new int[innerSum.length];\n\t\t\t\tsubtract(newTop, innerSum, result, subProcessSign); \n\t\t\t\textract(n1,0,result,0,result.length); // copy back in\n\t\t\t\t\n\t\t\t\tint[]normalized_n1 = reduce(n1);\n\t\t\t\tint[]normalized_n2 = reduce(n2);\n\t\t\t\tString s = start + subProcess(normalized_n1, normalized_n2);\n\t\t\t\treturn s;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tfor(int i=1;i<=5;i++)\n\t\t{\n\t\t\t\n\t\t for(int j=1;j<=i;j++) {\n\t\t\t \n\t\t\t \n\t\t\tSystem.out.print(\"*\");\n\t\t\n\t\t}\n\t\t\t\n\t\t System.out.println(\"\");\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=1;i<=5;i++) {\n\t\t\t\t\t\t\n\t\t for(int j=5;j>=i;j--) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\tSystem.out.print(\"*\");\t\n\t\t}\n System.out.println();\t\t\n \n }\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tfor(int a=1;a<=5;a++) {\n\t\t\t\n\t\t \n\t\t\tfor(int b=1;b<=a;b++) {\n\t\t\t\n\t\t \n\t\t\t\tSystem.out.print(\"*\");\n\t\t\n\t\t }\n\t\t System.out.println();\t\n\t\t\n\t\t}\n\t\t\n\t\t for(int c=1;c<=5;c++) {\n\t\t\t\n\t\t\t\n\t\t for(int d=4;d>=c;d--) {\n\t\t\t\n\t\t System.out.print(\"*\");\t\n\t\t\t\n\t\t}\n\t\t System.out.println();\t\n\t\t}\n \n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t}", "private int parent(int i) {\r\n\t\tif (i % 2 == 0) {\r\n\t\t\treturn i / 2 - 1;\r\n\t\t}\r\n\t\treturn i / 2;\r\n\t}", "public static int Main()\n\t{\n\t\tint n; //????\n\t\tint k;\n\t\tint i = 1;\n\t\tint j;\n\t\tn = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tk = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tint[] f = new int[n + 1]; //????\n\t\twhile (i > 0) //??????????\n\t\t{\n\t\t\tf[0] = (n - 1) * i; //?????\n\t\t\tfor (j = 1;j < n + 1;j++) //????\n\t\t\t{\n\t\t\t\tif (f[j - 1] % (n - 1) != 0)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tf[j] = f[j - 1] * n / (n - 1) + k;\n\t\t\t}\n\t\t\tif (j == n + 1)\n\t\t\t{\n\t\t\t\tbreak; //???????\n\t\t\t}\n\t\t\ti = i + 1;\n\t\t}\n\t\tSystem.out.print(f[n]);\n\t\tSystem.out.print(\"\\n\");\n\t\treturn 0;\n\t}", "public static void fourthProgram() {\n\t\tfor (int i = 1; i <= 4; i++) {\n\t\t\tfor (int j = 4; j > i; j--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int k = 1; k <= i; k++) {\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private static int parent(int i) {\n\t\treturn (i - 1) / 2;\n\t}", "private int percolateUpLeaf(){\n\t\treturn percolateUp(heap.size()-1);// TODO: A one-line function that calls percolateUp()\n\t}", "private int parent(int i)\n {\n return (i-1)/d;\n }", "public static void pattern6(int input){\n\t\tint counter=1;\n\t\tfor(int i=1;i<=input;i++){\n\t\t\tfor(int j=counter;j<=(i*(i+1)/2);j++){\n\t\t\t\tSystem.out.print(counter++ + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "protected int left(int i ) { return 2 * i + 1; }", "public static String[] digraphGenerator(String str)\n\t{\n\t\tString plainText = str.replaceAll(\"\\\\s+\",\"\"); // removes spaces\n\t\tint c1 = 0;\n\t\tint c2 = 1;\n\t\twhile( c2 > -6 )\n\t\t{\n\t\t\tif (plainText.charAt(c1) == plainText.charAt(c2))\n\t\t\t{\n\t\t\t\tplainText = plainText.substring(0, c2) + \"q\" + plainText.substring(c2, plainText.length());\n\t\t\t\tc1-=2;\n\t\t\t\tc2-=2;\n\t\t\t}\n\t\t\tc1+=2;\n\t\t\tc2+=2;\n\t\t\tif (c2 >= plainText.length())\n\t\t\t{\n\t\t\t\tif (plainText.length() % 2 == 1)\n\t\t\t\t{\n\t\t\t\t\tplainText += \"q\";\n\t\t\t\t}\n\t\t\t\tString[] blockArray = plainText.split(String.format(\"(?<=\\\\G.{%1$d})\", 2)); // splits the string into groups of 2\n\t\t\t\treturn blockArray;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private int leftChild(int index){\n\t\treturn (2*index) +1;\n\t}", "private int leftchild(int i) {\n return (2 * i) + 1;\n }", "public static void m8() {\r\n\tfor(int i =1;i<=5;i++) {\r\n\t\tchar ch ='A';\r\n\t\tfor(int j=5;j>=i;j--) {\r\n\t\t\tSystem.out.print(ch);\r\n\t\t\tch++;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}\r\n}", "public static void main(String[] args) {\nint i,j,lines=5;\nfor(i=1;i<=lines;i++){\n\tfor(j=lines;j>=1;j--) {\n\t\tif(j!=i) {\n\t\tSystem.out.print(j);\n\t}else\n\tSystem.out.print(\"*\");\n}\n\t\nSystem.out.println(\" \");\n\t}\n\n}", "private static int leftChild(int i) {\n\t\treturn 2*i + 1;\n\t}", "public static void m7() {\r\n\tchar ch ='A';\r\n\tfor(int i=1;i<=5;i++) {\r\n\t\tfor(int j =1;j<=i;j++)\r\n\t\t{\r\n\t\t\tSystem.out.print(ch);\r\n\t\t}\r\n\t\tch++;\r\n\t\tSystem.out.println();\r\n\t}\r\n}", "public static void main(String[] args) {\n int n;\n int i = 1;\n Scanner sc= new Scanner(System.in);\n n = sc.nextInt();\n \n while(i<=n)\n {\n int spaces = 1;\n while(spaces<=n-i)\n {\n System.out.print(' ');\n spaces = spaces + 1;\n }\n int numb = 1;\n while(numb<=i)\n {\n System.out.print('*');\n numb = numb + 1;\n }\n int dec = i - 1;\n while(dec>=1)\n {\n System.out.print('*');\n dec = dec - 1;\n }\n System.out.println();\n i = i +1;\n }\t\n\t}", "public static void main(String[] args) {\n int n = 4;\n char[] cs = new char[8];\n printParenthesis(0, 4, 0, 0, cs);\n //System.out.println(\"012143\");\n }", "private int parentIndex(int i) {\n return i / 2;\n }", "private int rs(final int x) {\n assert(! leaf(x));\n return Math.min(2*x+2, n);\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tfor (int i = 1; i <= 5; i++) {\r\n\t\t\tfor (int j = 1; j <= i; j++) {\r\n\t\t\t\tif (j<=1) {\r\n\t\t\t\tfor (int m = 5 - j; m >= i; m--) {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t}}\r\n\t\t\t\tSystem.out.print(\"* \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}", "private static int leftChild(int i) {\n\t\treturn 2 * i + 1;\n\t}", "public String toString(){ return \"DIV\";}", "void split(Node n,Stack<Long> nodes);", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\t\r\n\t\tString BETTEST = \"/+8*62-9*43\";\r\n\r\n\r\n\t\tBinaryExpressionTree<String>listBET = new BinaryExpressionTree<String>();\r\n\r\n\t\tfor (int i = 0; i < BETTEST.length(); i++) {\r\n\t\t\t\r\n\t\t\tlistBET.add(\"\" + BETTEST.charAt(i));\t\t\t\r\n\t\t}\r\n\r\n\r\n\t\tSystem.out.println(\"\\nPreOrder Traversal\");\r\n\t\tlistBET.PreorderTraversal();\r\n\t\tSystem.out.println(\"\\nPostOrder Traversal\");\r\n\t\tlistBET.PostorderTraversal();\r\n\r\n\r\n\t\t String BETTEST2 =\"/+84*32\";\r\n\t\t \r\n\t\t BinaryExpressionTree<String>listBET2 = new BinaryExpressionTree<String>();\r\n\t\t\r\n\t\t for (int i = 0; i < BETTEST2.length(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tlistBET2.add(\"\" + BETTEST2.charAt(i));\t\r\n\t\t\r\n\t\r\n\t}\r\n\t\t\tSystem.out.println(\"\\nPreOrder Traversal\");\r\n\t\t\tlistBET2.PreorderTraversal();\r\n\t\t\tSystem.out.println(\"\\nPostOrder Traversal\");\r\n\t\t\tlistBET2.PostorderTraversal();\r\n\t\t\t\r\n String BETTEST3 =\"*-92/31\";\r\n\t\t \r\n\t\t BinaryExpressionTree<String>listBET3 = new BinaryExpressionTree<String>();\r\n\t\t\r\n\t\t for (int i = 0; i < BETTEST3.length(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tlistBET3.add(\"\" + BETTEST3.charAt(i));\t\r\n\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t}\r\n\t\t System.out.println(\"\\nPreOrder Traversal\");\r\n\t\t\tlistBET3.PreorderTraversal();\r\n\t\t\tSystem.out.println(\"\\nPostOrder Traversal\");\r\n\t\t\t\r\n\t\t\tlistBET3.PostorderTraversal();\r\n \r\n\t\t\tString BETTEST4 =\"-/*8043\";\r\n\t\t \r\n\t\t BinaryExpressionTree<String>listBET4 = new BinaryExpressionTree<String>();\r\n\t\t\r\n\t\t for (int i = 0; i < BETTEST4.length(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tlistBET4.add(\"\" + BETTEST4.charAt(i));\t\r\n\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t}\r\n\t\t\tSystem.out.println(\"\\nPreOrder Traversal\");\r\n\t\t\tlistBET4.PreorderTraversal();\r\n\t\t\tSystem.out.println(\"\\nPostOrder Traversal\");\r\n\t\t\tlistBET4.PostorderTraversal();\r\n}", "public static void m6() {\r\n\tfor(int i=1;i<=5;i++) {\r\n\t\t\r\n\t\tfor(int j=1;j<=(5-i);j++) {\r\n\t\tSystem.out.print(\" \");\t\r\n\t\t}\r\n\t\tchar ch ='A';\r\n\t\tfor(int k =1;k<=i;k++) {\r\n\t\t\tSystem.out.print(ch);\r\n\t\t\tch++;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}\r\n}", "public static void main(String[] args) {\n\n int level = 50;\n for(int j=0; j<level; j++){\n for(int i=0; i<level-j; i++){\n System.out.print(\" \");\n }\n for(int k=0; k<=j; k++){\n System.out.print(\"* \");\n }\n System.out.println(\"\");\n }\n }", "public static void main(String[] args){\n LinkedListDeque<String> lld = new LinkedListDeque<>();\n lld.addFirst(\"Hello\");\n lld.addLast(\"Java\");\n lld.addLast(\"!\");\n\n String s0 = lld.getRecursive(0);\n String s1 = lld.getRecursive(1);\n String s2 = lld.getRecursive(2);\n System.out.println(s0 + s1 + s2);\n System.out.println(lld.getRecursive(556));\n //lld.getRecursive(2);\n }", "public static void main(String[] args) {\n\n int[] input = generateArray(4,5);//new int[]{4, 5, 0, 1};\n ArrayList<ArrayList<ArrayList<Integer>>> results = getPaths(input);\n// Output results:\n results.forEach((n) -> System.out.println(n));\n }", "public static void calcIntegersDivBy()\r\n\t{\r\n\t\tint x = 5;\r\n\t\tint y = 20;\r\n\t\tint p = 3;\r\n\t\tint result = 0;\r\n\t\tif (x % p == 0)\r\n\t\t\tresult = (y / p - x / p + 1);\r\n\t\telse\r\n\t\t\tresult = (y / p - x / p);\r\n\t\tSystem.out.println(result);\r\n\t}", "public int numTrees(int n) {\n if(n<=1)\n return 1;\n int[] dp = new int[n+1];\n dp[0] = 1;\n dp[1] = 1;\n dp[2] = 2;\n \n for(int i=3;i<=n;i++){\n int sum = 0;\n for(int a=0;a<i;a++){\n sum+=dp[0+a]*dp[i-1-a];\n }\n dp[i] = sum;\n //if i is odd then add the i/2 dp after you multiply by 2\n }\n return dp[n];\n }", "public static void main(String[] args) {\nScanner s =new Scanner(System.in);\r\nint n=s.nextInt();\r\nfor(int i=n;i>=0;i--)\r\n{ int a=n;\r\n for(int j=n;j>=i;j--)\r\n {System.out.print(a+\" \");a--;}\r\n a=a+1;\r\n for(int k=1;k<=2*i-1;k++)\r\n {System.out.print(\" \"+\" \");}\r\n if(a!=0) {\r\n for(int l=n;l>=i;l--)\r\n {System.out.print(a+\" \");a++;}\r\n }\r\n else {for(int m=1;m<=n;m++)\r\n {System.out.print(m+\" \");}\r\n }\r\n System.out.print(\"\\n\");\r\n}\r\nfor(int x=1;x<=n;x++)\r\n{ int c=n;\r\n for(int y=n;y>=x;y--)\r\n {System.out.print(c+\" \");c--;}\r\n c=c+1;\r\n for(int z=1;z<=2*x-1;z++)\r\n {System.out.print(\" \"+\" \");}\r\n for(int p=x;p<=n;p++)\r\n {System.out.print(c+\" \");c++;}\r\n \r\n\t\r\nSystem.out.print(\"\\n\");\r\n\r\n\r\n}\r\n}", "public static void main(String[] args) {\n List<Integer> pr = new ArrayList<>();\n out:\n for (int p = 2; p <= 100; p++) {\n for (int q : pr) {\n if (p % q == 0) {\n continue out;\n }\n }\n pr.add(p);\n }\n Set<List<Integer>> s = new HashSet<>();\n for (int a = 2; a <= 100; a++) {\n List<Integer> l = new ArrayList<>();\n for (int p : pr) {\n int e = 0;\n for (int c = a; c % p == 0; c /= p) {\n e++;\n }\n l.add(e);\n }\n for (int b = 2; b <= 100; b++) {\n List<Integer> m = new ArrayList<>();\n for (int e : l) {\n m.add(b * e);\n }\n s.add(m);\n }\n }\n System.out.println(s.size());\n }", "int query(int l, int r) {\n l += n;\n r += n;\n int resl = identity;\n int resr = identity;\n while (l < r) {\n if ((l & 1) > 0) resl = combine(resl, st[l++]);\n if ((r & 1) > 0) resr = combine(st[--r], resr);\n l /= 2;\n r /= 2;\n }\n return combine(resl, resr);\n }", "public static void main(String[] args) {\n\t\tint num=4;\r\n\t\tfor(int i=0;i<=num;i++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(int j=0;j<=num;j++) {\r\n\t\t\t\t\t\tif(j<=i && i+j>=num) \r\n\t\t\t\t\t\r\n\t\t\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\t\t}\r\n\t\t\t}", "public static void heapify() {\n //배열을 heap 자료형으로 만든다.\n // 1d 2d 2d 3d 3d 3d 3d 4d\n// int[] numbers = {9, 12, 1, 3, 6, 2, 8, 4};\n // 1depth의 자식노드 numbers[2i], numbers[2i+1]\n int[] numbers = {4, 1, 3, 2, 16, 9, 10, 14, 8, 7};\n int i = 1;\n while (true) {\n int target = numbers[i-1];\n int left = numbers[2*i-1];\n\n if (2*i == numbers.length) {\n if (left > target){\n numbers[i-1] = left;\n numbers[2*i-1] = target;\n }\n print(numbers);\n break;\n }\n int right =numbers[2*i];\n\n if (left > right) {\n if(left > target) {\n numbers[i-1] = left;\n numbers[2*i-1] = target;\n }\n }else if (right > left) {\n if (right > target) {\n numbers[i-1] = right;\n numbers[2*i] = target;\n }\n }\n i++;\n\n print(numbers);\n }\n\n }", "public static void main(String[] args) {\n\t\tint num=5;\r\n\t\tint c=num*2-1;//5\r\n\t\tfor(int j=0 ; j< c ; j++){//j: 0, 1, 2,3 4\r\n\t\t\t\r\n\t\t\tif(j<num) {///j: 0, 1, 2\r\n\t\t\t\t// 1 ,2,3 : 0+1, 1+1, 2+1\r\n\t\t\t\tfor(int i=0; i<j+1 ; i++) {\r\n\t\t\t\t\tSystem.out.print(\"* \");\r\n\t\t\t\t}\r\n\t\t\t}else {//j: 3,4\r\n\t\t\t\t//2,1 : 5-3, 5-4\r\n\t\t\t\tfor(int i=0; i<c-j ; i++) {\r\n\t\t\t\t\tSystem.out.print(\"* \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tNode root = newNode(1); \r\n\t root.left = newNode(2); \r\n\t root.right = newNode(3); \r\n\t root.left.left = newNode(4); \r\n\t root.left.right = newNode(5); \r\n\t root.right.left = newNode(6); \r\n\t root.right.right = newNode(7); \r\n\t root.right.left.right = newNode(8); \r\n\t root.right.right.right = newNode(9); \r\n\t \r\n\t System.out.println(largestUinquePath(root)); \r\n\t}", "public static void main(String[] args) {\n\t\tString str = \"264*8/+3-\";\n\t\t\n\t\tStack<Integer> val = new Stack<>();\n\t\tStack<String> in = new Stack<>();\n\t\tStack<String> pre = new Stack<>();\n\t\tfor(int i=0;i<str.length();i++) {\n\t\t\tchar ch = str.charAt(i);\n\t\t\tif(ch=='/'||ch=='+'||ch=='-'||ch=='*') {\n\t\t\t\tint val2 = val.pop();\n\t\t\t\tint val1 = val.pop();\n\t\t\t\tint valueVal = operations(val1, val2, ch);\n\t\t\t\tval.push(valueVal);\n\t\t\t\tString v2in = in.pop();\n\t\t\t\tString v1in = in.pop();\n\t\t\t\tString valueIn = \"(\"+v1in+ch+v2in+\")\";\n\t\t\t\tin.push(valueIn);\n\t\t\t\tString v2pre = pre.pop();\n\t\t\t\tString v1pre = pre.pop();\n\t\t\t\tString valuePre = ch+v1pre+v2pre;\n\t\t\t\tpre.push(valuePre);\n\t\t\t}else {\n\t\t\t\tval.push(ch-'0');\n\t\t\t\tin.push(ch+\"\");\n\t\t\t\tpre.push(ch+\"\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(val.pop());\n\t\tSystem.out.println(pre.pop());\n\t\tSystem.out.println(in.pop());\n\t}", "public static void main(String[] args) {\n\n\t\tint i, j, k;\n\n\t\tfor (i = 1; i <= 9; i++)\n\t\t{\n\t\t for (j = 1; j <= i; ++j)\n\t\t System.out.print(j);\n\n\t\t for (k = 9 - i; k >= 1; k--)\n\t\t System.out.print(\"*\");\n\n\t\t System.out.println(\"\");\n\t\t}\n\n\t}", "public static void main(String[] args) {\n \n int num = 5;\n\n for(int i=1; i<=num; i++){\n\n for (int x=1; x<=i; x++){\n System.out.print(\" \");\n }\n for(int y = i; y<=num; y++ ) System.out.print(\"*\");\n\n System.out.println();\n }\n }" ]
[ "0.59730023", "0.5593236", "0.55730385", "0.5432687", "0.52791494", "0.527625", "0.523507", "0.5188621", "0.51802474", "0.51546884", "0.51337755", "0.50925815", "0.50475264", "0.50446254", "0.50419474", "0.50293607", "0.49933", "0.49805215", "0.4980482", "0.49756125", "0.49653804", "0.4940443", "0.49181443", "0.4914435", "0.49119857", "0.49082154", "0.4904084", "0.49038848", "0.49023694", "0.4897773", "0.4886459", "0.4886459", "0.48858592", "0.48841387", "0.48837522", "0.48805618", "0.48776165", "0.48753756", "0.48751876", "0.48746", "0.48720992", "0.48704237", "0.48700127", "0.485914", "0.48540452", "0.485204", "0.48407423", "0.48376405", "0.4826162", "0.4826162", "0.4823347", "0.48144042", "0.48111567", "0.48089233", "0.48077184", "0.48013112", "0.48003998", "0.47993177", "0.47972724", "0.47933385", "0.47893158", "0.4777982", "0.47756544", "0.47707823", "0.47686774", "0.4768613", "0.4764718", "0.47642806", "0.47588313", "0.47556293", "0.47539163", "0.47505018", "0.47407812", "0.47398823", "0.4738708", "0.4733418", "0.47330725", "0.47257006", "0.4724981", "0.4723225", "0.47231132", "0.47227123", "0.47226688", "0.47223502", "0.47173116", "0.47154683", "0.47143778", "0.47142744", "0.47112378", "0.46986207", "0.4696558", "0.46962354", "0.46947998", "0.4694601", "0.4691466", "0.4691265", "0.46888715", "0.46873403", "0.4685976", "0.46825606", "0.46805376" ]
0.0
-1
Created by maxleo on 17920.
public interface CommonService { String codeToLocation(int code); int locationToCode(String location); Addressbase getAddress(int code); List<Addressbase> getSubAddress(int code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@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 interr() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public void init() {}", "@Override\n void init() {\n }", "@Override\n protected void init() {\n }", "private void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\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\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private void kk12() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void method_4270() {}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "private void strin() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override public int describeContents() { return 0; }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo12628c() {\n }", "@Override\n protected void initialize() \n {\n \n }", "private void init() {\n\n\n\n }", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public abstract void mo70713b();", "@Override\n\tpublic void einkaufen() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void init() {\n }", "public void mo6081a() {\n }", "public void mo21877s() {\n }", "public void m23075a() {\n }", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}" ]
[ "0.57955784", "0.56899214", "0.56620777", "0.56479204", "0.564708", "0.5635979", "0.55978197", "0.5540363", "0.5540363", "0.55261767", "0.55025464", "0.54899496", "0.54777414", "0.5437954", "0.54366803", "0.54346484", "0.54346484", "0.54346484", "0.54346484", "0.54346484", "0.5422376", "0.54210484", "0.54178804", "0.5412745", "0.54068637", "0.5405435", "0.539382", "0.53926444", "0.53884226", "0.53665656", "0.53623676", "0.5356853", "0.5345142", "0.53369415", "0.53162944", "0.5307232", "0.5306626", "0.5304131", "0.52997994", "0.5298176", "0.5288603", "0.5288603", "0.5288603", "0.52876407", "0.52876407", "0.52865195", "0.52865195", "0.52865195", "0.5285573", "0.5277396", "0.5274135", "0.5274135", "0.5274135", "0.5274135", "0.5274135", "0.5274135", "0.5274135", "0.526994", "0.5267898", "0.5266483", "0.52626896", "0.52544826", "0.52447486", "0.52447486", "0.52447486", "0.5242946", "0.5242477", "0.5235001", "0.52329916", "0.52329916", "0.52329916", "0.52329916", "0.52329916", "0.52329916", "0.5232068", "0.52316535", "0.5229755", "0.5229755", "0.51976836", "0.5196472", "0.5195674", "0.5189368", "0.51879174", "0.5184004", "0.51819485", "0.51710176", "0.5170122", "0.51689893", "0.5153874", "0.51376283", "0.5136865", "0.5132161", "0.51299024", "0.51250345", "0.5122437", "0.5117937", "0.5114097", "0.5103071", "0.5100996", "0.50927943", "0.5091783" ]
0.0
-1
Constructor with a message. When we want to signal when exception is made.
public SmartScriptParserException(String message) {super(message);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Exception(String message) {\n\t\t\tsuper(message);\n\t\t}", "public MyException(String message)\n { super(message); }", "public void testConstructorWithMessage() {\r\n RejectReasonNotFoundException exception = new RejectReasonNotFoundException(message);\r\n\r\n assertNotNull(\"Unable to instantiate RejectReasonNotFoundException\", exception);\r\n assertTrue(\"Message is not initialized correctly\", exception.getMessage().matches(message + \".*\"));\r\n assertEquals(\"Cause is not initialized correctly\", null, exception.getCause());\r\n assertEquals(\"ProblemRejectReason is not initialized correctly\", null, exception.getProblemRejectReason());\r\n }", "public MyException() {\n super(\"This is my message. There are many like it but this one is mine.\");\n }", "public JDBFException (String message){\r\n super(Messages.message(message));\r\n }", "public MyCustomException( String message )\n {\n\n\t// Why are we doing this??\n super( message );\n }", "@Test\n public void testConstructorWithMessage()\n {\n final LoaderException e = new LoaderException(\"Custom message\");\n assertEquals(\"Custom message\", e.getMessage());\n }", "public MyException(String message) {\r\n\t\tsuper(message);\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public notHumanBeingException(String message){// Message parameted created\n super(message);\n \n }", "public InstrumenterException(String message) {\r\n super(message);\r\n }", "public JavaException(@Nullable String message)\r\n\t{\r\n\t\tsuper(message);\r\n\t}", "public Error(String message) {\r\n \tsuper(message);\r\n \t}", "public Neo4jException(String message) {\n this(\"N/A\", message);\n }", "public VocabularioIOException(String msg)\n {\n message = msg;\n }", "public CommunicationException(String message) {\r\n\t\tsuper(message);\r\n\t}", "public SAXException (String message) {\n super(message);\n this.exception = null;\n }", "public CassetteException(String message) {\r\n super(message);\r\n }", "public SensorException(String message) {\r\n super(message);\r\n }", "public SMSLibException() {}", "public ConnectionException(String pMessage) {\n super(pMessage);\n }", "public TimException(String message) {\n\t\tsuper(message);\n\t}", "public MessageParseException() {\n }", "public ClientException(String message) {\n this.message = message;\n }", "public BadMessageException(final String message) {\r\n\t\tsuper(message);\r\n\t}", "public CanyonException( String message )\r\n {\r\n super( message );\r\n }", "public SysException(String message) {\r\n super(message);\r\n\r\n }", "public BaseException(String message) {\n super(message);\n setErrorCode();\n }", "public SMSLibException(String errorMessage)\n/* 10: */ {\n/* 11:34 */ super(errorMessage);\n\n/* 12: */ }", "public FullCarException(String message) {\r\n super(message);\r\n }", "public JiraServiceException(String message) {\r\n super(message);\r\n }", "public Message(){}", "public NotValidException(String message) {\r\n super(message);\r\n }", "public SearchServiceException(String message)\n\t{\n\t\tsuper(message);\n\t}", "public OLMSException(String message) {\r\n super(message);\r\n }", "@Test\n public void testConstructorWithMessageAndCause()\n {\n final RuntimeException cause = new RuntimeException();\n final LoaderException e = new LoaderException(\"Custom message\", cause);\n assertEquals(\"Custom message\", e.getMessage());\n assertEquals(cause, e.getCause());\n }", "public void testConstructorWithMessageAndCause() {\r\n RejectReasonNotFoundException exception = new RejectReasonNotFoundException(message, cause);\r\n\r\n assertNotNull(\"Unable to instantiate RejectReasonNotFoundException\", exception);\r\n assertTrue(\"Message is not initialized correctly\", exception.getMessage().matches(message + \".*\"));\r\n assertEquals(\"Cause is not initialized correctly\", cause, exception.getCause());\r\n assertEquals(\"ProblemRejectReason is not initialized correctly\", null, exception.getProblemRejectReason());\r\n }", "public User(Message message) {\n\t\tthis.message = message;\n\t\tlogger.info(\"Error has occured :(\");\n\t}", "public MessageParseException(String message) {\n super(message);\n }", "public CompilationException(String message) {\n\t\tsuper(message);\n\t}", "public ReportException(String message) {\n\t\tsuper(message);\n\t}", "public CRLException(String message) {\n super(message);\n }", "public AgentRegistrationException(String message)\r\n\t{\r\n\t\tsuper(message);\r\n\t}", "public InstagramException(String message) {\n\t\tsuper(message, null);\n\t}", "public CoderException(String message) {\n super(message);\n }", "public VerifyException(String message) {\n\t\tsuper(message);\n\t}", "public CIMException() {\n\t\tthis((String) null, (Object[]) null);\n\t}", "public Exception(String s) {\n\tsuper(s);\n }", "public MessageEvent(Message message) {\n super(message);\n this.message = message;\n }", "public PlayException(String message) {\n super(message);\n }", "public Message() {}", "public Message() {}", "public ExceptionDate(String parMessage){\n\t\tsuper(parMessage);\n\t}", "public CompilerMessage(MessageKind messageKind_, Exception exception_) {\r\n this((SourceRange)null, messageKind_, exception_); \r\n }", "public JDBFException (String message, Object [] args){\r\n super(Messages.format(message, args));\r\n }", "public WriteException(String message)\n {\n super(message);\n }", "public AuraUnhandledException(String message) {\n super(message);\n }", "public APIException(String message) {\n\t\tsuper(message, null);\n\t}", "public CodecException(String msg) {\n\t\tsuper(msg);\n\t}", "public void testConstructorWithMessageAndCauseAndRejectReason() {\r\n RejectReasonNotFoundException exception = new RejectReasonNotFoundException(message, cause, reason);\r\n\r\n assertNotNull(\"Unable to instantiate RejectReasonNotFoundException\", exception);\r\n assertTrue(\"Message is not initialized correctly\", exception.getMessage().matches(message + \".*\"));\r\n assertEquals(\"Cause is not initialized correctly\", cause, exception.getCause());\r\n assertEquals(\"ProblemRejectReason is not initialized correctly\", reason, exception.getProblemRejectReason());\r\n }", "WireframeException(String message){\r\n super(message);\r\n }", "public AbstractCodeGenException(final String message) {\n super(message);\n }", "public OutputQueueException(String message)\n {\n super(message);\n }", "public PriceModelException(final String message) {\n super(message);\n }", "public CustomException(String message, Throwable cause) {\n super(message, cause);\n }", "public SystemMessage() {\r\n\t}", "public MyCustomException( String message, Throwable cause )\n {\n\n\t// Why are we doing this??\n super( message, cause );\n }", "public ParsingException(String message) {\n super(message);\n }", "public SMSLibException(String errorMessage, Throwable originalE)\n/* 22: */ {\n/* 23:50 */ super(errorMessage);\n/* 24:51 */ this.originalE = originalE;\n/* 25: */ }", "public NoTraceOntimizeJEEException(String message) {\r\n this(message, (Object[]) null);\r\n }", "public TDLProException(String message)\n {\n super(message);\n }", "@ParametersAreNonnullByDefault\n\tpublic ApplicationException(String message) {\n\t\tsuper(message);\n\t}", "public EmailException(String msg)\n {\n super(msg);\n }", "public Exception() {\n\t\t\tsuper();\n\t\t}", "public Message() {\n }", "public Message() {\n }", "public BuildInterruptedException(String message) {\n super(message);\n }", "public Message(){\n this(\"Not Specified\",\"Not Specified\");\n }", "public StackException(String message){\n super(message);\n }", "public PreparationException(final String message) {\n\t\tsuper(message);\n\t}", "public ConverterException(String message) {\n super(message);\n this.cause = null;\n }", "public Message() {\n }", "public TwoDAReadException(String message) { super(message); }", "public Message() {\n\t\tsuper();\n\t}", "public ScheduleException(String msg) {\r\n super(msg);\r\n }", "public LexerException(String message) {\n\t\tsuper(message);\n\t}", "public AlfrescoServiceException(final String message) {\n super(message);\n }", "public PlotException(String message) {\n\tsuper(message);\n }", "public OperationException(String message) {\n super(message);\n }", "public TechnicalException(final String message) {\n super(message);\n }", "public TransactionAbortedException(String msg) {\n\t\t//EFFECTS: display error message\n\t\tsuper(msg);\n\t}", "public SyscallException(String message) {\n\t\tsuper(message);\n\t}", "public RDISException(String msg) {\n\t\tthis(msg, null);\n\t}", "public SSHException(String message) {\n super(message);\n }", "public SAXException (String message, Exception e)\n {\n super(message);\n this.exception = e;\n }", "public PizzaException(String message) {\n super(message);\n }", "public TechnicalException(String message) {\r\n super(message);\r\n }", "public Exception() {\n\tsuper();\n }", "public ResourceRuntimeException(String message) {\n super(message);\n }", "public CouponException(String message) {\n\n super (message);\n }", "public IORuntimeException(String message) {\n super(message);\n }", "public SenhaInvalidaException(String message) {\n\t\tsuper(message);\n\t}" ]
[ "0.75535285", "0.7419842", "0.7305542", "0.7205557", "0.7168239", "0.71501213", "0.711692", "0.71158224", "0.7089529", "0.7055337", "0.70548356", "0.7020712", "0.69925827", "0.6969737", "0.69498384", "0.6866378", "0.6856728", "0.68342453", "0.6830908", "0.68186474", "0.67930037", "0.6786262", "0.6779102", "0.67771196", "0.67591846", "0.67586917", "0.6750671", "0.6738054", "0.6736263", "0.67300177", "0.67286474", "0.67210615", "0.67204106", "0.66970265", "0.6690222", "0.6675227", "0.66730094", "0.6660556", "0.66576284", "0.6645791", "0.6635454", "0.66295767", "0.6622367", "0.66220385", "0.66179544", "0.6605277", "0.65946466", "0.6593185", "0.6579866", "0.6579636", "0.6579636", "0.6570073", "0.6567334", "0.656198", "0.6561113", "0.6560002", "0.6557303", "0.6554439", "0.65492356", "0.65418214", "0.65375835", "0.65330637", "0.6528532", "0.6513491", "0.65129405", "0.65060735", "0.65013313", "0.6491724", "0.6489031", "0.64877266", "0.64866406", "0.6485548", "0.64803636", "0.6479365", "0.6479365", "0.64771557", "0.64769983", "0.6474868", "0.6470583", "0.6470046", "0.6467839", "0.6459575", "0.64533687", "0.64492065", "0.6447359", "0.6447338", "0.6444069", "0.644127", "0.6440831", "0.64402854", "0.6434009", "0.6431958", "0.6429787", "0.64249164", "0.6423576", "0.64191806", "0.63881254", "0.6384089", "0.63796973", "0.63756734", "0.6374165" ]
0.0
-1
This is only required when you want to highlight the webelement
public static WebElement syncWebElement(WebDriver driver,WebElement element) { WebElement ele= waitForWebElement(driver, element, 20); WebElement ele1=highLightElement(driver, ele); return ele1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default void highlight()\n {\n JavascriptExecutor executor = (JavascriptExecutor) environment().getDriver();\n\n executor\n .executeScript(\"arguments[0].setAttribute('style', 'background: yellow; border: 2px solid red;'); \"\n + \"arguments[0].setAttribute('highlighted', 'true')\", element());\n }", "private IRenderingElement generateHighlightElement( IAtom atom ) {\n return null;\n }", "public WebElement highlight(WebElement element){\nfor(int i=0; i<2; i++) {\n WrapsDriver wrappedElement = (WrapsDriver) element;\n JavascriptExecutor executor = (JavascriptExecutor) wrappedElement.getWrappedDriver();\n waitSec(0.4);\n executor.executeScript(\"arguments[0].setAttribute('style', arguments[1]);\", element, \"color: purple; border: 2px solid LightCyan;background: PaleTurquoise ;\");\n waitSec(0.4);\n executor.executeScript(\"arguments[0].setAttribute('style', arguments[1]);\", element, \"\");\n\n}\nreturn element;\n }", "@Override\r\n public void elementHighlighted(Object source, int... data) {\n }", "public Color getHighlight();", "public void highlightEnable() {\n actualFillColor = new Color(0, 255, 0, 150);\n repaint();\n revalidate();\n }", "public static void highlightElement(WebDriver driver, WebElement element) {\n\n\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].style.border = '3px solid yellow'\", element);\n\n\t\tTestUtil.pause(2);\n\n\t\t((JavascriptExecutor) driver).executeScript(\"arguments[0].style.border = '0px'\", element);\n\t}", "public void changeHighlight(Object tag, int p0, int p1)\n/* */ throws BadLocationException\n/* */ {}", "public boolean getHighlight();", "public SmartHighlightPainter() {\n\t\tsuper(DEFAULT_HIGHLIGHT_COLOR);\n\t}", "boolean isHighlighted();", "public static WebElement selectHighlightedtext(WebDriver driver)\n\t{\n\t\telement = driver.findElement(By.xpath(\"//span[contains(text(),'+91 India')]\"));\n\t\treturn element; \n\t\t\t\t\n\t}", "public void setHighlight(boolean high);", "Picture highlightComponentImage() throws Exception;", "public void highlightTile() {\n\t\tclearHighlightTile();\n\t\trectangle.setStrokeType(StrokeType.INSIDE);\n\t\trectangle.setStrokeWidth(2.0);\n\t\trectangle.setStroke(Color.RED);\n\t}", "@Override\r\n\tpublic Image getHighlightImage() {\n\t\treturn null;\r\n\t}", "public static void HighLightElement(WebElement element) {\r\n\r\n\t\tjs = (JavascriptExecutor) driver;\r\n\t\tjs.executeScript(\"arguments[0].setAttribute('style','background: yellow; border: 2px solid red;')\", element);\r\n\t\ttry {\r\n\t\t\tThread.sleep(10);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\tjs.executeScript(\"arguments[0].setAttribute('style','border: solid 2px white')\", element);\r\n\t}", "@Override\n\tpublic void highlight(ImageType origin) {\n\t\t\n\t}", "@Override\n\tpublic void visit(TextHElement ele) {\n\t\tgetElementStyle(ele);\n\t}", "public ColorUIResource getPrimaryControlHighlight() { return fPrimaryHighlight;}", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "public JAnnotationCheckBox(){\n super();\n this.setOpaque(true);\n /*//this.setVerticalTextPosition(0);\n selectionBorderColor = UIManager.getColor(\"Tree.selectionBorderColor\");\n selectionForeground = UIManager.getColor(\"Tree.selectionForeground\");\n selectionBackground = UIManager.getColor(\"Tree.selectionBackground\");\n textForeground = UIManager.getColor(\"Tree.textForeground\");\n textBackground = UIManager.getColor(\"Tree.textBackground\");\n\n if (isHighlighted){\n\n this.setForeground(selectionForeground);\n this.setBackground(selectionBackground);\n } else {\n this.setForeground(textForeground);\n this.setBackground(textBackground);\n }*/\n\n }", "public void hoverMouseOverElement(WebElement element) {\n log.traceEntry();\n try {\n Actions actions = new Actions(driver);\n if (webWaitsutil.isElementPresent(element)) {\n highlightElement(element);\n actions.moveToElement(element).perform();\n }\n } catch (Exception e) {\n log.error(\"Something went wrong [{}]\", e.getMessage());\n }\n log.traceExit();\n }", "@Override\n public void removeHighlight()\n {\n }", "@Override\r\n public void beforeClickOn(final WebElement arg0, final WebDriver arg1) {\n\r\n }", "public void highlight(){\n myRectangle.setFill(HIGHLIGHT);\n }", "public DefaultHighlighter() {\n setDrawsLayeredHighlights(true);\n }", "private void highlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.RED, new TicksTiming(0), new TicksTiming(0));\r\n\t }", "public Object addHighlight(int p0, int p1, Highlighter.HighlightPainter p)\n/* */ throws BadLocationException\n/* */ {\n/* 64 */ return new Object();\n/* */ }", "BalloonAttributes getHighlightAttributes();", "@FXML\n public void highlightAboutUs()\n {\n aboutUsButton.setOnMouseEntered(mouseEvent -> aboutUsButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }", "private void highlight(final CellView cellView) {\r\n if (cellView != null) {\r\n highlight.setBounds(getHighlightBounds(cellView));\r\n if (highlight.getParent() == null) {\r\n GraphComponent.this.add(highlight);\r\n highlight.setVisible(true);\r\n }\r\n } else {\r\n if (highlight.getParent() != null) {\r\n highlight.setVisible(false);\r\n highlight.getParent().remove(highlight);\r\n }\r\n }\r\n }", "@Override\r\n\tpublic Color getNodeHighlightColor(Object entity) {\n\t\treturn null;\r\n\t}", "@Override\r\npublic void mouseClicked(MouseEvent e) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public Paint getPaintHighlight() {\n return mHighlightPaint;\n }", "B highlightExpression(String highlightExpression);", "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}", "@Override\r\n\tpublic Color getBorderHighlightColor(Object entity) {\n\t\treturn null;\r\n\t}", "@Override\r\npublic void mousePressed(MouseEvent arg0) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "@Override\r\n public void mousePressed(MouseEvent e) {\n setBackground(Color.BLUE);\r\n \r\n \r\n }", "public void removeHighlight(Object tag) {}", "public Color getHighlightColor() {\n return highlightColor;\n }", "public abstract Rect getRectForNodeHighlight();", "@Override\r\npublic void beforeClickOn(WebElement arg0, WebDriver arg1) {\n\tSystem.out.println(\"as\");\r\n}", "public boolean isHighlighted() {\n return _isHighlighted;\n }", "@Override\n protected boolean canHighlight(Component component,\n ComponentAdapter adapter) {\n return component instanceof JComponent;\n }", "@Override\r\npublic void mouseEntered(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "protected void mouseMoveOnWebElement(WebElement element) {\n String mouseOverScript = \"if(document.createEvent){var evObj = document.createEvent('MouseEvents');evObj.initEvent('mouseover', true, false); arguments[0].dispatchEvent(evObj);} else if(document.createEventObject) { arguments[0].fireEvent('onmouseover');}\";\n js.executeScript(mouseOverScript, element);\n HighlightElement(element);\n }", "public void createPurpleBanHighlight() {\n\t\tpurpleBanHighlight = new JLabel() {\n \t\tprotected void paintComponent(Graphics g) {\n\t \t g.setColor(getBackground());\n \t \tg.fillRect(0, 0, getWidth(), getHeight());\n \t\t\tsuper.paintComponent(g);\n\t\t }\n\t\t};\n\t\tpurpleBanHighlight.setBackground(new Color(255, 217, 0, 120));\n\t\tbottomPanel.add(purpleBanHighlight, new Integer(1));\n\t\tpurpleBanHighlight.setBounds(1014, 29, 245, 168);\n\t\tpurpleBanHighlight.setVisible(false);\n\t}", "private static void highlight(Graphics2D g, int x, int y, int startX){\r\n g.setColor(Color.RED);\r\n g.fillRect(startX * x + 1, startX * y + 1, startX - 1, startX - 1);\r\n }", "private void searchAndSelect() {\n currIndex = 0;\n Highlighter h = jta.getHighlighter();\n h.removeAllHighlights();\n String text = jtfFind.getText();\n \n String jText = jta.getText();\n if (text.equals(\"\")) {\n jtfFind.setBackground(Color.WHITE);\n }\n else {\n //TestInfo.testWriteLn(\"Plain Text: \" + text);\n text = processEscapeChars(text);\n //TestInfo.testWriteLn(\"Escape Text: \" + text);\n int index = jText.toLowerCase().indexOf(text.toLowerCase());\n if (index == -1) {\n jtfFind.setBackground(Color.RED);\n }\n else {\n try {\n currIndex = index + 1;\n // An instance of the private subclass of the default highlight painter\n Highlighter.HighlightPainter myHighlightPainter = new MyHighlightPainter(Color.YELLOW);\n oldHighlightPainter = myHighlightPainter;\n h.addHighlight(index,index+text.length(),myHighlightPainter);\n jtfFind.setBackground(Color.WHITE);\n jta.setSelectionColor(Color.CYAN);\n //jta.selectAll();\n jta.select(index,index+text.length());\n lastHighlight[0] = index;\n lastHighlight[1] = index + text.length();\n //jta.setSelectionEnd(index + text.length());\n }\n catch (BadLocationException e) {\n //Do nothing\n }\n }\n }\n }", "@Override\n\tpublic void beforeClickOn(WebElement element, WebDriver driver) {\n\t\t\n\t}", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "public void visite(Element element) {\n\t\t\n\t}", "public void highlightStop() {\n actualFillColor = new Color(0, 0, 0, 150);\n repaint();\n revalidate();\n }", "public boolean isHighlight() {\r\n\t\treturn _highlight;\r\n\t}", "void setHighlightAttributes(BalloonAttributes attrs);", "public void setHighlight(TileStatus highlight){\r\n highLight = highlight;\r\n }", "protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect){\n }", "public boolean isHighlighted() {\n\t\treturn highlighted;\n\t}", "private void performHighlight() {\n final String wordToHighlight;\n if (autoHighlight && !editor.getSelectionModel().hasSelection()) {\n int currentOffset = editor.getCaretModel().getOffset();\n wordToHighlight = BWACUtils.extractWordFrom(editor.getDocument().getText(), currentOffset);\n } else {\n wordToHighlight = null;\n }\n\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n buildHighlighters(wordToHighlight);\n }\n });\n }", "public void createBlueBanHighlight() {\n\t\tblueBanHighlight = new JLabel() {\n \t\tprotected void paintComponent(Graphics g) {\n\t \t g.setColor(getBackground());\n \t \tg.fillRect(0, 0, getWidth(), getHeight());\n \t\t\tsuper.paintComponent(g);\n\t\t }\n\t\t};\n\t\tblueBanHighlight.setBackground(new Color(255, 217, 0, 120));\n\t\tbottomPanel.add(blueBanHighlight, new Integer(1));\n\t\tblueBanHighlight.setBounds(23, 29, 245, 135);\n\t}", "private void decorate() {\n setBorderPainted(false);\n setOpaque(true);\n \n setContentAreaFilled(false);\n setMargin(new Insets(1, 1, 1, 1));\n }", "public void testStyleWhenSelectionIsInsideText()\n {\n deferTest(new Command()\n {\n public void execute()\n {\n doTestStyleWhenSelectionIsInsideText();\n }\n });\n }", "public void createPurplePickHiglight() {\n\t\tpurplePickHighlight = new JLabel() {\n \t\tprotected void paintComponent(Graphics g) {\n\t \t g.setColor(getBackground());\n \t \tg.fillRect(0, 0, getWidth(), getHeight());\n \t\t\tsuper.paintComponent(g);\n\t\t }\n\t\t};\n\t\tpurplePickHighlight.setBackground(new Color(218, 116, 32, 120));\n\t\trightPanel.add(purplePickHighlight, new Integer(1));\n\t\tpurplePickHighlight.setBounds(45, 10, 210, 88);\n\t\tpurplePickHighlight.setVisible(false);\n\t}", "private void highlightNodes(MouseEvent e) {\r\n\tNodeComponent node = (NodeComponent)e.getComponent();\r\n\tlabel.setText( node.getCoord().toString() );\r\n\tselectedNode = node.getNode();\r\n\tselectedNode.setHighLight(true);\r\n\tMoves[] tmp = selectedNode.getDamsteen().getMoveToArray();\r\n\tfor (Moves m : tmp) {\r\n\t m.getTargetNode().setHighLight(true);\r\n\t}\r\n }", "public String getHighlightedText() {\n List<WebElement> styleTags = getStyleTags();\n\n return styleTags.stream().map(WebElement::getText).collect(Collectors.joining(\"\\n\"));\n }", "void setAddHighlightListener(AddHighlightListener listener);", "public boolean isFocused() {\n/* 807 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n public void mouseEntered(MouseEvent e) {\n setBorderPainted(true);\n setForeground(Color.RED);\n }", "public void createBluePickHiglight() {\n\t\tbluePickHighlight = new JLabel() {\n \t\tprotected void paintComponent(Graphics g) {\n\t \t g.setColor(getBackground());\n \t \tg.fillRect(0, 0, getWidth(), getHeight());\n \t\t\tsuper.paintComponent(g);\n\t\t }\n\t\t};\n\t\tbluePickHighlight.setBackground(new Color(218, 116, 32, 120));\n\t\tleftPanel.add(bluePickHighlight, new Integer(1));\n\t\tbluePickHighlight.setBounds(18, 10, 210, 88);\n\t}", "private void doTestStyleWhenSelectionIsInsideText()\n {\n String text = \"123\";\n rta.setHTML(text);\n\n Range range = ((Document) rta.getDocument()).createRange();\n range.setStart(getBody().getFirstChild(), 1);\n range.setEnd(getBody().getFirstChild(), 2);\n select(range);\n\n assertFalse(executable.isExecuted());\n assertTrue(executable.execute(null));\n assertTrue(executable.isExecuted());\n assertEquals(\"1<em>2</em>3\", rta.getHTML().toLowerCase());\n assertTrue(executable.execute(null));\n assertFalse(executable.isExecuted());\n assertEquals(text, rta.getHTML().toLowerCase());\n }", "public boolean isSelected() {\n/* 876 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void highlightNode(Node node) {\r\n // jetzigen Knoten hervorheben\r\n colorNode(node, nodeHighlightColor);\r\n // Elternknoten wieder normal faerben\r\n if (node.getParent() != null) {\r\n colorNode(node.getParent(), nodeColor);\r\n\r\n }\r\n }", "public boolean isSelected() {\n/* 3021 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public static void renderHighlight(MatrixStack matrices, int x, int y, int width, int height) {\n RenderSystem.disableDepthTest();\n RenderSystem.colorMask(true, true, true, false);\n AbstractGui.fill(matrices, x, y, x + width, y + height, 0x80FFFFFF);\n RenderSystem.colorMask(true, true, true, true);\n RenderSystem.enableDepthTest();\n }", "public boolean isHighlighted() {\r\n\t\treturn view.isHighlighted();\r\n\t}", "public TileStatus getHighlight(){\r\n return highLight;\r\n }", "Shape getHighlightShape();", "@Override\n\tpublic void visit(OdfElement element) {\n\t\tgetElementStyle(element);\n\t}", "private Texture createInventoryHighlight() {\n Pixmap highlightPixmap = new Pixmap(1, 1, Pixmap.Format.RGBA8888);\n highlightPixmap.setColor(1, 1, 0, 0.5f);\n highlightPixmap.fill();\n Texture highlight = new Texture(highlightPixmap);\n highlightPixmap.dispose();\n return highlight;\n }", "public void testStyleCrossParagraphSelection()\n {\n deferTest(new Command()\n {\n public void execute()\n {\n doTestStyleCrossParagraphSelection();\n }\n });\n }", "public void setHighlight() {\n _highlight = HighlightMode.NORMAL;\n \n _input.setHighlightIntern();\n _output.setHighlightIntern();\n \n _isHighlighted = true;\n \n }", "@Override\n\tpublic void visit(TextPElement ele) {\n\t\tgetElementStyle(ele);\n\t}", "@Override\n public Color getHighlightedColor() { return getLine().getMapColor(); }", "public void mouseEntered(java.awt.event.MouseEvent evt) {\n button.setForeground(coloursObject.getButtonTextHoverColour());//the colour of the text when hovered over\n }", "@FXML\n public void highlightMultiplayer()\n {\n multiplayerButton.setOnMouseEntered(mouseEvent -> multiplayerButton.setTextFill(Color.valueOf(\"#FFD700\")));\n }", "abstract protected void selectUiNode(UiElementNode uiNode);", "protected void gainFocus(){\r\n\t\twidgetModifyFacade.changeVersatilePane(this);\r\n\t\twidgetModifyFacade.gainedFocusSignal(this);\r\n\t//\tthis.setId(\"single-image-widget-selected\");\r\n\t}", "void highlightSquare(boolean highlight, Button button, int row, int column, ChessPiece piece);", "public Highlighter.Highlight[] getHighlights()\n/* */ {\n/* 86 */ return null;\n/* */ }", "@Override\r\n\tpublic void howToColor() {\n\t\t\r\n\t}", "private void highlightView(AdapterList.ViewHolder holder) {\n holder.checkIcon.setImageResource(R.drawable.check_icon);\n// holder.checkIcon.setVisibility(View.VISIBLE);\n }", "public static void highlightElementBorder(WebDriver driver,\n\t\t\tWebElement element) {\n\n\t\ttry {\n\t\t\tif (Cls_Generic_methods.getConfigValues(\"Highlight\").equals(\"1\")) {\n\t\t\t\tfor (int i = 0; i < 1; i++) {\n\t\t\t\t\tJavascriptExecutor js = (JavascriptExecutor) driver;\n\t\t\t\t\tjs.executeScript(\n\t\t\t\t\t\t\t\"arguments[0].setAttribute('style', arguments[1]);\",\n\t\t\t\t\t\t\telement, \"color: yellow; border: 2px solid green;\");\n\t\t\t\t\t// + \"border: 4px solid red;\");\n\t\t\t\t\tThread.sleep(1200);\n\t\t\t\t\tjs.executeScript(\n\t\t\t\t\t\t\t\"arguments[0].setAttribute('style', arguments[1]);\",\n\t\t\t\t\t\t\telement, \"\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error Occured highlighting Border \" + element);\n\t\t}\n\t}", "private ElementColor selectColor() {\n\n\t\treturn Theme.defaultColor(); \n\t}" ]
[ "0.7570748", "0.7040353", "0.7022716", "0.6810292", "0.6153532", "0.6125833", "0.61005336", "0.608848", "0.6050932", "0.5996801", "0.59409404", "0.5916037", "0.5889391", "0.58648235", "0.58638996", "0.58569026", "0.581646", "0.5808188", "0.575283", "0.5746797", "0.57337654", "0.57337654", "0.57337654", "0.57337654", "0.57227296", "0.5646853", "0.5644699", "0.56444746", "0.563927", "0.5638873", "0.5637386", "0.5633312", "0.562759", "0.5598383", "0.5578327", "0.557707", "0.55502766", "0.5534117", "0.55108994", "0.5507757", "0.54963964", "0.54885596", "0.54789406", "0.54735243", "0.54717433", "0.54711723", "0.5466147", "0.5465247", "0.54605305", "0.54459536", "0.5435006", "0.54330415", "0.5419489", "0.54175705", "0.54175586", "0.540874", "0.540874", "0.540874", "0.540874", "0.54064345", "0.54043156", "0.5394514", "0.5384574", "0.5379805", "0.53607994", "0.5345353", "0.5325029", "0.5322198", "0.5320421", "0.53001416", "0.5299262", "0.529681", "0.52917355", "0.5281973", "0.52773577", "0.5272527", "0.5272257", "0.5244609", "0.5235753", "0.5230563", "0.5230361", "0.5227728", "0.5227429", "0.5226003", "0.5223259", "0.5211981", "0.52110404", "0.5210336", "0.52074903", "0.52060723", "0.5183911", "0.5177835", "0.5175337", "0.5173415", "0.51638025", "0.51592183", "0.5157052", "0.51527005", "0.5151882", "0.51506823", "0.5150499" ]
0.0
-1
use this always if you don't want to highlight the elements
public static WebElement waitForWebElement(WebDriver driver, WebElement element,int time) { WebDriverWait wait=new WebDriverWait(driver, time); return wait.until(ExpectedConditions.elementToBeClickable(element)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeAllHighlights() {}", "@Override\n public void removeHighlight()\n {\n }", "private IRenderingElement generateHighlightElement( IAtom atom ) {\n return null;\n }", "public void highlightEnable() {\n actualFillColor = new Color(0, 255, 0, 150);\n repaint();\n revalidate();\n }", "public void highlightStop() {\n actualFillColor = new Color(0, 0, 0, 150);\n repaint();\n revalidate();\n }", "default void highlight()\n {\n JavascriptExecutor executor = (JavascriptExecutor) environment().getDriver();\n\n executor\n .executeScript(\"arguments[0].setAttribute('style', 'background: yellow; border: 2px solid red;'); \"\n + \"arguments[0].setAttribute('highlighted', 'true')\", element());\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "public void removeHighlight(Object tag) {}", "public DefaultHighlighter() {\n setDrawsLayeredHighlights(true);\n }", "private void decorate() {\n setBorderPainted(false);\n setOpaque(true);\n \n setContentAreaFilled(false);\n setMargin(new Insets(1, 1, 1, 1));\n }", "public void removeAllHighlights() {\n while (!highlights.isEmpty()) {\n HighlightImpl hElem = highlights.getElem(0);\n Rectangle highlightBounds = getBoundsByHighlight(hElem);\n highlights.remove(0);\n repaintComponent(highlightBounds);\n }\n }", "@Override\r\n public void elementHighlighted(Object source, int... data) {\n }", "public void removeHighlight() {\n if (highlightWord == null) {\r\n return;\r\n }\r\n \r\n for (int i = 0; i < highlightWord.length(); i++) {\r\n if (hightlightDir == Ranker.RIGHT) {\r\n cells[highlightX][highlightY + i].highlight((char) 0);\r\n } else {\r\n cells[highlightX + i][highlightY].highlight((char) 0);\r\n }\r\n }\r\n repaint();\r\n }", "public boolean getHighlight();", "public SmartHighlightPainter() {\n\t\tsuper(DEFAULT_HIGHLIGHT_COLOR);\n\t}", "public void setHighlight(boolean high);", "public void clearHighlightTile() {\n\t\tfor(int i = 0;i < 8;i++) {\n\t\t\tfor(int j = 0;j < 8;j++) {\n\t\t\t\tRectangle rect = Main.tile[i][j].rectangle;\n\t\t\t\tif(rect.getStrokeType() == StrokeType.INSIDE){\n\t\t\t\t\trect.setStrokeType(StrokeType.INSIDE);\n\t\t\t\t\trect.setStroke(Color.TRANSPARENT);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic Image getHighlightImage() {\n\t\treturn null;\r\n\t}", "private void unhighlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.BLACK, new TicksTiming(0), new TicksTiming(0));\r\n\r\n\t }", "public JAnnotationCheckBox(){\n super();\n this.setOpaque(true);\n /*//this.setVerticalTextPosition(0);\n selectionBorderColor = UIManager.getColor(\"Tree.selectionBorderColor\");\n selectionForeground = UIManager.getColor(\"Tree.selectionForeground\");\n selectionBackground = UIManager.getColor(\"Tree.selectionBackground\");\n textForeground = UIManager.getColor(\"Tree.textForeground\");\n textBackground = UIManager.getColor(\"Tree.textBackground\");\n\n if (isHighlighted){\n\n this.setForeground(selectionForeground);\n this.setBackground(selectionBackground);\n } else {\n this.setForeground(textForeground);\n this.setBackground(textBackground);\n }*/\n\n }", "public void highlightTile() {\n\t\tclearHighlightTile();\n\t\trectangle.setStrokeType(StrokeType.INSIDE);\n\t\trectangle.setStrokeWidth(2.0);\n\t\trectangle.setStroke(Color.RED);\n\t}", "boolean isHighlighted();", "public void resetListStyles() {\n\t\t\t\t for (int i=0; i<wordsList.getChildCount(); i++) {\n\t\t\t\t\t View child = wordsList.getChildAt(i);\n\t\t\t\t\t child.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\t }\n\t\t\t }", "@Override\r\n\tpublic Color getNodeHighlightColor(Object entity) {\n\t\treturn null;\r\n\t}", "public void removeHighlights(JTextComponent textComp) {\r\n Highlighter hilite = textComp.getHighlighter();\r\n Highlighter.Highlight[] hilites = hilite.getHighlights();\r\n \r\n for (int i=0; i<hilites.length; i++) {\r\n if (hilites[i].getPainter() instanceof MyHighlightPainter) {\r\n hilite.removeHighlight(hilites[i]);\r\n }\r\n }\r\n }", "public Color getHighlight();", "public WebElement highlight(WebElement element){\nfor(int i=0; i<2; i++) {\n WrapsDriver wrappedElement = (WrapsDriver) element;\n JavascriptExecutor executor = (JavascriptExecutor) wrappedElement.getWrappedDriver();\n waitSec(0.4);\n executor.executeScript(\"arguments[0].setAttribute('style', arguments[1]);\", element, \"color: purple; border: 2px solid LightCyan;background: PaleTurquoise ;\");\n waitSec(0.4);\n executor.executeScript(\"arguments[0].setAttribute('style', arguments[1]);\", element, \"\");\n\n}\nreturn element;\n }", "private void initHighlightLines()\r\n\t{\t\t\r\n\t\tfofHighlightRect = lang.newRect(new Offset(-2, -2, \"sourceCode\", AnimalScript.DIRECTION_NW), new Offset(2, 13*21, \"sourceCode\", AnimalScript.DIRECTION_NE), \"fofHighlightRect\", null, fofSourceCodeHighlightRect);\r\n\t\taddAdjHighlightRect = lang.newRect(new Offset(0, 5, \"fofHighlightRect\", AnimalScript.DIRECTION_SW), new Offset(2, 2, \"sourceCode\", AnimalScript.DIRECTION_SE), \"addAdjHighlightRect\", null, addAdjSourceCodeHighlightRect);\r\n\t\t\r\n\t\tfofHighlightRect.hide();\r\n\t\taddAdjHighlightRect.hide();\r\n\t}", "private void highlight(final CellView cellView) {\r\n if (cellView != null) {\r\n highlight.setBounds(getHighlightBounds(cellView));\r\n if (highlight.getParent() == null) {\r\n GraphComponent.this.add(highlight);\r\n highlight.setVisible(true);\r\n }\r\n } else {\r\n if (highlight.getParent() != null) {\r\n highlight.setVisible(false);\r\n highlight.getParent().remove(highlight);\r\n }\r\n }\r\n }", "public static void resetAllHighlight(){\n\t\tfor (Case[] casesLignes: cases){\n\t\t\tfor(Case casePlateau: casesLignes){\n\t\t\t\tcasePlateau.resetHighlight();\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic Color getBorderHighlightColor(Object entity) {\n\t\treturn null;\r\n\t}", "@Test\n public void highlightedElementsCleared() {\n radar.loop();\n radar.loop();\n radar.loop();\n radar.loop();\n radar.loop();\n MovingWorldObject obj = radar.getNearestCollideableElement();\n assertFalse(world.getWorldObjects().stream().anyMatch(WorldObject::isHighlightedWhenRadarIsOn));\n assertFalse(world.getDynamics().stream().anyMatch(WorldObject::isHighlightedWhenRadarIsOn));\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n public boolean shouldPaint() {\n return false;\n }", "protected void doToggleTextBackgrounds() {\r\n\t\trenderer.textBackgrounds = ui.viewTextBackgrounds.isSelected();\r\n\t\trenderer.repaint();\r\n\t}", "public void resetSelected(){\n\t\tfor(int x =0; x<9; x++){\n\t\t\tClientWindow.retButtons()[x].setBackground(Color.LIGHT_GRAY);\n\t\t}\n\t}", "public synchronized void highlight(Parent pane) {\n if (this.parent != null && !boxes.isEmpty()) {\n clear();\n }\n\n this.parent = pane;\n\n ArrayList<Rectangle> allRectangles = new ArrayList<>(processAllTextNodes(pane));\n\n allRectangles.addAll(processCodeAreas(parent));\n\n JFXUtilities.runInFXAndWait(()-> getParentChildren(pane).addAll(allRectangles));\n }", "private void highlightNodes(MouseEvent e) {\r\n\tNodeComponent node = (NodeComponent)e.getComponent();\r\n\tlabel.setText( node.getCoord().toString() );\r\n\tselectedNode = node.getNode();\r\n\tselectedNode.setHighLight(true);\r\n\tMoves[] tmp = selectedNode.getDamsteen().getMoveToArray();\r\n\tfor (Moves m : tmp) {\r\n\t m.getTargetNode().setHighLight(true);\r\n\t}\r\n }", "private void checkHighlight(Point p) {\n\t\t\tfor (ChannelPanelBox box : boxList) {\n\t\t\t\tif (box.contains(p))\n\t\t\t\t\tbox.highlight(true);\n\t\t\t\telse\n\t\t\t\t\tbox.highlight(false);\n\t\t\t}\n\t\t}", "private void highlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.RED, new TicksTiming(0), new TicksTiming(0));\r\n\t }", "public Highlighter.Highlight[] getHighlights()\n/* */ {\n/* 86 */ return null;\n/* */ }", "@Override\n public boolean hasOverlappingRendering() {\n return false;\n }", "@Override\n public boolean hasOverlappingRendering() {\n return false;\n }", "protected void removealphaOpeque() {\n\t\tlistbackground.setAlpha(1f);\n\t\tbackground.setAlpha(1f);\n\t\tlv.setClickable(true);\n\t\tlvx.setClickable(true);\n\t\trefresh.setClickable(true);\n\t\tsearch.setClickable(true);\n\t\tsearch.setEnabled(true);\n\t\tlv.setEnabled(true);\n\t\tlvx.setEnabled(true);\n\t\tcancelButton.setClickable(true);\n\t\tcancelButton.setEnabled(true);\n\t\trefresh.setEnabled(true);\n\t}", "@Override\n public boolean hasOverlappingRendering() {\n return false;\n }", "private void highlightNode(Node node) {\r\n // jetzigen Knoten hervorheben\r\n colorNode(node, nodeHighlightColor);\r\n // Elternknoten wieder normal faerben\r\n if (node.getParent() != null) {\r\n colorNode(node.getParent(), nodeColor);\r\n\r\n }\r\n }", "public void highlight(Graphics g) {\n\t\tg.setColor(Color.CYAN);\n\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t\tg.setColor(Color.BLACK);\n\t\tg.drawRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t}", "public BasicTextUI() {\n painted = false;\n }", "protected void doLessLight() {\r\n\t\talpha = Math.max(0, alpha - 0.05f);\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}", "private void drawNone(){\n drawAbstract(R.color.white);\n }", "@Override\r\npublic void mouseEntered(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public void cancelSelectionBorder(){\n BackgroundImage bgselected= new BackgroundImage(new Image(\"rugbeats/img/Background_selectedhdpi.png\"),BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT,\n new BackgroundSize(1.0, 1.0, true, true, false, false));\n ImgStack.setBackground(new Background(bgselected));\n }", "private void removeHighlights(FilterBypass fb, int left, int right) {\n ((StyledDocument)fb.getDocument()).setCharacterAttributes(left, (right-left), attributeScheme[11], true);\n }", "private void selectAll()\r\n/* 45: */ {\r\n/* 46: 87 */ JTextComponent c = getComponent();\r\n/* 47: 88 */ boolean backward = Boolean.TRUE.equals(c.getClientProperty(\"JGoodies.invertSelection\"));\r\n/* 48: 89 */ if (backward)\r\n/* 49: */ {\r\n/* 50: 90 */ setDot(c.getDocument().getLength());\r\n/* 51: 91 */ moveDot(0);\r\n/* 52: */ }\r\n/* 53: */ else\r\n/* 54: */ {\r\n/* 55: 93 */ setDot(0);\r\n/* 56: 94 */ moveDot(c.getDocument().getLength());\r\n/* 57: */ }\r\n/* 58: */ }", "@Override\n public void mouseEntered(MouseEvent e) {\n setBorderPainted(true);\n setForeground(Color.RED);\n }", "void unhighlight(SpellCheckWord word)\n\t{\n\t\tHighlighter highlighter = getHighlighter();\n\t\tHighlighter.Highlight[] highlights = highlighter.getHighlights();\n\n \tfor (int i = 0; i < highlights.length; i++) \n \t{\n \t\tif(highlights[i].getStartOffset() == word.startLocation) \n \t\t{\n highlighter.removeHighlight(highlights[i]);\n word.missingWord = false;\n \t\t}\n \t\t}\n\t}", "public boolean isHighlight() {\r\n\t\treturn _highlight;\r\n\t}", "public void disableHighlightButton(ImageButton imageButtonNotClicked) {\n imageButtonNotClicked.clearColorFilter();\n }", "@Override\n public void unhighlight() {\n\n // @tag ADJACENT : Removed highlight adjacent\n // boolean highlightedAdjacently = (highlighted == HIGHLIGHT_ADJACENT);\n if (highlighted == HIGHLIGHT_NONE) {\n return;\n }\n // @tag ADJACENT : Removed highlight adjacent\n /*\n * if (!highlightedAdjacently) { // IF we are highlighted as an adjacent\n * node, we don't need to deal // with our connections. if\n * (ZestStyles.checkStyle(getNodeStyle(),\n * ZestStyles.NODES_HIGHLIGHT_ADJACENT)) { // unhighlight the adjacent\n * edges for (Iterator iter = sourceConnections.iterator();\n * iter.hasNext();) { GraphConnection conn = (GraphConnection)\n * iter.next(); conn.unhighlight(); if (conn.getDestination() != this) {\n * conn.getDestination().unhighlight(); } } for (Iterator iter =\n * targetConnections.iterator(); iter.hasNext();) { GraphConnection conn\n * = (GraphConnection) iter.next(); conn.unhighlight(); if\n * (conn.getSource() != this) { conn.getSource().unhighlight(); } } } }\n */\n if (parent.getItemType() == GraphItem.CONTAINER) {\n ((GraphContainer) parent).unhighlightNode(this);\n } else {\n ((Graph) parent).unhighlightNode(this);\n }\n highlighted = HIGHLIGHT_NONE;\n updateFigureForModel(nodeFigure);\n\n }", "public void setDrawHighlightIndicators(boolean enabled) {\n/* 51 */ setDrawVerticalHighlightIndicator(enabled);\n/* 52 */ setDrawHorizontalHighlightIndicator(enabled);\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 boolean isHighlighted() {\n return _isHighlighted;\n }", "public static void toggleHighlightState() {\n toggleHighlightState(!highlighted.getValue());\n }", "public void highlight(){\n myRectangle.setFill(HIGHLIGHT);\n }", "@Override\n public boolean isGoodForInterior()\n {\n return false;\n }", "public void highlightEnemy(int i, boolean clear) {\n\n if(clear)\n clearBorders();\n\n switch(i) {\n\n case 1:\n findViewById(R.id.eslot1).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#FF00FF00\")));\n break;\n case 2:\n findViewById(R.id.eslot2).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#FF00FF00\")));\n break;\n case 3:\n findViewById(R.id.eslot3).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#FF00FF00\")));\n break;\n case 4:\n findViewById(R.id.eslot4).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#FF00FF00\")));\n break;\n }\n\n findViewById(R.id.eslot1).refreshDrawableState();\n findViewById(R.id.eslot2).refreshDrawableState();\n findViewById(R.id.eslot3).refreshDrawableState();\n findViewById(R.id.eslot4).refreshDrawableState();\n }", "public void removeHighlight(final Object obj) {\n Highlight highlight = highlights.getElem(obj);\n if (highlight != null) {\n Rectangle highlightBounds = getBoundsByHighlight(highlight);\n highlights.remove(highlight);\n repaintComponent(highlightBounds);\n }\n }", "@Override\r\n\tpublic boolean forceSelection() {\r\n\t\treturn false;\r\n\t}", "public void createPurpleBanHighlight() {\n\t\tpurpleBanHighlight = new JLabel() {\n \t\tprotected void paintComponent(Graphics g) {\n\t \t g.setColor(getBackground());\n \t \tg.fillRect(0, 0, getWidth(), getHeight());\n \t\t\tsuper.paintComponent(g);\n\t\t }\n\t\t};\n\t\tpurpleBanHighlight.setBackground(new Color(255, 217, 0, 120));\n\t\tbottomPanel.add(purpleBanHighlight, new Integer(1));\n\t\tpurpleBanHighlight.setBounds(1014, 29, 245, 168);\n\t\tpurpleBanHighlight.setVisible(false);\n\t}", "public void resetSelections()\n {\n for(Node child: gridpane.getChildren())\n {\n Button randButton = (Button) child;\n\n // set all buttons to have default background\n randButton.setStyle(null);\n }\n }", "@Override\r\n public void setOpaque(boolean bln) {\r\n super.setOpaque(false); \r\n }", "@Override\r\n public void setOpaque(boolean bln) {\r\n super.setOpaque(false); \r\n }", "public void allOff() {\r\n\t\tsetAllColor(0, 0, 0);\r\n\t}", "private void searchAndSelect() {\n currIndex = 0;\n Highlighter h = jta.getHighlighter();\n h.removeAllHighlights();\n String text = jtfFind.getText();\n \n String jText = jta.getText();\n if (text.equals(\"\")) {\n jtfFind.setBackground(Color.WHITE);\n }\n else {\n //TestInfo.testWriteLn(\"Plain Text: \" + text);\n text = processEscapeChars(text);\n //TestInfo.testWriteLn(\"Escape Text: \" + text);\n int index = jText.toLowerCase().indexOf(text.toLowerCase());\n if (index == -1) {\n jtfFind.setBackground(Color.RED);\n }\n else {\n try {\n currIndex = index + 1;\n // An instance of the private subclass of the default highlight painter\n Highlighter.HighlightPainter myHighlightPainter = new MyHighlightPainter(Color.YELLOW);\n oldHighlightPainter = myHighlightPainter;\n h.addHighlight(index,index+text.length(),myHighlightPainter);\n jtfFind.setBackground(Color.WHITE);\n jta.setSelectionColor(Color.CYAN);\n //jta.selectAll();\n jta.select(index,index+text.length());\n lastHighlight[0] = index;\n lastHighlight[1] = index + text.length();\n //jta.setSelectionEnd(index + text.length());\n }\n catch (BadLocationException e) {\n //Do nothing\n }\n }\n }\n }", "public void changeHighlight(Object tag, int p0, int p1)\n/* */ throws BadLocationException\n/* */ {}", "@Override\n protected boolean canHighlight(Component component,\n ComponentAdapter adapter) {\n return component instanceof JComponent;\n }", "public void highlightDrawerSelection() {\n if (this.groups.isEmpty()) {\n Log.i(tag, \"highlightDrawerSelection, groups empty, returning\");\n return;\n }\n if (this.currentLight == null) {\n Iterator it = this.groups.iterator();\n while (true) {\n if (!it.hasNext()) {\n break;\n }\n LinkedList<Light> group = (LinkedList) it.next();\n if (!group.isEmpty() && ((Light) group.getFirst()).getGroupNumber() != 0) {\n this.currentLight = (Light) group.getFirst();\n this.broadcastingToGroup = true;\n startDreamScreenFragment();\n break;\n }\n }\n if (this.currentLight == null && !((LinkedList) this.groups.getFirst()).isEmpty()) {\n this.currentLight = (Light) ((LinkedList) this.groups.getFirst()).getFirst();\n this.broadcastingToGroup = false;\n startDreamScreenFragment();\n }\n if (this.currentLight == null) {\n Log.i(tag, \"highlightDrawerSelection currentlight is null, not highlighting\");\n return;\n } else if (this.reattemptJumpToWidgetSettingsFlag) {\n this.reattemptJumpToWidgetSettingsFlag = false;\n attemptToJumpToWidgetSettings();\n }\n }\n if (this.currentLight.getGroupNumber() == 0 && this.broadcastingToGroup) {\n Log.i(tag, \"highlightDrawer, currentlight in unassigned was broadcasting to group, setting false \");\n this.broadcastingToGroup = false;\n }\n for (int i = 0; i < this.drawerLinearLayout.getChildCount(); i++) {\n ViewGroup drawerEntry = (ViewGroup) this.drawerLinearLayout.getChildAt(i);\n if (drawerEntry.getTag() != null) {\n if (drawerEntry.getTag() instanceof Light) {\n if (drawerEntry.getTag() == this.currentLight && !this.broadcastingToGroup) {\n drawerEntry.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.colorDrawerItemSelected));\n }\n } else if (((LinkedList) drawerEntry.getTag()).contains(this.currentLight) && this.broadcastingToGroup) {\n drawerEntry.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.colorDrawerItemSelected));\n }\n }\n }\n }", "BalloonAttributes getHighlightAttributes();", "public boolean isHighlighted() {\n\t\treturn highlighted;\n\t}", "private void mouseExitedHandler(java.awt.event.MouseEvent evt) {\n this.setHighlighted(false);\n }", "public void duplicateAndInsertElements() {\n\t\t\n\t\tif (highlightedFields.isEmpty()) return;\n\t\t\n\t\t// highlighted fields change while adding. Make a copy first\n\t\tArrayList<XmlNode> tempArray = new ArrayList<XmlNode>(highlightedFields);\n\t\t\n\t\tcopyAndInsertElements(tempArray);\n\t}", "public boolean shouldHighlight(WorldEvent anEvent)\n\t\t{\n\t\t\treturn false;\n\t\t}", "public static void makeBackgroundGray(){\r\n\t\tStdDraw.clear(StdDraw.LIGHT_GRAY);\r\n\t}", "public Object addHighlight(int p0, int p1, Highlighter.HighlightPainter p)\n/* */ throws BadLocationException\n/* */ {\n/* 64 */ return new Object();\n/* */ }", "@Override\r\npublic void mouseClicked(MouseEvent e) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "public void focusGained(FocusEvent e) {\n highlightText(0);\n }", "@Override\n public void mouseExited(MouseEvent e) {\n setBorderPainted(false);\n setForeground(Color.BLACK);\n }", "public boolean isHighlighted() {\r\n\t\treturn view.isHighlighted();\r\n\t}", "private void unhilitNode()\n {\n\tif (hilited==null) return;\n\tGraphics g = getGraphics();\n\tsetRenderColor(g,Color.black);\n\trenderCircle(g,hilited.x,hilited.y,hilited.diameter+4);\n\thilited = null;\n }", "public boolean isUnderlined() { return false; }", "public ColorUIResource getPrimaryControlHighlight() { return fPrimaryHighlight;}", "public static void renderHighlight(MatrixStack matrices, int x, int y, int width, int height) {\n RenderSystem.disableDepthTest();\n RenderSystem.colorMask(true, true, true, false);\n AbstractGui.fill(matrices, x, y, x + width, y + height, 0x80FFFFFF);\n RenderSystem.colorMask(true, true, true, true);\n RenderSystem.enableDepthTest();\n }", "@Override\n\tpublic void highlight(ImageType origin) {\n\t\t\n\t}", "public void clouleurFondEcran() {\n this.setBackground(Color.WHITE);\n jPanel3.setBackground(Color.WHITE);\n jPanel2.setBackground(Color.WHITE);\n jPanel5.setBackground(Color.WHITE);\n jTable2.setBackground(Color.WHITE);\n jTextField3.setBackground(Color.WHITE);\n }", "protected void addopqueueonBackground() {\n\t\tlv.setClickable(false);\n\t\tlvx.setClickable(false);\n\t\trefresh.setClickable(false);\n\t\tsearch.setClickable(false);\n\t\tsearch.setEnabled(false);\n\t\tlv.setEnabled(false);\n\t\tlvx.setEnabled(false);\n\t\trefresh.setEnabled(false);\n\t\tcancelButton.setClickable(false);\n\t\tcancelButton.setEnabled(false);\n\t\tlistbackground.setAlpha(0.5f);\n\t\tbackground.setAlpha(0.5f);\n\t}" ]
[ "0.69783247", "0.67539513", "0.6615973", "0.6565665", "0.6541549", "0.64322126", "0.63931024", "0.63931024", "0.63931024", "0.63931024", "0.6306751", "0.62385374", "0.6208651", "0.6193481", "0.6177909", "0.6135018", "0.6119927", "0.6109503", "0.60842216", "0.6076718", "0.6027751", "0.59576714", "0.59304786", "0.5924701", "0.5878588", "0.58778685", "0.5859513", "0.58579606", "0.58525366", "0.58247167", "0.5777771", "0.5769694", "0.5761458", "0.57453245", "0.5742793", "0.5740102", "0.5740102", "0.5740102", "0.5740102", "0.5717818", "0.5707775", "0.57056737", "0.56869805", "0.56370103", "0.5629526", "0.56161636", "0.56076086", "0.5604483", "0.5604483", "0.55979073", "0.55860317", "0.5560274", "0.5556771", "0.55441815", "0.5540895", "0.5533747", "0.55253315", "0.55056435", "0.5488692", "0.54823756", "0.54817545", "0.5462162", "0.54551977", "0.54517925", "0.54286236", "0.5427196", "0.54232293", "0.54129905", "0.5412631", "0.5412044", "0.5404156", "0.5404069", "0.5387833", "0.5379749", "0.53768206", "0.53749406", "0.5373487", "0.5373487", "0.5369077", "0.5368846", "0.5367622", "0.5363835", "0.5356167", "0.53492963", "0.5343748", "0.53353655", "0.53298336", "0.532625", "0.53244746", "0.5320808", "0.5316833", "0.53165317", "0.53153825", "0.5312625", "0.5308282", "0.5306939", "0.5306512", "0.53047013", "0.530441", "0.52993727", "0.52919304" ]
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column TRS_TREASURY_LIMIT.BRANCH_CODE
public BigDecimal getBRANCH_CODE() { return BRANCH_CODE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public String getBranchCode() {\n return normalizedBic.substring(BRANCH_CODE_INDEX, BRANCH_CODE_INDEX + BRANCH_CODE_LENGTH);\n }", "public String getBranchcode() {\n return branchcode;\n }", "public String getBranchNo() {\r\n return branchNo;\r\n }", "public String getBranchNo() {\n return branchNo;\n }", "public String getBranchno() {\n return branchno;\n }", "public Integer getBranchNum() {\r\n return branchNum;\r\n }", "public String getBankBranchID() {\n return bankBranchID;\n }", "public String getBankBranchID() {\n return bankBranchID;\n }", "public Integer getBranchId() {\n return branchId;\n }", "public String getBranchCodeFk() {\r\n return (String) getAttributeInternal(BRANCHCODEFK);\r\n }", "public int getBranchCount() { return _brcnt; }", "public void setBranchNo(String branchNo) {\r\n this.branchNo = branchNo;\r\n }", "public String getBranchId() {\n return branchId;\n }", "@Override\n\tpublic List<Object[]> findBranchByBrnCode(String brnCode) {\n\t\treturn brnRepo.findBranchByBrnCode(brnCode);\n\t}", "java.lang.String getBranchId();", "public String getBankCode() {\r\n return bankCode;\r\n }", "public String getBranchStatus() {\r\n return (String) getAttributeInternal(BRANCHSTATUS);\r\n }", "java.lang.String getBankNo();", "public String getBranchCd() {\r\n return branchCd;\r\n }", "Optional<BankBranch> getByCode(String code) throws ObjectNotFoundException;", "public java.lang.String getBankNo() {\r\n return localBankNo;\r\n }", "public java.lang.String getBankNo() {\r\n return localBankNo;\r\n }", "public void setBankBranchID(String value) {\n this.bankBranchID = value;\n }", "public void setBranchcode(String branchcode) {\n this.branchcode = branchcode == null ? null : branchcode.trim();\n }", "public void setBranchNum(Integer branchNum) {\r\n this.branchNum = branchNum;\r\n }", "public String getBranchLabel() {\r\n\t\treturn branchLabel;\r\n\t}", "public int getBranchCount() {\n return this.branchCount;\n }", "public void setBranchNo(String branchNo) {\n this.branchNo = branchNo == null ? null : branchNo.trim();\n }", "public String getBranchPrefix() {\n\t\tString revisionNumber = logEntry.getRevision();\n\t\tint lastDotRev = revisionNumber.lastIndexOf(\".\");\n\t\tif (lastDotRev < 0) {\n\t\t\tVersionTreePlugin.log(IStatus.ERROR, \"Malformed revision: \"+revisionNumber);\n\t\t\treturn null;\n\t\t}\n\n\t\tString branchNumber = revisionNumber.substring(0, lastDotRev);\n\t\tint lastDotBr = branchNumber.lastIndexOf(\".\");\n\t\tif (lastDotBr > 0) {\n\t\t\tString branchPrefix = branchNumber.substring(0, lastDotBr) +\n\t\t\t\t\t\".0\" + branchNumber.substring(lastDotBr);\n\t\t\treturn branchPrefix;\n\t\t}\n\t\treturn branchNumber;\n\t}", "public String getBranchName() {\r\n return branchName;\r\n }", "public String getTrackingBranch(Project project);", "public Optional<String> getBranch() {\n return Optional.fromNullable(branch);\n }", "public Number getBranchNotifIdFk() {\r\n return (Number) getAttributeInternal(BRANCHNOTIFIDFK);\r\n }", "public String getBranchName() {\n return branchName;\n }", "public String getBranchName() {\n return branchName;\n }", "public String getBranchname() {\n return branchname;\n }", "java.lang.String getBranchName();", "public BigDecimal getCODE() {\r\n return CODE;\r\n }", "public BigDecimal getCODE() {\r\n return CODE;\r\n }", "public Branch find_Branch(Integer branch_id) {\n return branch_dao.find(branch_id);\n }", "public BranchType getBranchType() {\n long __key = this.branchTypeId;\n if (branchType__resolvedKey == null || !branchType__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n BranchTypeDao targetDao = daoSession.getBranchTypeDao();\n BranchType branchTypeNew = targetDao.load(__key);\n synchronized (this) {\n branchType = branchTypeNew;\n \tbranchType__resolvedKey = __key;\n }\n }\n return branchType;\n }", "public BigDecimal getACC_BR() {\r\n return ACC_BR;\r\n }", "public int getBankAccountNumber() {\n return bankAccountNumber;\n }", "@Override\n\tpublic String getBankCode(final int bankAccountId, final Connection connection)\n\t{\n\t\tString bankCodeAndName = \"\";\n\t\ttry {\n\t\t\tfinal String query = \"select glcode,name from chartofaccounts where id=(select glcodeid from bankaccount where id= ?)\";\n\t\t\tQuery pst = persistenceService.getSession().createSQLQuery(query);\n\t\t\tpst.setInteger(0, bankAccountId);\n\t\t\tList<Object[]> rset = pst.list();\n\t\t\tfor (final Object[] element : rset) {\n\t\t\t\tbankCodeAndName = element[0].toString();\n\t\t\t\tbankCodeAndName = bankCodeAndName + \"#\" + element[1].toString();\n\t\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\t\tLOGGER.info(\">>>bankCodeAndName \" + bankCodeAndName);\n\t\t\t}\n\t\t\tif (rset == null || rset.size() == 0)\n\t\t\t\tthrow new NullPointerException(\"BAnk Code Not Found\");\n\t\t} catch (final HibernateException e) {\n\t\t\tLOGGER.error(\" Bank code not found \" + e.toString(), e);\n\t\t\tthrow new HibernateException(e.toString());\n\t\t}\n\t\treturn bankCodeAndName;\n\t}", "public String getJP_BankDataCustomerCode2();", "public java.lang.String getBankNo() {\n java.lang.Object ref = bankNo_;\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 bankNo_ = s;\n return s;\n }\n }", "String getBranchName();", "String getCurrentBranchName(Project project);", "public String getBillCode() {\r\n return billCode;\r\n }", "public DatiBancari[] findWhereBanBranchCodeEquals(String banBranchCode) throws DatiBancariDaoException;", "public java.lang.String getBankNo() {\n java.lang.Object ref = bankNo_;\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 bankNo_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public int getBankAccount() {\n return bankAccount;\n }", "public String getJP_BankAccount_Value();", "public void setBranchno(String branchno) {\n this.branchno = branchno == null ? null : branchno.trim();\n }", "public static Branch getDefaultBranch(){\n BranchDao bDAO = new BranchDao();\n Branch branch = null;\n try {\n branch = bDAO.findByName(\"Main Branch\"); //from SQL script\n } catch (DaoException ex) {\n Logger.getLogger(BranchCtrl.class.getName()).log(Level.SEVERE, null, ex);\n ErrorMsg.setLastError(ErrorMsg.ERROR_SQL_ERROR);\n }\n if(branch==null){\n branch = defaultBranch;\n }\n return branch;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.PolicyPeriod getBranchValue();", "public BranchDetails getBranchDetails(){\n\t\n\tbranchD = BranchDetails.getBranchDetails();\t\n\treturn branchD;\n\t}", "public String f9Branch() throws Exception {\r\n\t\tString query = \" SELECT DISTINCT CENTER_ID,NVL(CENTER_NAME,' ') \"\r\n\t\t\t+ \" FROM HRMS_CENTER \"\r\n\t\t\t+ \" WHERE IS_ACTIVE='Y'\" \r\n\t\t\t+ \" ORDER BY CENTER_ID\";\r\n\r\n\t\tString[] headers = { getMessage(\"branch.code\"), getMessage(\"branch\") };\r\n\r\n\t\tString[] headerWidth = { \"30\", \"70\" };\r\n\r\n\t\tString[] fieldNames = { \"branchId\", \"branchName\" };\r\n\r\n\t\tint[] columnIndex = { 0, 1 };\r\n\r\n\t\tString submitFlag = \"false\";\r\n\r\n\t\tString submitToMethod = \"\";\r\n\t\tsetF9Window(query, headers, headerWidth, fieldNames, columnIndex,\r\n\t\t\t\tsubmitFlag, submitToMethod);\r\n\r\n\t\treturn \"f9page\";\r\n\t}", "public String getBranch() {\n if (LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"getBranch()\");\n Via via=(Via)sipHeader;\n return via.getBranch();\n }", "@org.jetbrains.annotations.Nullable()\n @kotlin.jvm.JvmStatic()\n public final com.stripe.android.view.NetbankingBank get(@org.jetbrains.annotations.Nullable()\n java.lang.String bankCode) {\n return null;\n }", "public void setACC_BR(BigDecimal ACC_BR) {\r\n this.ACC_BR = ACC_BR;\r\n }", "public static String getCurrentBill(String accountNumber){\n return \"select cb_bill from current_bills where cb_account = '\"+accountNumber+\"'\";\n }", "public String getJP_BankData_ReferenceNo();", "public Integer getBankCityId() {\r\n return bankCityId;\r\n }", "public String getCHEQUE_BANK() {\r\n return CHEQUE_BANK;\r\n }", "public String getJP_BankDataCustomerCode1();", "public void setBrandid( Integer brandid )\n {\n this.brandid = brandid ;\n }", "public short getBranchOffset() {\r\n\t\treturn branchOffset;\r\n\t}", "com.google.protobuf.ByteString\n getBranchIdBytes();", "public void setBranchId(Integer branchId) {\n this.branchId = branchId;\n }", "public void setBranchCodeFk(String value) {\r\n setAttributeInternal(BRANCHCODEFK, value);\r\n }", "public java.lang.String getBranchName() {\n return branchName;\n }", "public Integer getSubBankId() {\r\n return subBankId;\r\n }", "@Nullable\n public String getBankBic() {\n return bankBic;\n }", "public int getC_BankAccount_ID();", "public String getJP_BranchName_Kana_Line();", "public int getLBR_SeqNumberInBank_ID () \n\t{\n\t\tInteger ii = (Integer)get_Value(COLUMNNAME_LBR_SeqNumberInBank_ID);\n\t\tif (ii == null)\n\t\t\t return 0;\n\t\treturn ii.intValue();\n\t}", "public Integer getBranchesCount() throws SQLException {\n\t\treturn getCount(\"select count(*) as COUNT from tbl_library_branch;\", null);\n\t}", "public Criteria andCodeGreaterThanColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"code > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "public void setBranchStatus(String value) {\r\n setAttributeInternal(BRANCHSTATUS, value);\r\n }", "public Builder setBankBranchID(String value) {\n validate(fields()[8], value);\n this.bankBranchID = value;\n fieldSetFlags()[8] = true;\n return this; \n }", "public void setCODE(BigDecimal CODE) {\r\n this.CODE = CODE;\r\n }", "public void setCODE(BigDecimal CODE) {\r\n this.CODE = CODE;\r\n }", "private Branch getBranch(String branchId) {\n \t\tBranch result = null;\n\n \t\tif (branchId != null) {\n \t\t\t// if branch doesn't exist, create it\n \t\t\tif (!branches.containsKey(branchId)) {\n \t\t\t\tresult = new Branch();\n \t\t\t\tresult.setBranchId(branchId);\n \t\t\t\tbranches.put(branchId, result);\n \t\t\t} else {\n \t\t\t\tresult = branches.get(branchId);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}", "public String getBankTradeNo() {\n\t\treturn bankTradeNo;\n\t}" ]
[ "0.67134625", "0.67134625", "0.67134625", "0.67134625", "0.67134625", "0.67134625", "0.67134625", "0.67134625", "0.6555734", "0.6455185", "0.63346976", "0.6294653", "0.6175746", "0.6075484", "0.59846264", "0.5894398", "0.58825004", "0.5874771", "0.5736007", "0.5647345", "0.5646942", "0.5598426", "0.557233", "0.5557802", "0.54668415", "0.54649097", "0.54472274", "0.54300445", "0.5427648", "0.5427648", "0.53925127", "0.53062856", "0.52584726", "0.5227285", "0.5217128", "0.52111083", "0.5204727", "0.51961446", "0.5184409", "0.5170507", "0.51679873", "0.5147433", "0.5147077", "0.5129591", "0.51040155", "0.5103009", "0.5103009", "0.51010144", "0.50755167", "0.5071211", "0.5068262", "0.50417376", "0.5037962", "0.5036848", "0.5036457", "0.5032956", "0.5030689", "0.5028981", "0.50208986", "0.5016583", "0.5014581", "0.49967438", "0.4969158", "0.4964311", "0.4963129", "0.49577218", "0.49562615", "0.49465358", "0.49272197", "0.49228546", "0.49219373", "0.4913961", "0.4905529", "0.48953256", "0.48889324", "0.4885633", "0.48821056", "0.48769304", "0.48727846", "0.4868566", "0.48612964", "0.48606303", "0.48599255", "0.48516586", "0.4851022", "0.48444483", "0.48431936", "0.48318198", "0.48293892", "0.482917", "0.482917", "0.482169", "0.48180664" ]
0.73416716
6
This method was generated by MyBatis Generator. This method sets the value of the database column TRS_TREASURY_LIMIT.BRANCH_CODE
public void setBRANCH_CODE(BigDecimal BRANCH_CODE) { this.BRANCH_CODE = BRANCH_CODE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public void setBranchNo(String branchNo) {\r\n this.branchNo = branchNo;\r\n }", "public void setBranchcode(String branchcode) {\n this.branchcode = branchcode == null ? null : branchcode.trim();\n }", "public void setBranchNum(Integer branchNum) {\r\n this.branchNum = branchNum;\r\n }", "public void setBankBranchID(String value) {\n this.bankBranchID = value;\n }", "public void setBranchNo(String branchNo) {\n this.branchNo = branchNo == null ? null : branchNo.trim();\n }", "public String getBranchcode() {\n return branchcode;\n }", "public void setBankNo(java.lang.String param) {\r\n localBankNoTracker = param != null;\r\n\r\n this.localBankNo = param;\r\n }", "public void setBankNo(java.lang.String param) {\r\n localBankNoTracker = param != null;\r\n\r\n this.localBankNo = param;\r\n }", "public Builder setBankBranchID(String value) {\n validate(fields()[8], value);\n this.bankBranchID = value;\n fieldSetFlags()[8] = true;\n return this; \n }", "public void setBranchCodeFk(String value) {\r\n setAttributeInternal(BRANCHCODEFK, value);\r\n }", "public void setBranchno(String branchno) {\n this.branchno = branchno == null ? null : branchno.trim();\n }", "public void setCODE(BigDecimal CODE) {\r\n this.CODE = CODE;\r\n }", "public void setCODE(BigDecimal CODE) {\r\n this.CODE = CODE;\r\n }", "public String getBranchNo() {\r\n return branchNo;\r\n }", "public String getBranchNo() {\n return branchNo;\n }", "public void setBranchId(Integer branchId) {\n this.branchId = branchId;\n }", "public String getBranchno() {\n return branchno;\n }", "public void setACC_BR(BigDecimal ACC_BR) {\r\n this.ACC_BR = ACC_BR;\r\n }", "public void setBranchStatus(String value) {\r\n setAttributeInternal(BRANCHSTATUS, value);\r\n }", "public void setBrandid( Integer brandid )\n {\n this.brandid = brandid ;\n }", "public Integer getBranchNum() {\r\n return branchNum;\r\n }", "public String getBankBranchID() {\n return bankBranchID;\n }", "public int getBranchCount() { return _brcnt; }", "public void setJP_BankDataCustomerCode2 (String JP_BankDataCustomerCode2);", "public void setBankAccount(final int newBAccount) {\n this.bankAccount = newBAccount;\n }", "public String getBankBranchID() {\n return bankBranchID;\n }", "public Builder setBankNo(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n bankNo_ = value;\n onChanged();\n return this;\n }", "public void setJP_BankAccount_Value (String JP_BankAccount_Value);", "public String getBranchCode() {\n return normalizedBic.substring(BRANCH_CODE_INDEX, BRANCH_CODE_INDEX + BRANCH_CODE_LENGTH);\n }", "public void setC_BankAccount_ID (int C_BankAccount_ID);", "public Integer getBranchId() {\n return branchId;\n }", "public void setBankaccount(java.lang.String param) {\r\n localBankaccountTracker = param != null;\r\n\r\n this.localBankaccount = param;\r\n }", "public void setBankCode(String bankCode) {\r\n this.bankCode = bankCode == null ? null : bankCode.trim();\r\n }", "public void setJP_BankDataCustomerCode1 (String JP_BankDataCustomerCode1);", "public void setBranchId(String branchId) {\n this.branchId = branchId;\n }", "private void setBId(int value) {\n \n bId_ = value;\n }", "public void setCompanycode(java.lang.Integer newCompany) {\n\tcompanycode = newCompany;\n}", "ScriptBuilder setBranchCoverage(String branchCoverage) {\n this.branchCoverage = branchCoverage;\n return this;\n }", "public void setBranchValue(entity.PolicyPeriod value);", "public void setJP_BranchName_Kana_Line (String JP_BranchName_Kana_Line);", "@Override\n\tpublic List<Object[]> findBranchByBrnCode(String brnCode) {\n\t\treturn brnRepo.findBranchByBrnCode(brnCode);\n\t}", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public String getBranchId() {\n return branchId;\n }", "public void setLBR_SeqNumberInBank_ID (int LBR_SeqNumberInBank_ID)\n\t{\n\t\tif (LBR_SeqNumberInBank_ID < 1) \n\t\t\tset_Value (COLUMNNAME_LBR_SeqNumberInBank_ID, null);\n\t\telse \n\t\t\tset_Value (COLUMNNAME_LBR_SeqNumberInBank_ID, Integer.valueOf(LBR_SeqNumberInBank_ID));\n\t}", "public void setBP_BankAccount(MBPBankAccount ba) {\n log.fine(\"\" + ba);\n if (ba == null) {\n return;\n }\n setC_BPartner_ID(ba.getC_BPartner_ID());\n setAccountAddress(ba.getA_Name(), ba.getA_Street(), ba.getA_City(),\n ba.getA_State(), ba.getA_Zip(), ba.getA_Country());\n setA_EMail(ba.getA_EMail());\n setA_Ident_DL(ba.getA_Ident_DL());\n setA_Ident_SSN(ba.getA_Ident_SSN());\n //\tCC\n if (ba.getCreditCardType() != null) {\n setCreditCardType(ba.getCreditCardType());\n }\n if (ba.getCreditCardNumber() != null) {\n setCreditCardNumber(ba.getCreditCardNumber());\n }\n if (ba.getCreditCardExpMM() != 0) {\n setCreditCardExpMM(ba.getCreditCardExpMM());\n }\n if (ba.getCreditCardExpYY() != 0) {\n setCreditCardExpYY(ba.getCreditCardExpYY());\n }\n if (ba.getCreditCardVV() != null) {\n setCreditCardVV(ba.getCreditCardVV());\n }\n //\tBank\n if (ba.getAccountNo() != null) {\n setAccountNo(ba.getAccountNo());\n }\n if (ba.getRoutingNo() != null) {\n setRoutingNo(ba.getRoutingNo());\n }\n }", "public void setCHARGE_CODE(BigDecimal CHARGE_CODE) {\r\n this.CHARGE_CODE = CHARGE_CODE;\r\n }", "public void setCode(final int code) {\n this.code = code;\n commited = true;\n }", "public void setLimit_Base (String Limit_Base);", "@Override\n protected void setBankNum(int bankNum) {\n }", "private void initializeBranchLimitSpinner() {\n SpinnerValueFactory<Integer> valueFactory;\n valueFactory = new SpinnerValueFactory.IntegerSpinnerValueFactory(0, 20, inputN){\n @Override public void decrement(int steps) {\n final int min = getMin();\n final int currentValue = getValue();\n final int newIndex = currentValue - steps * getAmountToStepBy();\n setValue(Math.max(newIndex, min));\n inputN = newIndex;\n renderTree();\n }\n\n @Override public void increment(int steps) {\n final int max = getMax();\n final int currentValue = getValue();\n final int newIndex = currentValue + steps * getAmountToStepBy();\n setValue(Math.min(newIndex, max));\n inputN = newIndex;\n renderTree();\n }\n };\n branchLimitSpinner.setValueFactory(valueFactory);\n }", "public void setJP_BankData_ReferenceNo (String JP_BankData_ReferenceNo);", "public void setLBR_TaxRateCredit (BigDecimal LBR_TaxRateCredit);", "public void setJP_BankAccountType (String JP_BankAccountType);", "public BranchDetails(String branchName, Integer changesetsAhead, Integer changesetsBehind) {\n this.branchName = branchName;\n this.changesetsAhead = changesetsAhead;\n this.changesetsBehind = changesetsBehind;\n }", "public void setLBR_ProtestCode (String LBR_ProtestCode);", "public void setJP_BankData_ID (int JP_BankData_ID);", "public void setlbr_CPF (String lbr_CPF);", "public String getBankCode() {\r\n return bankCode;\r\n }", "public void setBSCA_ProfitPriceLimit (BigDecimal BSCA_ProfitPriceLimit);", "public void setTallaNbr(String value) {\n setAttributeInternal(TALLANBR, value);\n }", "public void setBNumber(int B_numberIn){\n\t\tB_number = B_numberIn;\n\t}", "public void setBENEF_REGION(BigDecimal BENEF_REGION) {\r\n this.BENEF_REGION = BENEF_REGION;\r\n }", "public void setBranchName(String branchName) {\r\n this.branchName = branchName;\r\n }", "private void setBid(int value) {\n \n bid_ = value;\n }", "public void setSaleBranchPrice(Double saleBranchPrice) {\r\n this.saleBranchPrice = saleBranchPrice;\r\n }", "public void settBlkr(BigDecimal tBlkr) {\n this.tBlkr = tBlkr;\n }", "public void setBranchNotifIdFk(Number value) {\r\n setAttributeInternal(BRANCHNOTIFIDFK, value);\r\n }", "public Builder setB(int value) {\n \n b_ = value;\n onChanged();\n return this;\n }", "public Builder setB(int value) {\n \n b_ = value;\n onChanged();\n return this;\n }", "public void setCode(BizCodeEnum code) {\n this.code = code;\n }", "@Transactional\n\t@Override\n\tpublic void createBranch(Branch branch) {\n\t\tcall = new SimpleJdbcCall(jdbcTemplate).withProcedureName(\"create_branch\");\n\t\tMap<String, Object> culoMap = new HashMap<String, Object>();\n\t\tculoMap.put(\"Pname_branch\", branch.getNameBranch());\n\t\tculoMap.put(\"Paddress_branch\", branch.getAddressBranch());\n\t\tculoMap.put(\"Pphone_branch\", branch.getPhoneBranch());\n\t\t\n\t\t\n\t\tSqlParameterSource src = new MapSqlParameterSource()\n\t\t\t\t.addValues(culoMap);\n\t\tcall.execute(src);\n\t}", "public void setBidResultCode(BidEvaluationReport bidResultCode) {\n this.bidResultCode = bidResultCode;\n }", "public void setEndBank(int arg, String compcode) throws ReadWriteException\n\t{\n\t\tsetValue(_Prefix + HardZone.ENDBANK.toString(), arg, compcode);\n\t}", "void setWBMaximum(java.math.BigDecimal wbMaximum);", "@Transactional\n\t@Override\n\tpublic void updateBranch(Branch branch) {\n\t\tcall = new SimpleJdbcCall(jdbcTemplate).withProcedureName(\"update_branch\");\n\t\tMap<String, Object> culoMap = new HashMap<String, Object>();\n\t\t\n\t\tculoMap.put(\"Pid_branch\", branch.getIdBranch());\n\t\tculoMap.put(\"Pname_branch\", branch.getNameBranch());\n\t\tculoMap.put(\"Paddress_branch\", branch.getAddressBranch());\n\t\tculoMap.put(\"Pphone_branch\", branch.getPhoneBranch());\n\t\t\n\t\tSqlParameterSource src = new MapSqlParameterSource()\n\t\t\t\t.addValues(culoMap);\n\t\tcall.execute(src);\n\t\t\n\t}", "public Builder setCode(int value) {\n\n code_ = value;\n onChanged();\n return this;\n }", "public void setCode(long value) {\n this.code = value;\n }", "java.lang.String getBranchId();" ]
[ "0.638271", "0.638271", "0.638271", "0.638271", "0.638271", "0.638271", "0.638271", "0.638271", "0.6098058", "0.60040903", "0.5952078", "0.5929183", "0.577668", "0.56794715", "0.5634483", "0.5634483", "0.56325024", "0.5550583", "0.55395424", "0.55305856", "0.55305856", "0.550271", "0.5433855", "0.54220587", "0.537519", "0.53660786", "0.53346866", "0.5274665", "0.52676153", "0.52490896", "0.52137524", "0.5212615", "0.52070725", "0.5190394", "0.5181782", "0.5175189", "0.515476", "0.51475674", "0.5145709", "0.51431036", "0.5134542", "0.51238745", "0.50738704", "0.50469494", "0.50307924", "0.5020261", "0.50173336", "0.50165224", "0.50135803", "0.49478343", "0.49478343", "0.49478343", "0.49478343", "0.49478343", "0.49478343", "0.49478343", "0.49478343", "0.4946588", "0.49437675", "0.49228755", "0.4917726", "0.49100265", "0.48980317", "0.48747712", "0.48705977", "0.48549274", "0.48312354", "0.48244014", "0.48207515", "0.48117465", "0.4802673", "0.4801934", "0.47947952", "0.47941288", "0.4781144", "0.47753066", "0.47752234", "0.47728997", "0.4771513", "0.47640407", "0.47608355", "0.4757956", "0.4752383", "0.4752383", "0.4751236", "0.47492996", "0.47429448", "0.47406736", "0.47302344", "0.47247627", "0.47075582", "0.47039038", "0.46997094" ]
0.74146533
6
This method was generated by MyBatis Generator. This method returns the value of the database column TRS_TREASURY_LIMIT.CIF_NO
public BigDecimal getCIF_NO() { return CIF_NO; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCIF_NO(BigDecimal CIF_NO) {\r\n this.CIF_NO = CIF_NO;\r\n }", "public BigDecimal getCIF_SUB_NO() {\r\n return CIF_SUB_NO;\r\n }", "public BigDecimal getCIF_SUB_NO() {\r\n return CIF_SUB_NO;\r\n }", "public BigDecimal getCIF_SUB_NO() {\r\n return CIF_SUB_NO;\r\n }", "public Integer getLimitnumber() {\n return limitnumber;\n }", "public int getLimitNum() {\r\n return this.limitNum;\r\n }", "public java.math.BigInteger getLimit()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LIMIT$6, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getBigIntegerValue();\r\n }\r\n }", "public void setACC_CIF(BigDecimal ACC_CIF) {\r\n this.ACC_CIF = ACC_CIF;\r\n }", "public int getCodigoDocumento(java.sql.Connection con,int CodEmp, int CodLoc, int intCodTipDoc){ \n int intDoc = -1;\n java.sql.Statement stm; \n java.sql.ResultSet rst;\n try{\n if (con!=null){\n stm =con.createStatement();\n String strSQL= \"SELECT case when Max(co_doc) is null then 1 else Max(co_doc)+1 end as codoc FROM tbm_cabMovInv WHERE \" +\n \" co_emp =\"+CodEmp+\" AND co_loc =\"+CodLoc+\" AND co_tipdoc =\"+intCodTipDoc;\n \n rst = stm.executeQuery(strSQL);\n if(rst.next()){\n intDoc = rst.getInt(\"codoc\");\n }\n rst.close();\n stm.close();\n }\n }catch(java.sql.SQLException e){ objUti.mostrarMsgErr_F1(new javax.swing.JInternalFrame(),e); }\n catch(Exception e){ objUti.mostrarMsgErr_F1(new javax.swing.JInternalFrame(),e); }\n return intDoc;\n }", "public int siguienteRegistro(int codigoCiclo, int codigoPlan) {\n/* 454 */ int numero = 1;\n/* 455 */ String s = \"select max(codigo_meta) from cal_plan_metas\";\n/* 456 */ s = s + \" where codigo_ciclo=\" + codigoCiclo;\n/* */ try {\n/* 458 */ boolean rta = this.dat.parseSql(s);\n/* 459 */ if (!rta) return 0; \n/* 460 */ this.rs = this.dat.getResultSet();\n/* 461 */ if (this.rs.next()) {\n/* 462 */ s = this.rs.getString(1);\n/* 463 */ if (!this.rs.wasNull()) {\n/* 464 */ numero = Integer.parseInt(s) + 1;\n/* */ }\n/* */ } \n/* 467 */ if (numero < 10000) numero = 10000; \n/* 468 */ return numero;\n/* */ }\n/* 470 */ catch (Exception e) {\n/* 471 */ e.printStackTrace();\n/* 472 */ Utilidades.writeError(\"CalPlanMetasFactory:siguienteRegistro\", e);\n/* */ \n/* 474 */ return 0;\n/* */ } \n/* */ }", "public void setCIF_SUB_NO(BigDecimal CIF_SUB_NO) {\r\n this.CIF_SUB_NO = CIF_SUB_NO;\r\n }", "public void setCIF_SUB_NO(BigDecimal CIF_SUB_NO) {\r\n this.CIF_SUB_NO = CIF_SUB_NO;\r\n }", "public void setCIF_SUB_NO(BigDecimal CIF_SUB_NO) {\r\n this.CIF_SUB_NO = CIF_SUB_NO;\r\n }", "public BigDecimal getACC_CIF() {\r\n return ACC_CIF;\r\n }", "public Long getLimit() {\n return this.limit;\n }", "public String getLimit() {\r\n\t\treturn this.limit;\r\n\t}", "public Long getLimit() {\n return this.Limit;\n }", "public Long getLimit() {\n return this.Limit;\n }", "public Integer getLimit() {\n return limit;\n }", "public int GetLastnumero()\r\n throws SQLException{\r\n int code = 0;\r\n ResultSet result = null;\r\n \r\n result = RequeteSelect(result,\"select max(CodeFiche) from Travaux\");\r\n while (result.next()){\r\n if(result.getString(1) == null)\r\n code = 0;\r\n else code = Integer.parseInt(new String(result.getString(1)))+1;\r\n }\r\n \r\n Close();\r\n result.close();\r\n \r\n return code;\r\n }", "public Long cniAsNumber() {\n return this.innerProperties() == null ? null : this.innerProperties().cniAsNumber();\n }", "@Override\r\n\tpublic int maxNum() throws Exception {\n\t\treturn session.selectOne(\"com.mapper.cook.maxNum\");\r\n\t}", "private int getCurrentLimit(){\n\t\treturn this.LIMIT;\n\t}", "public String getLimit_Base();", "public int getLimit() {\n\treturn Limit;\n }", "public int getLimit() {\r\n return limit;\r\n }", "public String getUSECIF_NUMBER2() {\r\n return USECIF_NUMBER2;\r\n }", "public String getUSECIF_NUMBER2() {\r\n return USECIF_NUMBER2;\r\n }", "public int getLimit(){\r\n return limit;\r\n\r\n }", "int getCouponNum();", "public int getLimit() {\n return limit;\n }", "public int getLastNumeroFacturaCabecera() {\n\t\tString jpql = \"Select MAX(e.numeroFactura) from FacturaCabecera e\";\n\t\tQuery q = em.createQuery(jpql, Integer.class);\n\t\treturn (int)q.getSingleResult();\n\t}", "public int getLimit() {\n return limit;\n }", "public int getLimit() {\n return limit;\n }", "public int getLimit() {\n return limit;\n }", "private int getMaxIfIpId() {\n\n // get maxRundowId\n Integer maxIfIpId = this.baseMapper.getSqlSession().selectOne(this.getSqlId(\"getMaxIfIpId\"));\n\n // get form databse\n return maxIfIpId == null ? IntDef.INT_ONE : maxIfIpId.intValue();\n }", "float getCTR() throws SQLException;", "public String getCnicNo() {\n return (String)getAttributeInternal(CNICNO);\n }", "private int getConnectionLimit(String businessId) {\n\t\tString schema = getCustomSchema();\n\t\tString sql = StringUtil.join(\"select quota_no as value from \", schema, \"rezdox_connection_quota_view where business_id=?\");\n\n\t\tDBProcessor db = new DBProcessor(getDBConnection(), schema);\n\t\tdb.setGenerateExecutedSQL(log.isDebugEnabled());\n\t\tList<GenericVO> data = db.executeSelect(sql, Arrays.asList(businessId), new GenericVO());\n\t\treturn !data.isEmpty() ? Convert.formatInteger(\"\"+data.get(0).getValue()) : 0;\n\t}", "public int getLimit() {\n\t\treturn limit;\n\t}", "public int getLimit() {\n\t\treturn limit;\n\t}", "@BeanTagAttribute(name = \"resultSetLimit\")\r\n public Integer getResultSetLimit() {\r\n return resultSetLimit;\r\n }", "public BigDecimal getCOVERING_ACC_CIF() {\r\n return COVERING_ACC_CIF;\r\n }", "public int ObtenerMaximaIdCabecera() {\n\n conexionBD.getConnection();\n\n try {\n String SQL = \"SELECT * FROM facturacabecera\";\n Statement stmt = conexionBD.con.createStatement();\n ResultSet rs = stmt.executeQuery(SQL);\n idFacturaCabecera = 0;\n\n while (rs.next()) {\n idFacturaCabecera = rs.getInt(\"idFacturaCabecera\");\n }\n\n rs.close();\n stmt.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return idFacturaCabecera;\n }", "public String getCantidad() {\n\t\tInsumosBean obj = (InsumosBean) getCurrentRowObject();\n\t\t\n\t\tString cantidad =\"<input type=\\\"text\\\" id=\\\"text-input\\\" name=\\\"can\\\"\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t\t\t\t\t\t\t\t\t class=\\\"form-control\\\" value=\\\"0\\\">\";\n\t\treturn cantidad;\n\t\t\n\t}", "public int getLimit() {\n\t\t\treturn limit;\n\t\t}", "public String getNUM_BICO() {\n return NUM_BICO;\n }", "public String getJP_BankData_ReferenceNo();", "public Integer getProjlimit() {\n return projlimit;\n }", "public String getCfNo() {\n\t\treturn cfNo;\n\t}", "public double getNumericalLimit() {\n\treturn NUMERICAL_LIMIT;\n }", "public float getLimit() {\n return limit;\n }", "public static String selectDef5767(ConnectionProvider connectionProvider, String C_Project_ID) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT COALESCE(MAX(Line),0)+10 AS DefaultValue FROM C_ProjectLine WHERE C_Project_ID=? \";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, C_Project_ID);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"defaultvalue\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + e.getSQLState() + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }", "public Number getBranchNotifIdFk() {\r\n return (Number) getAttributeInternal(BRANCHNOTIFIDFK);\r\n }", "public int siguienteRegistro(int codigoFlujo) {\n/* 265 */ int inumero = 1;\n/* 266 */ String s = \"select max(secuencia) from wkf_detalle where codigo_flujo=\" + codigoFlujo + \"\";\n/* */ \n/* */ \n/* */ \n/* */ try {\n/* 271 */ boolean rta = this.dat.parseSql(s);\n/* 272 */ if (!rta) return 0; \n/* 273 */ this.rs = this.dat.getResultSet();\n/* 274 */ if (this.rs.next()) {\n/* 275 */ s = this.rs.getString(1);\n/* 276 */ if (!this.rs.wasNull()) {\n/* 277 */ inumero = Integer.parseInt(s) + 1;\n/* */ }\n/* */ } \n/* 280 */ return inumero;\n/* */ }\n/* 282 */ catch (Exception e) {\n/* 283 */ e.printStackTrace();\n/* 284 */ Utilidades.writeError(\"FlujoDetalleDAO:siguienteRegistro \", e);\n/* */ \n/* 286 */ return 0;\n/* */ } \n/* */ }", "public static int retourneMaxNumber() {\n int tmp = 0;\n try {\n String requete = \"SELECT Max(eleve.id_el) AS Maxeleve FROM eleve\";\n ResultSet rs = Connector1.statement.executeQuery(requete);\n while (rs.next()) {\n tmp = rs.getInt(1);\n\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"ERROR \\n\" + e.getMessage());\n }\n return tmp;\n }", "public String getTxt_Nif() {\r\n\t\treturn cb_nifCliente.getSelectedItem().toString();\r\n\t}", "public String getUSECIF_NUMBER5() {\r\n return USECIF_NUMBER5;\r\n }", "public String getUSECIF_NUMBER5() {\r\n return USECIF_NUMBER5;\r\n }", "public String getUSECIF_NUMBER1() {\r\n return USECIF_NUMBER1;\r\n }", "public String getUSECIF_NUMBER1() {\r\n return USECIF_NUMBER1;\r\n }", "@Accessor(qualifier = \"redemptionQuantityLimit\", type = Accessor.Type.GETTER)\n\tpublic Integer getRedemptionQuantityLimit()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(REDEMPTIONQUANTITYLIMIT);\n\t}", "public void setCOVERING_ACC_CIF(BigDecimal COVERING_ACC_CIF) {\r\n this.COVERING_ACC_CIF = COVERING_ACC_CIF;\r\n }", "private String getCriterionMaxValueValue()\n {\n return getConvertedValue(myCriterionMaxValue.get());\n }", "public double getLimit() {return limit;}", "public FastKeyValue GetFson(int limit )\n\t{\n\t\tString sql =\"Select ID,MobileID,CaseTitle,PatrolType,PatrolOn,TotalNafri,StartDate,EndDate from patrol where SyncStatus=1 ORDER BY ID LIMIT \" +limit ;\n\t\tFastDb db = new FastDb(\"dbLocation\",FastApp.getContext());\n\t\tFastKeyValue id_value= db.GetDumpText(sql);\n\t\treturn id_value;\t\t\n\t}", "public com.google.protobuf.Int32Value getLimit() {\n return instance.getLimit();\n }", "public Integer getCcn()\r\n {\r\n return (Integer) ( (IntegerMetricBO) getMetrics().get( CCN ) ).getValue();\r\n }", "public BigDecimal getBSCA_ProfitPriceLimit();", "public void setLimitnumber(Integer limitnumber) {\n this.limitnumber = limitnumber;\n }", "public void setCodigo() throws SQLException {\n try (PreparedStatement query = Herramientas.getConexion().prepareStatement(\"SELECT MAX(codigo_ticket) FROM ticket\"); \n ResultSet resultado = query.executeQuery()) {\n resultado.next();\n this.codigo = (resultado.getInt(1))+1;\n }\n \n }", "float getCPC() throws SQLException;", "@Override\n\tpublic Integer findMaxCount() {\n\t\tString maxCountSql = \"select count(noticeid) from notice where status=1\";\n\t\treturn (Integer) this.jdbcTemplate.queryForObject(maxCountSql, Integer.class);\n\t}", "public BigDecimal getPriceLimit();", "public int getLimitZoneNumber() {\n return this.limitZoneNumber;\n }", "float getCPM() throws SQLException;", "@SuppressWarnings(\"null\")\n private void setIDCupon() {\n int id_opinion = 1;\n ResultSet rs = null;\n Statement s = null;\n //cb_TS.addItem(\"Seleccione una opinion...\");\n //Creamos la query\n try {\n s = conexion.createStatement();\n } catch (SQLException se) {\n System.out.println(\"probando conexion de consulta\");\n }\n try {\n rs = s.executeQuery(\"SELECT id_cupon FROM cupon order by id_cupon desc LIMIT 1\");\n while (rs.next()) {\n id_opinion = Integer.parseInt(rs.getString(1))+1;\n }\n tf_ID.setText(Integer.toString(id_opinion));\n } catch (SQLException ex) {\n Logger.getLogger(N_Opinion.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "List<Coupon> findByPrice(double maxPrice);", "public int getTripNr(int bikeID){\n Connection connection = null;\n ResultSet resultSet = null;\n PreparedStatement preparedStatement = null;\n\n BikeModel bikeModel = new BikeModel();\n int tripNr;\n String tripQuery = \"SELECT MAX(trip_number) FROM bike_stats WHERE bike_id = ?\";\n\n try{\n connection = DBCleanup.getConnection();\n\n if(bikeModel.bikeExists(bikeID)) {\n preparedStatement = connection.prepareStatement(tripQuery);\n preparedStatement.setInt(1, bikeID);\n resultSet = preparedStatement.executeQuery();\n resultSet.next();\n tripNr = resultSet.getInt(\"MAX(trip_number)\");\n return tripNr;\n }else{\n return -1;\n }\n }catch(SQLException e){\n System.out.println(e.getMessage() + \" - getTripNr()\");\n }finally {\n DBCleanup.closeStatement(preparedStatement);\n DBCleanup.closeResultSet(resultSet);\n DBCleanup.closeConnection(connection);\n }\n return -1;\n }", "public Double getLimit() {\n return limit;\n }", "@Override\r\n\tpublic int selectLastNo() {\n\t\treturn sqlSession.selectOne(namespace + \".selectLastNo\");\r\n\t}", "@Override\r\n\tpublic int selectLastNo() {\n\t\treturn sqlSession.selectOne(namespace + \".selectLastNo\");\r\n\t}", "@Override\r\n\tpublic Integer getMaxInvSrno() {\n\t\tQStnLooseMt qStnLooseMt = QStnLooseMt.stnLooseMt;\r\n\t\tJPAQuery query = new JPAQuery(entityManager);\r\n\t\tInteger retVal = -1;\r\n\t\t\r\n\t\tCalendar date = new GregorianCalendar();\r\n\t\t\r\n\t\tList<Integer> maxSrno = query\r\n\t\t\t.from(qStnLooseMt)\r\n\t\t\t.where(qStnLooseMt.invDate.year().eq(date.get(Calendar.YEAR))).list(qStnLooseMt.srNo.max());\r\n\t\t\r\n\t\tfor (Integer srno : maxSrno) {\r\n\t\t\tretVal = (srno == null ? 0 : srno);\r\n\t\t}\r\n\r\n\t\t\r\n\t\t\r\n\t\treturn retVal;\r\n\t}", "public int getCLNO() {\n return clno;\n }", "@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 final void mK_LIMIT() throws RecognitionException {\n try {\n int _type = K_LIMIT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:487:8: ( L I M I T )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:487:16: L I M I T\n {\n mL(); \n mI(); \n mM(); \n mI(); \n mT(); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public com.google.protobuf.Int32Value getLimit() {\n return limit_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : limit_;\n }", "public Integer getResultLimit()\n {\n if (resultLimit == null)\n {\n return HPCCWsWorkUnitsClient.defaultResultLimit;\n }\n return resultLimit;\n }", "public BigDecimal getnCodregpen() {\n return nCodregpen;\n }", "public java.lang.String getCsp_Nif() {\n return csp_Nif;\n }", "public FdEbusinessCreditLimit() {\n this(DSL.name(\"fd_ebusiness_credit_limit\"), null);\n }", "int getLimit();", "int getLimit();", "public abstract int getCntCod();", "public String getUSECIF_NUMBER3() {\r\n return USECIF_NUMBER3;\r\n }", "public String getUSECIF_NUMBER3() {\r\n return USECIF_NUMBER3;\r\n }", "@Query(value = \"SELECT * FROM Champignon_Logboeken ORDER BY nummer DESC LIMIT ?1\", nativeQuery = true)\n\tpublic List<Champignonlogboek> findLastTen(int limit);", "public int setNitrateMax(String nitrateMax) {\n try {\n setNitrateMax(new Float(nitrateMax).floatValue());\n } catch (Exception e) {\n setNitrateMaxError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return nitrateMaxError;\n }", "String getLimit(boolean hasWhereClause, long limit);", "public java.lang.String getCivNo () {\n\t\treturn civNo;\n\t}" ]
[ "0.6371465", "0.60698664", "0.60698664", "0.60698664", "0.58883923", "0.5697324", "0.563551", "0.55876744", "0.5525818", "0.55240333", "0.54994047", "0.54994047", "0.54994047", "0.5447864", "0.54334086", "0.53962743", "0.5374097", "0.5374097", "0.5345029", "0.53173953", "0.53109604", "0.5293178", "0.5231729", "0.52229923", "0.51608896", "0.51572025", "0.5143876", "0.5143876", "0.51248664", "0.5119166", "0.5117105", "0.51088667", "0.5105363", "0.5105363", "0.5105363", "0.5105241", "0.51013935", "0.5087993", "0.5084519", "0.50843674", "0.50843674", "0.50732464", "0.505474", "0.5047171", "0.5042575", "0.50261444", "0.49920082", "0.4989213", "0.49850002", "0.4980555", "0.49725077", "0.49693406", "0.49516967", "0.49477655", "0.49462336", "0.4921985", "0.49176717", "0.49058232", "0.49058232", "0.48999694", "0.48999694", "0.48942378", "0.4893285", "0.48731044", "0.48688167", "0.48666972", "0.4861692", "0.48562858", "0.48473856", "0.48444948", "0.48425165", "0.48402783", "0.48398632", "0.48387966", "0.48374695", "0.4835467", "0.48286918", "0.48236138", "0.48135287", "0.4804826", "0.48037338", "0.48037338", "0.48031324", "0.47986332", "0.4797066", "0.47888553", "0.47742018", "0.4756861", "0.4756015", "0.47527975", "0.47394907", "0.47349083", "0.47349083", "0.4732979", "0.47296798", "0.47296798", "0.47244182", "0.47210518", "0.47183225", "0.47182027" ]
0.6473809
0
This method was generated by MyBatis Generator. This method sets the value of the database column TRS_TREASURY_LIMIT.CIF_NO
public void setCIF_NO(BigDecimal CIF_NO) { this.CIF_NO = CIF_NO; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setACC_CIF(BigDecimal ACC_CIF) {\r\n this.ACC_CIF = ACC_CIF;\r\n }", "public void setCIF_SUB_NO(BigDecimal CIF_SUB_NO) {\r\n this.CIF_SUB_NO = CIF_SUB_NO;\r\n }", "public void setCIF_SUB_NO(BigDecimal CIF_SUB_NO) {\r\n this.CIF_SUB_NO = CIF_SUB_NO;\r\n }", "public void setCIF_SUB_NO(BigDecimal CIF_SUB_NO) {\r\n this.CIF_SUB_NO = CIF_SUB_NO;\r\n }", "public void setLimit(java.math.BigInteger limit)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LIMIT$6, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(LIMIT$6);\r\n }\r\n target.setBigIntegerValue(limit);\r\n }\r\n }", "public void setLimitnumber(Integer limitnumber) {\n this.limitnumber = limitnumber;\n }", "public BigDecimal getCIF_NO() {\r\n return CIF_NO;\r\n }", "@SuppressWarnings(\"null\")\n private void setIDCupon() {\n int id_opinion = 1;\n ResultSet rs = null;\n Statement s = null;\n //cb_TS.addItem(\"Seleccione una opinion...\");\n //Creamos la query\n try {\n s = conexion.createStatement();\n } catch (SQLException se) {\n System.out.println(\"probando conexion de consulta\");\n }\n try {\n rs = s.executeQuery(\"SELECT id_cupon FROM cupon order by id_cupon desc LIMIT 1\");\n while (rs.next()) {\n id_opinion = Integer.parseInt(rs.getString(1))+1;\n }\n tf_ID.setText(Integer.toString(id_opinion));\n } catch (SQLException ex) {\n Logger.getLogger(N_Opinion.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void setLimit_Base (String Limit_Base);", "public void setLimit(int limit) {\n\tLimit = limit;\n }", "public void setLimit(Integer limit) {\n this.limit = limit;\n }", "public void xsetLimit(org.apache.xmlbeans.XmlNonNegativeInteger limit)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlNonNegativeInteger target = null;\r\n target = (org.apache.xmlbeans.XmlNonNegativeInteger)get_store().find_element_user(LIMIT$6, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlNonNegativeInteger)get_store().add_element_user(LIMIT$6);\r\n }\r\n target.set(limit);\r\n }\r\n }", "public void setLimit(int limit) {\n this.limit=limit;\n }", "public void setCLNO(int value) {\n this.clno = value;\n }", "public void setPriceLimit (BigDecimal PriceLimit);", "public abstract void setCntCod(int cntCod);", "public void setLimitNum(int limitNum) {\r\n this.limitNum = limitNum;\r\n this.endNum = this.skipNum + this.limitNum +1;\r\n }", "public void setNUMSECFO(int value) {\n this.numsecfo = value;\n }", "public int setNitrateMax(Integer nitrateMax) {\n try {\n setNitrateMax(nitrateMax.floatValue());\n } catch (Exception e) {\n setNitrateMaxError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return nitrateMaxError;\n }", "public void setLimit(int limit) {\n this.limit = limit;\n }", "public void setLimit(int limit) {\n\t\tthis.limit = limit;\n\t}", "public void setLimit(int limit) {\n this.limit = limit;\n }", "public Integer getLimitnumber() {\n return limitnumber;\n }", "public final void setRowLimit(int newObj)throws SL_Exception\n {\n setRowLimit(newObj, null);\n }", "void setLimit(int limit);", "public void setCOVERING_ACC_CIF(BigDecimal COVERING_ACC_CIF) {\r\n this.COVERING_ACC_CIF = COVERING_ACC_CIF;\r\n }", "public BigDecimal getCIF_SUB_NO() {\r\n return CIF_SUB_NO;\r\n }", "public BigDecimal getCIF_SUB_NO() {\r\n return CIF_SUB_NO;\r\n }", "public BigDecimal getCIF_SUB_NO() {\r\n return CIF_SUB_NO;\r\n }", "public void setBSCA_ProfitPriceLimit (BigDecimal BSCA_ProfitPriceLimit);", "DbQuery setLimit(Limit limit, int limitNum) {\n this.limit = limit;\n this.limitNum = limitNum;\n return this;\n }", "public int setNitrateMax(String nitrateMax) {\n try {\n setNitrateMax(new Float(nitrateMax).floatValue());\n } catch (Exception e) {\n setNitrateMaxError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return nitrateMaxError;\n }", "public int setNitrateMax(Float nitrateMax) {\n try {\n setNitrateMax(nitrateMax.floatValue());\n } catch (Exception e) {\n setNitrateMaxError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return nitrateMaxError;\n }", "public void setLimit(double limit) {\n\t\tthis.limit = limit;\n\t }", "public void setLimit(Long limit) {\n this.limit = limit;\n }", "public void setTaxAmtPriceLimit (BigDecimal TaxAmtPriceLimit);", "public void setPriceLimitOld (BigDecimal PriceLimitOld);", "public abstract void setCntFtc(int cntFtc);", "public void setCantidadCUVErrado(java.math.BigInteger param){\n \n this.localCantidadCUVErrado=param;\n \n\n }", "public int getLimitNum() {\r\n return this.limitNum;\r\n }", "@Accessor(qualifier = \"redemptionQuantityLimit\", type = Accessor.Type.SETTER)\n\tpublic void setRedemptionQuantityLimit(final Integer value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(REDEMPTIONQUANTITYLIMIT, value);\n\t}", "public void setReportLimit(long limit)\n {\n if (limit < 0L) {\n this.rptLimitCount = -1L;\n } else\n if (limit == 0L) {\n this.rptLimitCount = 1L;\n } else {\n this.rptLimitCount = limit;\n }\n //Print.logInfo(\"Report record limit: %d\", this.rptLimitCount);\n }", "public void setCodigo() throws SQLException {\n try (PreparedStatement query = Herramientas.getConexion().prepareStatement(\"SELECT MAX(codigo_ticket) FROM ticket\"); \n ResultSet resultado = query.executeQuery()) {\n resultado.next();\n this.codigo = (resultado.getInt(1))+1;\n }\n \n }", "private void setLimit(\n com.google.protobuf.Int32Value.Builder builderForValue) {\n limit_ = builderForValue.build();\n \n }", "public void setLimit(Long Limit) {\n this.Limit = Limit;\n }", "public void setLimit(Long Limit) {\n this.Limit = Limit;\n }", "public Builder setCouponNum(int value) {\n \n couponNum_ = value;\n onChanged();\n return this;\n }", "public void setPriceLimitWTax (BigDecimal PriceLimitWTax);", "public void setMiterLimit(float limit);", "public void setCPTLNO(int value) {\n this.cptlno = value;\n }", "public final void mK_LIMIT() throws RecognitionException {\n try {\n int _type = K_LIMIT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:487:8: ( L I M I T )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:487:16: L I M I T\n {\n mL(); \n mI(); \n mM(); \n mI(); \n mT(); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public void setNOficina (Integer pNOficina)\r\n {\r\n this.nOficina=pNOficina;\r\n }", "public void setBSCA_ProfitPriceLimitEntered (BigDecimal BSCA_ProfitPriceLimitEntered);", "public void set_constant(double cutoff)\r\n\t{\r\n\t\tthis.switchValue = (int)cutoff;\t\r\n\t}", "public void setCfNo(String cfNo) {\n\t\tthis.cfNo = cfNo;\n\t}", "public void setLimit(float value) {\n this.limit = value;\n }", "public void setJP_BankData_ReferenceNo (String JP_BankData_ReferenceNo);", "public FdEbusinessCreditLimit() {\n this(DSL.name(\"fd_ebusiness_credit_limit\"), null);\n }", "public void setREF_NO(BigDecimal REF_NO) {\r\n this.REF_NO = REF_NO;\r\n }", "void setLimit( Token t, int limit) {\r\n \tMExprToken tok = (MExprToken)t;\r\n \ttok.charEnd = limit;\r\n \ttok.charStart = limit;\r\n }", "public void setTRX_NO(BigDecimal TRX_NO) {\r\n this.TRX_NO = TRX_NO;\r\n }", "public void setLimitEnd(Integer limitEnd) {\r\n this.limitEnd=limitEnd;\r\n }", "public void setMaxprice(int value) {\n this.maxprice = value;\n }", "@Override\r\n\tpublic int updateCostIoQtyInit() {\n\t\treturn getSqlSession().update(namespace+\".updateCostIoQtyInit\");\r\n\t}", "void setWBMaximum(java.math.BigDecimal wbMaximum);", "public void setDatossolicitudBftipoDeConvenio(int value) {\n this.datossolicitudBftipoDeConvenio = value;\n }", "void setNumberOfInfantry(int infantry);", "public void setBranchNotifIdFk(Number value) {\r\n setAttributeInternal(BRANCHNOTIFIDFK, value);\r\n }", "public void setDatossolicitudBfclasificacionConvenio(int value) {\n this.datossolicitudBfclasificacionConvenio = value;\n }", "public void setCODE(BigDecimal CODE) {\r\n this.CODE = CODE;\r\n }", "public void setCODE(BigDecimal CODE) {\r\n this.CODE = CODE;\r\n }", "public void setC_Invoice_ID (int C_Invoice_ID);", "public java.math.BigInteger getLimit()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LIMIT$6, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getBigIntegerValue();\r\n }\r\n }", "@Test\n\tpublic void testSetLimitX() {\n\t\tPlateauImpl.setPlateau(\"5 5\");\n\t\tassertEquals(5, PlateauImpl.getLimitX());\n\t\tPlateauImpl.setLimitX(3);\n\t\tassertEquals(3, PlateauImpl.getLimitX());\n\t}", "public Long getLimit() {\n return this.limit;\n }", "public void setPriceLimitEntered (BigDecimal PriceLimitEntered);", "public void setSelectionLimit(long limit)\n {\n if (limit < 0L) {\n this.selLimitCount = -1L;\n } else\n if (limit == 0L) {\n this.selLimitCount = 1L;\n } else {\n this.selLimitCount = limit;\n }\n }", "public void setNmbMine(int nmbMine) {\n\t\tif (nmbMine < 0) {\n\t\t\tthis.nmbMine = 0;\n\t\t} else if (nmbMine > Constant.SCAVENGER_MAX_MINE) {\n\t\t\tthis.nmbMine = Constant.SCAVENGER_MAX_MINE;\n\t\t} else {\n\t\t\tthis.nmbMine = nmbMine;\n\t\t}\n\t}", "public Long getLimit() {\n return this.Limit;\n }", "public Long getLimit() {\n return this.Limit;\n }", "public void setCantidadFaltanteAnunciado(java.math.BigInteger param){\n \n this.localCantidadFaltanteAnunciado=param;\n \n\n }", "public void setTRS_NO(BigDecimal TRS_NO) {\r\n this.TRS_NO = TRS_NO;\r\n }", "public void setTRS_NO(BigDecimal TRS_NO) {\r\n this.TRS_NO = TRS_NO;\r\n }", "public int getLimit(){\r\n return limit;\r\n\r\n }", "public void setChallanNo(Number value) {\n setAttributeInternal(CHALLANNO, value);\n }", "public void setC_BankAccount_ID (int C_BankAccount_ID);", "public void setValorInt(BigDecimal valorInt) {\n\t\tthis.valorInt = valorInt;\n\t}", "private void setLimit(com.google.protobuf.Int32Value value) {\n if (value == null) {\n throw new NullPointerException();\n }\n limit_ = value;\n \n }", "public void setProjlimit(Integer projlimit) {\n this.projlimit = projlimit;\n }", "public void setMprice(int value) {\r\n this.mprice = value;\r\n }", "public void setCantidad(int value) {\n this.cantidad = value;\n }", "public void setC_BPartner_ID (int C_BPartner_ID);", "public void setMAX_ITERACOES(int MAX_ITERACOES) \r\n {\r\n if(MAX_ITERACOES > 0)\r\n this.MAX_ITERACOES = MAX_ITERACOES;\r\n }", "public void setNumCpfCnpjBeneficiario(String numCpfCnpjBeneficiario) {\n this.numCpfCnpjBeneficiario = numCpfCnpjBeneficiario;\n }", "public native void setMaximumRTO (long RTO);", "public void setC_BPartnerCashTrx_ID(int C_BPartnerCashTrx_ID) {\n\t\tif (C_BPartnerCashTrx_ID <= 0)\n\t\t\tset_Value(\"C_BPartnerCashTrx_ID\", null);\n\t\telse\n\t\t\tset_Value(\"C_BPartnerCashTrx_ID\", new Integer(C_BPartnerCashTrx_ID));\n\t}", "public void setNUM_BICO(String NUM_BICO) {\n this.NUM_BICO = NUM_BICO;\n }", "public FoursquarePathBuilder setLimit(Integer limit) {\n String limits = limit.toString();\n addParameter(\"limit\", limits);\n return this;\n }", "public void setSL_NO(BigDecimal SL_NO) {\r\n this.SL_NO = SL_NO;\r\n }", "public void setSL_NO(BigDecimal SL_NO) {\r\n this.SL_NO = SL_NO;\r\n }" ]
[ "0.5972449", "0.57983804", "0.57983804", "0.57983804", "0.57747966", "0.5640398", "0.55953735", "0.55279434", "0.54461986", "0.5414087", "0.5407065", "0.53929734", "0.5371439", "0.53456324", "0.53313947", "0.5324903", "0.53228515", "0.5304645", "0.52919", "0.5281216", "0.5267198", "0.52624726", "0.52534705", "0.52404153", "0.5219066", "0.52168053", "0.52045685", "0.52045685", "0.52045685", "0.5185819", "0.5170954", "0.5169598", "0.51514935", "0.51468056", "0.51456994", "0.51415694", "0.5138372", "0.512475", "0.5120017", "0.5108868", "0.51016134", "0.5086479", "0.50837153", "0.50606066", "0.50529146", "0.50529146", "0.504823", "0.50441843", "0.5027152", "0.50258654", "0.5006641", "0.5004212", "0.49907023", "0.49760294", "0.49657235", "0.49655765", "0.49450657", "0.49332345", "0.49317813", "0.49289313", "0.49163222", "0.49160072", "0.4911809", "0.49092633", "0.4903029", "0.48960862", "0.48819816", "0.48753977", "0.4875127", "0.48709452", "0.48709452", "0.4861479", "0.4851015", "0.48442882", "0.48280114", "0.4825641", "0.4823768", "0.48151353", "0.4811987", "0.4811987", "0.48035216", "0.4801861", "0.4801861", "0.48018473", "0.48017198", "0.47748393", "0.4774587", "0.4772599", "0.47688124", "0.4767111", "0.47666427", "0.4765993", "0.47618747", "0.4759043", "0.47570622", "0.47570318", "0.47560906", "0.47545245", "0.47498655", "0.47498655" ]
0.6775092
0
This method was generated by MyBatis Generator. This method returns the value of the database column TRS_TREASURY_LIMIT.COMP_CODE
public BigDecimal getCOMP_CODE() { return COMP_CODE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "public void setCOMP_CODE(BigDecimal COMP_CODE) {\r\n this.COMP_CODE = COMP_CODE;\r\n }", "protected String getTableCompCode()\n\t\t{\n\t\t\treturn CompCode ;\n\t\t}", "public String getCompCode() {\n return compCode;\n }", "public String getCompCode() {\n return (String)getAttributeInternal(COMPCODE);\n }", "public BigDecimal getCODE() {\r\n return CODE;\r\n }", "public BigDecimal getCODE() {\r\n return CODE;\r\n }", "public void setCompCode(String compCode) {\n this.compCode = compCode;\n }", "public java.lang.Integer getCompanycode() {\n\treturn companycode;\n}", "private int getQuanteComande(int codRMP) {\n /* variabili e costanti locali di lavoro */\n int totComande = 0;\n Number numero;\n Modulo modRMO = RMOModulo.get();\n Modulo modRTO = RTOModulo.get();\n Filtro filtro;\n\n try { // prova ad eseguire il codice\n filtro = FiltroFactory.crea(modRMO.getCampo(RMO.CAMPO_RIGA_MENU_PIATTO), codRMP);\n numero = modRTO.query().contaRecords(filtro);\n totComande = Libreria.getInt(numero);\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n /* valore di ritorno */\n return totComande;\n }", "protected void setTableCompCode(String compcode)\n\t\t{\n\t\t\tCompCode = compcode ;\n\t\t}", "public int getSelectedTelObsComp()\n\t{\n\t\treturn _avTable.getInt( ATTR_SELECTED_TEL_OBS_COMP , 0 ) ;\n\t}", "@Accessor(qualifier = \"code\", type = Accessor.Type.GETTER)\n\tpublic String getCode()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(CODE);\n\t}", "public void setCODE(BigDecimal CODE) {\r\n this.CODE = CODE;\r\n }", "public void setCODE(BigDecimal CODE) {\r\n this.CODE = CODE;\r\n }", "public ScGridColumn<AcActionAutoCorrectedLog> newActualCarrierCodeColumn()\n {\n return newActualCarrierCodeColumn(\"Actual Carrier Code\");\n }", "public String getCompanyCode() {\r\n return companyCode;\r\n }", "public String getCompanyCode() {\r\n return companyCode;\r\n }", "public String getJP_BankDataCustomerCode2();", "public String getCustomerCode()\n\t{\n\t\treturn getColumn(OFF_CUSTOMER_CODE, LEN_CUSTOMER_CODE) ;\n\t}", "public java.lang.String getCmpCode() {\r\n return cmpCode;\r\n }", "public int siguienteRegistro(int codigoCiclo, int codigoPlan) {\n/* 454 */ int numero = 1;\n/* 455 */ String s = \"select max(codigo_meta) from cal_plan_metas\";\n/* 456 */ s = s + \" where codigo_ciclo=\" + codigoCiclo;\n/* */ try {\n/* 458 */ boolean rta = this.dat.parseSql(s);\n/* 459 */ if (!rta) return 0; \n/* 460 */ this.rs = this.dat.getResultSet();\n/* 461 */ if (this.rs.next()) {\n/* 462 */ s = this.rs.getString(1);\n/* 463 */ if (!this.rs.wasNull()) {\n/* 464 */ numero = Integer.parseInt(s) + 1;\n/* */ }\n/* */ } \n/* 467 */ if (numero < 10000) numero = 10000; \n/* 468 */ return numero;\n/* */ }\n/* 470 */ catch (Exception e) {\n/* 471 */ e.printStackTrace();\n/* 472 */ Utilidades.writeError(\"CalPlanMetasFactory:siguienteRegistro\", e);\n/* */ \n/* 474 */ return 0;\n/* */ } \n/* */ }", "public Integer getCompid() {\n return compid;\n }", "public String getCompanyCode() {\n return companyCode;\n }", "public java.lang.String getCodigo_pcom();", "public void setCompCode(String value) {\n setAttributeInternal(COMPCODE, value);\n }", "public java.lang.String getPayComCode() {\n return payComCode;\n }", "public String getCommodityCode() {\n return commodityCode;\n }", "public void setCodigo() throws SQLException {\n try (PreparedStatement query = Herramientas.getConexion().prepareStatement(\"SELECT MAX(codigo_ticket) FROM ticket\"); \n ResultSet resultado = query.executeQuery()) {\n resultado.next();\n this.codigo = (resultado.getInt(1))+1;\n }\n \n }", "public Integer getCompId() {\n return compId;\n }", "public CompaniaDTO findObtenerListaCompaniasByCodigo(Integer codigoCompania) throws ERPException{\r\n\t\treturn this.companiaGestor.obtenerListaCompaniasByCodigo(codigoCompania);\r\n\t}", "@Override\r\n\tpublic Compte consulterCompte(String codeCpte) {\n\t\treturn dao.consulterCompte(codeCpte);\r\n\t}", "public String getJP_BankDataCustomerCode1();", "public Long getCode() {\n return code;\n }", "public Long getCode() {\n return code;\n }", "public int GetLastnumero()\r\n throws SQLException{\r\n int code = 0;\r\n ResultSet result = null;\r\n \r\n result = RequeteSelect(result,\"select max(CodeFiche) from Travaux\");\r\n while (result.next()){\r\n if(result.getString(1) == null)\r\n code = 0;\r\n else code = Integer.parseInt(new String(result.getString(1)))+1;\r\n }\r\n \r\n Close();\r\n result.close();\r\n \r\n return code;\r\n }", "public String getRestrictionCode() {\n return restrictionCode;\n }", "public String getOrgCreditQuantid() {\n return orgCreditQuantid;\n }", "public static JwComparator<AcCustodySummaryVo> getItemLastAirportCodeComparator()\n {\n return AcCustodySummaryVoTools.instance.getItemLastAirportCodeComparator();\n }", "public int getCodigoDocumento(java.sql.Connection con,int CodEmp, int CodLoc, int intCodTipDoc){ \n int intDoc = -1;\n java.sql.Statement stm; \n java.sql.ResultSet rst;\n try{\n if (con!=null){\n stm =con.createStatement();\n String strSQL= \"SELECT case when Max(co_doc) is null then 1 else Max(co_doc)+1 end as codoc FROM tbm_cabMovInv WHERE \" +\n \" co_emp =\"+CodEmp+\" AND co_loc =\"+CodLoc+\" AND co_tipdoc =\"+intCodTipDoc;\n \n rst = stm.executeQuery(strSQL);\n if(rst.next()){\n intDoc = rst.getInt(\"codoc\");\n }\n rst.close();\n stm.close();\n }\n }catch(java.sql.SQLException e){ objUti.mostrarMsgErr_F1(new javax.swing.JInternalFrame(),e); }\n catch(Exception e){ objUti.mostrarMsgErr_F1(new javax.swing.JInternalFrame(),e); }\n return intDoc;\n }", "@Accessor(qualifier = \"voucherCode\", type = Accessor.Type.GETTER)\n\tpublic String getVoucherCode()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(VOUCHERCODE);\n\t}", "public Number getCodeCombinationId() {\n return (Number)getAttributeInternal(CODECOMBINATIONID);\n }", "public Long getCompId() {\n return compId;\n }", "public Long getCompId() {\n return compId;\n }", "public abstract java.lang.Long getCod_actividad();", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }", "public String getcCode() {\n\t\treturn this.cCode;\n\t}", "public String getCustCode() {\n return custCode;\n }", "public String getCustCode() {\n return custCode;\n }", "public ScGridColumn<AcActionAutoCorrectedLog> newActualAirportCodeColumn()\n {\n return newActualAirportCodeColumn(\"Actual Airport Code\");\n }", "public Object[][] getTdsDebitCode(){\r\n\t\tObject tdsParameter[][] = null;\r\n\t\ttry {\r\n\t\t\tString tdsParaQuery = \"SELECT TDS_DEBIT_CODE,TDS_EDU_CESS,TDS_REBATEMAX_AMOUNT,TDS_SURCHARGE \"\r\n\t\t\t\t\t+ \" FROM HRMS_TAX_PARAMETER \"\r\n\t\t\t\t\t+ \" WHERE TDS_CODE= (SELECT MAX(TDS_CODE) FROM HRMS_TAX_PARAMETER)\";\r\n\t\t\ttdsParameter = getSqlModel().getSingleResult(tdsParaQuery);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"exception in tdsParameter query\",e);\r\n\t\t} //end of catch\r\n\t\treturn tdsParameter;\r\n\t}", "public BigDecimal getCHARGE_CODE() {\r\n return CHARGE_CODE;\r\n }", "public abstract Integer getCompteId();", "public int getCode() {\n\t\treturn adaptee.getCode();\n\t}", "int getCodeValue();", "public ResultSet appcomp(Long comp_id)throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from company where comp_id=\"+comp_id+\"\");\r\n\treturn rs;\r\n}", "@Override\r\n\tpublic Company getAllCompaniesByCode(Integer code) {\r\n\t\tString methodName = \"getAllCompaniesById(Integer id)\";\r\n\t\tlog.info(className+\",\"+methodName);\r\n\t\tlog.debug(\"company code is::\"+code);\r\n\t\treturn companyRepository.findCompanyByCode(code.longValue());\r\n\t}", "public String getCorpcode() {\n return corpcode;\n }", "public long getCode () {\r\n\t\treturn code;\r\n\t}", "public String getPrmCategCode() {\n return (String)getAttributeInternal(PRMCATEGCODE);\n }", "public ScGridColumn<AcAirportProgressSummaryVo> newAirportCodeColumn()\n {\n return newAirportCodeColumn(\"Airport Code\");\n }", "Integer getCode();", "public String getJP_BankData_ReferenceNo();", "public int getMaxPanelistCodeValue () throws Exception {\r\n String sql = \"call NEXT VALUE FOR PANELIST_CODE_SEQUENCE;\";\r\n ResultSet result = stmt.executeQuery(sql);\r\n result.next();\r\n return result.getInt(1);\r\n }", "@Override\r\n\tpublic Code selectCode(Map<String, String[]> map) throws SQLException {\n\t\t\r\n\t\tJPAQuery query = new JPAQuery(entityManager);\r\n\r\n\t\tQCode code = QCode.code;\r\n\t\tCode codeList = null;\r\n\t\tif(map.get(\"gbn\")[0].equals(\"upr\")) {\r\n\t\t\tcodeList = query.from(code)\r\n\t\t\t .where(code.upr_cd.eq(\"*\").and(code.cd.eq(map.get(\"cd\")[0])))\r\n\t\t\t .singleResult(code);\r\n\t\t} else {\r\n\t\t\tcodeList = query.from(code)\r\n\t\t\t .where(code.upr_cd.eq(map.get(\"upr_cd\")[0]).and(code.cd.eq(map.get(\"cd\")[0])))\r\n\t\t\t .singleResult(code);\r\n\t\t}\r\n\t\t\r\n\t\treturn codeList;\r\n\t}", "public Integer getCarCompanyCd() {\n\t\treturn carCompanyCd;\n\t}", "public ScGridColumn<AcGlobalDomesticActualMarketCache> newOriginAirportCodeColumn()\n {\n return newOriginAirportCodeColumn(\"Origin Airport Code\");\n }", "public String getCode() {\n return (String) get(\"code\");\n }", "java.lang.String getProductNumberCode();", "int leerCodigoIngreso(){\n\t\treturn Integer.parseInt(cboCodigoIngreso.getSelectedItem().toString());\n\t}", "public void setCompanycode(java.lang.Integer newCompany) {\n\tcompanycode = newCompany;\n}", "java.lang.String getSqlCode();", "public String getLBR_ProtestCode();", "public int getCode() {\n\t\treturn this.code;\n\t}", "private String getOrderCode(int pkgCode){\n\t\tint a = pkgCode ;\n\t\tint b = a/10 ;\n\t\tint c = b*10 ;\n//\t\tSystem.out.println(c);\n\t\treturn c+\"\" ;\n\t}", "Integer obtenerUltimoComprobante(TipoComprobante tipoCbte, Integer ptoVta, Cuit cuitFacturador) throws EsphoraInternalException;", "public static String getRedemptionPromotionId(Connection conn, String redemptionCode) throws SQLException {\n\t\tString promoId = null;\n\t\t//TODO later the select query need to be changed to return ID column instead of Code. \n\t\tPreparedStatement ps = conn.prepareStatement(\"SELECT code FROM CUST.PROMOTION_NEW where UPPER(redemption_code) = UPPER(?) and status \"+getStatusReplacementString()+\" order by expiration_date desc\");\n\t\tps.setString(1, redemptionCode);\n\t\tResultSet rs = ps.executeQuery();\n\n\t\tif (rs.next()) {\n\t\t\tpromoId = rs.getString(\"CODE\");\n\t\t}\n\n\t\trs.close();\n\t\tps.close();\n\n\t\treturn promoId;\n\t}", "public long getCode() {\n return code;\n }", "public String getCompanyCd() {\r\n return companyCd;\r\n }", "public String getCompanyCd() {\r\n return companyCd;\r\n }" ]
[ "0.6143805", "0.6143805", "0.6143805", "0.6143805", "0.6143805", "0.6143805", "0.6143805", "0.6143805", "0.5912065", "0.57917863", "0.5735157", "0.5688957", "0.5688957", "0.56028444", "0.5507281", "0.5498101", "0.5418064", "0.5369752", "0.5294637", "0.52295107", "0.52295107", "0.52276456", "0.5223594", "0.5223594", "0.5216763", "0.5210999", "0.52078414", "0.5198193", "0.51692826", "0.51655346", "0.51625085", "0.51615995", "0.5140091", "0.5136347", "0.5113063", "0.509864", "0.5088006", "0.5086535", "0.50658435", "0.5054318", "0.5054318", "0.5046538", "0.50344247", "0.5032423", "0.50242424", "0.5023704", "0.4977156", "0.49700376", "0.49684757", "0.49684757", "0.49619496", "0.49525616", "0.49525616", "0.49525616", "0.49525616", "0.49525616", "0.49525616", "0.49525616", "0.49525616", "0.49430594", "0.49318713", "0.49318713", "0.49104455", "0.49048313", "0.48823982", "0.48777062", "0.48749074", "0.48634687", "0.48614097", "0.48493028", "0.4844785", "0.48272073", "0.4819091", "0.48174068", "0.48112658", "0.48101878", "0.4809577", "0.48020086", "0.47857812", "0.47829008", "0.47800437", "0.47796273", "0.4768667", "0.47641346", "0.4762015", "0.47591725", "0.47558165", "0.47338212", "0.4731405", "0.4726686", "0.47223043", "0.4713338", "0.4713338" ]
0.6372483
6
This method was generated by MyBatis Generator. This method sets the value of the database column TRS_TREASURY_LIMIT.COMP_CODE
public void setCOMP_CODE(BigDecimal COMP_CODE) { this.COMP_CODE = COMP_CODE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void setTableCompCode(String compcode)\n\t\t{\n\t\t\tCompCode = compcode ;\n\t\t}", "public void setCompCode(String compCode) {\n this.compCode = compCode;\n }", "public void setCODE(BigDecimal CODE) {\r\n this.CODE = CODE;\r\n }", "public void setCODE(BigDecimal CODE) {\r\n this.CODE = CODE;\r\n }", "public void setCompCode(String value) {\n setAttributeInternal(COMPCODE, value);\n }", "public void setCompanycode(java.lang.Integer newCompany) {\n\tcompanycode = newCompany;\n}", "public BigDecimal getCOMP_CODE() {\r\n return COMP_CODE;\r\n }", "public BigDecimal getCOMP_CODE() {\r\n return COMP_CODE;\r\n }", "public BigDecimal getCOMP_CODE() {\r\n return COMP_CODE;\r\n }", "public BigDecimal getCOMP_CODE() {\r\n return COMP_CODE;\r\n }", "public BigDecimal getCOMP_CODE() {\r\n return COMP_CODE;\r\n }", "public BigDecimal getCOMP_CODE() {\r\n return COMP_CODE;\r\n }", "public BigDecimal getCOMP_CODE() {\r\n return COMP_CODE;\r\n }", "public BigDecimal getCOMP_CODE() {\r\n return COMP_CODE;\r\n }", "public void setCodigo() throws SQLException {\n try (PreparedStatement query = Herramientas.getConexion().prepareStatement(\"SELECT MAX(codigo_ticket) FROM ticket\"); \n ResultSet resultado = query.executeQuery()) {\n resultado.next();\n this.codigo = (resultado.getInt(1))+1;\n }\n \n }", "public void setCode(String cod){\n\t\tcodeService = cod;\n\t}", "public void setValue(String column, long intval, String compcode)\n\t\t\tthrows ReadWriteException\n\t{\n\t\tsetValue(column, intval, compcode, \"\", \"\", \"AND\") ;\n\t}", "public abstract BaseQuantityDt setCode(String theCode);", "public void setValue(String column, int intval, String compcode)\n\t\t\tthrows ReadWriteException\n\t{\n\t\tsetValue(column, intval, compcode, \"\", \"\", \"AND\") ;\n\t}", "public abstract void setCntCod(int cntCod);", "public void setCode(long value) {\n this.code = value;\n }", "public void setDOC_CODE(BigDecimal DOC_CODE) {\r\n this.DOC_CODE = DOC_CODE;\r\n }", "public void setJP_BankDataCustomerCode2 (String JP_BankDataCustomerCode2);", "public void setCmpCode(java.lang.String cmpCode) {\r\n this.cmpCode = cmpCode;\r\n }", "public void setCompany(java.lang.Integer newCompany) {\n\tcompany = newCompany;\n}", "public void setCHARGE_CODE(BigDecimal CHARGE_CODE) {\r\n this.CHARGE_CODE = CHARGE_CODE;\r\n }", "public void setCompanyCode(String companyCode) {\r\n this.companyCode = companyCode == null ? null : companyCode.trim();\r\n }", "public void setCompanyCode(String companyCode) {\r\n this.companyCode = companyCode == null ? null : companyCode.trim();\r\n }", "public void setJP_BankDataCustomerCode1 (String JP_BankDataCustomerCode1);", "public abstract void setCod_actividad(java.lang.Long newCod_actividad);", "public void setCompanyCode(String companyCode) {\n this.companyCode = companyCode == null ? null : companyCode.trim();\n }", "public void setCode (java.lang.Long code) {\r\n\t\tthis.code = code;\r\n\t}", "public void setCode(final int code) {\n this.code = code;\n commited = true;\n }", "public void setCode(Long code) {\n this.code = code;\n }", "public void setCode(Long code) {\n this.code = code;\n }", "public void setCodigo(java.lang.String param){\n \n this.localCodigo=param;\n \n\n }", "public abstract void setCompteId(Integer pCompteId);", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setBRANCH_CODE(BigDecimal BRANCH_CODE) {\r\n this.BRANCH_CODE = BRANCH_CODE;\r\n }", "public void setCompid(Integer compid) {\n this.compid = compid;\n }", "public void setCode(Integer code) {\n this.code = code;\n }", "public void setPayComCode(java.lang.String payComCode) {\n this.payComCode = payComCode;\n }", "public void setCode(int code) {\n this.code = code;\n }", "public void setCode(int code) {\n this.code = code;\n }", "public void setCodigo_pcom(java.lang.String newCodigo_pcom);", "public void setComuneResidenzaCod(int value) {\r\n this.comuneResidenzaCod = value;\r\n }", "public void setCreditCardExpYY(int newCreditCardExpYY) {\n int CreditCardExpYY = newCreditCardExpYY;\n if (newCreditCardExpYY > 1999) {\n CreditCardExpYY = newCreditCardExpYY - 2000;\n }\n super.setCreditCardExpYY(CreditCardExpYY);\n }", "public void setValue(String column, double intval, String compcode)\n\t\t\tthrows ReadWriteException\n\t{\n\t\tsetValue(column, intval, compcode, \"\", \"\", \"AND\") ;\n\t}", "protected String getTableCompCode()\n\t\t{\n\t\t\treturn CompCode ;\n\t\t}", "public void setCode(Code code) {\n this.Code = code;\n }", "public void setValue(String column, float intval, String compcode)\n\t\t\tthrows ReadWriteException\n\t{\n\t\tsetValue(column, intval, compcode, \"\", \"\", \"AND\") ;\n\t}", "public void setCodigo(int pCodigo){\n this.codigo = pCodigo;\n }", "protected void setTableCondtion(int pcond)\n\t\t{\n\t\t\tCondtion = pcond ;\n\t\t}", "public void setTransocode(java.lang.String param) {\r\n localTransocodeTracker = param != null;\r\n\r\n this.localTransocode = param;\r\n }", "protected void setCode(@Code int code) {\n\t\tthis.mCode = code;\n\t}", "public String getCompCode() {\n return compCode;\n }", "void setCode(Integer aCode);", "public void setFKComp(int FKComp) {\n\t\tthis.FKComp = FKComp;\n\t}", "public void setCompnayNum(String comnayNum) {\n this.companyNum = FileUtils.hexStringFromatByF(10, \"\");\n }", "public void setGBInterval_iscomp(gov.nih.nlm.ncbi.www.soap.eutils.efetch_seq.GBInterval_iscomp_type0 param){\n localGBInterval_iscompTracker = param != null;\n \n this.localGBInterval_iscomp=param;\n \n\n }", "public void setGL_CODE(BigDecimal GL_CODE) {\r\n this.GL_CODE = GL_CODE;\r\n }", "public void setGL_CODE(BigDecimal GL_CODE) {\r\n this.GL_CODE = GL_CODE;\r\n }", "public void setGL_CODE(BigDecimal GL_CODE) {\r\n this.GL_CODE = GL_CODE;\r\n }", "public void setTypesetComp(String value) {\n setAttributeInternal(TYPESETCOMP, value);\n }", "public String getCompanyCode() {\r\n return companyCode;\r\n }", "public String getCompanyCode() {\r\n return companyCode;\r\n }", "public void setCompId(Integer compId) {\n this.compId = compId;\n }", "public ScGridColumn<AcActionAutoCorrectedLog> newActualCarrierCodeColumn()\n {\n return newActualCarrierCodeColumn(\"Actual Carrier Code\");\n }", "public BigDecimal getCODE() {\r\n return CODE;\r\n }", "public BigDecimal getCODE() {\r\n return CODE;\r\n }", "public TblrefJoboptioncode() {\n this(\"tblref_joboptioncode\", null);\n }", "public java.lang.Integer getCompanycode() {\n\treturn companycode;\n}", "public void setTradeCode(String value) {\n this.tradeCode = value;\n }", "public void setAvailNumComps(int availNumComps){\n this.mFarm.setAvailNumComps(availNumComps);\n }", "public void setBSCA_ProfitPriceLimit (BigDecimal BSCA_ProfitPriceLimit);", "public void setLBR_ProtestCode (String LBR_ProtestCode);", "public String getCompanyCode() {\n return companyCode;\n }", "public void setOperateComCode(java.lang.String operateComCode) {\n this.operateComCode = operateComCode;\n }", "public void setEqCode(String eqCode) {\n this.eqCode = eqCode == null ? null : eqCode.trim();\n }", "public void setCodigo(int codigo) {\n this.codigo = codigo;\n }", "public void setClassCode(java.lang.String classCode)\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(CLASSCODE$30);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CLASSCODE$30);\n }\n target.setStringValue(classCode);\n }\n }", "public void setLimit_Base (String Limit_Base);", "public void setTypeCode(Integer typeCode) {\n this.typeCode = typeCode;\n }", "public void setCode(String code){\n\t\tthis.code = code;\n\t}", "public void setComuneNascitaCod(int value) {\r\n this.comuneNascitaCod = value;\r\n }", "public void setParamCode(String paramCode) {\n this.paramCode = paramCode;\n }", "@Accessor(qualifier = \"code\", type = Accessor.Type.SETTER)\n\tpublic void setCode(final String value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(CODE, value);\n\t}" ]
[ "0.6572177", "0.62839323", "0.6142865", "0.6142865", "0.608601", "0.59790295", "0.54969233", "0.54969233", "0.54969233", "0.54969233", "0.54969233", "0.54969233", "0.54969233", "0.54969233", "0.5383881", "0.53665745", "0.53528637", "0.53334403", "0.5320195", "0.5254054", "0.5253076", "0.52415663", "0.52327603", "0.52222955", "0.5216908", "0.521535", "0.51800567", "0.51800567", "0.5174069", "0.51631236", "0.51597756", "0.5151865", "0.515058", "0.514247", "0.514247", "0.51372445", "0.5131335", "0.51086515", "0.51086515", "0.51086515", "0.51086515", "0.51086515", "0.51086515", "0.51086515", "0.51086515", "0.50526947", "0.50414383", "0.5026875", "0.50207597", "0.50207597", "0.5019131", "0.4998293", "0.49970287", "0.49802658", "0.49772364", "0.49734658", "0.49724096", "0.49632433", "0.49605408", "0.4949615", "0.4949568", "0.49488485", "0.49381462", "0.49356496", "0.49275026", "0.49173513", "0.49097243", "0.49097243", "0.49097243", "0.49072346", "0.4904956", "0.4904956", "0.49040145", "0.49017528", "0.48972857", "0.48972857", "0.48847723", "0.48808637", "0.48590362", "0.485108", "0.48383147", "0.48264235", "0.4818567", "0.48122454", "0.48097923", "0.4804999", "0.47997487", "0.4796942", "0.4790227", "0.47867087", "0.47841144", "0.47797364", "0.47773802" ]
0.671658
6
Implementation of select algorithm O(n)
public static int select(int[] arr, int k){ return select(arr, 0, arr.length, k); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract int quickSelect(Integer[] map, int right, int idx);", "private static int select (int[] arr, int p, int n, int k){\n //threshold of 17\n if(n < 17 ){\n insertionSort(arr, p, p+n-1);\n return arr[p + n - k];\n }else{\n int q = randomizedPartition(arr,p,p+n-1);\n int left = q-p;\n int right = n - left - 1;\n if(right >= k)\n return select(arr,q+1,right,k);\n else if(right + 1 == k )\n return arr[q];\n else\n return select(arr,p,left,k-right-1);\n }\n }", "public K select(int k);", "private int quickSelect(int[] arr, int n, int low, int high){\n\n int index = partition(arr, low, high);\n\n if (index - low == n - 1)\n return arr[index];\n\n if (index - low > n - 1)\n return quickSelect(arr, n, low, index - 1);\n\n return quickSelect(arr, n - index + low- 1,index + 1, high);\n }", "public abstract TIntArrayList select(TIntArrayList input);", "public int Select(int[] A, int k, int l, int h){\n\tint low = l;\n\tint high = h-1;\n\tint pivot= A[l];\n\tint index = 0;\n\t//switches the two\n\tint first= A[l];\n\tint second= A[h];\n\tA[l]=second;\n\tA[h]=first;\n\twhile(low < high) {\n\t if (A[low] < pivot) {\n\t\tlow++;\n\t } else {\n\t\tint uno= A[low];\n\t\tA[low]= A[high];\n\t\tA[high]=uno;\t\n\t\thigh--;\n\t }\n\t}\n\tif (A[low] < pivot){\n\t A[h] = A[low + 1];\n\t index = low + 1;\n\t A[index] = pivot;\n\n\t}\n if (A[low] > pivot){\n\t A[h] = A[low];\n\t index = low;\n\t A[index] = pivot;\n\t}\n\t//rec\n\tif (low < k) {\n\t Select(A,k,index+1,h);\n\t}\n if (low > k) {\n\t Select(A,k,l,index-1);\n\t}\n\treturn A[k];\n }", "public int quickSelect(int[] a, int l, int h, int k){\n int pivot=a[h],pIndex=l;\n for(int i=l;i<h;i++){\n if(a[i]<=pivot){\n swap(a,i,pIndex);\n pIndex++;\n }\n }\n \n swap(a,pIndex,h);\n if(k==pIndex)return a[pIndex]);\n else if(k>pIndex){\n return quickSelect(a,l,pIndex-1,k);\n }else return quickSelect(a,pIndex+1,h,k); \n \n }", "public void select() {}", "public void select();", "static void selection(int arr[]){\n for (int i =0; i < arr.length -1 ; i++){\n for (int j = i +1; j < arr.length; j++){\n if (arr[j] < arr[i]){\n int temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }\n }\n }\n }", "public static void selectionSort(Comparable[] a) {\n int n = a.length;\n int im;\n for (int i = 0; i < n; i++) {\n im = i;\n for (int j = im; j < n; j++) {\n // Find the min\n if (less(a[j], a[im])) im = j;\n if (i != im) exch(a, i, im);\n }\n }\n }", "private static int QuickSelect(int[] arr, int lo, int hi, int k){\n if(hi <= lo) return arr[lo];\n\t\t\n\t\tint p = pickPivot(arr, lo, hi);\n\t\tint j = partition(arr, lo, hi, p);\n\t\t\n\t\tif(k <= j){\n\t\t\treturn QuickSelect(arr, lo, j-1, k);\n\t\t} else if (k == j+1){\n\t\t\treturn arr[j];\n\t\t} else {\n\t\t\treturn QuickSelect(arr, j+1, hi, k);\n\t\t}\n }", "@Override\n protected int quickSelect(Integer[] map, int right, int idx) {\n int left = 0;\n do {\n int i = left;\n int j = right;\n int x = map[i + ((j - i) >> 1)];\n do {\n while (i < map.length && this.compareKeys(x, map[i]) > 0)\n i++;\n\n while (j >= 0 && this.compareKeys(x, map[j]) < 0)\n j--;\n\n if (i > j)\n break;\n\n if (i < j) {\n int temp = map[i];\n map[i] = map[j];\n map[j] = temp;\n }\n\n i++;\n j--;\n } while (i <= j);\n\n if (i <= idx)\n left = i + 1;\n else\n right = j - 1;\n\n if (j - left <= right - i) {\n if (left < j)\n right = j;\n\n left = i;\n } else {\n if (i < right)\n left = i;\n\n right = j;\n }\n } while (left < right);\n\n return map[idx];\n }", "protected abstract void select();", "boolean selectAt(double x, double y);", "public int select(int[] nums, int left, int right) {\n\t\tif (left >= right) {\n\t\t\treturn left;\n\t\t}\n\t\t\n\t\tint pivot = nums[left];\n\t\tint p = left;\n\t\tfor (int i = left+1; i <= right; i++) {\n\t\t\tif (smaller(nums[i], pivot)) {\n\t\t\t\tp++;\n\t\t\t\tswap(nums, i, p);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tswap(nums, left, p);\n\t\t\n\t\treturn p;\n\t}", "public void select ();", "private Node select(Node x, int k) {\n\t if (x == null) return null; \n\t int t = size(x.left); \n\t if (t > k) return select(x.left, k); \n\t else if (t < k) return select(x.right, k-t-1); \n\t else return x; \n\t }", "int select(int arr[], int i) {\n\t\t// Your code here\n\t\tint index_of_max;\n\t\tindex_of_max = i;\n\t\t//linear search\n\t\tfor (int j = 0; j <= i; j++) {\n\t\t\tif (arr[j] > arr[index_of_max]) {\n\t\t\t\tindex_of_max = j;\n\t\t\t}\n\t\t}\n\t\treturn index_of_max;\n\t}", "public Integer selection(Integer startIndex, String selection) {\n int selectionIndex = 0;\n for (int i = 0; i < playList.length; i++) {\n\n if (playList[i].equals(selection) && (playList.length-i < startIndex+ i)) {\n selectionIndex += i;\n }\n }\n //if the startIndex comes BEFORE the selection index\n //ed- [startIndex....,... selectionIndex..]\n if (selectionIndex > startIndex) {\n //(left side count VS right side count)\n if (selectionIndex - startIndex < (startIndex + playList.length - selectionIndex)) {\n return selectionIndex - startIndex;\n }\n return startIndex + playList.length - selectionIndex;\n }\n //if the startIndex comes AFTER the selection index\n //ed- [selectionIndex....,... startIndex..]\n if (selectionIndex < startIndex) {\n //(left side count VS right side count)\n if (startIndex - selectionIndex < (selectionIndex + playList.length - startIndex)) {\n return selectionIndex + playList.length - startIndex;\n }\n return startIndex- selectionIndex;\n\n }\n return null;\n }", "private Node select(Node x, int k) {\n if (x == null) return null; \n int t = size(x.left); \n if (t > k) return select(x.left, k); \n else if (t < k) return select(x.right, k-t-1); \n else return x; \n }", "void select();", "private int quickSelect(int[] a, int low, int high,int k) {\n //using quick sort\n //put nums that are <= pivot to the left\n //put nums that are > pivot to the right\n int i = low, j = high, pivot = a[high];\n while(i < j) {\n if(a[i++] > pivot)\n swap(a, --i, --j);\n }\n swap(a, i, high);\n\n //count the nums that are <= pivot from low\n int m = i - low + 1;\n if(m == k)\n return i;\n //pivot is too big\n else if(m > k)\n return quickSelect(a, low, i-1, k);\n else\n return quickSelect(a, i+1, high, k - m);\n }", "static void selectionSort(int a[])\n {\n int n = a.length;\n for(int i = 0; i < n-1; i++)\n {\n for(int j = i + 1; j < n; j++)\n {\n if(a[i] > a[j])\n swap(a,i,j);\n }\n }\n }", "private static int findKthSmallestElementUsingQuickSelect(int[] a, int low, int high, int k) {\n\n //CHECKS\n //In your original method check if array is null or empty\n //k is from 1 to n\n\n //If k is smaller than number of elements in array\n if (k > 0 && k <= a.length) {\n\n int pi = partition(a, low, high);\n\n if (pi == k - 1) {\n return a[pi];\n }\n if (pi > k - 1) {\n return findKthSmallestElementUsingQuickSelect(a, low, pi - 1, k);\n } else {\n return findKthSmallestElementUsingQuickSelect(a, pi + 1, high, k);\n }\n }\n return Integer.MAX_VALUE;\n }", "public static int quickSelectImpl(int k, CompareInt[] arr) {\n\t\tint select = Sorting.quickSelect(k, arr).val;\n\t\tquickSelectComparisons = CompareInt.countComparisons(arr, 0, arr.length - 1);\n\t\treturn select;\n\t}", "private static <AnyType extends Comparable<? super AnyType>> void quickSelect(AnyType[] a, int left, int right, int k)\n {\n if(left + CUTOFF <= right)\n {\n AnyType pivot = median3(a, left, right);\n\n // Begin partitioning\n int i = left, j = right - 1;\n for( ; ; )\n {\n while(a[++i].compareTo(pivot) < 0);\n while(a[--j].compareTo(pivot) > 0);\n if(i < j)\n CommonFunc.swapReference(a, i, j);\n else \n break;\n }\n\n CommonFunc.swapReference(a, i, right - 1);\n\n // if k = i + 1, the a[i] is the kth smallest item\n if(k <= i)\n quickSelect(a, left, i - 1, k);\n else if(k > i + 1)\n quickSelect(a, i + 1, right, k);\n }\n else // Do an insertion sort on the subarray\n Insertionsort.insertionsort(a, left, right);\n }", "boolean selectTo(double x, double y);", "public void selectionSort(int[] x)\n {\n for (int i = 0; i < x.length-1; i++) {\n int minIndex = i;\n for (int j = i+1; j < x.length; j++) {\n if (x[minIndex] > x[j]) {\n minIndex = j;\n }\n }\n int temp = x[i];\n x[i] = x[minIndex];\n x[minIndex] = temp;\n }\n \n public void replaceFirst(int oldVal, int newVal)\n {\n \n }\n}", "private Node select(Node x, int k) {\n if (x == null) return null;\n int t = size(x.left);\n if (t > k) return select(x.left, k);\n else if (t < k) return select(x.right, k - t - 1);\n else return x;\n }", "public static void selectionSort(int[] a) \n {\n for (int i = 0; i < a.length; i++) \n {\n int minPos = minimumPosition(a, i);\n swap(a, minPos, i);\n }\n }", "@Override\n protected int selectNextClusterIndex(\n final double[] minDistances,\n final boolean[] selected)\n {\n double maxMinDistance = Double.MAX_VALUE;\n int maxIndex = 0;\n\n final int elementCount = minDistances.length;\n for (int i = 0; i < elementCount; i++)\n {\n if (selected[i])\n {\n // Skip clusters we've already selected.\n continue;\n }\n\n // Get the current minimum distance for the element.\n double minDistance = minDistances[i];\n\n if (maxIndex == 0 || minDistance > maxMinDistance)\n {\n // This is the minium seen so far, so keep track of\n // it.\n maxIndex = i;\n maxMinDistance = minDistance;\n }\n }\n\n if (maxMinDistance <= 0.0)\n {\n // There are not enough points to prevent selecting two\n // that are on top of each other.\n return -1;\n }\n else\n {\n return maxIndex;\n }\n }", "private int find(int p){\n while(p!=id[p]){\n p=id[p];\n eachDoUnionArrayAccessTimes+=2; //遍历读取某个元素算一次,设置值也算一次,所以加2次\n }\n eachDoUnionArrayAccessTimes++; //查询p的时候依然会读取一次\n return p;\n }", "private int PASSSelection(HashMap<Integer, Integer> T, HashMap<Integer, Integer> colours, ColEdge[] edge){\r\n\t\tHashMap<Integer, Integer> bestBoiStorage = new HashMap<>();\r\n\t\tHashMap<Integer, Integer> bestBoiFinder = new HashMap<>();\r\n\t\tfor(int s = 0; s < T.size(); s++){\r\n\t\t\tint coloursPos = 0;\r\n\t\t\tVs = T.get(s);\r\n\t\t\tfor(int i = 1; i < T.size(); i++){\r\n\t\t\t\tif(i != s){\r\n\t\t\t\t\tVi = T.get(i);\r\n\t\t\t\t\tcoloursPos += same(edge, colours, Vs, Vi);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbestBoiStorage.put(s, Vs);\r\n\t\t\tbestBoiFinder.put(s, coloursPos);\r\n\t\t}\r\n\t\tint mostColPos = 0;\r\n\t\tint mostColKey = 0;\r\n\t\tfor(int b = 0; b < bestBoiFinder.size(); b++){\r\n\t\t\tif(mostColPos == 0 || bestBoiFinder.get(b).compareTo(mostColPos) > 0){\r\n\t\t\t\tmostColPos = bestBoiFinder.get(b);\r\n\t\t\t\tmostColKey = b;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn bestBoiStorage.get(mostColKey);\r\n\t}", "private void selectionSort(T[] arr) {\n for (int i = 0; i < n; i++) {\n int min = i; // the index of the minimal element is set to i by default\n for (int j = i + 1; j < n; j++) {\n if (arr[j].compareTo(arr[min]) < 0)\n min = j;\n }\n swap(arr, i, min);\n }\n }", "public static void Selectionsort(int a[]) { \n\t int n = a.length; \n\t for (int i = 0; i < n-1; i++) \n\t { \n\t int min_idx = i; \n\t for (int j = i+1; j < n; j++) \n\t if (a[j] < a[min_idx]) \n\t min_idx = j; \n\t \n\t int temp = a[min_idx]; \n\t a[min_idx] = a[i]; \n\t a[i] = temp; \n\t } \n\t }", "long select(int n, int m, long mod) {\n long[][] dp = new long[n + 1][m + 1];\n for (int i = 1; i <= n; ++i) {\n dp[i][0] = 1;\n if (i <= m) {\n dp[i][i] = 1;\n }\n for (int j = 1; j < i && j <= m; ++j) {\n dp[i][j] = (dp[i - 1][j] + dp[i - 1][j - 1]) % mod;\n }\n }\n return dp[n][m];\n }", "int findCandidate(int a[], int size) {\n int maj_index = 0, count = 1;\n int i;\n for (i = 1; i < size; i++) {\n if (a[maj_index] == a[i])\n count++;\n else\n count--;\n\n if (count == 0) {\n maj_index = i;\n count = 1;\n }\n }\n return a[maj_index];\n }", "public static void selectionSort(int[] a) {\r\n int temp; // catalyst variable for Integer swapping\r\n int spot; //location in array where minimum will be inserted\r\n int minimum; //location of minimum value in remainder\r\n\r\n for (spot = 0; spot < a.length - 1; spot++) {\r\n minimum = spot; //\r\n for (int i = spot + 1; i < a.length; i++) {\r\n if (a[i] < a[minimum]) {\r\n minimum = i; //if i is less than minimum, i is new minimum\r\n }\r\n }//end for i\r\n\r\n //swap a[spot] and a[minimum]\r\n temp = a[minimum];\r\n a[minimum] = a[spot];\r\n a[spot] = temp;\r\n }//end for spot\r\n }", "int[] getSelection();", "public static InstanceSelection select ( Instances data, int items[] ) {\n\t\t/*Instances data2 = new Instances ( data, 0 );\n\t\tInstances data3 = new Instances(data,0);\n\t\tInstances[] result = {data3, data2};*/\n\t\tInstanceSelection result = new InstanceSelection(data);\n\t\t\n\t\tboolean isCovered = false;\n\t\t\n\t\tfor ( int i = 0; i < data.numInstances (); ++i ) {\n\t\t\tisCovered = false;\n\t\t\tfor ( int j = 0; j < items.length; ++j ) {\n\t\t\t\tif ( data.instance ( i ).value ( items[j] ) == 0 ) {\n\t\t\t\t\tisCovered = false;\n\t\t\t\t\t// one item is missing, add immediately\n\t\t\t\t\t//result.add ( data.instance ( i ) );\n\t\t\t\t\tresult.addNotSelected(data.instance(i));\n\t\t\t\t\tresult.addIndicesNotSelected(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\tisCovered = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (isCovered) {\n\t\t\t\t//data3.add(data.instance(i));\n\t\t\t\tresult.addSelected(data.instance(i));\n\t\t\t\tresult.addIndicesSelected(i);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "protected Pair<TreeNodeConcurrent,IGrammarElement> select( IndividualTreeConcurrent a ) {\n\t\tTreeNodeConcurrent fromA = a.random( e -> e.getElement() instanceof NonTerminalElement );\n\t\t\n\t\t//Get the number of siblings this node has\n\t\tint ruleMembersNumber = a.getChildren( fromA.getParent() ).size();\n\t\t\n\t\t//Get the position within its siblings this node has\t\n\t\tfinal int position = fromA.getPosition();\n\n\t\t\n\t\t//Remove rules with less elements than ruleAux\n/*\t\tList<Rule> rules = ( (NonTerminalElement)fromA.getParent().getElement() ).getRuleSet();\n\t\tList<Rule> rulesFiltered = rules.stream().filter( r -> r.size() == ruleMembersNumber ).collect( Collectors.toList() );//Pick only those of same length\n\t\tList<Rule> rulesReduced = new ArrayList<>();\n\t\tfor ( Rule rl : rulesFiltered ){\n\t\t\tboolean valid = true;\n\t\t\tfor ( int i = 0; i < rl.size() && valid; i++ ){\n\t\t\t\tif ( i == position ){\n\t\t\t\t\tvalid = rl.get(i) == fromA.getElement();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( valid )\n\t\t\t\trulesReduced.add( rl );\n\t\t}*/\n\t\t\n\t\t//Remove rules with less elements than ruleAux\n\t\tList<Rule> rulesReduced = ( (NonTerminalElement)fromA.getParent().getElement() ).getRuleSet().stream() \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.filter( r -> r.size() == ruleMembersNumber ) //Pick only those of same length\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.filter( r -> r.get( position ) == fromA.getElement() ) // Pick only those whose position element is in the same position\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.collect( Collectors.toList() );\n\t\t\n\t\t//Get single elements from the remaining rules, in the position of the original node\n\t\tList<IGrammarElement> elements = rulesReduced.stream().map( r -> r.get( position ) ).collect( Collectors.toList() );\n\t\tIGrammarElement target = elements.get( RandomGenEnum.INSTANCE.getInt( elements.size() ) );\n\t\t\n\t\t//return data\n\t\treturn new Pair<TreeNodeConcurrent,IGrammarElement>( fromA, target );\n\t}", "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}", "public void candidateSelection(int n, int k, int m) //method that gives political selectors the amount of people (nodes) to go\n {\n Node forward; //node that represents the selector going clockwise \n Node backward; //node that represents the selector going counter-clockwise\n forward = Head; //clockwise selector starts at the first node\n backward = Tail; //counter-clockwise selector starts at the last node\n writer.println(\" \");\n writer.println(\"N = \" + n + \", \" + \"k = \" + k + \", \" + \"m = \" + m);\n writer.println(\" \");\n writer.println(\"Output\");\n writer.println(\"------\");\n if (m > n) //if so that the counter-clockwise selector doesn't waste time circling\n { \n m = m % n;\n }\n if (k > n) //if so that the clockwise selector doesn't waste time circling\n { \n k = k % n;\n }\n while (cand > 0) //as long as the candidates in the circle are > 0\n {\n for (int x = n - 1; x > (n - m); x--) //iterates until backward is on the person m away\n {\n backward = backward.getPrev();\n }\n for (int x = 1; x < k; x++) //iterates until forward is on the the person k away\n {\n forward = forward.getNext();\n }\n if (forward.getData() == backward.getData()) //if the selectors end\n { //on the same person\n writer.println(forward.getData()); //only print once, for\n delete(forward.getData()); //they are worthy\n backward = backward.getPrev(); //but still remove them\n forward = forward.getNext(); //from the circle and set\n } //the selectors on the next candidates\n else \n {\n writer.println(forward.getData() + \" \" + backward.getData());\n delete(backward.getData()); //if the selectors aren't on the\n delete(forward.getData()); //same candidate, remove both\n forward = forward.getNext(); //for they are not worthy,\n backward = backward.getPrev(); //then move the selectors to the\n if (cand == 2) //next candidates\n {\n backward = backward.getPrev(); //resloves an error that I was suffering\n } //with the last 2 lines of output\n }\n }\n }", "public static void selection(double[] list){\n \n double currentMin = 0;\n int currentMinIndex = 0;\n \n // searches overall array\n for(int i = 0; i < list.length - 1; i++){\n currentMin = list[i];\n currentMinIndex = i;\n \n // This is where the array will be sorted\n for(int j = i + 1; j < list.length; j++){\n // will comapre current numbers to next\n if(currentMin < list[j]){\n currentMin = list[j];\n currentMinIndex = j;\n }\n }\n \n // This is where the values are swaped\n if(currentMinIndex != i){\n list[currentMinIndex] = list[i];\n list[i] = currentMin;\n }\n } \n }", "private static int queryLazy(int[] segtree, int[] lazyValue, int l, int r, int ns, int ne, int index) {\n if(lazyValue[index]!=0){\n segtree[index]+=lazyValue[index];\n if(ns!=ne){\n lazyValue[2*index]+=lazyValue[index];\n lazyValue[2*index+1]+=lazyValue[index];\n }\n lazyValue[index]=0;\n }\n if(r<ns || l>ne){\n //no overlap\n return Integer.MAX_VALUE;\n }\n if(ns>=l && ne<=r){\n //complete overlap\n return segtree[index];\n }else{\n //partial overlap\n int mid=(ns+ne)/2;\n int leftAns=queryLazy(segtree, lazyValue, l, r, ns, mid, 2*index);\n int rightAns=queryLazy(segtree, lazyValue, l, r, mid+1, ne, 2*index+1);\n return Math.min(leftAns,rightAns);\n }\n }", "public abstract void select(boolean select);", "public void select(List<Object> objs, boolean selectionFlag) throws Exception;", "void visit(final Select select);", "public void findSubSeqWithGivenSum(int[] a, int n, int k, List<Integer> chosen) {\n\t\t// base case\n\t\t// Remaining sum == 0\n\t\tif (k == 0) {\n\t\t\tSystem.out.println(\"Combination found : \" + chosen);\n\t\t\treturn;\n\t\t}\n\n\t\t// if remaining elements == 0\n\t\tif (n == -1) {\n\t\t\tSystem.out.println(\"Hitting end\");\n\t\t\treturn;\n\t\t}\n\n\t\tList<Integer> withCurrent = new ArrayList<>();\n\t\twithCurrent.addAll(chosen);\n\t\twithCurrent.add(a[n]);\n\n\t\tList<Integer> withoutCurrent = new ArrayList<>();\n\t\twithoutCurrent.addAll(chosen);\n\n\t\t// If a[n] is chosen\n\t\tif (a[n] <= k)\n\t\t\tfindSubSeqWithGivenSum(a, n - 1, k - a[n], withCurrent);\n\n\t\tfindSubSeqWithGivenSum(a, n - 1, k, withoutCurrent);\n\n\t}", "public int[] selectionSort(int[] lista) {\r\n\t for (int i = 0; i < lista.length; i++) {\r\n\t int inicial = lista[i];\r\n\t int minId = i;\r\n\t for (int j = i+1; j < lista.length; j++) {\r\n\t if (lista[j] < inicial) {\r\n\t inicial = lista[j];\r\n\t minId = j;\r\n\t }\r\n\t }\r\n\t // swapping\r\n\t int cambiar = lista[i];\r\n\t lista[i] = inicial;\r\n\t lista[minId] = cambiar;\r\n\t }\r\n\t return lista;\r\n\t}", "public void selectionSort() {\n int nextMin;\n\n for (int i = 0; i < IntList.length - 1; i++) {\n nextMin = i;\n for (int j = i + 1; j < IntList.length; j++) {\n if (IntList[j] < IntList[nextMin])\n nextMin = j;\n }\n if (nextMin != i)\n swapSelection(IntList, i, nextMin);\n }\n }", "public static <T extends Comparable<? super T>> void selectionSort(List<T> list){\n int size = list.size();\n if(size > 1){\n for(int i = 0; i < size; i++){\n int lowestIndex = i;\n for(int j = i; j < size; j++){\n if(list.get(lowestIndex).compareTo(list.get(j)) > 0){\n lowestIndex = j;\n }\n }\n if(lowestIndex != i){\n swap(list, i, lowestIndex);\n }\n }\n }\n }", "public static int[] quickselect(int[] arr, int start, int end) {\n if(start < end) return new int[] {};\n int pivot = partition(arr, start ,end );\n //int mid = (0 + arr.length)/2;\n quickselect(arr, start, pivot);\n quickselect(arr, pivot + 1, end);\n return arr;\n }", "public void selectionSort()\r\n {\r\n for(int x = 0; x < numItems; x++)\r\n {\r\n int smallestLoc = x;\r\n for(int y = x+1; y<numItems; y++)\r\n {\r\n if(mArray[y]< mArray[smallestLoc])\r\n {\r\n smallestLoc = y;\r\n }\r\n }\r\n int temp = mArray[x];\r\n mArray[x] = mArray[smallestLoc];\r\n mArray[smallestLoc] = temp;\r\n }\r\n }", "private Node select(Node x, int k) {\n if (x == null) return null;\n int t = size(x.left);\n// TODO:根据size和rank的关系,进行定位,右子树需要用k-t-1,\n if (t > k) return select(x.left, k);\n else if (t < k) return select(x.right, k - t - 1);\n else return x;\n }", "Optional<Pairof<X, MultiSet<X>>> choose();", "public static void main(String[] args) {\n\t\t\n\t\tint k = 3;\n\t\t\n\t\tint max = Integer.MIN_VALUE, min = Integer.MAX_VALUE;\n\t\t\n\t\tint arr[] = new int[k];\n\t\t\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tif(max < arr[i])\n\t\t\t\tmax = arr[i];\n\t\t\tif(min > arr[i])\n\t\t\t\tmin = arr[i];\n\t\t}\n\t\t\n\t\t\n\t\tint [][] arr1 = {{3,8},{10,11},{1,3},{2,4}};\n\t\t\n\t\tSystem.out.println(selection(arr1));\n\t}", "public List<Integer> selectRangeWherePar(byte[][] selectCols, byte[] whereCol, long value1, long value2, ResultSet result){\n List<Integer> oidList = new ArrayList<Integer>();\n \n //assuming the where col is in type LONG\n boolean[] access = new boolean[keyForLong.length];\n int whereIndex = -1;\n \n for(int i = 0; i < keyForLong.length; i++){\n if(keyForLong[i].equals( new String(whereCol) + separator + \"LONG\" )) whereIndex = i;\n \n access[i] = false;\n for(int j = 0; j < selectCols.length; j++){\n if(keyForLong[i].equals( new String(selectCols[j]) + separator + \"LONG\" )){\n access[i] = true;\n break;\n }\n }\n }\n \n int numOfFields = keyForLong.length;\n for(int i = 0; i < numObject; i++){\n //first check if this object meet the where condition\n long value = longValues[i*numOfFields + whereIndex];\n if( (value >= value1) && (value <= value2)){\n //this object meets condition\n int oid=objectIds[i];\n oidList.add(oid);\n \n //select fields in the select clause\n for(int j = 0; j < access.length; j++){\n if(access[j]){\n String key = keyForLong[j];\n if(j == whereIndex){\n result.addLong(key, oid, value);\n continue;\n }\n long longnum = longValues[i*numOfFields + j];\n if(longnum != UNDEFINED)\n result.addLong(key, oid, longnum);\n }\n }\n }\n }\n \n if(oidList.size() > 0){\n //if this partition also has other data types, also select those based on oidList\n if(keyForString.length != 0)\n selectConditionString(oidList, selectCols, result);\n if(keyForDouble.length != 0)\n selectConditionDouble(oidList, selectCols, result);\n if(keyForBool.length != 0)\n selectConditionBool(oidList, selectCols, result);\n }\n return oidList;\n }", "public static <T extends Comparable<? super T>> \n\t\t\tvoid selectionSort (T [] array)\n {\t\n\t int startScan, index, minIndex;\n T minValue; \t// Note that T is now a type that can be used in\n \t\t\t\t// this method\n\n for (startScan = 0; startScan < (array.length-1); startScan++)\n {\n minIndex = startScan;\n minValue = array[startScan];\n for(index = startScan + 1; index < array.length; index++)\n {\n if (array[index].compareTo(minValue) < 0)\n {\n minValue = array[index];\n minIndex = index;\n }\n }\n array[minIndex] = array[startScan];\n array[startScan] = minValue;\n }\n \n }", "public static void selectionSort(int[] data){\n\n int sfIndex, lowestSF, store;\n sfIndex = 0;\n for (int i = 0; i < data.length; i++){\n lowestSF = data[i];\n for (int j = i; j < data.length; j++){\n if (data[j] < lowestSF){\n lowestSF = data[j];\n sfIndex = j;\n }\n }\n store = data[i];\n data[i] = lowestSF;\n data[sfIndex] = store;\n }\n }", "private static void helper (int[] candidates,\n\t\t\t\t\t\t int remainTarget,\n\t\t\t\t\t\t int startPos,\n\t\t\t\t\t\t ArrayList<Integer> subset,\n\t\t\t\t\t\t List<List<Integer>> results) {\n\t\t//2. Exit, Judge bound\n\t\t//if (remainTarget < 0)\treturn;\t\t\t\t\t\t//Better to put the judgement inside the for loop\n\t\tif (remainTarget == 0) {\n\t\t\tresults.add(new ArrayList<Integer>(subset));\n\t\t\treturn;\t\t\t\t\t\t\t\t\t\t\t//Forgot to return here!!!\n\t\t}\n\t\t\n\t\t//3.\n\t\tfor (int i = startPos; i < candidates.length; i++) {\n\t\t\tif (remainTarget < candidates[i]) {\t\t\t\t//Since the nums has already sorted in descending order\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsubset.add(candidates[i]);\n\t\t\thelper(candidates, remainTarget - candidates[i], i, subset, results);\n\t\t\tsubset.remove(subset.size() - 1);\n\t\t}\n\t}", "public java.util.List<Node> select(java.util.List<Node> tbs) {\n\t\tjava.util.List<Node> return_value = new ArrayList<Node>();\n\t\tfor(Node node : tbs) {\n\t\t\tif(!selected_nodes.contains(node)) {\n\t\t\t\tselected_nodes.add(node);\n\t\t\t\treturn_value.add(node);\n\t\t\t}\n\t\t}\n\t\treturn return_value;\n\t}", "public static int QuickSelect(int[] arr, int k){\n if(k > arr.length || k <= 0){\n\t\t\treturn -1;\n\t\t}\n\t\t\n\t\treturn QuickSelect(arr, 0, arr.length-1 , k);\n }", "public void testSelect_0()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n Gene gene = new IntegerGene(conf);\n gene.setAllele(new Integer(444));\n Chromosome secondBestChrom = new Chromosome(conf, gene, 3);\n secondBestChrom.setFitnessValue(11);\n selector.add(secondBestChrom);\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n selector.select(1, null, new Population(conf));\n }", "public UnionFind(int n) {}", "Range selectAssignment(IntervalSet availableRanges, IntervalSet neededRanges, long blockSize);", "static void selectionSort(int arr[]) {\n\t\tfor (int i = 0; i < arr.length - 1; i++) {\r\n\t\t\tfor (int j = i + 1; j < arr.length; j++) {\r\n\t\t\t\tif (arr[i] > arr[j]) {\r\n\t\t\t\t\tswap(arr, i, j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic int chooseNum(TreeSet<Integer> avail) {\n\t\tIterator<Integer> iter = avail.descendingIterator();\n\t\t\n\t\tint i = iter.next();\n\t\t\n\t\t//Find a number which we previous have not chosen yet\n\t\twhile(prevChosen.contains(i)){\n\t\t\ti = iter.next();\n\t\t}\n\t\t\n\t\t//Add our chosen number to the list of chosen numbers\n\t\tprevChosen.add(i);\n\t\t\n\t\t//Return the chosen number\n\t\treturn i;\n\t}", "public long selectWhere(byte[][] selectCols, byte[] whereCol, int threshold){\n\t\tlong sum = 0;\n\t\tlong longnum = 0;\n ByteBuffer [] selectBufs = new ByteBuffer [searchBufs.size()];\n int [] bounds = new int [searchBufs.size()];\n int [][] Fields = new int [searchBufs.size()][];\n int [] positions = new int [searchBufs.size()];\n \n\t\t//index starts at 1 because index=0 is for thr bytebuffer with where field\n int index = 1;\n int whereIndex = 0;\n for(String skey: searchBufs.keySet()){\n String[] keys = skey.split(\"\\\\s+\");\n\t\t\tint[] fields = new int[keys.length];\n\t\t\tboolean containSelect = false;\n\t\t\tboolean containWhere = false;\n\t\t\tfor(int i = 0; i < keys.length; i++){\n fields[i] = 0;\n String columnKey = keys[i];\n\t\t\t\tif(Arrays.equals(columnKey.getBytes(), whereCol)==true){\n\t\t\t\t\tfields[i] = 2;\n whereIndex = 0;\n\t\t\t\t\tcontainWhere = true;\n\t\t\t\t}\n\t\t\t\tfor(int j = 0; j < selectCols.length; j++){\n\t\t\t\t\tif(Arrays.equals(columnKey.getBytes(), selectCols[j])==true){\n\t\t\t\t\t\tfields[i] = 1;\n\t\t\t\t\t\tcontainSelect = true;\n\t\t\t\t\t}\n\t\t\t\t}\n }\n\t\t\tByteBuffer sbuf = searchBufs.get(skey);\n\t\t\tByteBuffer rbuf = sbuf.asReadOnlyBuffer();\n\t\t\trbuf.position(0);\n if(containWhere == true){\n // this bytebuffer contains the where field\n bounds[0] = sbuf.position();\n selectBufs[0] = rbuf;\n positions[0] = 0;\n\t\t\t\tFields[0] = fields;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(containSelect==true){\n\t\t\t\t//this bytebuffer contains select fields\n bounds[index] = sbuf.position();\n selectBufs[index] = rbuf;\n positions[index] = 0;\n\t\t\t\tFields[index] = fields;\n index += 1;\n\t\t\t}\n }\n \n\t\tif(selectBufs[0] == null){\n\t\t\tSystem.out.println(\"Didn't find buffer that contains the where field\");\n\t\t\treturn -1;\n\t\t}\n ByteBuffer readBuf = selectBufs[0];\n\t\tint wbound = bounds[0];\n\t\tint wposition = positions[0];\n\t\tint[] wfields = Fields[0];\n int rowSkipped = 0;\n\n //we only need to scan one bytebuffer, which include everything we need\n\t\tif(index <= 1){\n while(readBuf.position()<wbound){\n wposition += 4; //skip the objid\n //skip to the wherefield\n readBuf.position(wposition+whereIndex*8);\n longnum = readBuf.getLong();\n if(longnum >= threshold){\n wposition += 8*(wfields.length - whereIndex);\n continue;\n }\n \n for(int i = 0; i < wfields.length; i++){\n if(wfields[i] == 1){\n readBuf.position(wposition);\n longnum = readBuf.getLong();\n sum += longnum;\n }\n wposition += 8;\n }\n }\n\t\t}\n else{\n\t\t\twhile(readBuf.position()<wbound){\n \twposition += 4; //skip the objid\n \t//skip to the wherefield\n\t readBuf.position(wposition+whereIndex*8);\n \t longnum = readBuf.getLong();\n if(longnum >= threshold){\n wposition += 8*(wfields.length - whereIndex);\n rowSkipped++;\n continue;\n }\n //readBuf.position(wposition);\n for(int i = 0; i < wfields.length; i++){\n if(wfields[i] == 1){\n readBuf.position(wposition);\n longnum = readBuf.getLong();\n sum += longnum;\n }\n wposition += 8;\n }\n //go through other bytebuffer\n for(int i = 1; i < index; i++){\n positions[i] += ((4 + 8*Fields[i].length)*rowSkipped + 4);\n for(int j = 0; j < Fields[i].length; j++){\n if(Fields[i][j] == 1){\n selectBufs[i].position(positions[i]);\n longnum = selectBufs[i].getLong();\n sum += longnum;\n }\n positions[i] += 8;\n }\n }\n rowSkipped = 0;\n \t }\n }\n\t\treturn sum;\n\t}", "@Test\n\tpublic void peorCasoOrderAndSelectTest() {\n\t\tint longitud = 16;\n\t\tInteger[] conjunto = new Integer[longitud];\n\t\tfor (int i = 0; i < conjunto.length; i++)\n\t\t\tconjunto[i] = 1; \n\t\tint k = longitud - 1;\n\t\tassertEquals(new Integer(15), buscador.buscarEstadisticoDeOrdenK(conjunto, k));\n\t}", "public abstract void selectIndexRange(int min, int max);", "public static void selectionSort (int[] arr)\n {\n for (int x = 0; x < arr.length; x++)\n {\n //A variable is used to keep track of the index of the current minumum value\n int minimum = x; \n //The second loop is used to find the smallest element in the unsorted section of the array\n for (int y = x + 1; y < arr.length; y++)\n {\n if (arr[y] < arr[minimum])\n minimum = y;\n }\n //A temporary variable allows the minimum element and the element after the sorted sectino to be swapped\n int temp = arr [minimum];\n arr [minimum] = arr [x];\n arr [x] = temp;\n }\n }", "private Stack<Select> selectionPathAux(JoinPointClass current, String joinPointName,\n ArrayList<JoinPointClass> visitedList, Set<JoinPointClass> ignoreSet, SelectionPathV2 selPath) {\n\n Stack<Select> path = new Stack<>();\n\n if (ignoreSet.contains(current) || visitedList.contains(current)) {\n\n return path;\n }\n\n final Select selected = select(current, joinPointName);\n if (selected != null) {\n\n path.push(selected);\n return path;\n }\n\n visitedList.add(current);\n\n // System.out.println(\"SELECTS: \" + current.getSelects());\n for (final Select select : current.getSelects()) {\n final JoinPointClass next = getJoinPoint(select);\n Stack<Select> pathAux = selectionPathAux(next, joinPointName, visitedList, ignoreSet, selPath);\n if (!pathAux.isEmpty()) {\n pathAux.add(select);\n if (selPath.hasSecondaryPath()) {\n selPath.getSecondaryPath().get().add(select);\n }\n if (!path.isEmpty()) {\n if (!alreadyFound) {\n selPath.setSecondaryPath(pathAux);\n selPath.setTieBreakReason(\"use the first path found (from a depth first search)\");\n // System.out.println(\n // \"More than one path for inital join point '\" + joinPointName + \"'. Two of then are: \");\n // Function<Pair<String, String>, String> converted = p -> {\n // if (p.getLeft().equals(p.getRight())) {\n // return p.getLeft();\n // }\n // return \"(\" + p.getRight() + \" as \" + p.getLeft() + \")\";\n // };\n //\n // System.out.println(\"\\t1. \" + StringUtils.join(path, converted, \".\"));\n // System.out.println(\"\\t2. \" + StringUtils.join(pathAux, converted, \".\"));\n //\n // System.out.println(\"Select uses a depth first search. Will use 1.\");\n alreadyFound = true;\n }\n break;\n }\n path = pathAux;\n } else {\n ignoreSet.add(next);\n }\n }\n visitedList.remove(current);\n\n return path;\n }", "public static void main(String[] args) {\n int[] arr = new int[] {2,3,1,4,6};\n partition(arr, 0, arr.length - 1);\n for(int i : quickselect(arr, 0, arr.length - 1)) {\n System.out.print(i);\n }\n }", "public static void selectionSorter(int[] arr) {\n //run n-1 times where n is array length\n for(int i = 0; i < arr.length - 1; i++) {\n //find the minimum element in unsorted list\n //swap it with arr[i]\n int min = i;\n for(int j = i + 1; j < arr.length; j++) {\n if(arr[j] < arr[min]) {\n min = j;\n }\n }\n swap(arr,min,i);\n }\n }", "public void select(Object obj, boolean selectionFlag);", "public String select(int i) // find i's smallest key in the tree, using the recursion method select_rec\r\n {\r\n\t \tif (this.root==EXT_NODE||i>root.sizen||i<1) { // check if i is a valid number to select\r\n\t \t\treturn null;\r\n\t \t}\r\n\t \treturn select_rec(this.root, i-1);\r\n \r\n }", "public static void sortIntegersBySelect(int[] A) {\n\n for (int i = 0; i < A.length; i++) {\n int minIndex = i;\n for (int j = i; j < A.length; j++) {\n if (A[j] < A[minIndex]) {\n minIndex = j;\n }\n }\n // 选择排序的关键:找出最小值的那个下标,然后第一个数和它交换\n // 然后依次交换第二个,第三个。。。\n int temp = A[minIndex];\n A[minIndex] = A[i];\n A[i] = temp;\n }\n }", "void select(int index) throws InvalidValueException;", "Pair<String,LeafNode> chooseNode(T i){\n Set<Map.Entry<String, Identifier>> s= leafInfos.entrySet();\n Identifier page=null;\n LeafNode ln = null;\n for(Map.Entry<String,Identifier> p: s){\n TriangleShape t = triangleEncoder.parse(p.getKey());\n if(Geom2DSuits.contains(t,i.getLowerBound(),i.getUpperBound())){\n ln = readNode(p.getValue());\n return new Pair<String,LeafNode>(p.getKey(),ln);\n }\n\n// int r = test(t,(Interval)i);\n// if(r==0)\n// continue;\n// else{\n// page = p.getValue();\n// if(page.longValue()!=-1)\n// ln = readNode(page);\n// else{\n// ln = new LeafNode();\n// }\n// return new Pair<String,LeafNode>(p.getKey(),ln);\n// }\n }\n\n //2. there is no leaf node that contains i, scan the emptyNodes only when the insertion is running\n int k=0;\n for(String str: emptyNodes){\n TriangleShape t = triangleEncoder.parse(str);\n if(Geom2DSuits.contains(t,i.getLowerBound(),i.getUpperBound())){\n String sss = emptyNodes.remove(k);\n ln = new LeafNode();\n ln.triangle = t;\n return new Pair<String,LeafNode>(sss,ln);\n }\n ++k;\n }\n\n //3. error\n assert false;\n return new Pair<String,LeafNode>(null,null);\n }", "public static void selectionSort (int[] elts) {\r\n\t\tint minPosition;\r\n\t\tint length = elts.length;\r\n\t\tfor (int i = 0; i < length-1; i++) {\r\n\t\t\tminPosition = findMinPositionSegment (elts, i, length-i);\r\n\t\t\tif (minPosition != i)\r\n\t\t\t\tswap (elts, i, minPosition);\r\n\t\t}\r\n\t}", "public static void selectionSort (int[] elts) {\r\n\t\tint minPosition;\r\n\t\tint length = elts.length;\r\n\t\tfor (int i = 0; i < length-1; i++) {\r\n\t\t\tminPosition = findMinPositionSegment (elts, i, length-i);\r\n\t\t\tif (minPosition != i)\r\n\t\t\t\tswap (elts, i, minPosition);\r\n\t\t}\r\n\t}", "public static void selectionSort (int array[])\n {\n for (int i = 0; i < (array.length -1); i++)\n {\n for (int j = i + 1; j < (array.length); j++)\n {\n if(array[i] > array[j])\n //the new found smallest element is swapped\n swap(array, j, i);\n }\n }\n }", "boolean selectAll(double x, double y);", "public static int[] selectionSort(int[] array) {\n\n if(array.length== 0) {\n return new int[] {};\n }\n\n int[] arraySorted = new int[array.length];\n int[] arrayWaitToSorted = new int[array.length];\n\n\n\n int startIndex = 0;\n while ( startIndex < array.length ) {\n int swapMinIndex = startIndex;\n\n\n\n\n\n for (int j = startIndex+1; j < array.length ; j++) {\n\n\n if (array[j] < array[swapMinIndex] ) {\n swapMinIndex = j;\n }\n\n }\n\n int temp = array[swapMinIndex];\n array[swapMinIndex] = array[startIndex];\n array[startIndex] = temp;\n\n startIndex++;\n\n\n\n// int temp = array[swapMinIndex];\n// arraySorted[i] = array[swapMinIndex];\n// array[swapMinIndex]= array[i];\n }\n\n\n\n\n// return arraySorted;\n return array;\n }", "public static void selectionSort(int[] arr) {\r\n\t\tfor (int pos = 0; pos < arr.length - 1; pos++) {\r\n\t\t\tint minIdx = pos;\r\n\t\t\tfor (int scan = pos + 1; scan < arr.length; scan++)\r\n\t\t\t\tif (arr[scan] < arr[minIdx])\r\n\t\t\t\t\tminIdx = scan;\r\n\r\n\t\t\tif (pos != minIdx) {\r\n\t\t\t\tint temp = arr[pos];\r\n\t\t\t\tarr[pos] = arr[minIdx];\r\n\t\t\t\tarr[minIdx] = temp;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void selectionSort(int[] array) {\n int iOfTempMin;\n\n for (int i = 0; i < array.length - 1; i++) {\n iOfTempMin = i; // 1 - FIND INDEX OF MIN\n \n for (int index = i + 1; index < array.length; index++) {\n \n if (array[index] < array[iOfTempMin])\n iOfTempMin = index; \n }\n swap(array, i, iOfTempMin); // 2 - SWAP\n }\n }", "public static void selectionSort(int[] data, int i, int j){\n\t\tfor(int k = i; k <= j && k < data.length; k++){\n\t\t\tint minIndex = k;\n\t\t\tfor(int s = k + 1; s <= j && s < data.length; s++){\n\t\t\t\tif(data[minIndex] > data[s])\n\t\t\t\t\tminIndex = s;\n\t\t\t}\n\t\t\tif(minIndex != k){\n\t\t\t\tint tmp = data[k];\n\t\t\t\tdata[k] = data[minIndex];\n\t\t\t\tdata[minIndex] = tmp;\n\t\t\t}\n\t\t}\n\t}", "public static void selectionSort(int[] arr) {\n for (int firstUnordered = 0; firstUnordered < arr.length; firstUnordered++) {\n int smallestIndex = firstUnordered;\n for (int j = firstUnordered; j < arr.length; j++) {\n if (arr[j] < arr[smallestIndex]) {\n smallestIndex = j;\n }\n }\n int aux = arr[firstUnordered];\n arr[firstUnordered] = arr[smallestIndex];\n arr[smallestIndex] = aux;\n }\n }", "public static void selectionSort(int input[]) {\n\t\tfor(int i = 0;i<input.length-1;i++) {\n\t\t\tint min = input[i];\n\t\t\tint minindex = i;\n\t\t\tfor(int j = i+1 ;j<input.length;j++) {\n\t\t\t\tif(min > input[j] ) {\n\t\t\t\t\tmin = input[j];\n\t\t\t\t\tminindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(minindex!=i) {\n\t\t\tinput[minindex] = input[i];\n\t\t\t input[i]= min;\n\t\t\t}\n\t\t}\n\t}", "public void selectB() { }", "private void determineMenuSelection(String filePath) throws IOException {\n\t\tBufferedImage currentImage = Utils.readInImage(filePath);\n\t\tArrayList<Rectangle> boxes = model.getTemplateBoxes();\n\t\tArrayList<Rectangle> used = new ArrayList<>();\n\t\tdetermineInitSelections(boxes, used, currentImage);\n\t\tfor(int i = 7; i < boxes.size(); i++) { // Start at i = 2 for initial selections\n\t\t\t\n\t\t\tif(!used.contains(boxes.get(i))) {\n\t\t\t\tboolean a = searchBlackPixels(boxes.get(i), currentImage);\n\t\t\t\tboolean b = searchBlackPixels(boxes.get(i + 5), currentImage);\n\t\t\t\tif(a) {\n\t\t\t\t\tmodel.getSelections()[i] = 'A';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t} else if(b) {\n\t\t\t\t\tmodel.getSelections()[i] = 'B';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t} else {\n\t\t\t\t\tmodel.getSelections()[i] = 'A';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static int find(int i)\r\n{\n int ind = i;\r\n while (ind != ptrs[ind]) {\r\n ind = ptrs[ind];\r\n }\r\n // fix the link so that it is one hop only\r\n // note: this doesn't implement the full union-find update\r\n\r\n ptrs[i] = ind;\r\n\r\n return ind;\r\n}", "public static void selectionSort(int[] data){ \n for (int i = 0; i < data.length; i++) {\n\t int placeholder = 0;\n\t for( int j = i; j < data.length; j++) {\n\t if (data[j] < data[i]) {\n\t\t placeholder = data[i];\n\t\t data [i] = data[j];\n\t\t data[j] = placeholder;\n\t }\n\t }\n }\n }", "@Override\n public Component select(int x, int y) { \n\t m_selected = super.select(x, y);\n\t return m_selected;\n }", "protected final int internalFind(int paramInt)\n/* */ {\n/* 200 */ int i = computeSlot(paramInt);\n/* 201 */ while (this.m_flagTable[i] != false) {\n/* 202 */ if (paramInt == this.m_keyTable[i]) {\n/* 203 */ return i;\n/* */ }\n/* 205 */ i = stepSlot(i);\n/* */ }\n/* 207 */ return -i - 1;\n/* */ }", "private TupleList DirectSelect(String[] p){\n TupleList tpl = new TupleList();\n int attrnumber = Integer.parseInt(p[1]);\n String[] attrname = new String[attrnumber];\n int[] attrid = new int[attrnumber];\n String[] attrtype= new String[attrnumber];\n String classname = p[2+4*attrnumber];\n int classid = 0;\n for(int i = 0;i < attrnumber;i++){\n for (ClassTableItem item:classt.classTable) {\n if (item.classname.equals(classname) && item.attrname.equals(p[2+4*i])) {\n classid = item.classid;\n attrid[i] = item.attrid;\n attrtype[i] = item.attrtype;\n attrname[i] = p[5+4*i];\n //重命名\n\n break;\n }\n }\n }\n\n\n int sattrid = 0;\n String sattrtype = null;\n for (ClassTableItem item:classt.classTable) {\n if (item.classid == classid && item.attrname.equals(p[3+4*attrnumber])) {\n sattrid = item.attrid;\n sattrtype = item.attrtype;\n break;\n }\n }\n\n\n for(ObjectTableItem item : topt.objectTable){\n if(item.classid == classid){\n Tuple tuple = GetTuple(item.blockid,item.offset);\n if(Condition(sattrtype,tuple,sattrid,p[4*attrnumber+5])){\n //Switch\n\n for(int j = 0;j<attrnumber;j++){\n if(Integer.parseInt(p[3+4*j])==1){\n int value = Integer.parseInt(p[4+4*j]);\n int orivalue = Integer.parseInt((String)tuple.tuple[attrid[j]]);\n Object ob = value+orivalue;\n tuple.tuple[attrid[j]] = ob;\n }\n\n }\n\n\n\n tpl.addTuple(tuple);\n }\n }\n }\n for(int i =0;i<attrnumber;i++){\n attrid[i]=i;\n }\n PrintSelectResult(tpl,attrname,attrid,attrtype);\n return tpl;\n\n }", "private void helper(int[] S, int k, int p, ArrayList<ArrayList<Integer>> result, ArrayList<Integer> set) {\n if(k==0) {\n result.add(set);\n return;\n }\n if(S.length-p>=k) {\n ArrayList<Integer> newSet = new ArrayList<Integer>(set);\n newSet.add(S[p]);\n helper(S, k-1, p+1, result, newSet); //if S[p] be choosen\n helper(S, k, p+1, result, set); // if S[p] not be choosen\n }\n\n }", "public static double linSearchT(int s, Integer[] a){\n Random rand = new Random();\n int searchVar;\n Stopwatch timer = new Stopwatch();\n for (int i = 0; i < s; i++){\n searchVar = (int)(rand.nextDouble()*a.length);\n for (int j = 0; j < a.length; j++){\n if (a[j] == searchVar)\n break;\n }\n }\n return timer.elapsedTime(); // the method returns the elapsed time\n }" ]
[ "0.66711134", "0.6275944", "0.62719", "0.6156153", "0.60423833", "0.6008034", "0.59875", "0.5899465", "0.58815044", "0.58408886", "0.58292645", "0.5824368", "0.58138406", "0.57633", "0.5758464", "0.5733756", "0.57137436", "0.57033217", "0.5691135", "0.5680113", "0.5668527", "0.56626767", "0.5648858", "0.56399536", "0.5629414", "0.5621325", "0.56208456", "0.5593698", "0.5585226", "0.5577793", "0.5575267", "0.55723846", "0.55711293", "0.5570845", "0.55370647", "0.5519221", "0.5462087", "0.54533845", "0.54430604", "0.53981316", "0.5390999", "0.53742117", "0.5362421", "0.5341506", "0.53259957", "0.5325702", "0.53196096", "0.5316138", "0.5316092", "0.53041583", "0.52936107", "0.52907467", "0.5280431", "0.52786285", "0.5257973", "0.52565986", "0.52543986", "0.52449393", "0.5243963", "0.5238339", "0.52234995", "0.5221343", "0.52195996", "0.5216679", "0.5200529", "0.51990473", "0.51919687", "0.51861966", "0.5181063", "0.51763976", "0.5171416", "0.51646733", "0.51568145", "0.5153722", "0.5151041", "0.5148991", "0.5142362", "0.5133439", "0.5131787", "0.5126542", "0.51238835", "0.5117889", "0.5117889", "0.5117281", "0.5114379", "0.5105001", "0.5102082", "0.51008165", "0.5092977", "0.50910693", "0.50883436", "0.50854397", "0.5079264", "0.5071828", "0.507148", "0.50712395", "0.5057513", "0.5054853", "0.5042844", "0.5039152" ]
0.5638341
24
Implementation of select algorithm O(n)
private static int select (int[] arr, int p, int n, int k){ //threshold of 17 if(n < 17 ){ insertionSort(arr, p, p+n-1); return arr[p + n - k]; }else{ int q = randomizedPartition(arr,p,p+n-1); int left = q-p; int right = n - left - 1; if(right >= k) return select(arr,q+1,right,k); else if(right + 1 == k ) return arr[q]; else return select(arr,p,left,k-right-1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract int quickSelect(Integer[] map, int right, int idx);", "public K select(int k);", "private int quickSelect(int[] arr, int n, int low, int high){\n\n int index = partition(arr, low, high);\n\n if (index - low == n - 1)\n return arr[index];\n\n if (index - low > n - 1)\n return quickSelect(arr, n, low, index - 1);\n\n return quickSelect(arr, n - index + low- 1,index + 1, high);\n }", "public abstract TIntArrayList select(TIntArrayList input);", "public int Select(int[] A, int k, int l, int h){\n\tint low = l;\n\tint high = h-1;\n\tint pivot= A[l];\n\tint index = 0;\n\t//switches the two\n\tint first= A[l];\n\tint second= A[h];\n\tA[l]=second;\n\tA[h]=first;\n\twhile(low < high) {\n\t if (A[low] < pivot) {\n\t\tlow++;\n\t } else {\n\t\tint uno= A[low];\n\t\tA[low]= A[high];\n\t\tA[high]=uno;\t\n\t\thigh--;\n\t }\n\t}\n\tif (A[low] < pivot){\n\t A[h] = A[low + 1];\n\t index = low + 1;\n\t A[index] = pivot;\n\n\t}\n if (A[low] > pivot){\n\t A[h] = A[low];\n\t index = low;\n\t A[index] = pivot;\n\t}\n\t//rec\n\tif (low < k) {\n\t Select(A,k,index+1,h);\n\t}\n if (low > k) {\n\t Select(A,k,l,index-1);\n\t}\n\treturn A[k];\n }", "public int quickSelect(int[] a, int l, int h, int k){\n int pivot=a[h],pIndex=l;\n for(int i=l;i<h;i++){\n if(a[i]<=pivot){\n swap(a,i,pIndex);\n pIndex++;\n }\n }\n \n swap(a,pIndex,h);\n if(k==pIndex)return a[pIndex]);\n else if(k>pIndex){\n return quickSelect(a,l,pIndex-1,k);\n }else return quickSelect(a,pIndex+1,h,k); \n \n }", "public void select() {}", "public void select();", "static void selection(int arr[]){\n for (int i =0; i < arr.length -1 ; i++){\n for (int j = i +1; j < arr.length; j++){\n if (arr[j] < arr[i]){\n int temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }\n }\n }\n }", "public static void selectionSort(Comparable[] a) {\n int n = a.length;\n int im;\n for (int i = 0; i < n; i++) {\n im = i;\n for (int j = im; j < n; j++) {\n // Find the min\n if (less(a[j], a[im])) im = j;\n if (i != im) exch(a, i, im);\n }\n }\n }", "private static int QuickSelect(int[] arr, int lo, int hi, int k){\n if(hi <= lo) return arr[lo];\n\t\t\n\t\tint p = pickPivot(arr, lo, hi);\n\t\tint j = partition(arr, lo, hi, p);\n\t\t\n\t\tif(k <= j){\n\t\t\treturn QuickSelect(arr, lo, j-1, k);\n\t\t} else if (k == j+1){\n\t\t\treturn arr[j];\n\t\t} else {\n\t\t\treturn QuickSelect(arr, j+1, hi, k);\n\t\t}\n }", "@Override\n protected int quickSelect(Integer[] map, int right, int idx) {\n int left = 0;\n do {\n int i = left;\n int j = right;\n int x = map[i + ((j - i) >> 1)];\n do {\n while (i < map.length && this.compareKeys(x, map[i]) > 0)\n i++;\n\n while (j >= 0 && this.compareKeys(x, map[j]) < 0)\n j--;\n\n if (i > j)\n break;\n\n if (i < j) {\n int temp = map[i];\n map[i] = map[j];\n map[j] = temp;\n }\n\n i++;\n j--;\n } while (i <= j);\n\n if (i <= idx)\n left = i + 1;\n else\n right = j - 1;\n\n if (j - left <= right - i) {\n if (left < j)\n right = j;\n\n left = i;\n } else {\n if (i < right)\n left = i;\n\n right = j;\n }\n } while (left < right);\n\n return map[idx];\n }", "protected abstract void select();", "boolean selectAt(double x, double y);", "public int select(int[] nums, int left, int right) {\n\t\tif (left >= right) {\n\t\t\treturn left;\n\t\t}\n\t\t\n\t\tint pivot = nums[left];\n\t\tint p = left;\n\t\tfor (int i = left+1; i <= right; i++) {\n\t\t\tif (smaller(nums[i], pivot)) {\n\t\t\t\tp++;\n\t\t\t\tswap(nums, i, p);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tswap(nums, left, p);\n\t\t\n\t\treturn p;\n\t}", "public void select ();", "private Node select(Node x, int k) {\n\t if (x == null) return null; \n\t int t = size(x.left); \n\t if (t > k) return select(x.left, k); \n\t else if (t < k) return select(x.right, k-t-1); \n\t else return x; \n\t }", "int select(int arr[], int i) {\n\t\t// Your code here\n\t\tint index_of_max;\n\t\tindex_of_max = i;\n\t\t//linear search\n\t\tfor (int j = 0; j <= i; j++) {\n\t\t\tif (arr[j] > arr[index_of_max]) {\n\t\t\t\tindex_of_max = j;\n\t\t\t}\n\t\t}\n\t\treturn index_of_max;\n\t}", "public Integer selection(Integer startIndex, String selection) {\n int selectionIndex = 0;\n for (int i = 0; i < playList.length; i++) {\n\n if (playList[i].equals(selection) && (playList.length-i < startIndex+ i)) {\n selectionIndex += i;\n }\n }\n //if the startIndex comes BEFORE the selection index\n //ed- [startIndex....,... selectionIndex..]\n if (selectionIndex > startIndex) {\n //(left side count VS right side count)\n if (selectionIndex - startIndex < (startIndex + playList.length - selectionIndex)) {\n return selectionIndex - startIndex;\n }\n return startIndex + playList.length - selectionIndex;\n }\n //if the startIndex comes AFTER the selection index\n //ed- [selectionIndex....,... startIndex..]\n if (selectionIndex < startIndex) {\n //(left side count VS right side count)\n if (startIndex - selectionIndex < (selectionIndex + playList.length - startIndex)) {\n return selectionIndex + playList.length - startIndex;\n }\n return startIndex- selectionIndex;\n\n }\n return null;\n }", "private Node select(Node x, int k) {\n if (x == null) return null; \n int t = size(x.left); \n if (t > k) return select(x.left, k); \n else if (t < k) return select(x.right, k-t-1); \n else return x; \n }", "void select();", "private int quickSelect(int[] a, int low, int high,int k) {\n //using quick sort\n //put nums that are <= pivot to the left\n //put nums that are > pivot to the right\n int i = low, j = high, pivot = a[high];\n while(i < j) {\n if(a[i++] > pivot)\n swap(a, --i, --j);\n }\n swap(a, i, high);\n\n //count the nums that are <= pivot from low\n int m = i - low + 1;\n if(m == k)\n return i;\n //pivot is too big\n else if(m > k)\n return quickSelect(a, low, i-1, k);\n else\n return quickSelect(a, i+1, high, k - m);\n }", "static void selectionSort(int a[])\n {\n int n = a.length;\n for(int i = 0; i < n-1; i++)\n {\n for(int j = i + 1; j < n; j++)\n {\n if(a[i] > a[j])\n swap(a,i,j);\n }\n }\n }", "public static int select(int[] arr, int k){\n return select(arr, 0, arr.length, k);\n }", "private static int findKthSmallestElementUsingQuickSelect(int[] a, int low, int high, int k) {\n\n //CHECKS\n //In your original method check if array is null or empty\n //k is from 1 to n\n\n //If k is smaller than number of elements in array\n if (k > 0 && k <= a.length) {\n\n int pi = partition(a, low, high);\n\n if (pi == k - 1) {\n return a[pi];\n }\n if (pi > k - 1) {\n return findKthSmallestElementUsingQuickSelect(a, low, pi - 1, k);\n } else {\n return findKthSmallestElementUsingQuickSelect(a, pi + 1, high, k);\n }\n }\n return Integer.MAX_VALUE;\n }", "public static int quickSelectImpl(int k, CompareInt[] arr) {\n\t\tint select = Sorting.quickSelect(k, arr).val;\n\t\tquickSelectComparisons = CompareInt.countComparisons(arr, 0, arr.length - 1);\n\t\treturn select;\n\t}", "private static <AnyType extends Comparable<? super AnyType>> void quickSelect(AnyType[] a, int left, int right, int k)\n {\n if(left + CUTOFF <= right)\n {\n AnyType pivot = median3(a, left, right);\n\n // Begin partitioning\n int i = left, j = right - 1;\n for( ; ; )\n {\n while(a[++i].compareTo(pivot) < 0);\n while(a[--j].compareTo(pivot) > 0);\n if(i < j)\n CommonFunc.swapReference(a, i, j);\n else \n break;\n }\n\n CommonFunc.swapReference(a, i, right - 1);\n\n // if k = i + 1, the a[i] is the kth smallest item\n if(k <= i)\n quickSelect(a, left, i - 1, k);\n else if(k > i + 1)\n quickSelect(a, i + 1, right, k);\n }\n else // Do an insertion sort on the subarray\n Insertionsort.insertionsort(a, left, right);\n }", "boolean selectTo(double x, double y);", "public void selectionSort(int[] x)\n {\n for (int i = 0; i < x.length-1; i++) {\n int minIndex = i;\n for (int j = i+1; j < x.length; j++) {\n if (x[minIndex] > x[j]) {\n minIndex = j;\n }\n }\n int temp = x[i];\n x[i] = x[minIndex];\n x[minIndex] = temp;\n }\n \n public void replaceFirst(int oldVal, int newVal)\n {\n \n }\n}", "private Node select(Node x, int k) {\n if (x == null) return null;\n int t = size(x.left);\n if (t > k) return select(x.left, k);\n else if (t < k) return select(x.right, k - t - 1);\n else return x;\n }", "public static void selectionSort(int[] a) \n {\n for (int i = 0; i < a.length; i++) \n {\n int minPos = minimumPosition(a, i);\n swap(a, minPos, i);\n }\n }", "@Override\n protected int selectNextClusterIndex(\n final double[] minDistances,\n final boolean[] selected)\n {\n double maxMinDistance = Double.MAX_VALUE;\n int maxIndex = 0;\n\n final int elementCount = minDistances.length;\n for (int i = 0; i < elementCount; i++)\n {\n if (selected[i])\n {\n // Skip clusters we've already selected.\n continue;\n }\n\n // Get the current minimum distance for the element.\n double minDistance = minDistances[i];\n\n if (maxIndex == 0 || minDistance > maxMinDistance)\n {\n // This is the minium seen so far, so keep track of\n // it.\n maxIndex = i;\n maxMinDistance = minDistance;\n }\n }\n\n if (maxMinDistance <= 0.0)\n {\n // There are not enough points to prevent selecting two\n // that are on top of each other.\n return -1;\n }\n else\n {\n return maxIndex;\n }\n }", "private int PASSSelection(HashMap<Integer, Integer> T, HashMap<Integer, Integer> colours, ColEdge[] edge){\r\n\t\tHashMap<Integer, Integer> bestBoiStorage = new HashMap<>();\r\n\t\tHashMap<Integer, Integer> bestBoiFinder = new HashMap<>();\r\n\t\tfor(int s = 0; s < T.size(); s++){\r\n\t\t\tint coloursPos = 0;\r\n\t\t\tVs = T.get(s);\r\n\t\t\tfor(int i = 1; i < T.size(); i++){\r\n\t\t\t\tif(i != s){\r\n\t\t\t\t\tVi = T.get(i);\r\n\t\t\t\t\tcoloursPos += same(edge, colours, Vs, Vi);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbestBoiStorage.put(s, Vs);\r\n\t\t\tbestBoiFinder.put(s, coloursPos);\r\n\t\t}\r\n\t\tint mostColPos = 0;\r\n\t\tint mostColKey = 0;\r\n\t\tfor(int b = 0; b < bestBoiFinder.size(); b++){\r\n\t\t\tif(mostColPos == 0 || bestBoiFinder.get(b).compareTo(mostColPos) > 0){\r\n\t\t\t\tmostColPos = bestBoiFinder.get(b);\r\n\t\t\t\tmostColKey = b;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn bestBoiStorage.get(mostColKey);\r\n\t}", "private int find(int p){\n while(p!=id[p]){\n p=id[p];\n eachDoUnionArrayAccessTimes+=2; //遍历读取某个元素算一次,设置值也算一次,所以加2次\n }\n eachDoUnionArrayAccessTimes++; //查询p的时候依然会读取一次\n return p;\n }", "private void selectionSort(T[] arr) {\n for (int i = 0; i < n; i++) {\n int min = i; // the index of the minimal element is set to i by default\n for (int j = i + 1; j < n; j++) {\n if (arr[j].compareTo(arr[min]) < 0)\n min = j;\n }\n swap(arr, i, min);\n }\n }", "public static void Selectionsort(int a[]) { \n\t int n = a.length; \n\t for (int i = 0; i < n-1; i++) \n\t { \n\t int min_idx = i; \n\t for (int j = i+1; j < n; j++) \n\t if (a[j] < a[min_idx]) \n\t min_idx = j; \n\t \n\t int temp = a[min_idx]; \n\t a[min_idx] = a[i]; \n\t a[i] = temp; \n\t } \n\t }", "long select(int n, int m, long mod) {\n long[][] dp = new long[n + 1][m + 1];\n for (int i = 1; i <= n; ++i) {\n dp[i][0] = 1;\n if (i <= m) {\n dp[i][i] = 1;\n }\n for (int j = 1; j < i && j <= m; ++j) {\n dp[i][j] = (dp[i - 1][j] + dp[i - 1][j - 1]) % mod;\n }\n }\n return dp[n][m];\n }", "int findCandidate(int a[], int size) {\n int maj_index = 0, count = 1;\n int i;\n for (i = 1; i < size; i++) {\n if (a[maj_index] == a[i])\n count++;\n else\n count--;\n\n if (count == 0) {\n maj_index = i;\n count = 1;\n }\n }\n return a[maj_index];\n }", "public static void selectionSort(int[] a) {\r\n int temp; // catalyst variable for Integer swapping\r\n int spot; //location in array where minimum will be inserted\r\n int minimum; //location of minimum value in remainder\r\n\r\n for (spot = 0; spot < a.length - 1; spot++) {\r\n minimum = spot; //\r\n for (int i = spot + 1; i < a.length; i++) {\r\n if (a[i] < a[minimum]) {\r\n minimum = i; //if i is less than minimum, i is new minimum\r\n }\r\n }//end for i\r\n\r\n //swap a[spot] and a[minimum]\r\n temp = a[minimum];\r\n a[minimum] = a[spot];\r\n a[spot] = temp;\r\n }//end for spot\r\n }", "int[] getSelection();", "public static InstanceSelection select ( Instances data, int items[] ) {\n\t\t/*Instances data2 = new Instances ( data, 0 );\n\t\tInstances data3 = new Instances(data,0);\n\t\tInstances[] result = {data3, data2};*/\n\t\tInstanceSelection result = new InstanceSelection(data);\n\t\t\n\t\tboolean isCovered = false;\n\t\t\n\t\tfor ( int i = 0; i < data.numInstances (); ++i ) {\n\t\t\tisCovered = false;\n\t\t\tfor ( int j = 0; j < items.length; ++j ) {\n\t\t\t\tif ( data.instance ( i ).value ( items[j] ) == 0 ) {\n\t\t\t\t\tisCovered = false;\n\t\t\t\t\t// one item is missing, add immediately\n\t\t\t\t\t//result.add ( data.instance ( i ) );\n\t\t\t\t\tresult.addNotSelected(data.instance(i));\n\t\t\t\t\tresult.addIndicesNotSelected(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\tisCovered = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (isCovered) {\n\t\t\t\t//data3.add(data.instance(i));\n\t\t\t\tresult.addSelected(data.instance(i));\n\t\t\t\tresult.addIndicesSelected(i);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "protected Pair<TreeNodeConcurrent,IGrammarElement> select( IndividualTreeConcurrent a ) {\n\t\tTreeNodeConcurrent fromA = a.random( e -> e.getElement() instanceof NonTerminalElement );\n\t\t\n\t\t//Get the number of siblings this node has\n\t\tint ruleMembersNumber = a.getChildren( fromA.getParent() ).size();\n\t\t\n\t\t//Get the position within its siblings this node has\t\n\t\tfinal int position = fromA.getPosition();\n\n\t\t\n\t\t//Remove rules with less elements than ruleAux\n/*\t\tList<Rule> rules = ( (NonTerminalElement)fromA.getParent().getElement() ).getRuleSet();\n\t\tList<Rule> rulesFiltered = rules.stream().filter( r -> r.size() == ruleMembersNumber ).collect( Collectors.toList() );//Pick only those of same length\n\t\tList<Rule> rulesReduced = new ArrayList<>();\n\t\tfor ( Rule rl : rulesFiltered ){\n\t\t\tboolean valid = true;\n\t\t\tfor ( int i = 0; i < rl.size() && valid; i++ ){\n\t\t\t\tif ( i == position ){\n\t\t\t\t\tvalid = rl.get(i) == fromA.getElement();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( valid )\n\t\t\t\trulesReduced.add( rl );\n\t\t}*/\n\t\t\n\t\t//Remove rules with less elements than ruleAux\n\t\tList<Rule> rulesReduced = ( (NonTerminalElement)fromA.getParent().getElement() ).getRuleSet().stream() \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.filter( r -> r.size() == ruleMembersNumber ) //Pick only those of same length\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.filter( r -> r.get( position ) == fromA.getElement() ) // Pick only those whose position element is in the same position\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.collect( Collectors.toList() );\n\t\t\n\t\t//Get single elements from the remaining rules, in the position of the original node\n\t\tList<IGrammarElement> elements = rulesReduced.stream().map( r -> r.get( position ) ).collect( Collectors.toList() );\n\t\tIGrammarElement target = elements.get( RandomGenEnum.INSTANCE.getInt( elements.size() ) );\n\t\t\n\t\t//return data\n\t\treturn new Pair<TreeNodeConcurrent,IGrammarElement>( fromA, target );\n\t}", "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}", "public void candidateSelection(int n, int k, int m) //method that gives political selectors the amount of people (nodes) to go\n {\n Node forward; //node that represents the selector going clockwise \n Node backward; //node that represents the selector going counter-clockwise\n forward = Head; //clockwise selector starts at the first node\n backward = Tail; //counter-clockwise selector starts at the last node\n writer.println(\" \");\n writer.println(\"N = \" + n + \", \" + \"k = \" + k + \", \" + \"m = \" + m);\n writer.println(\" \");\n writer.println(\"Output\");\n writer.println(\"------\");\n if (m > n) //if so that the counter-clockwise selector doesn't waste time circling\n { \n m = m % n;\n }\n if (k > n) //if so that the clockwise selector doesn't waste time circling\n { \n k = k % n;\n }\n while (cand > 0) //as long as the candidates in the circle are > 0\n {\n for (int x = n - 1; x > (n - m); x--) //iterates until backward is on the person m away\n {\n backward = backward.getPrev();\n }\n for (int x = 1; x < k; x++) //iterates until forward is on the the person k away\n {\n forward = forward.getNext();\n }\n if (forward.getData() == backward.getData()) //if the selectors end\n { //on the same person\n writer.println(forward.getData()); //only print once, for\n delete(forward.getData()); //they are worthy\n backward = backward.getPrev(); //but still remove them\n forward = forward.getNext(); //from the circle and set\n } //the selectors on the next candidates\n else \n {\n writer.println(forward.getData() + \" \" + backward.getData());\n delete(backward.getData()); //if the selectors aren't on the\n delete(forward.getData()); //same candidate, remove both\n forward = forward.getNext(); //for they are not worthy,\n backward = backward.getPrev(); //then move the selectors to the\n if (cand == 2) //next candidates\n {\n backward = backward.getPrev(); //resloves an error that I was suffering\n } //with the last 2 lines of output\n }\n }\n }", "public static void selection(double[] list){\n \n double currentMin = 0;\n int currentMinIndex = 0;\n \n // searches overall array\n for(int i = 0; i < list.length - 1; i++){\n currentMin = list[i];\n currentMinIndex = i;\n \n // This is where the array will be sorted\n for(int j = i + 1; j < list.length; j++){\n // will comapre current numbers to next\n if(currentMin < list[j]){\n currentMin = list[j];\n currentMinIndex = j;\n }\n }\n \n // This is where the values are swaped\n if(currentMinIndex != i){\n list[currentMinIndex] = list[i];\n list[i] = currentMin;\n }\n } \n }", "private static int queryLazy(int[] segtree, int[] lazyValue, int l, int r, int ns, int ne, int index) {\n if(lazyValue[index]!=0){\n segtree[index]+=lazyValue[index];\n if(ns!=ne){\n lazyValue[2*index]+=lazyValue[index];\n lazyValue[2*index+1]+=lazyValue[index];\n }\n lazyValue[index]=0;\n }\n if(r<ns || l>ne){\n //no overlap\n return Integer.MAX_VALUE;\n }\n if(ns>=l && ne<=r){\n //complete overlap\n return segtree[index];\n }else{\n //partial overlap\n int mid=(ns+ne)/2;\n int leftAns=queryLazy(segtree, lazyValue, l, r, ns, mid, 2*index);\n int rightAns=queryLazy(segtree, lazyValue, l, r, mid+1, ne, 2*index+1);\n return Math.min(leftAns,rightAns);\n }\n }", "public abstract void select(boolean select);", "public void select(List<Object> objs, boolean selectionFlag) throws Exception;", "void visit(final Select select);", "public void findSubSeqWithGivenSum(int[] a, int n, int k, List<Integer> chosen) {\n\t\t// base case\n\t\t// Remaining sum == 0\n\t\tif (k == 0) {\n\t\t\tSystem.out.println(\"Combination found : \" + chosen);\n\t\t\treturn;\n\t\t}\n\n\t\t// if remaining elements == 0\n\t\tif (n == -1) {\n\t\t\tSystem.out.println(\"Hitting end\");\n\t\t\treturn;\n\t\t}\n\n\t\tList<Integer> withCurrent = new ArrayList<>();\n\t\twithCurrent.addAll(chosen);\n\t\twithCurrent.add(a[n]);\n\n\t\tList<Integer> withoutCurrent = new ArrayList<>();\n\t\twithoutCurrent.addAll(chosen);\n\n\t\t// If a[n] is chosen\n\t\tif (a[n] <= k)\n\t\t\tfindSubSeqWithGivenSum(a, n - 1, k - a[n], withCurrent);\n\n\t\tfindSubSeqWithGivenSum(a, n - 1, k, withoutCurrent);\n\n\t}", "public int[] selectionSort(int[] lista) {\r\n\t for (int i = 0; i < lista.length; i++) {\r\n\t int inicial = lista[i];\r\n\t int minId = i;\r\n\t for (int j = i+1; j < lista.length; j++) {\r\n\t if (lista[j] < inicial) {\r\n\t inicial = lista[j];\r\n\t minId = j;\r\n\t }\r\n\t }\r\n\t // swapping\r\n\t int cambiar = lista[i];\r\n\t lista[i] = inicial;\r\n\t lista[minId] = cambiar;\r\n\t }\r\n\t return lista;\r\n\t}", "public void selectionSort() {\n int nextMin;\n\n for (int i = 0; i < IntList.length - 1; i++) {\n nextMin = i;\n for (int j = i + 1; j < IntList.length; j++) {\n if (IntList[j] < IntList[nextMin])\n nextMin = j;\n }\n if (nextMin != i)\n swapSelection(IntList, i, nextMin);\n }\n }", "public static <T extends Comparable<? super T>> void selectionSort(List<T> list){\n int size = list.size();\n if(size > 1){\n for(int i = 0; i < size; i++){\n int lowestIndex = i;\n for(int j = i; j < size; j++){\n if(list.get(lowestIndex).compareTo(list.get(j)) > 0){\n lowestIndex = j;\n }\n }\n if(lowestIndex != i){\n swap(list, i, lowestIndex);\n }\n }\n }\n }", "public static int[] quickselect(int[] arr, int start, int end) {\n if(start < end) return new int[] {};\n int pivot = partition(arr, start ,end );\n //int mid = (0 + arr.length)/2;\n quickselect(arr, start, pivot);\n quickselect(arr, pivot + 1, end);\n return arr;\n }", "public void selectionSort()\r\n {\r\n for(int x = 0; x < numItems; x++)\r\n {\r\n int smallestLoc = x;\r\n for(int y = x+1; y<numItems; y++)\r\n {\r\n if(mArray[y]< mArray[smallestLoc])\r\n {\r\n smallestLoc = y;\r\n }\r\n }\r\n int temp = mArray[x];\r\n mArray[x] = mArray[smallestLoc];\r\n mArray[smallestLoc] = temp;\r\n }\r\n }", "private Node select(Node x, int k) {\n if (x == null) return null;\n int t = size(x.left);\n// TODO:根据size和rank的关系,进行定位,右子树需要用k-t-1,\n if (t > k) return select(x.left, k);\n else if (t < k) return select(x.right, k - t - 1);\n else return x;\n }", "Optional<Pairof<X, MultiSet<X>>> choose();", "public static void main(String[] args) {\n\t\t\n\t\tint k = 3;\n\t\t\n\t\tint max = Integer.MIN_VALUE, min = Integer.MAX_VALUE;\n\t\t\n\t\tint arr[] = new int[k];\n\t\t\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tif(max < arr[i])\n\t\t\t\tmax = arr[i];\n\t\t\tif(min > arr[i])\n\t\t\t\tmin = arr[i];\n\t\t}\n\t\t\n\t\t\n\t\tint [][] arr1 = {{3,8},{10,11},{1,3},{2,4}};\n\t\t\n\t\tSystem.out.println(selection(arr1));\n\t}", "public List<Integer> selectRangeWherePar(byte[][] selectCols, byte[] whereCol, long value1, long value2, ResultSet result){\n List<Integer> oidList = new ArrayList<Integer>();\n \n //assuming the where col is in type LONG\n boolean[] access = new boolean[keyForLong.length];\n int whereIndex = -1;\n \n for(int i = 0; i < keyForLong.length; i++){\n if(keyForLong[i].equals( new String(whereCol) + separator + \"LONG\" )) whereIndex = i;\n \n access[i] = false;\n for(int j = 0; j < selectCols.length; j++){\n if(keyForLong[i].equals( new String(selectCols[j]) + separator + \"LONG\" )){\n access[i] = true;\n break;\n }\n }\n }\n \n int numOfFields = keyForLong.length;\n for(int i = 0; i < numObject; i++){\n //first check if this object meet the where condition\n long value = longValues[i*numOfFields + whereIndex];\n if( (value >= value1) && (value <= value2)){\n //this object meets condition\n int oid=objectIds[i];\n oidList.add(oid);\n \n //select fields in the select clause\n for(int j = 0; j < access.length; j++){\n if(access[j]){\n String key = keyForLong[j];\n if(j == whereIndex){\n result.addLong(key, oid, value);\n continue;\n }\n long longnum = longValues[i*numOfFields + j];\n if(longnum != UNDEFINED)\n result.addLong(key, oid, longnum);\n }\n }\n }\n }\n \n if(oidList.size() > 0){\n //if this partition also has other data types, also select those based on oidList\n if(keyForString.length != 0)\n selectConditionString(oidList, selectCols, result);\n if(keyForDouble.length != 0)\n selectConditionDouble(oidList, selectCols, result);\n if(keyForBool.length != 0)\n selectConditionBool(oidList, selectCols, result);\n }\n return oidList;\n }", "public static <T extends Comparable<? super T>> \n\t\t\tvoid selectionSort (T [] array)\n {\t\n\t int startScan, index, minIndex;\n T minValue; \t// Note that T is now a type that can be used in\n \t\t\t\t// this method\n\n for (startScan = 0; startScan < (array.length-1); startScan++)\n {\n minIndex = startScan;\n minValue = array[startScan];\n for(index = startScan + 1; index < array.length; index++)\n {\n if (array[index].compareTo(minValue) < 0)\n {\n minValue = array[index];\n minIndex = index;\n }\n }\n array[minIndex] = array[startScan];\n array[startScan] = minValue;\n }\n \n }", "public static void selectionSort(int[] data){\n\n int sfIndex, lowestSF, store;\n sfIndex = 0;\n for (int i = 0; i < data.length; i++){\n lowestSF = data[i];\n for (int j = i; j < data.length; j++){\n if (data[j] < lowestSF){\n lowestSF = data[j];\n sfIndex = j;\n }\n }\n store = data[i];\n data[i] = lowestSF;\n data[sfIndex] = store;\n }\n }", "private static void helper (int[] candidates,\n\t\t\t\t\t\t int remainTarget,\n\t\t\t\t\t\t int startPos,\n\t\t\t\t\t\t ArrayList<Integer> subset,\n\t\t\t\t\t\t List<List<Integer>> results) {\n\t\t//2. Exit, Judge bound\n\t\t//if (remainTarget < 0)\treturn;\t\t\t\t\t\t//Better to put the judgement inside the for loop\n\t\tif (remainTarget == 0) {\n\t\t\tresults.add(new ArrayList<Integer>(subset));\n\t\t\treturn;\t\t\t\t\t\t\t\t\t\t\t//Forgot to return here!!!\n\t\t}\n\t\t\n\t\t//3.\n\t\tfor (int i = startPos; i < candidates.length; i++) {\n\t\t\tif (remainTarget < candidates[i]) {\t\t\t\t//Since the nums has already sorted in descending order\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsubset.add(candidates[i]);\n\t\t\thelper(candidates, remainTarget - candidates[i], i, subset, results);\n\t\t\tsubset.remove(subset.size() - 1);\n\t\t}\n\t}", "public java.util.List<Node> select(java.util.List<Node> tbs) {\n\t\tjava.util.List<Node> return_value = new ArrayList<Node>();\n\t\tfor(Node node : tbs) {\n\t\t\tif(!selected_nodes.contains(node)) {\n\t\t\t\tselected_nodes.add(node);\n\t\t\t\treturn_value.add(node);\n\t\t\t}\n\t\t}\n\t\treturn return_value;\n\t}", "public static int QuickSelect(int[] arr, int k){\n if(k > arr.length || k <= 0){\n\t\t\treturn -1;\n\t\t}\n\t\t\n\t\treturn QuickSelect(arr, 0, arr.length-1 , k);\n }", "public void testSelect_0()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n Gene gene = new IntegerGene(conf);\n gene.setAllele(new Integer(444));\n Chromosome secondBestChrom = new Chromosome(conf, gene, 3);\n secondBestChrom.setFitnessValue(11);\n selector.add(secondBestChrom);\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n selector.select(1, null, new Population(conf));\n }", "public UnionFind(int n) {}", "Range selectAssignment(IntervalSet availableRanges, IntervalSet neededRanges, long blockSize);", "static void selectionSort(int arr[]) {\n\t\tfor (int i = 0; i < arr.length - 1; i++) {\r\n\t\t\tfor (int j = i + 1; j < arr.length; j++) {\r\n\t\t\t\tif (arr[i] > arr[j]) {\r\n\t\t\t\t\tswap(arr, i, j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic int chooseNum(TreeSet<Integer> avail) {\n\t\tIterator<Integer> iter = avail.descendingIterator();\n\t\t\n\t\tint i = iter.next();\n\t\t\n\t\t//Find a number which we previous have not chosen yet\n\t\twhile(prevChosen.contains(i)){\n\t\t\ti = iter.next();\n\t\t}\n\t\t\n\t\t//Add our chosen number to the list of chosen numbers\n\t\tprevChosen.add(i);\n\t\t\n\t\t//Return the chosen number\n\t\treturn i;\n\t}", "public long selectWhere(byte[][] selectCols, byte[] whereCol, int threshold){\n\t\tlong sum = 0;\n\t\tlong longnum = 0;\n ByteBuffer [] selectBufs = new ByteBuffer [searchBufs.size()];\n int [] bounds = new int [searchBufs.size()];\n int [][] Fields = new int [searchBufs.size()][];\n int [] positions = new int [searchBufs.size()];\n \n\t\t//index starts at 1 because index=0 is for thr bytebuffer with where field\n int index = 1;\n int whereIndex = 0;\n for(String skey: searchBufs.keySet()){\n String[] keys = skey.split(\"\\\\s+\");\n\t\t\tint[] fields = new int[keys.length];\n\t\t\tboolean containSelect = false;\n\t\t\tboolean containWhere = false;\n\t\t\tfor(int i = 0; i < keys.length; i++){\n fields[i] = 0;\n String columnKey = keys[i];\n\t\t\t\tif(Arrays.equals(columnKey.getBytes(), whereCol)==true){\n\t\t\t\t\tfields[i] = 2;\n whereIndex = 0;\n\t\t\t\t\tcontainWhere = true;\n\t\t\t\t}\n\t\t\t\tfor(int j = 0; j < selectCols.length; j++){\n\t\t\t\t\tif(Arrays.equals(columnKey.getBytes(), selectCols[j])==true){\n\t\t\t\t\t\tfields[i] = 1;\n\t\t\t\t\t\tcontainSelect = true;\n\t\t\t\t\t}\n\t\t\t\t}\n }\n\t\t\tByteBuffer sbuf = searchBufs.get(skey);\n\t\t\tByteBuffer rbuf = sbuf.asReadOnlyBuffer();\n\t\t\trbuf.position(0);\n if(containWhere == true){\n // this bytebuffer contains the where field\n bounds[0] = sbuf.position();\n selectBufs[0] = rbuf;\n positions[0] = 0;\n\t\t\t\tFields[0] = fields;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(containSelect==true){\n\t\t\t\t//this bytebuffer contains select fields\n bounds[index] = sbuf.position();\n selectBufs[index] = rbuf;\n positions[index] = 0;\n\t\t\t\tFields[index] = fields;\n index += 1;\n\t\t\t}\n }\n \n\t\tif(selectBufs[0] == null){\n\t\t\tSystem.out.println(\"Didn't find buffer that contains the where field\");\n\t\t\treturn -1;\n\t\t}\n ByteBuffer readBuf = selectBufs[0];\n\t\tint wbound = bounds[0];\n\t\tint wposition = positions[0];\n\t\tint[] wfields = Fields[0];\n int rowSkipped = 0;\n\n //we only need to scan one bytebuffer, which include everything we need\n\t\tif(index <= 1){\n while(readBuf.position()<wbound){\n wposition += 4; //skip the objid\n //skip to the wherefield\n readBuf.position(wposition+whereIndex*8);\n longnum = readBuf.getLong();\n if(longnum >= threshold){\n wposition += 8*(wfields.length - whereIndex);\n continue;\n }\n \n for(int i = 0; i < wfields.length; i++){\n if(wfields[i] == 1){\n readBuf.position(wposition);\n longnum = readBuf.getLong();\n sum += longnum;\n }\n wposition += 8;\n }\n }\n\t\t}\n else{\n\t\t\twhile(readBuf.position()<wbound){\n \twposition += 4; //skip the objid\n \t//skip to the wherefield\n\t readBuf.position(wposition+whereIndex*8);\n \t longnum = readBuf.getLong();\n if(longnum >= threshold){\n wposition += 8*(wfields.length - whereIndex);\n rowSkipped++;\n continue;\n }\n //readBuf.position(wposition);\n for(int i = 0; i < wfields.length; i++){\n if(wfields[i] == 1){\n readBuf.position(wposition);\n longnum = readBuf.getLong();\n sum += longnum;\n }\n wposition += 8;\n }\n //go through other bytebuffer\n for(int i = 1; i < index; i++){\n positions[i] += ((4 + 8*Fields[i].length)*rowSkipped + 4);\n for(int j = 0; j < Fields[i].length; j++){\n if(Fields[i][j] == 1){\n selectBufs[i].position(positions[i]);\n longnum = selectBufs[i].getLong();\n sum += longnum;\n }\n positions[i] += 8;\n }\n }\n rowSkipped = 0;\n \t }\n }\n\t\treturn sum;\n\t}", "@Test\n\tpublic void peorCasoOrderAndSelectTest() {\n\t\tint longitud = 16;\n\t\tInteger[] conjunto = new Integer[longitud];\n\t\tfor (int i = 0; i < conjunto.length; i++)\n\t\t\tconjunto[i] = 1; \n\t\tint k = longitud - 1;\n\t\tassertEquals(new Integer(15), buscador.buscarEstadisticoDeOrdenK(conjunto, k));\n\t}", "public abstract void selectIndexRange(int min, int max);", "public static void selectionSort (int[] arr)\n {\n for (int x = 0; x < arr.length; x++)\n {\n //A variable is used to keep track of the index of the current minumum value\n int minimum = x; \n //The second loop is used to find the smallest element in the unsorted section of the array\n for (int y = x + 1; y < arr.length; y++)\n {\n if (arr[y] < arr[minimum])\n minimum = y;\n }\n //A temporary variable allows the minimum element and the element after the sorted sectino to be swapped\n int temp = arr [minimum];\n arr [minimum] = arr [x];\n arr [x] = temp;\n }\n }", "private Stack<Select> selectionPathAux(JoinPointClass current, String joinPointName,\n ArrayList<JoinPointClass> visitedList, Set<JoinPointClass> ignoreSet, SelectionPathV2 selPath) {\n\n Stack<Select> path = new Stack<>();\n\n if (ignoreSet.contains(current) || visitedList.contains(current)) {\n\n return path;\n }\n\n final Select selected = select(current, joinPointName);\n if (selected != null) {\n\n path.push(selected);\n return path;\n }\n\n visitedList.add(current);\n\n // System.out.println(\"SELECTS: \" + current.getSelects());\n for (final Select select : current.getSelects()) {\n final JoinPointClass next = getJoinPoint(select);\n Stack<Select> pathAux = selectionPathAux(next, joinPointName, visitedList, ignoreSet, selPath);\n if (!pathAux.isEmpty()) {\n pathAux.add(select);\n if (selPath.hasSecondaryPath()) {\n selPath.getSecondaryPath().get().add(select);\n }\n if (!path.isEmpty()) {\n if (!alreadyFound) {\n selPath.setSecondaryPath(pathAux);\n selPath.setTieBreakReason(\"use the first path found (from a depth first search)\");\n // System.out.println(\n // \"More than one path for inital join point '\" + joinPointName + \"'. Two of then are: \");\n // Function<Pair<String, String>, String> converted = p -> {\n // if (p.getLeft().equals(p.getRight())) {\n // return p.getLeft();\n // }\n // return \"(\" + p.getRight() + \" as \" + p.getLeft() + \")\";\n // };\n //\n // System.out.println(\"\\t1. \" + StringUtils.join(path, converted, \".\"));\n // System.out.println(\"\\t2. \" + StringUtils.join(pathAux, converted, \".\"));\n //\n // System.out.println(\"Select uses a depth first search. Will use 1.\");\n alreadyFound = true;\n }\n break;\n }\n path = pathAux;\n } else {\n ignoreSet.add(next);\n }\n }\n visitedList.remove(current);\n\n return path;\n }", "public static void main(String[] args) {\n int[] arr = new int[] {2,3,1,4,6};\n partition(arr, 0, arr.length - 1);\n for(int i : quickselect(arr, 0, arr.length - 1)) {\n System.out.print(i);\n }\n }", "public static void selectionSorter(int[] arr) {\n //run n-1 times where n is array length\n for(int i = 0; i < arr.length - 1; i++) {\n //find the minimum element in unsorted list\n //swap it with arr[i]\n int min = i;\n for(int j = i + 1; j < arr.length; j++) {\n if(arr[j] < arr[min]) {\n min = j;\n }\n }\n swap(arr,min,i);\n }\n }", "public void select(Object obj, boolean selectionFlag);", "public String select(int i) // find i's smallest key in the tree, using the recursion method select_rec\r\n {\r\n\t \tif (this.root==EXT_NODE||i>root.sizen||i<1) { // check if i is a valid number to select\r\n\t \t\treturn null;\r\n\t \t}\r\n\t \treturn select_rec(this.root, i-1);\r\n \r\n }", "public static void sortIntegersBySelect(int[] A) {\n\n for (int i = 0; i < A.length; i++) {\n int minIndex = i;\n for (int j = i; j < A.length; j++) {\n if (A[j] < A[minIndex]) {\n minIndex = j;\n }\n }\n // 选择排序的关键:找出最小值的那个下标,然后第一个数和它交换\n // 然后依次交换第二个,第三个。。。\n int temp = A[minIndex];\n A[minIndex] = A[i];\n A[i] = temp;\n }\n }", "void select(int index) throws InvalidValueException;", "Pair<String,LeafNode> chooseNode(T i){\n Set<Map.Entry<String, Identifier>> s= leafInfos.entrySet();\n Identifier page=null;\n LeafNode ln = null;\n for(Map.Entry<String,Identifier> p: s){\n TriangleShape t = triangleEncoder.parse(p.getKey());\n if(Geom2DSuits.contains(t,i.getLowerBound(),i.getUpperBound())){\n ln = readNode(p.getValue());\n return new Pair<String,LeafNode>(p.getKey(),ln);\n }\n\n// int r = test(t,(Interval)i);\n// if(r==0)\n// continue;\n// else{\n// page = p.getValue();\n// if(page.longValue()!=-1)\n// ln = readNode(page);\n// else{\n// ln = new LeafNode();\n// }\n// return new Pair<String,LeafNode>(p.getKey(),ln);\n// }\n }\n\n //2. there is no leaf node that contains i, scan the emptyNodes only when the insertion is running\n int k=0;\n for(String str: emptyNodes){\n TriangleShape t = triangleEncoder.parse(str);\n if(Geom2DSuits.contains(t,i.getLowerBound(),i.getUpperBound())){\n String sss = emptyNodes.remove(k);\n ln = new LeafNode();\n ln.triangle = t;\n return new Pair<String,LeafNode>(sss,ln);\n }\n ++k;\n }\n\n //3. error\n assert false;\n return new Pair<String,LeafNode>(null,null);\n }", "public static void selectionSort (int[] elts) {\r\n\t\tint minPosition;\r\n\t\tint length = elts.length;\r\n\t\tfor (int i = 0; i < length-1; i++) {\r\n\t\t\tminPosition = findMinPositionSegment (elts, i, length-i);\r\n\t\t\tif (minPosition != i)\r\n\t\t\t\tswap (elts, i, minPosition);\r\n\t\t}\r\n\t}", "public static void selectionSort (int[] elts) {\r\n\t\tint minPosition;\r\n\t\tint length = elts.length;\r\n\t\tfor (int i = 0; i < length-1; i++) {\r\n\t\t\tminPosition = findMinPositionSegment (elts, i, length-i);\r\n\t\t\tif (minPosition != i)\r\n\t\t\t\tswap (elts, i, minPosition);\r\n\t\t}\r\n\t}", "public static void selectionSort (int array[])\n {\n for (int i = 0; i < (array.length -1); i++)\n {\n for (int j = i + 1; j < (array.length); j++)\n {\n if(array[i] > array[j])\n //the new found smallest element is swapped\n swap(array, j, i);\n }\n }\n }", "boolean selectAll(double x, double y);", "public static int[] selectionSort(int[] array) {\n\n if(array.length== 0) {\n return new int[] {};\n }\n\n int[] arraySorted = new int[array.length];\n int[] arrayWaitToSorted = new int[array.length];\n\n\n\n int startIndex = 0;\n while ( startIndex < array.length ) {\n int swapMinIndex = startIndex;\n\n\n\n\n\n for (int j = startIndex+1; j < array.length ; j++) {\n\n\n if (array[j] < array[swapMinIndex] ) {\n swapMinIndex = j;\n }\n\n }\n\n int temp = array[swapMinIndex];\n array[swapMinIndex] = array[startIndex];\n array[startIndex] = temp;\n\n startIndex++;\n\n\n\n// int temp = array[swapMinIndex];\n// arraySorted[i] = array[swapMinIndex];\n// array[swapMinIndex]= array[i];\n }\n\n\n\n\n// return arraySorted;\n return array;\n }", "public static void selectionSort(int[] arr) {\r\n\t\tfor (int pos = 0; pos < arr.length - 1; pos++) {\r\n\t\t\tint minIdx = pos;\r\n\t\t\tfor (int scan = pos + 1; scan < arr.length; scan++)\r\n\t\t\t\tif (arr[scan] < arr[minIdx])\r\n\t\t\t\t\tminIdx = scan;\r\n\r\n\t\t\tif (pos != minIdx) {\r\n\t\t\t\tint temp = arr[pos];\r\n\t\t\t\tarr[pos] = arr[minIdx];\r\n\t\t\t\tarr[minIdx] = temp;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void selectionSort(int[] array) {\n int iOfTempMin;\n\n for (int i = 0; i < array.length - 1; i++) {\n iOfTempMin = i; // 1 - FIND INDEX OF MIN\n \n for (int index = i + 1; index < array.length; index++) {\n \n if (array[index] < array[iOfTempMin])\n iOfTempMin = index; \n }\n swap(array, i, iOfTempMin); // 2 - SWAP\n }\n }", "public static void selectionSort(int[] data, int i, int j){\n\t\tfor(int k = i; k <= j && k < data.length; k++){\n\t\t\tint minIndex = k;\n\t\t\tfor(int s = k + 1; s <= j && s < data.length; s++){\n\t\t\t\tif(data[minIndex] > data[s])\n\t\t\t\t\tminIndex = s;\n\t\t\t}\n\t\t\tif(minIndex != k){\n\t\t\t\tint tmp = data[k];\n\t\t\t\tdata[k] = data[minIndex];\n\t\t\t\tdata[minIndex] = tmp;\n\t\t\t}\n\t\t}\n\t}", "public static void selectionSort(int[] arr) {\n for (int firstUnordered = 0; firstUnordered < arr.length; firstUnordered++) {\n int smallestIndex = firstUnordered;\n for (int j = firstUnordered; j < arr.length; j++) {\n if (arr[j] < arr[smallestIndex]) {\n smallestIndex = j;\n }\n }\n int aux = arr[firstUnordered];\n arr[firstUnordered] = arr[smallestIndex];\n arr[smallestIndex] = aux;\n }\n }", "public static void selectionSort(int input[]) {\n\t\tfor(int i = 0;i<input.length-1;i++) {\n\t\t\tint min = input[i];\n\t\t\tint minindex = i;\n\t\t\tfor(int j = i+1 ;j<input.length;j++) {\n\t\t\t\tif(min > input[j] ) {\n\t\t\t\t\tmin = input[j];\n\t\t\t\t\tminindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(minindex!=i) {\n\t\t\tinput[minindex] = input[i];\n\t\t\t input[i]= min;\n\t\t\t}\n\t\t}\n\t}", "public void selectB() { }", "private void determineMenuSelection(String filePath) throws IOException {\n\t\tBufferedImage currentImage = Utils.readInImage(filePath);\n\t\tArrayList<Rectangle> boxes = model.getTemplateBoxes();\n\t\tArrayList<Rectangle> used = new ArrayList<>();\n\t\tdetermineInitSelections(boxes, used, currentImage);\n\t\tfor(int i = 7; i < boxes.size(); i++) { // Start at i = 2 for initial selections\n\t\t\t\n\t\t\tif(!used.contains(boxes.get(i))) {\n\t\t\t\tboolean a = searchBlackPixels(boxes.get(i), currentImage);\n\t\t\t\tboolean b = searchBlackPixels(boxes.get(i + 5), currentImage);\n\t\t\t\tif(a) {\n\t\t\t\t\tmodel.getSelections()[i] = 'A';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t} else if(b) {\n\t\t\t\t\tmodel.getSelections()[i] = 'B';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t} else {\n\t\t\t\t\tmodel.getSelections()[i] = 'A';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public Component select(int x, int y) { \n\t m_selected = super.select(x, y);\n\t return m_selected;\n }", "public static void selectionSort(int[] data){ \n for (int i = 0; i < data.length; i++) {\n\t int placeholder = 0;\n\t for( int j = i; j < data.length; j++) {\n\t if (data[j] < data[i]) {\n\t\t placeholder = data[i];\n\t\t data [i] = data[j];\n\t\t data[j] = placeholder;\n\t }\n\t }\n }\n }", "private static int find(int i)\r\n{\n int ind = i;\r\n while (ind != ptrs[ind]) {\r\n ind = ptrs[ind];\r\n }\r\n // fix the link so that it is one hop only\r\n // note: this doesn't implement the full union-find update\r\n\r\n ptrs[i] = ind;\r\n\r\n return ind;\r\n}", "protected final int internalFind(int paramInt)\n/* */ {\n/* 200 */ int i = computeSlot(paramInt);\n/* 201 */ while (this.m_flagTable[i] != false) {\n/* 202 */ if (paramInt == this.m_keyTable[i]) {\n/* 203 */ return i;\n/* */ }\n/* 205 */ i = stepSlot(i);\n/* */ }\n/* 207 */ return -i - 1;\n/* */ }", "private TupleList DirectSelect(String[] p){\n TupleList tpl = new TupleList();\n int attrnumber = Integer.parseInt(p[1]);\n String[] attrname = new String[attrnumber];\n int[] attrid = new int[attrnumber];\n String[] attrtype= new String[attrnumber];\n String classname = p[2+4*attrnumber];\n int classid = 0;\n for(int i = 0;i < attrnumber;i++){\n for (ClassTableItem item:classt.classTable) {\n if (item.classname.equals(classname) && item.attrname.equals(p[2+4*i])) {\n classid = item.classid;\n attrid[i] = item.attrid;\n attrtype[i] = item.attrtype;\n attrname[i] = p[5+4*i];\n //重命名\n\n break;\n }\n }\n }\n\n\n int sattrid = 0;\n String sattrtype = null;\n for (ClassTableItem item:classt.classTable) {\n if (item.classid == classid && item.attrname.equals(p[3+4*attrnumber])) {\n sattrid = item.attrid;\n sattrtype = item.attrtype;\n break;\n }\n }\n\n\n for(ObjectTableItem item : topt.objectTable){\n if(item.classid == classid){\n Tuple tuple = GetTuple(item.blockid,item.offset);\n if(Condition(sattrtype,tuple,sattrid,p[4*attrnumber+5])){\n //Switch\n\n for(int j = 0;j<attrnumber;j++){\n if(Integer.parseInt(p[3+4*j])==1){\n int value = Integer.parseInt(p[4+4*j]);\n int orivalue = Integer.parseInt((String)tuple.tuple[attrid[j]]);\n Object ob = value+orivalue;\n tuple.tuple[attrid[j]] = ob;\n }\n\n }\n\n\n\n tpl.addTuple(tuple);\n }\n }\n }\n for(int i =0;i<attrnumber;i++){\n attrid[i]=i;\n }\n PrintSelectResult(tpl,attrname,attrid,attrtype);\n return tpl;\n\n }", "private void helper(int[] S, int k, int p, ArrayList<ArrayList<Integer>> result, ArrayList<Integer> set) {\n if(k==0) {\n result.add(set);\n return;\n }\n if(S.length-p>=k) {\n ArrayList<Integer> newSet = new ArrayList<Integer>(set);\n newSet.add(S[p]);\n helper(S, k-1, p+1, result, newSet); //if S[p] be choosen\n helper(S, k, p+1, result, set); // if S[p] not be choosen\n }\n\n }", "public static double linSearchT(int s, Integer[] a){\n Random rand = new Random();\n int searchVar;\n Stopwatch timer = new Stopwatch();\n for (int i = 0; i < s; i++){\n searchVar = (int)(rand.nextDouble()*a.length);\n for (int j = 0; j < a.length; j++){\n if (a[j] == searchVar)\n break;\n }\n }\n return timer.elapsedTime(); // the method returns the elapsed time\n }" ]
[ "0.6671118", "0.62733746", "0.61556685", "0.604222", "0.6008506", "0.59879315", "0.5901497", "0.5883466", "0.58406687", "0.58293116", "0.5824464", "0.58134174", "0.57652617", "0.57610875", "0.5734189", "0.57156", "0.57038087", "0.56914365", "0.56809664", "0.5668936", "0.5664361", "0.5648457", "0.5639927", "0.5639594", "0.5628559", "0.56212515", "0.56204224", "0.5596451", "0.5584464", "0.557818", "0.5575124", "0.5573689", "0.557197", "0.557052", "0.5536848", "0.55190533", "0.5463374", "0.5453055", "0.54430175", "0.53994685", "0.53928435", "0.5374515", "0.53626454", "0.5341939", "0.5325787", "0.5324582", "0.5321599", "0.5317646", "0.53158796", "0.5301865", "0.52932507", "0.52907556", "0.52802706", "0.5278594", "0.5258562", "0.52567136", "0.52549684", "0.52455455", "0.5244012", "0.5239233", "0.52233475", "0.52210796", "0.52200925", "0.5216834", "0.5201637", "0.51975566", "0.5193191", "0.5186412", "0.5181282", "0.5176933", "0.5170916", "0.51654214", "0.5157234", "0.51541305", "0.51511127", "0.5148989", "0.5144354", "0.5133586", "0.51310134", "0.5128021", "0.51238066", "0.5118444", "0.5118444", "0.51179236", "0.5116267", "0.5104903", "0.51021683", "0.5101183", "0.50932014", "0.50913554", "0.5087872", "0.5086783", "0.50805706", "0.50741535", "0.50713605", "0.5070574", "0.5057498", "0.5056238", "0.50413543", "0.50387806" ]
0.6276236
1
Exchange the values at index i with j in the arr A
private static void exchange(int[] A, int i, int j) { if(A[i] == A[j]) return; A[i] = A[i] ^ A[j]; A[j] = A[i] ^ A[j]; A[i] = A[i] ^ A[j]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void exchange(int i, int j){\n\t\tString temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n\t}", "void exchange(Node[] arr, int i, int j) {\n\n\t\tNode temp = arr[i];\n\t\tarr[i] = arr[j];\n\t\tarr[j] = temp;\n\t}", "private void exchange(int i, int j){\n\t\tnode_data t = _a[i];\n\t\t_a[i] = _a[j];\n\t\t_a[j] = t;\n\t}", "private static void swap(int[] A, int i , int j){\r\n\t\tint temp = A[i];\r\n\t\tA[i] = A[j];\r\n\t\tA[j] = temp;\r\n\t}", "private static void swap(int[] arr, int i, int j) {\n arr[i] = arr[j]^arr[i]^(arr[j] = arr[i]);\n }", "private static <Key extends Comparable<Key>> void exch(Key[] a, int i, int j)\n\t{\n\t\tKey tmp = a[i];\n\t\ta[i] = a[j];\n\t\ta[j] = tmp;\n\t}", "private static void exch(String[] a, int i, int j) {\n String temp = a[i];\n a[i] = a[j];\n a[j] = temp;\n }", "private static void exch(String[] a, int i, int j) {\n String temp = a[i];\n a[i] = a[j];\n a[j] = temp;\n }", "private void exchange(int i, int j) {\n int temp = numbers[i];\n numbers[i] = numbers[j];\n numbers[j] = temp;\n \n }", "private static void exch(Object[] a, int i, int j) {\n Object swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }", "private static void exch(Object[] a, int i, int j) {\n Object swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }", "private static void exch(Object[] a, int i, int j) {\n Object swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }", "private static void swap(int[] A, int i, int j) {\n int temp = A[i];\n A[i] = A[j];\n A[j] = temp;\n }", "private static void exch(Object[] a, int i, int j) {\r\n Object swap = a[i];\r\n a[i] = a[j];\r\n a[j] = swap;\r\n }", "private static void exch(Comparable[] a, int i, int j) {\n Comparable swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }", "private static void exch(Alumno[] a, int i, int j) {\n\t Alumno swap = a[i];\n\t a[i] = a[j];\n\t a[j] = swap;\n\t }", "private static <Key extends Comparable<Key> > void exch(Key []a, int i, int j){\n Key tmp=a[i-1];\n a[i-1]=a[j-1];\n a[j-1]=tmp;\n }", "public static void swap(int[] arr,int i,int j){\n int temp=arr[i];\n arr[i]=arr[j];\n arr[j]=temp;\n }", "private void swap(int []a, int i, int j){\n\t\tint temp = a[i];\n\t\ta[i] = a[j];\n\t\ta[j] = temp;\n\t}", "static void swap(int[] A, int i, int j) {\n\t\tint temp = A[i];\n\t\tA[i] = A[j];\n\t\tA[j] = temp;\n\t}", "private void swap(int[] a, int i, int j) {\n int tmp = a[i];\n a[i] = a[j];\n a[j] = tmp;\n }", "private static void exchange( Comparable[] datos, int i, int j)\n\t{\n\t\t// TODO implementar\n\t\tComparable copia=datos[j];\n\t\tdatos[j]=datos[i];\n\t\tdatos[i]=copia; \n\t}", "private static void swap(int[] a, int i, int j) {\n int swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }", "protected static void exch(Comparable[] a, int i, int j) {\n\t\t\r\n\t\tComparable temp = a[i];\r\n\t\ta[i] = a[j];\r\n\t\ta[j] = temp;\r\n\t\t\r\n\t}", "public static void swap(int i, int j, int[] arr)\n {\n int temp=0;\n temp=arr[i];\n arr[i]=arr[j];\n arr[j]=temp;\n }", "@Override\n protected void swap(int i, int j)\n {\n E temp = this.elements[i];\n this.elements[i] = this.elements[j];\n \tthis.elementsToArrayIndex.put(elements[i], i);\n this.elements[j] = temp;\n \tthis.elementsToArrayIndex.put(elements[j], j);\n }", "public static void swap(int arr[], int i, int j){\n int tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n }", "public static void swap(int[] arr, int i, int j)\n {\n arr[i] = arr[i] ^ arr[j];\n arr[j] = arr[i] ^ arr[j];\n arr[i] = arr[i] ^ arr[j];\n }", "private void swap(int i, int j){\n \t\tint temp = a[i];\n \t\ta[i] = a[j];\n \t\ta[j] = temp;\n }", "private static void swap(int[] arr, int j) {\n\t\t\n\t\tint temp = arr[j];\n\t\tarr[j] = arr[j+1];\n\t\tarr[j+1] = temp;\n\t}", "private int[] swap(int[] a, int i, int j) {\n int tmp;\n tmp = a[i];\n a[i] = a[j];\n a[j] = tmp;\n return a;\n }", "private static void swap(int[] nums, int i, int j) {\n nums[i] += nums[j];\n nums[j] = nums[i] - nums[j];\n nums[i] = nums[i] - nums[j];\n }", "public static void swap(int[] A, int i, int j) {\n int temp = A[i];\n A[i] = A[j];\n A[j] = temp;\n }", "public static void swap(int arr[], int i, int j) {\n int tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n }", "public static void swap(int[] arr, int i, int j) {\r\n int temp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = temp;\r\n }", "public static void swap(Integer arr[], int i, int j)\n {\n int tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n }", "public static void intercambiar(int []Grado1, int ii, int jj){\nint aux=Grado1[ii];\nGrado1[ii]= Grado1[jj];\nGrado1[jj]=aux;\n}", "public static void swap(int[] arr, int i, int j) {\n System.out.println(\"Swapping index \" + j + \" and index \" + i);\n int temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }", "public void swap(int i, int j) {\n int temp = a[i];\n a[i] = a[j];\n a[j] = temp;\n }", "private void swap(int[] nums, int i, int j) {\n\t\tint tmp=nums[i];\n\t\tnums[i]=nums[j];\n\t\tnums[j]=tmp;\n\t}", "private void swap(int i, int j) {\n\t\tlong temp = a[i];\n\t\ta[i] = a[j];\n\t\ta[j] = temp;\n\t}", "private static <E> void swap(ArrayList<E> a, int i, int j) {\n\t\tE t = a.get(i);\n\t\ta.set(i, a.get(j));\n\t\ta.set(j, t);\n\t}", "private static <E> void swap(ArrayList<E> a, int i, int j) {\n\t\tE t = a.get(i);\n\t\ta.set(i, a.get(j));\n\t\ta.set(j, t);\n\t}", "public static void swap(int[] a, int i, int j)\n {\n int temp = a[i];\n a[i] = a[j];\n a[j] = temp;\n }", "public static void swapArr(int a[], int i, int j) {\n\t\tint temp = a[i];\n\t\ta[i] = a[j];\n\t\ta[j] = temp;\n\n\t}", "private static void swap(int[] array, int j, int i) {\r\n\t\tint temp = array[i];\r\n\t\tarray[i] = array[j];\r\n\t\tarray[j] = temp;\r\n\t}", "private void exchange(int i, int j) {\r\n\t\t//swap values\r\n\t\tint temp = mutualNum[i];\r\n\t\tmutualNum[i] = mutualNum[j];\r\n\t\tmutualNum[j] = temp;\r\n\t\t//swap the same friends\r\n\t\tString Stemp = potentialFriends[i];\r\n\t\tpotentialFriends[i] = potentialFriends[j];\r\n\t\tpotentialFriends[j] = Stemp;\r\n\t}", "private static void swap(int[] array, int i, int j) {\n\n int temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }", "private static <E extends Comparable<? super E>> void swap(\r\n\t\t\tComparable<E>[] data, int i, int j) {\r\n\t\tComparable<E> temp = data[i];\r\n\t\tdata[i] = data[j];\r\n\t\tdata[j] = temp;\r\n\t}", "public static void swap (int[] elts, int i, int j) {\r\n\t\tint temp = elts[i];\r\n\t\telts[i] = elts[j];\r\n\t\telts[j] = temp;\r\n\t}", "public static void swap (int[] elts, int i, int j) {\r\n\t\tint temp = elts[i];\r\n\t\telts[i] = elts[j];\r\n\t\telts[j] = temp;\r\n\t}", "private void swap(int[] nums, int i, int j) {\n int temp = nums[i];\n nums[i] = nums[j];\n nums[j] = temp;\n }", "private void swapAt(int i, int j) {\n\t\tfloat tmp = sequence[i];\n\t\tsequence[i] = sequence[j];\n\t\tsequence[j] = tmp;\n\t}", "static void swap(int[] array, int i, int j) {\n if (i >= 0 && j >= 0 && i < array.length && j < array.length) {\n int tmp = array[i];\n array[i] = array[j];\n array[j] = tmp;\n }\n }", "private static void swap(char[] arr,int i,int j){\n char temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }", "public static void swap2DArr(int a[][], int i, int j, int x, int y) {\n\t\tint temp = a[i][j];\n\t\ta[i][j] = a[x][y];\n\t\ta[x][y] = temp;\n\n\t}", "private static int[] ArraySwapper(int[] arr) {\n\t\tint size=Array.getLength(arr),temp;\n\t\tfor(int i=0;i<size/2;i++) {\n\t\t\ttemp =arr[i];\n\t\t\tarr[i]=arr[size-i-1];\n\t\t\tarr[size-i-1]=temp;\n\t\t}\n\t\treturn arr;\n\t\t\n\t}", "public static void swap(int[] arr, int i, int j) {\n System.out.println(\"Swapping \" + arr[i] + \" and \" + arr[j]);\n int temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }", "public static void swap(int[] input, int i, int j){\n\t\tint temp = input[i];\n\t\tinput[i] = input[j];\n\t\tinput[j] = temp;\n\t}", "public void swapAdjacentElements(int[] values)\n {\n // your work here\n\n\n\n\n }", "void swap(int[] array, int i, int j) {\n\t\tint t = array[i];\n\t\tarray[i] = array[j];\n\t\tarray[j] = t;\n\t}", "public void swap(int[] nums, int i, int j) {\n int temp = nums[i];\n nums[i] = nums[j];\n nums[j] = temp;\n }", "private void swap(int i, int j) {\n double[] temp = data[i];\n data[i] = data[j];\n data[j] = temp;\n }", "private void swap(int i, int j) {\n\t\tint tmp = data.get(i);\n\t\tdata.set(i, data.get(j));\n\t\tdata.set(j, tmp);\n\t}", "private static void swap(char[] arr, int i, int j) {\r\n\t\tchar c = arr[i];\r\n\t\tarr[i] = arr[j];\r\n\t\tarr[j] = c;\r\n\t}", "public static void swapPosts(int[][] view, int i, int j) {\n int[] temp = view[i];\n view[i] = view[j];\n view[j] = temp;\n }", "public static void swap(int[] array,int i, int j)\n {\n if( i==j)\n {\n return;\n }\n int temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }", "public static void swap(int[] array, int i, int j)\n {\n int temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }", "private void exch(int i, int j) {\n \tif (i < 0 || j< 0 || j >= length() || i >= length()) \n \t\tthrow new IllegalArgumentException();\n int swap = csa[i];\n csa[i] = csa[j];\n csa[j] = swap;\n }", "private void exchangeCards(int i, int j){\r\n\t Card temp = cards[i];\r\n\t cards[i] = cards[j];\r\n\t cards[j] = temp;\r\n\t}", "public void reverse(int[] nums, int i, int j) {\n while (i < j) {\n int temp = nums[i];\n nums[i] = nums[j];\n nums[j] = temp;\n j--;\n i++;\n }\n }", "private static void vecswap(double x[], int[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}", "private static void swap(int[] A, int a, int b){\n\t\tint temp = A[a];\n\t\tA[a] = A[b];\n\t\tA[b] = temp;\n\t}", "public static void swap(List<Integer> values, int i, int j) {\r\n int temp = values.get(i);\r\n values.set(i, values.get(j));\r\n values.set(j, temp);\r\n }", "private static void swap(Integer[] a, int x, int y) {\n\t\tInteger temp = a[x];\n\t\ta[x] = a[y];\n\t\ta[y] = temp;\n\t}", "private void switchElements(int a, int b) {\r\n\t\tE temp = c[a];\r\n\t\tc[a] = c[b];\r\n\t\tc[b] = temp;\r\n\t}", "private static void vecswap(int x[], int[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}", "@Given(\"I swap values in array\")\n public void iSwapValuesInArray() {\n int[] numrs = {5, 2, 9, 7, 3};\n System.out.println(\"I have an array:\");\n for (int numr : numrs) {\n System.out.print(numr + \" \");\n }\n System.out.println(\" \");\n System.out.println(\"I swap the values: \");\n int temp = numrs[2];\n numrs[2] = numrs[4];\n numrs[4] = temp;\n for (int numr : numrs) {\n System.out.print(numr + \" \");\n }\n }", "public static void swap(int[] array, int i, int j) {\n if (i == j) {\n return;\n }\n int temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }", "void swap(int index_1,int index_2){\n int temp=arr[index_1];\n arr[index_1]=arr[index_2];\n arr[index_2]=temp;\n }", "protected void exchange(int i, int j)\n {\n Key t = pq[i];\n pq[i] = pq[j];\n pq[j] = t;\n }", "private static void swap(char[] a, int i, int j) {\r\n\r\n\t\tchar c;\r\n\t\tc = a[i];\r\n\t\ta[i] = a[j];\r\n\t\ta[j] = c;\r\n\t}", "private static <T> void vecswap(int x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}", "private void swap(int[] nums, int i, int index) {\n if (i < nums.length && index < nums.length) {\n int temp = nums[i];\n nums[i] = nums[index];\n nums[index] = temp;\n }\n }", "private void setInArray(int i, int j, E element) {\r\n\t\tmElements.set(j*mRowCount+i, element);\r\n\t}", "public void swap(int i, int j) {\n double[] temp = data[i];\n data[i] = data[j];\n data[j] = temp;\n }", "private static void vecswap(double x[], double[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}", "private static <T,P> void vecswap(T x[], int[] a2,int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}", "private static <T> void vecswap(int x[], double[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}", "private static void swap(int[] arr, int a, int b) {\n int temp = arr[a];\n arr[a] = arr[b];\n arr[b] = temp;\n }", "private void swap( int i, int j )\n {\n\t\n\tString jStr = _fruits[j] ;\n\t_fruits[j] = _fruits[i];\n\t_fruits[i] = jStr;\n }", "public static void swap(int[] array, int i, int j) {\n if (array == null || array.length == 0){\n return;\n }\n int temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n\n }", "private static void swap(int[] arry , int a,int b) {\n int temp = arry[a];\n arry[a]=arry[b];\n arry[b]=temp;\n }", "public static void swap(int[]array, int i, int j) {\n\t\t\n\t\tif(i==j) {\n\t\t\treturn;\n\t\t}\n\t\tint temp = array[i];\n\t\tarray[i] = array[j];\n\t\tarray[j] = temp;\n\t}", "@Override\n \tpublic void swap(int i, int j) {\n \t\tint t=data[i];\n \t\tdata[i]=data[j];\n \t\tdata[j]=t;\n \t}", "@SuppressWarnings(\"unchecked\")\r\n\tprivate static <T> void swap(Comparable<T>[] array, int j, int i) {\r\n\t\tT temp = ((T) array[i]);\r\n\t\tarray[i] = array[j];\r\n\t\tarray[j] = (Comparable<T>) temp;\r\n\t}", "private static void swap(int fi, int si, int d)\r\n\t{\r\n\t int i, temp;\r\n\t for(i = 0; i<d; i++) \r\n\t {\r\n\t temp = arr[fi + i];\r\n\t arr[fi + i] = arr[si + i];\r\n\t arr[si + i] = temp;\r\n\t } \r\n\t}", "private static void vecswap(int x[], int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a, b);\n\t}", "public static void reverseArray3(int[] X, int i, int j)\n {\n if (i >= j)\n {\n return;\n }\n else\n {\n int temp = X[i];\n X[i] = X[j];\n X[j] = temp;\n reverseArray3(X, i + 1, j - 1);\n }\n }", "private static void swap(int[] a, int x, int y) {\n\t\tint temp = a[x];\n\t\ta[x] = a[y];\n\t\ta[y] = temp;\n\t}" ]
[ "0.7442028", "0.73706174", "0.73273844", "0.7261353", "0.7202352", "0.72014767", "0.71756065", "0.71756065", "0.71728027", "0.7169585", "0.7169585", "0.7169585", "0.713922", "0.7112143", "0.70998555", "0.70807326", "0.70603055", "0.7038842", "0.7032808", "0.70308596", "0.70265585", "0.7014029", "0.70090264", "0.7007815", "0.698798", "0.6966612", "0.6963528", "0.6876899", "0.68756217", "0.6865231", "0.6859991", "0.68580925", "0.68565273", "0.6844845", "0.6835436", "0.68221253", "0.6803729", "0.67850876", "0.67696065", "0.67435753", "0.67229456", "0.67200327", "0.67200327", "0.67099243", "0.67092633", "0.66899234", "0.6681037", "0.6657235", "0.66479355", "0.663031", "0.663031", "0.66132814", "0.66017944", "0.6556517", "0.6545118", "0.6532783", "0.6509779", "0.65011823", "0.6494174", "0.6477617", "0.64404166", "0.6439012", "0.64222515", "0.6400708", "0.6353086", "0.6334849", "0.63209206", "0.6304388", "0.6291296", "0.6289024", "0.62629825", "0.62488633", "0.6235863", "0.62337965", "0.62314487", "0.6203616", "0.62023205", "0.619281", "0.6191999", "0.61892635", "0.618105", "0.6173036", "0.6166743", "0.6158038", "0.61568916", "0.6151581", "0.61342156", "0.6130023", "0.61195207", "0.6110891", "0.6096519", "0.609344", "0.6093289", "0.6075107", "0.60679096", "0.6053237", "0.6052985", "0.6043975", "0.6038605", "0.6021613" ]
0.7361377
2
Select using the priority queue
public static int selectUsingPQ(int[] arr, int k){ PriorityQueue<Integer> pq = new PriorityQueue<>(); int i; //add first k elements in the priority queue for(i=0; i<k ; i++){ pq.add(arr[i]); } while(i<arr.length){ if(arr[i] > pq.peek()){ pq.add(arr[i]); pq.remove(); } i++; } // the top of the heap will be the kth largest element return pq.peek(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\nPriorityQueue pq= new PriorityQueue(15);//,new MyComparator123());\r\nSystem.out.println(pq.peek());\r\n//System.out.println(pq.element());\r\n/*for(int i=1;i<=10;i++)\r\npq.offer(i);\r\nSystem.out.println(pq);\r\nSystem.out.println(pq.poll());\r\n\r\nSystem.out.println(pq);*/\r\npq.offer(\"A\");\r\npq.offer(\"C\");\r\npq.offer(\"B\");\r\npq.offer(\"Z\");\r\nfor(int i=0;i<pq.size();i++)\r\nSystem.out.println(pq.peek());\r\n\t}", "protected ThreadState pickNextThread() //Returns the ThreadState of the head of the PriorityQueue or null if the queue is empty\n\t\t{\n\t\t\tLib.assertTrue(Machine.interrupt().disabled());\n KThread thread = waitQueue.peek();\n if(thread == null)\n\t\t\t{\n return null;\n }\n else\n\t\t\t{\n return getThreadState(thread);\n }\n\t\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tQueue<Item> pq = new PriorityQueue<Item>();\r\n\t\t\r\n\t\tpq.add(new Item(154,\"java\"));\r\n\t\tpq.add(new Item(45,\"c++\"));\r\n\t\tpq.add(new Item(4,\"c\"));\r\n\t\tpq.add(new Item(154,\"javascript\"));\r\n\t\tpq.add(new Item(160,\"html\"));\r\n\t\t\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t}", "public T poll() {\n if (this.size > 0) {\n T min = (T) pq[0];\n pq[0] = pq[this.size - 1];\n size--;\n percolateDown(0);\n return min;\n } else {\n return null;\n }\n }", "public int peek()\r\n\t{\r\n\t\treturn (int) pq[lowestCurrentPriority].getHead();\r\n\t}", "public T poll() {\n if(size==0)\n return null;\n else {\n T temp= (T) pq[0];\n pq[0]=pq[size-1];\n size--;\n percolateDown(0);\n return temp;\n\n\n }\n }", "public static void main(String[] arg) {\n\t\tMyPriorityQueue pq = new MyPriorityQueue();\n\n\t\tpq.enqueue(2, \"apple\");\t// medium priority\n\t\tpq.enqueue(3, \"candy\");\t// low priority\n\t\tpq.enqueue(1, \"milk\");\t// high priority\n\t\tpq.enqueue(1, \"cheese\");// high priority\n\t\tpq.enqueue(2, \"banana\");// medium priority\n\t\tpq.peek();\n\t\tpq.dequeue();\t\t\t// ----> milk come out first although it was not the first one enter the queue!\n\t\tpq.peek();\n\t\tpq.enqueue(3, \"gum\");\t// low priority\n\t\tpq.dequeue();\t\t\t// ----> cheese come out next\n\t\tpq.peek();\n\t\tpq.enqueue(2, \"kiwi\");\t// low priority\n\t\tpq.dequeue();\t\t\t// apple come out after ALL high priority items had dequeued.\n\t\tpq.dequeue();\t\t\t// ----> banana\n\t\tpq.dequeue();\t\t\t// ----> kiwi\n\t\tpq.peek();\n\t\tpq.enqueue(1, \"fish\");\t// high priority\n\t\tpq.enqueue(2, \"apple\");\t// medium priority\n\t\tpq.peek();\n\t\tpq.dequeue();\t\t\t// ----> fish\n\t\tpq.dequeue();\t\t\t// ----> apple\n\t\tpq.dequeue();\t\t\t// ----> kiwi\n\t\tpq.dequeue();\t\t\t// ----> candy\n\t\tpq.peek();\n\t\tpq.enqueue(2, \"kiwi\");\t// medium priority\n\t\tpq.enqueue(1, \"cheese\");// high priority\n\t\tpq.peek();\n\t\n\t}", "public Task poll() \n\t{\n\t\tif(this.isEmpty())\n\t\t{\n\t\t\tSystem.out.println(\"Cannot remove from an empty list.\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tint parent = 1;\n\t\tint child = 2;\n\t\tTask newTask = heap[1];\n\t\tTask temp = heap[size--];\n\t\t\n\t\twhile(child <= size)\n\t\t{\n\t\t\tif(child < size && heap[child].getPriority() > heap[child + 1].getPriority())\n\t\t\t{\n\t\t\t\tchild++;\n\t\t\t}\n\t\t\tif(temp.getPriority() <= heap[child].getPriority())\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\theap[parent] = heap[child];\n\t\t\tparent = child;\n\t\t\tchild *= 2;\n\t\t\t\n\t\t}\n\t\t\n\t\theap[parent] = temp;\n\t\treturn newTask;\n\t}", "@Test\n public void randomLockstep() {\n PriorityBlockingQueue pbq = new PriorityBlockingQueue();\n PriorityQueue pq = new PriorityQueue();\n List<Consumer<Queue>> frobbers = List.of(\n q -> q.add(42),\n q -> assertTrue(q.offer(86)),\n q -> q.poll(),\n q -> q.peek(),\n q -> {\n Iterator it = q.iterator();\n if (it.hasNext()) {\n it.next();\n it.remove();\n }});\n for (int i = 0; i < 100; i++) {\n Consumer<Queue> frobber = frobbers.get(rnd.nextInt(frobbers.size()));\n frobber.accept(pq);\n frobber.accept(pbq);\n assertInvariants(pbq);\n assertInvariants(pq);\n assertTrue(Arrays.equals(pq.toArray(), pbq.toArray()));\n }\n }", "public T getElemPrio(int prio, int i);", "private void selectPriority(String priority) {\n delegationDefaultCreationScreen.priorityField.click();\n delegationDefaultCreationScreen.picker.sendKeys(priority);\n delegationDefaultCreationScreen.doneButton.click();\n }", "public int dequeue()\r\n\t{\r\n\t\tint dequeued = 0;\r\n\t\r\n\t\tif (empty())\r\n\t\t{\r\n\t\t\tdequeued = 0;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tdequeued = (int) pq[lowestCurrentPriority].getHead();\r\n\t\t\tcurrentSize--;\r\n\t\t\tif (currentSize > 0)\r\n\t\t\t{\r\n\t\t\t\twhile (pq[lowestCurrentPriority].isEmpty())\r\n\t\t\t\t\tlowestCurrentPriority++;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tlowestCurrentPriority = Integer.MAX_VALUE;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn dequeued;\r\n\t}", "void enqueue(int x, int p){\n for(int i=0;i<size;i++){\n if(values[i]==(-1)){\n values[i] = x;\n priorities[i] = p;\n break;\n }\n }\n }", "public static void main(String[] args) {\n ArrayList<String> list=new ArrayList<>();\n list.add(\"1\");\n list.add(\"2\");\n list.add(\"3\");\n list.add(\"4\");\n list.add(\"5\");\n list.remove(\"2\");\n PriorityBlockingQueue priorityBlockingQueue=new PriorityBlockingQueue(100, new Comparator() {\n @Override\n public int compare(Object o1, Object o2) {\n return 0;\n }\n });\n }", "PriorityQueue(boolean transferPriority) \n\t\t{\n\t\t\tthis.transferPriority = transferPriority;\n\t\t\twaitQueue = new java.util.PriorityQueue<KThread>(1, new comparePriority()); //Initialize the waitQueue to a java.util.PriorityQueue with a custom comparator defined below\n\t\t}", "int getPriority( int priority );", "public void select() {}", "public static void main(String[] args) {\n\t\t\n\t\tPriorityBlockingQueue<Integer> obj = new PriorityBlockingQueue<Integer>();\n\t\t\n\t\t/*for(int i=9;i<=99;i=i+9)\n\t\t{\n\t\t\tobj.offer(i);\n\t\t}\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tSystem.out.println(\"Removing First Element :\"+ obj.poll());\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tSystem.out.println(\"Removing First Element :\"+ obj.poll());\n\t\t\n\t\tSystem.out.println(obj);*/\n\t\t\n//\t\tfor (int i = 7; i <=84; i=i+7) {\n//\t\t\tobj.offer(i);\n//\t\t}\n\t\t\n\t\tobj.offer(5);\n\t\tobj.offer(2);\n\t\tobj.offer(13);\n\t\tobj.offer(7);\n\t\tobj.offer(12);\n\t\tobj.offer(3);\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tSystem.out.println(\"First Element :\"+obj.peek());\n\t\t\n\t\tSystem.out.println(\"Removed First Element :\"+obj.poll());\n\t\t\n\t\tSystem.out.println(\"Now First Element :\"+obj.peek());\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tSystem.out.println(\"Removed First Element :\"+obj.poll());\n\t\t\n\t\tSystem.out.println(obj);\n\n\t}", "public E dequeue() throws InterruptedException {\n\t\tthis.sem.acquire();\n\n\t\tsynchronized (this.pq) {\n\t\t\tE res = this.pq.poll();\n//\t\t\tSystem.out.println(\"dequeue \" + res);\n\n\t\t\treturn res;\n\t\t}\t\t\n\t}", "@Nullable\n public T choose(Predicate<T> predicate, Random random) {\n List<Entry<T>> filteredEntries = entries.stream()\n .filter(t -> predicate.apply(t.getValue()))\n .collect(Collectors.toList());\n if (Iterables.isEmpty(filteredEntries)) {\n return null;\n }\n\n int maximumPriority = Ordering.natural().max(Iterables.transform(filteredEntries, Entry::getPriority));\n filteredEntries = filteredEntries.stream()\n .filter(t -> t.getPriority() == maximumPriority)\n .collect(Collectors.toList());\n\n if(Iterables.isEmpty(filteredEntries)) {\n return null;\n }\n\n double sum = 0;\n for(Entry<T> entry : filteredEntries)\n sum += entry.getWeight();\n\n double selection = random.nextDouble() * sum;\n for(Entry<T> entry : filteredEntries) {\n selection -= entry.getWeight();\n if(selection <= 0)\n return entry.getValue();\n }\n // should not get here.\n throw new IllegalStateException();\n }", "int priority();", "int priority();", "public Message<?> receiveSelected(MessageSelector selector) {\n Object[] array = this.queue.toArray();\n for (Object o : array) {\n Message<?> message = (Message<?>) o;\n if (selector.accept(message) && this.queue.remove(message)) {\n return message;\n }\n }\n \n return null;\n }", "public K select(int k);", "public static void selfTest() {\n System.out.println(\"+++Beginning tests for priority scheduler+++\");\n int numTests = 5;\n int count = 0;\n\n boolean machine_start_status = Machine.interrupt().disabled();\n Machine.interrupt().disable();\n\n PriorityScheduler p = new PriorityScheduler();\n\n ThreadQueue t = p.newThreadQueue(true);\n ThreadQueue t1 = p.newThreadQueue(true);\n ThreadQueue t2 = p.newThreadQueue(true);\n ThreadQueue masterQueue = p.newThreadQueue(true);\n\n KThread tOwn = new KThread();\n KThread t1Own = new KThread();\n KThread t2Own = new KThread();\n\n t.acquire(tOwn);\n t1.acquire(t1Own);\n t2.acquire(t2Own);\n\n\n for (int i = 0; i < 3; i++) {\n for (int j = 1; j <= 3; j++) {\n KThread curr = new KThread();\n\n if (i == 0)\n t.waitForAccess(curr);\n else if (i == 1)\n t1.waitForAccess(curr);\n else\n t2.waitForAccess(curr);\n\n p.setPriority(curr, j);\n }\n }\n\n KThread temp = new KThread();\n t.waitForAccess(temp);\n p.getThreadState(temp).setPriority(4);\n\n temp = new KThread();\n t1.waitForAccess(temp);\n p.getThreadState(temp).setPriority(5);\n\n temp = new KThread();\n t2.waitForAccess(temp);\n p.getThreadState(temp).setPriority(7);\n\n temp = new KThread();\n\n masterQueue.waitForAccess(tOwn);\n masterQueue.waitForAccess(t1Own);\n masterQueue.waitForAccess(t2Own);\n\n masterQueue.acquire(temp);\n\n System.out.println(\"master queue: \"); masterQueue.print();\n// System.out.println(\"t queue: \"); t.print();\n// System.out.println(\"t1 queue: \"); t1.print();\n// System.out.println(\"t2 queue: \"); t2.print();\n//\n// System.out.println(\"tOwn effective priority = \" + p.getThreadState(tOwn).getEffectivePriority() + \" and priority = \" + p.getThreadState(tOwn).getPriority());\n System.out.println(\"temp's effective priority = \" + p.getThreadState(temp).getEffectivePriority());\n\n System.out.println(\"After taking away max from master queue\");\n KThread temp1 = masterQueue.nextThread();\n masterQueue.print();\n System.out.println(\"temp's effective priority = \" + p.getThreadState(temp).getEffectivePriority() + \" and it's priority = \" + p.getThreadState(temp).getPriority());\n System.out.println(\"nextThread's effective priority = \" + p.getThreadState(temp1).getEffectivePriority());\n Machine.interrupt().restore(machine_start_status);\n// while(count < numTests) {\n// KThread toRun = new KThread(new PriSchedTest(count++));\n// System.out.println(toRun);\n// t.waitForAccess(toRun);\n// p.getThreadState(toRun).setPriority(numTests-count);\n// toRun.fork();\n// }\n// count = 0;\n// while(count++ < numTests) {\n// KThread next = t.nextThread();\n// Lib.assertTrue(p.getThreadState(next).getPriority() == numTests-count);\n// System.out.println(\"Priority is \" + p.getThreadState(next).getPriority());\n// }\n }", "public abstract int priority();", "public void select();", "@Override\n public boolean offer(Object o) {\n\n // Rank is extracted from the header\n Packet packet = (Packet) o;\n PriorityHeader header = (PriorityHeader) packet;\n int rank = (int)header.getPriority();\n\n this.reentrantLock.lock();\n boolean returnValue = false;\n try {\n\n // Keep track of the current queue bounds (Figure 13a in the SP-PIFO paper)\n for (int q=queueList.size()-1; q>=0; q--){\n if(SimulationLogger.hasQueueBoundTrackingEnabled()){\n SimulationLogger.logQueueBound(this.ownId, q, (int)queueBounds.get(q));\n }\n }\n\n // Aggregate adaptation parameters\n int currentQueueBound, currentQueueBoundPlus, currentQueueBoundMinus;\n int QLm, QLh, QLmplus, QLmminus, sumA1, sumA2, sumB1, sumB2;\n\n // SP-PIFO queue scanning process\n for (int q=queueList.size()-1; q>=0; q--){\n currentQueueBound = (int)queueBounds.get(q);\n if ((currentQueueBound <= rank) || q==0) {\n boolean result = queueList.get(q).offer(o);\n\n if (!result){\n // System.out.println(\"Greedy: Packet with rank \" + rank + \" has been dropped from queue \" + q + \".\");\n returnValue = false;\n break;\n } else {\n\n // Update general counter\n this.generalPacketCounter = this.generalPacketCounter + 1;\n\n // We compute the perceived rank\n Object[] contentPIFO = queueList.get(q).toArray();\n Arrays.sort(contentPIFO);\n Packet packet_maxrank = (Packet) contentPIFO[0];\n PriorityHeader header_maxrank = (PriorityHeader) packet_maxrank;\n int rank_perceived = (int)header_maxrank.getPriority();\n if (rank_perceived > rank){\n this.unpifoness = this.unpifoness + (rank_perceived - rank);\n }\n\n // IMPORTANT: If packet enqueued here, means that QLm <= rank < QLh\n // Packet enqueued, we update counters, and return true\n if (q==queueList.size()-1){\n QLh = rank_bound;\n QLm = (int)this.queueBounds.get(q);\n } else {\n QLh = (int)this.queueBounds.get(q+1);\n QLm = (int)this.queueBounds.get(q);\n }\n\n // To consider non continuous rank distributions, we have to keep track of the Qm+1 and Qh-1 ranks per each queue\n // This way we are sure that the boundary move we are analyzing will not be an empty rank\n currentQueueBoundPlus = (int)this.queueBoundsPlus.get(q);\n if (rank > QLm && rank < currentQueueBoundPlus){\n this.queueBoundsPlus.put(q, rank);\n }\n\n // Update counters per queue\n Object currentPackets = countersB21.get(q);\n if (currentPackets == null){\n countersB21.put(q, rank);\n } else {\n countersB21.put(q, (int)currentPackets+rank);\n }\n\n currentPackets = countersB22.get(q);\n if (currentPackets == null){\n countersB22.put(q, 1);\n } else {\n countersB22.put(q, (int)currentPackets+1);\n }\n\n if (rank != QLm){\n currentPackets = countersA21.get(q);\n if (currentPackets == null){\n countersA21.put(q, rank);\n } else {\n countersA21.put(q, (int)currentPackets+rank);\n }\n\n currentPackets = countersA22.get(q);\n if (currentPackets == null){\n countersA22.put(q, 1);\n } else {\n countersA22.put(q, (int)currentPackets+1);\n }\n }\n\n if (q!=queueList.size()-1){\n\n currentQueueBoundMinus = (int) this.queueBoundsMinus.get(q + 1);\n if (rank > currentQueueBoundMinus) {\n this.queueBoundsMinus.put(q + 1, rank);\n }\n\n currentPackets = countersA11.get(q+1);\n if (currentPackets == null){\n countersA11.put(q+1, importance(rank));\n } else {\n countersA11.put(q+1, (int)currentPackets+importance(rank));\n }\n\n currentPackets = countersA12.get(q+1);\n if (currentPackets == null){\n countersA12.put(q+1, (importance(rank))*rank);\n } else {\n countersA12.put(q+1, (int)currentPackets+(importance(rank))*rank);\n }\n\n if(rank != (int)this.queueBoundsMinus.get(q+1)){\n currentPackets = countersB11.get(q+1);\n if (currentPackets == null){\n countersB11.put(q+1, importance(rank));\n } else {\n countersB11.put(q+1, (int)currentPackets+importance(rank));\n }\n\n currentPackets = countersB12.get(q+1);\n if (currentPackets == null){\n countersB12.put(q+1, (importance(rank))*rank);\n } else {\n countersB12.put(q+1, (int)currentPackets+(importance(rank))*rank);\n }\n }\n }\n\n returnValue = true;\n break;\n }\n }\n }\n\n // When the threshold is reached, aggregate adaptation is considered based on the values in counters\n if(this.generalPacketCounter == 1000) {\n\n // Each queue bound expected unpifoness is compared to the one achieved by moving the boundaries\n for(int i=queueBounds.size()-1; i>0; i--){\n\n // Obtain the values of adjacent ranks to analyze\n QLm = (int)this.queueBounds.get(i);\n QLmplus = (int)this.queueBoundsPlus.get(i);\n QLmminus = (int)this.queueBoundsMinus.get(i);\n\n sumA1 = ((QLm) * (int)countersA11.get(i)) - (int)countersA12.get(i);\n sumA2 = (importance(QLm) * (int)countersA21.get(i)) - (importance(QLm) * (QLm) * (int)countersA22.get(i));\n\n if (i==(queueBounds.size()-1)){\n if ((sumA1 < sumA2) && (QLmplus != (int)this.rank_bound)){\n if (!this.fixQueueBounds){\n this.queueBounds.put(i, QLmplus);\n }\n } else {\n\n sumB1 = ((QLmminus) * (int)countersB11.get(i)) - (int)countersB12.get(i);\n sumB2 = (importance(QLmminus) * (int)countersB21.get(i)) - (importance(QLmminus) * (QLmminus) * (int)countersB22.get(i));\n\n if ((sumB1 > sumB2) && (QLmminus != (int)this.queueBounds.get(i-1))){\n if (!this.fixQueueBounds){\n this.queueBounds.put(i, QLmminus);\n }\n }\n }\n } else {\n if ((sumA1 < sumA2) && (QLmplus != (int)this.queueBounds.get(i+1))){\n if (!this.fixQueueBounds){\n this.queueBounds.put(i, QLmplus);\n }\n } else {\n\n sumB1 = ((QLmminus) * (int)countersB11.get(i)) - (int)countersB12.get(i);\n sumB2 = (importance(QLmminus) * (int)countersB21.get(i)) - (importance(QLmminus) * (QLmminus) * (int)countersB22.get(i));\n\n if ((sumB1 > sumB2) && (QLmminus != (int)this.queueBounds.get(i-1))){\n if (!this.fixQueueBounds){\n this.queueBounds.put(i, QLmminus);\n }\n }\n }\n }\n\n }\n\n // Reset the counters for the next iteration\n this.queueBoundsPlus.clear();\n this.queueBoundsMinus.clear();\n this.generalPacketCounter = 0;\n this.countersA11.clear();\n this.countersA12.clear();\n this.countersA21.clear();\n this.countersA22.clear();\n this.countersB11.clear();\n this.countersB12.clear();\n this.countersB21.clear();\n this.countersB22.clear();\n for (int i=0; i<queueList.size(); i++){\n countersA11.put(i,0);\n countersA12.put(i,0);\n countersA21.put(i,0);\n countersA22.put(i,0);\n countersB11.put(i,0);\n countersB12.put(i,0);\n countersB21.put(i,0);\n countersB22.put(i,0);\n }\n\n // Reinitialize the adjacent rank values based on the updated queue bounds\n for (int q=0; q<queueList.size(); q++){\n if (q==queueList.size()-1){\n this.queueBoundsPlus.put(q,this.rank_bound);\n this.queueBoundsMinus.put(q,this.queueBounds.get(q-1));\n } else if (q==0){\n this.queueBoundsPlus.put(q,this.queueBounds.get(q+1));\n this.queueBoundsMinus.put(q,0);\n } else{\n this.queueBoundsPlus.put(q,this.queueBounds.get(q+1));\n this.queueBoundsMinus.put(q,this.queueBounds.get(q-1));\n }\n }\n }\n\n } catch (Exception e){\n System.out.println(\"Exception: \" + e.getMessage());\n e.printStackTrace();\n } finally {\n this.reentrantLock.unlock();\n // System.out.println(\"Packet with rank \" + rank + \"enqueued_flag\" + returnValue);\n return returnValue;\n }\n }", "private Node chooseNode(Identity identity) {\n\t\treturn availableNodes.peek();\n\t}", "public static void main(String[] args) {\n\t\tQueue<Integer> integerPriorityQueue = new PriorityQueue<>(7);\r\n\t\tRandom rand = new Random();\r\n\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\tintegerPriorityQueue.add(new Integer(rand.nextInt(100)));\r\n\t\t}\r\n\t\tfor (int i = 0; i < 7; i++) {\r\n\t\t\tInteger in = integerPriorityQueue.poll();\r\n\t\t\tSystem.out.println(\"Processing Integer:\" + in);\r\n\t\t}\r\n\r\n\t\t// PriorityQueue example with Comparator\r\n\t\tQueue<Customer> customerPriorityQueue = new PriorityQueue<>(7, idComparator);\r\n\t\taddDataToQueue(customerPriorityQueue);\r\n\r\n\t\tpollDataFromQueue(customerPriorityQueue);\r\n\r\n\t}", "IPriorityQueue pop() throws EmptyPriorityQueueException;", "public static void main(String[] args) {\n\t\tQueue<Integer> queue = new PriorityQueue<>();\n\n\t\tqueue.offer(2);\n\t\tqueue.offer(8);\n\t\tqueue.offer(3);\n\t\tqueue.offer(1);\n\t\tqueue.offer(10);\n\n\t\tSystem.out.println(\"Get head of the head and remove element: \" + queue.poll()); // 1\n\t\tSystem.out.println(\"Size of the queue after poll(): \" + queue.size()); // 4\n\t\tSystem.out.println(\"peek(): \" + queue.peek()); // 2\n\t\tSystem.out.println(\"Size of the queue after poll(): \" + queue.size()); // 4\n\n\t\t// This example throws ClassCastException\n//\t\tQueue<Product> products = new PriorityQueue<>();\n//\t\tproducts.offer(new Product(\"Shoes\"));\n\t\t// java.lang.ClassCastException: class com.roy._18collections.queue.Product\n\t\t// cannot be cast to class java.lang.Comparable\n\n\t\t// Using custom Comparator\n\t\tComparator<Product> productComparator = new Comparator<Product>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Product o1, Product o2) {\n\t\t\t\treturn o1.getName().compareTo(o2.getName());\n\t\t\t}\n\t\t};\n\t\tQueue<Product> products = new PriorityQueue<>(productComparator);\n\t\tproducts.offer(new Product(\"Shoes\"));\n\t\tproducts.offer(new Product(\"Jeans\"));\n\t\tproducts.offer(new Product(\"Shirts\"));\n\t\tproducts.offer(new Product(\"Hat\"));\n\t\tproducts.offer(new Product(\"T-Shirts\"));\n\n\t\tfor (Product p : products) {\n\t\t\tSystem.out.println(p.getName());\n\t\t}\n\n\t}", "@Override\r\n public CustomProcess peekBest() {\r\n if (data[0] == null || isEmpty()) {\r\n throw new NoSuchElementException(\"queue is empty\");\r\n }\r\n return data[0];\r\n }", "Optional<Pairof<X, MultiSet<X>>> choose();", "public void changePriority(E e, P p) throws NoSuchElementException;", "public static void main (String []args) throws FileNotFoundException {\n\t\tArrayList<Item> priorities = new ArrayList<Item>();\n\t\t\n\t\t// pq.id.100K1.1\n\t\t// pq.id.100K4.1\n\t\t// pq.id.10K1.2\n\t\t// pqsort.100K.3\n\t\t\n\t\t// do this to retrieve large cases via internet.\n\t\t//java.net.URL u;\n\t\t//Scanner s = new Scanner (u.openStream());\n\t\t\n\t\tFile f = new File (\"tests\\\\algs\\\\model\\\\performance\\\\pq_random\\\\pqsort.1K.1\");\n\t\tScanner sc = new Scanner (f);\n\t\twhile (sc.hasNext()) {\n\t\t\tString s = sc.nextLine();\n\t\t\tif (s.startsWith(\"pqh\")) continue;\n\t\t\tif (s.startsWith(\"com\")) continue;\n\t\t\t\n\t\t\tif (s.startsWith(\"dmn\")) {\n\t\t\t\tpriorities.add(sentinel);\n\t\t\t} else {\n\t\t\t\tStringTokenizer st = new StringTokenizer(s, \" \");\n\t\t\t\tst.nextToken();\n\t\t\t\tDouble d = Double.parseDouble(st.nextToken());\n\t\t\t\tInteger i = Integer.parseInt(st.nextToken());\n\t\t\t\tpriorities.add(new Item (i, d));\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t\t\n\t\t// Now ready to measure PQ.\n\t\tIPQueue ipq = new ArrayPQ();\n\t\t//IPQueue ipq = new BalancedTreePQ();\n\t\t\n\t\tTrialSuite minTS = new TrialSuite ();\n\t\tTrialSuite insTS = new TrialSuite ();\n\t\tlong n0 = System.currentTimeMillis();\n\t\tfor (int i = 0; i < priorities.size(); i++) {\n\t\t\tItem it = priorities.get(i);\n\t\t\tif (it == sentinel) {\n\t\t\t\tlong n1 = System.currentTimeMillis();\n\t\t\t\tipq.minimum();\n\t\t\t\tlong n2 = System.currentTimeMillis();\n\t\t\t\tminTS.addTrial(1, n1, n2);\n\t\t\t} else {\n\t\t\t\tlong n1 = System.currentTimeMillis();\n\t\t\t\tipq.insert(it.priority, it.item);\n\t\t\t\tlong n2 = System.currentTimeMillis();\n\t\t\t\tinsTS.addTrial(1, n1, n2);\n\t\t\t}\n\t\t}\n\t\tlong e0 = System.currentTimeMillis();\n\t\tSystem.out.println ((e0 - n0) + \" milliseconds for completion.\");\n\t\tSystem.out.println (\"min\");\n\t\tSystem.out.println (minTS.computeTable());\n\t\tSystem.out.println (\"insert\");\n\t\tSystem.out.println (insTS.computeTable());\n\t}", "public static void main(String[] args) {\r\n\t\tPriorityQueue p1=new PriorityQueue();\r\n\t\t // System.out.println(\"p1.poll()=\"+p1.poll());\r\n // System.out.println(\"p1.remove()=\"+p1.remove());\r\n\t\tp1.add(12); \r\n\t\tp1.add(10);\r\n p1.add(20);\r\n // p1.add(2.3);\r\n p1.add(20);\r\n p1.add(100);\r\n p1.add(21);\r\n // p1.add(null);\r\n System.out.println(p1);\r\n System.out.println(\"p1.remove()=\"+p1.remove());\r\n System.out.println(\"p1.poll()=\"+p1.poll());\r\n System.out.println(p1);\r\n System.out.println(\"p1.peek()=\"+p1.peek()); \r\n System.out.println(\"p1.peek()=\"+p1.peek()); \r\n System.out.println(p1);\r\n\t}", "@DISPID(3)\r\n\t// = 0x3. The runtime will prefer the VTID if present\r\n\t@VTID(9)\r\n\tint queuePriority();", "void select();", "public NodeBase<V> dequeue() {\r\n \tif(!isEmpty()){\r\n \tNodeBase<V> min=queue[0];\r\n \tint j=0;\r\n for(int i=0;i<currentSize;i++){\r\n \t if(min.getPriority()>queue[i].getPriority()){\r\n \t\t min=queue[i];\r\n \t\t j=i;\r\n \t }\r\n }\r\n for(int x=j;x<currentSize-1;x++){\r\n \t queue[x]=queue[x+1];\r\n }\r\n \r\n currentSize--;\r\n \r\n return min;\r\n \t}\r\n \telse{\r\n \t\treturn null;\r\n \t}\r\n }", "public void select ();", "public PuzzleBoard poll() {\r\n if (isEmpty()) throw new NoSuchElementException(\"Priority queue underflow\");\r\n swap(1, N);\r\n PuzzleBoard min = pq[N--];\r\n sink(1);\r\n pq[N+1] = null; // avoid loitering and help with garbage collection\r\n if ((N > 0) && (N == (pq.length - 1) / 4)) resize(pq.length / 2);\r\n assert isMinHeap();\r\n return min;\r\n }", "protected abstract int quickSelect(Integer[] map, int right, int idx);", "public T select(int x) {\n\n // r = 1 + size of left subtree\n int r = 1;\n\n // If rSize is equal to x, then return the data at this node and exit\n if (r == x) {\n return this.data;\n }\n\n // If T is an empty node, the rank x is invalid. Return null as the result.\n else {\n return null;\n }\n\n }", "public WaitablePQueue(int Capacity, Comparator<? super E> comparator) {\n\t \tthis.pq = new PriorityQueue<>(Capacity, comparator);\n\t \tthis.sem = new Semaphore(0);\n\t}", "public E poll() {\n\t\tif (apq.isEmpty())\n\t\t\treturn null;\n\t\tE retValue = apq.get(1);\n\t\tswap(1, apq.size() - 1); // -1 changed, change back if it doesnt work\n\t\tapq.remove(apq.size() - 1); // -1 changed, change back if it doesnt work\n\t\tdownheap(1);\n\t\treturn retValue; // implement this method\n\t}", "public void notifyAll(int priority) {}", "public interface PQueue<T> {\n\n void add(T item, int priority) throws InterruptedException;\n\n T removeMin();\n\n}", "int minPriority(){\n if (priorities.length == 0)\n return -1;\n\n int index = 0;\n int min = priorities[index];\n\n for (int i = 1; i < priorities.length; i++){\n if ((priorities[i]!=(-1))&&(priorities[i]<min)){\n min = priorities[i];\n index = i;\n }\n }\n return values[index];\n }", "ActionSequenceQueue prioritize(ActionSequenceQueue actionSequences);", "public NCRPNode select() {\n\t\t\t\n\t\t\t//dim number of children + 1 (unallocated mass) \n\t\t\tdouble[] weights = new double[children.size() + 1];\n\t \n\t\t\t//weight of unallocated probability mass\n\t\t\tweights[0] = gamma / (gamma + customers);\n\t\t\t\n\t\t\t//calc weight for each child based on the number of customers on them\n\t\t\tint i = 1;\n\t\t\tfor (NCRPNode child: children) {\n\t\t\t\tweights[i] = (double) child.customers / (gamma + customers);\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\t//sample a child with higher weight\n\t\t\tint choice = random.nextDiscrete(weights);\n\t\t\t//if unallocated mass is sampled, create a new child\n\t\t\tif (choice == 0) {\n\t\t\t\treturn(addChild());\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn children.get(choice - 1);\n\t\t\t}\n\t\t}", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "@Override\n protected void processSelect() {\n \n }", "public static void served(PriorityQueue<Student> queue){\n queue.poll();\n\n }", "public static void main(String[] args) {\n Queue<Integer> values=new PriorityQueue<>();\r\n values.add(87);\r\n\t values.add(97);\r\n\t values.add(34);\r\n\t values.add(92);\r\n\t System.out.println(values);\r\n\t}", "public static void main(String[] args) throws Exception{\n\n BlockingQueue<String> blockingQueue = new ArrayBlockingQueue<>(3);\n\n /*System.out.println(blockingQueue.offer(\"a\"));\n System.out.println(blockingQueue.offer(\"b\"));\n System.out.println(blockingQueue.offer(\"c\"));\n System.out.println(blockingQueue.offer(\"x\"));\n\n System.out.println(blockingQueue.peek());\n\n System.out.println(blockingQueue.poll());\n System.out.println(blockingQueue.poll());\n System.out.println(blockingQueue.poll());\n System.out.println(blockingQueue.poll()); */\n\n /*blockingQueue.put(\"a\");\n blockingQueue.put(\"a\");\n blockingQueue.put(\"a\");\n System.out.println(\"===============\");\n// blockingQueue.put(\"x\");\n\n blockingQueue.take();\n blockingQueue.take();\n blockingQueue.take();\n blockingQueue.take();*/\n\n System.out.println(blockingQueue.offer(\"a\", 2L, TimeUnit.SECONDS));\n System.out.println(blockingQueue.offer(\"a\", 2L, TimeUnit.SECONDS));\n System.out.println(blockingQueue.offer(\"a\", 2L, TimeUnit.SECONDS));\n System.out.println(blockingQueue.offer(\"a\", 2L, TimeUnit.SECONDS));\n\n }", "@Override\n /**\n * Selects a move based on the current game state\n */\n public Move selectMove() {\n Game game = this.game.copy();\n List<Move> moves = game.getValidMoves(this.player);\n Collections.shuffle(moves);\n\n // Create a thread pool\n Executor executor = Executors.newFixedThreadPool(this.threadCount);\n CompletionService<MinimaxEngineWorker> service = new ExecutorCompletionService<MinimaxEngineWorker>(executor);\n\n // Determine the value of each move using the thread pool\n for (Move move : moves) {\n service.submit(new MinimaxEngineWorker(game, move, this.hashMap));\n }\n\n Move bestMove = null;\n double bestMoveValue = Double.NEGATIVE_INFINITY;\n int movesSize = moves.size();\n long moveCount = 0;\n long hashMapHits = 0;\n for (int i = 0; i < movesSize; i++) {\n try {\n // Block until a worker thread finishes\n MinimaxEngineWorker worker = service.take().get();\n\n // Report progress\n moveCount += worker.moveCount;\n hashMapHits += worker.hashMapHits;\n this.setProgress((double) i / movesSize, moveCount, hashMapHits);\n\n // Update the best move\n if (bestMove == null || worker.moveValue >= bestMoveValue) {\n bestMove = worker.move;\n bestMoveValue = worker.moveValue;\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n }\n \n // Clear the hashmap\n this.hashMap.clear();\n Runtime.getRuntime().gc();\n\n return bestMove;\n }", "protected abstract void select();", "@DISPID(115)\r\n\t// = 0x73. The runtime will prefer the VTID if present\r\n\t@VTID(110)\r\n\tint queuePriority();", "public void testSelect_0()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n Gene gene = new IntegerGene(conf);\n gene.setAllele(new Integer(444));\n Chromosome secondBestChrom = new Chromosome(conf, gene, 3);\n secondBestChrom.setFitnessValue(11);\n selector.add(secondBestChrom);\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n selector.select(1, null, new Population(conf));\n }", "protected Job getNextJobInReadyQueue(long tick) {\n Job targetJob = null;\n int highestActivePriority = 0;\n\n for (Job job : nextJobOfATask.values()) {\n if (job.releaseTime > tick)\n continue;\n if (job.task.getPriority() > highestActivePriority) {\n highestActivePriority = job.task.getPriority();\n targetJob = job;\n }\n }\n return targetJob;\n }", "public static void main(String[] args) {\n\n\t\tPriorityQueue pq = new PriorityQueue(15, new MyComparator());\n\t\t\n\t\tpq.offer(\"A\");\n\t\tpq.offer(\"B\");\n\t\tpq.offer(\"Z\");\n\t\tpq.offer(\"L\");\n\t\t\n\t\tSystem.out.println(pq);\n\t}", "Computer findFirstByActiveTrueAndPriorityGreaterThanAndStatusOrderByPriorityAsc(int priority, EnumComputerStatus status);", "private PriorityQueue<Integer> get(Node x, int key) {\n while (x != null) {\n int cmp = key - x.key;\n if (cmp < 0)\n x = x.left;\n else if (cmp > 0)\n x = x.right;\n else\n return x.val;\n }\n return null;\n }", "@Override\n public T dequeue() {\n if (!isEmpty()) {\n return heap.remove();\n } else {\n throw new NoSuchElementException(\"Priority Queue is null\");\n }\n }", "public PrimObject perform(String selector) {\n return perform0(selector);\n }", "@Override\n protected Action selectAction(State state, Set<Action> actions){\n //Call the preSelectAction method from the DefaultProtocol so that, if necessary,\n //unwanted processes are killed and SUT is put into foreground.\n Action retAction = preSelectAction(state, actions);\n if (retAction == null)\n //if no preSelected actions are needed, then implement your own strategy\n retAction = RandomActionSelector.selectAction(actions);\n return retAction;\n }", "public void setPriority(int priority){\n this.priority = priority;\n }", "public abstract int getPriority();", "public abstract int getPriority();", "public abstract int getPriority();", "public static void main(String[] args)\n\t{\n\t\tdouble mine = (29 + 27 + 29 + /*24*/ 28 + 30 + 50 + 55 + 17 + 19 + 16 + 18 + 17 + 17 + 20 + 18 + 20 + 82 + 81 + 87 + 215);\n\t\t\n\t\tdouble pote = (30 + 30 + 30 + 30 + 30 + 60 + 30 + 30 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 100 + 100 + 100 + 250);\n\t\t\n\t\tdouble grade = (mine / pote) * 100;\n\t\tSystem.out.println(grade);\n\t\t\n\t\tPriorityQueue<String> pq = new PriorityQueue<String>();\n\t\tPriorityQueue<String> pq2 = new PriorityQueue<String>();\n\t\tPriorityQueue<Character> pq3 = new PriorityQueue<Character>();\n\t\t/*\n\t\tPriorityQueue pq4 = new PriorityQueue();\n\t\tpq4.enqueuePQ(2, \"F\");\n\t\tpq4.enqueuePQ(2, 32);\n\t\tSystem.out.println(pq4.toString());\n\t\t*/\n\t\t\n\t\t\n\t\tpq3.enqueuePQ(3, 'A');\n\t\tpq3.enqueuePQ(3, 'B');\n\t\tpq3.enqueuePQ(3, 'C');\n\t\tSystem.out.println(pq3.toString());\n\t\t\n\t\tSystem.out.println(pq3.dequeuePQ());\n\t\tSystem.out.println(pq3.peekPQ());\n\t\t\n\t\tpq2.enqueuePQ(2, \"two\");\n\t\tpq2.enqueuePQ(3, \"three\");\n\t\tpq2.enqueuePQ(1, \"one\");\n\t\t//pq2.enqueuePQ(-2, \"neg two\");\n\t\t//pq2.enqueuePQ(3, \"three 2\");\n\t\t//pq2.enqueuePQ(-2, \"neg two 2\");\n\t\t//pq2.enqueuePQ(1, \"one 2\");\n\t\tSystem.out.println(pq2.toString());\n\t\t\n\t\tSystem.out.println(pq2.dequeuePQ());\n\t\tSystem.out.println(pq2.peekPQ());\n\t\tSystem.out.println(pq2.toString());\n\t\t\n\t\tSystem.out.println(pq.isEmpty());\n\t\tpq.enqueuePQ(3, \"three\");\n\t\tSystem.out.println(pq.toString());\n\t\tpq.enqueuePQ(5, \"five\");\n\t\tSystem.out.println(pq.isEmpty());\n\t\tSystem.out.println(pq.toString());\n\t\tSystem.out.println(pq.dequeuePQ());\n\t\tSystem.out.println(pq.isEmpty());\n\t\tSystem.out.println(pq.dequeuePQ());\n\t\t\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(pq.peekPQ());\n\t\t}\n\t\tcatch (PQException ex)\n\t\t{\n\t\t\tSystem.out.println(\"PEEK EXCEPTION CAUGHT\");\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(pq.dequeuePQ());\n\t\t}\n\t\tcatch (PQException ex)\n\t\t{\n\t\t\tSystem.out.println(\"Dequeue EXCEPTION CAUGHT\");\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(pq.isEmpty());\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"DONE\");\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint item;\n\t\tpriority c=new priority();\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\titem=sc.nextInt();\n\t\t\tc.add(item);\n\t\t\t\n\t\t}\n\t\t//c.highestremove();\n\t\tc.hightest();\n\tc.display();\n\t\t//c.display();\n\n\t}", "public interface SelectStrategy {\n\n /**\n * Indicates a blocking select should follow.\n */\n int SELECT = -1;\n /**\n * Indicates the IO loop should be retried, no blocking select to follow directly.\n */\n int CONTINUE = -2;\n /**\n * Indicates the IO loop to poll for new events without blocking.\n */\n int BUSY_WAIT = -3;\n\n /**\n * The {@link SelectStrategy} can be used to steer the outcome of a potential select\n * call.\n *\n * @param selectSupplier The supplier with the result of a select result.\n * @param hasTasks true if tasks are waiting to be processed.\n * @return {@link #SELECT} if the next step should be blocking select {@link #CONTINUE} if\n * the next step should be to not select but rather jump back to the IO loop and try\n * again. Any value >= 0 is treated as an indicator that work needs to be done.\n */\n int calculateStrategy(IntSupplier selectSupplier, boolean hasTasks) throws Exception;\n}", "private synchronized void refreshQueuePriority() {\n BlockingQueue<Message> newQueue;\n if(highPriorityMode) {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, HighPriorityModeComparator.COMPARATOR);\n } else {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, NoPriorityModeComparator.COMPARATOR);\n }\n this.queue.drainTo(newQueue);\n this.queue = newQueue;\n latch.countDown();\n }", "public IndexedList<Task> search(TaskPriority priority) {\n\t\tLinkedList<Task> result=new LinkedList<Task>();\n\t\tfor(Task task : tasks) {\n\t\t\tif(task.getPriority()==priority)\n\t\t\t\tresult.add(task);\n\t\t}\n\t\treturn result;\n\t}", "@Override\n public void handle(Car car) {\n\t\t\t\t\tPriorityIntersection inter = (PriorityIntersection) Main.intersection;\n try {\n sleep(car.getWaitingTime());\n } catch (InterruptedException e) {\n e.printStackTrace();\n } // NU MODIFICATI\n\n\t // masinile din lane 1 sunt adaugate in queue fara prioritate\n\t if(car.getPriority()==1) {\n\t\t inter.queueLow.add(car);\n\t\t System.out.println(\"Car \"+ car.getId()+\" with low priority is \" +\n\t\t\t\t \"trying to enter the intersection...\");\n\n\t\t // se asteapta pana cand in intersectie nu mai sunt masini\n\t\t // cu prioritate\n\t\t while(!inter.queueHigh.isEmpty()) {}\n\n\t\t // daca nu sunt in intersectie masini cu prioritate\n\t\t if(inter.queueHigh.isEmpty()) {\n\t\t\t try {\n\t\t\t \t// semafor pt ca operatia de poll sa nu se faca in paralel\n\t\t\t\t inter.s.acquire();\n\t\t\t } catch (InterruptedException e) {\n\t\t\t\t e.printStackTrace();\n\t\t\t }\n\t\t\t // se scoate varful cozii\n\t\t\t Car auxLow = (Car) inter.queueLow.poll();\n\t\t\t System.out.println(\"Car \"+ auxLow.getId()+\" with low priority \" +\n\t\t\t\t\t \"has entered the intersection\");\n\t\t\t inter.s.release();\n\n\n\t\t }\n\n\t }\n\t\t\t\t\t//daca masina are prioritate\n\t else {\n\t\t\t\t\t\t//se adauga in coada cu prioritate\n\t\t inter.queueHigh.add(car);\n\n\n\t \tSystem.out.println(\"Car \"+ car.getId()+\" with high priority has \" +\n\t\t\t\t \"entered the intersection\");\n\t\t try {\n\t\t \t// sleep 2000ms pt fiecare masina cu prioritate\n\t\t\t sleep(2000);\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\t\t System.out.println(\"Car \"+ car.getId()+\" with high priority has \" +\n\t\t\t\t \"exited the intersection\");\n\n\t\t //se scoate din coada\n\t\t inter.queueHigh.poll();\n\n\t }\n\n }", "private static void pollDataFromQueue(Queue<Customer> customerPriorityQueue) {\r\n\t\twhile (true) {\r\n\t\t\tCustomer cust = customerPriorityQueue.poll();\r\n\t\t\tif (cust == null)\r\n\t\t\t\tbreak;\r\n\t\t\tSystem.out.println(\"Processing Customer with ID=\" + cust.getId());\r\n\t\t}\r\n\t}", "public T remove() throws NoSuchElementException {\n\tT result = poll();\n\tif(result == null) {\n\t throw new NoSuchElementException(\"Priority queue is empty\");\n\t} else {\n\t return result;\n\t}\n }", "public static void main(String[] args)\n {\n PriorityQueue<Integer> pQueue =\n new PriorityQueue<>(Collections.reverseOrder());\n\n // Adding items to the pQueue using add()\n pQueue.add(10);\n pQueue.add(30);\n pQueue.add(20);\n pQueue.add(400);\n\n // Printing the most priority element\n System.out.println(\"Head value using peek function:\" +\n pQueue.peek());\n\n // Printing all elements\n System.out.println(\"The queue elements:\");\n for (Integer integer : pQueue) System.out.println(integer);\n\n // Removing the top priority element (or head) and\n // printing the modified pQueue using poll()\n pQueue.poll();\n System.out.println(\"After removing an element \"\n + \"with poll function:\");\n for (Integer integer : pQueue) System.out.println(integer);\n\n // Removing 30 using remove()\n pQueue.remove(30);\n System.out.println(\"after removing 30 with\"\n + \" remove function:\");\n for (Integer integer : pQueue) System.out.println(integer);\n\n // Check if an element is present using contains()\n boolean b = pQueue.contains(20);\n System.out.println(\"Priority queue contains 20 \"\n + \"or not?: \" + b);\n\n // Getting objects from the queue using toArray()\n // in an array and print the array\n Object[] arr = pQueue.toArray();\n System.out.println(\"Value in array: \");\n for (Object o : arr) System.out.println(\"Value: \" + o.toString());\n }", "public E poll(){\n int cnt = 0;\n long expect = front;\n int index;\n int curTryNum = tryNum;\n E e ;\n for(;;) {\n HighPerformanceQueue q = this;\n expect = front;\n index = (int)(expect&(max_size-1));\n if(available[index]) {\n e = (E) data[index];\n //TODO Additional write burden is added to the read operation\n available[index] = false;\n if (help.compareAndSwapLong(q, frontOffset, expect, expect + 1)) {\n // TODO Dynamic maintenance retries\n break;\n }\n available[index] = true;\n }\n cnt++;\n if(cnt==tryNum){\n return null;\n }\n }\n return e;\n }", "public void setPriority(Priority priority);", "public interface PriorityQueue<E, P> {\n\t\n\t/** return the comparator used for ordering priorities */\n\tpublic Comparator<? super P> comparator();\n\t\n\t/** Return the number of elements in this. Runs in O(1) time. */\n\tpublic int size();\n\t\n\t/**\n\t * Remove and return the largest element of this, according to comparator()\n\t * Runs in O(log n) time.\n\t * \n\t * @throws NoSuchElementException if this is empty \n\t */\n\tpublic E poll() throws NoSuchElementException;\n\t\n\t/**\n\t * Return the largest element of this, according to comparator().\n\t * Runs in O(1) time.\n\t * \n\t * @throws NoSuchElementException if this is empty.\n\t */\n\tpublic E peek() throws NoSuchElementException;\n\t\n\t/**\n\t * Add the element e with priority p to this. Runs in O(log n + a) time,\n\t * where a is the time it takes to append an element to an ArrayList of size\n\t * n.\n\t * \n\t * @throws IllegalArgumentException if this already contains an element that\n\t * is equal to e (according to .equals())\n\t */\n\tpublic void add(E e, P p) throws IllegalArgumentException;\n\n\t/**\n\t * Change the priority associated with e to p.\n\t *\n\t * @throws NoSuchElementException if this does not contain e.\n\t */\n\tpublic void changePriority(E e, P p) throws NoSuchElementException;\n}", "@Override\n\tpublic void select() {\n\t}", "public void setPriority(Priority priority) {\r\n this.priority = priority;\r\n }", "void selectBlock(byte pos) {\n if (pos <= getChildren().size) {\n selected = pos;\n for (Actor c : getChildren()) {\n c.setScale(0.35f);\n }\n getChildren().get(selected).setScale(0.4f);\n }\n }", "public int getPriority();", "public int getPriority();", "public static void main(String[] args){\n Queue<Patient> pQ = new PriorityQueue<>();\n Scanner in = new Scanner(System.in);\n String line = in.nextLine();\n \n while(!line.equalsIgnoreCase(\"QUIT\")){\n \n if(line.equalsIgnoreCase(\"process\")){\n //Collections.sort(pQ);\n \n while(pQ.peek() != null){\n System.out.println(pQ.poll());\n }\n }\n else{\n String name;\n int severity;\n double time;\n Scanner scan = new Scanner(line);\n name = scan.next();\n severity = scan.nextInt();\n time = scan.nextDouble();\n\n try{\n pQ.add(new Patient(name, severity, time));\n }\n catch (PatientException pe){\n System.out.println(\"Severity is not within 1-10\");\n }\n }\n line = in.nextLine();\n } \n }", "Entity determinePriorityTarget();", "List<AlertQueue> selectByExample(AlertQueueExample example);", "public static void main(String[] args)\n\t{\n\t\t// data added with the same priority value as already-preasent data, have less\n\t\t// priority than objects with the same priority value that were there before\n\t\t// being added.\n\t\tSystem.out.println(\"Data given all have equal priority so data\\nis ordered by the order it is provided in:\");\n\t\tPriorityQueue<String> q = new PriorityQueue<String>();\n\t\tq.add(\"highest\", 8);\n\t\tq.add(\"second highest\", 8);\n\t\tq.add(\"third highest\", 8);\n\t\tq.add(\"fourth highest\", 8);\n\t\tq.add(\"fifth highest\", 8);\n\t\tq.add(\"least\", 8);\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\n\t\t// sorting data provided in ascending order\n\t\tSystem.out.println(\"-------------\\nData given in ascending priority order:\");\n\t\tPriorityQueue<String> r = new PriorityQueue<String>();\n\t\tr.add(\"one\", 1);\n\t\tr.add(\"two\", 2);\n\t\tr.add(\"three\", 3);\n\t\tr.add(\"four\", 4);\n\t\tr.add(\"five\", 5);\n\t\tr.add(\"six\", 6);\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\n\t\t// sorting data provided in descending order\n\t\tSystem.out.println(\"-------------\\nData given in descending priority order:\");\n\t\tPriorityQueue<String> s = new PriorityQueue<String>();\n\t\ts.add(\"six\", 6);\n\t\ts.add(\"five\", 5);\n\t\ts.add(\"four\", 4);\n\t\ts.add(\"three\", 3);\n\t\ts.add(\"two\", 2);\n\t\ts.add(\"one\", 1);\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\n\t\t// sorting data provided in a mixed order\n\t\tSystem.out.println(\"-------------\\nData given in a mixed priority order:\");\n\t\tPriorityQueue<String> t = new PriorityQueue<String>();\n\t\tt.add(\"four\", 4);\n\t\tt.add(\"six\", 6);\n\t\tt.add(\"two\", 2);\n\t\tt.add(\"three\", 3);\n\t\tt.add(\"one\", 1);\n\t\tt.add(\"five\", 5);\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\n\t\t// sorting data provided in a mixed priority order including some repitition and\n\t\t// negative values\n\t\tSystem.out.println(\n\t\t\t\t\"-------------\\nData given in a mixed priority order\\nincluding repitition and negative priority:\");\n\t\tPriorityQueue<String> u = new PriorityQueue<String>();\n\t\tu.add(\"-two\", -2);\n\t\tu.add(\"two\", 2);\n\t\tu.add(\"zero\", 0);\n\t\tu.add(\"one\", 1);\n\t\tu.add(\"zero again\", 0);\n\t\tu.add(\"-one\", -1);\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\n\t\t// sorting data provided in a mixed priority order and is of type Double this\n\t\t// time\n\t\tSystem.out.println(\n\t\t\t\t\"-------------\\nData given in a mixed priority order\\nbut using double as the objects this time:\");\n\t\tPriorityQueue<Double> v = new PriorityQueue<Double>();\n\t\tv.add(.002, 2);\n\t\tv.add(.006, 6);\n\t\tv.add(.005, 5);\n\t\tv.add(.001, 1);\n\t\tv.add(.004, 4);\n\t\tv.add(.003, 3);\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t}", "public Decision bestFor(final QueueContext context);" ]
[ "0.62340534", "0.606084", "0.6004087", "0.5907552", "0.58673227", "0.5842667", "0.5829236", "0.5806292", "0.5749295", "0.57436883", "0.57099545", "0.5698381", "0.56726456", "0.5668612", "0.5648526", "0.56439775", "0.563166", "0.5609952", "0.5586697", "0.5581474", "0.55796266", "0.55796266", "0.55670005", "0.5561067", "0.5467151", "0.54575324", "0.5423033", "0.5419358", "0.54190904", "0.541805", "0.54092026", "0.54006743", "0.5397009", "0.5369842", "0.53680074", "0.5366055", "0.53651685", "0.53641814", "0.53324294", "0.53131086", "0.5304919", "0.52956706", "0.5295481", "0.52712715", "0.52704924", "0.52594876", "0.5253156", "0.5242727", "0.5225795", "0.52129877", "0.5209975", "0.52073795", "0.52073795", "0.52073795", "0.52073795", "0.52073795", "0.52073795", "0.52073795", "0.52073795", "0.52035093", "0.5184868", "0.5183948", "0.51783067", "0.51724535", "0.51708066", "0.5168076", "0.5159888", "0.5144615", "0.51366144", "0.51314336", "0.51289815", "0.5124947", "0.51240367", "0.5121755", "0.5118265", "0.5113948", "0.5113948", "0.5113948", "0.51101774", "0.51082844", "0.51012665", "0.51008546", "0.50937754", "0.5093365", "0.5083012", "0.5082054", "0.5079952", "0.50761175", "0.5067955", "0.5065669", "0.50615907", "0.5061095", "0.5043066", "0.5041894", "0.5041894", "0.5039655", "0.50344807", "0.5029095", "0.502799", "0.50264513" ]
0.6184068
1
Select pivot x uniformly from A[p...r]
private static int randomizedPartition(int[] A, int p, int r) { Random rand = new Random(); int idx = p+rand.nextInt(r-p+1); int x = A[idx]; int i = p; int j = r; // LI:A[p...i] ≤ x, A[j...r] ≥ x while (true) { while (A[i] < x) i++; while (A[j] > x) j--; if (i >= j) return j; exchange(A, i, j); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected T pickPivot(T[] array, int start, int end) {\n\t\treturn array[start];\n\t}", "@Nonnull\n public int [] getPivot ()\n {\n return Arrays.copyOf (m_aPivot, m_nRows);\n }", "private static int partition(int[] a, int p, int r) {\n int i = p;\n int pivot = a[r];\n // put the larger number front, put the smaller number behind.\n\n for (int j = p; j < r; j++) {\n if (a[j] < pivot) {\n int tmp = a[i];\n a[i] = a[j];\n a[j] = tmp;\n i++;\n }\n }\n\n // exchange a[i] and a[r].\n int tmp = a[i];\n\n a[i] = a[r];\n a[r] = tmp;\n System.out.println(i);\n return i;\n }", "public static int partition(int[] A, int p, int r) {\n\t\tint pivot = A[p];\n\t\tint i = p;\n\t\tint j = r;\n\t\tint temp = 0;\n\t\twhile(j > i) {\n\t\t\twhile(A[i] <= pivot && j > i) { i++; }\n\t\t\twhile(A[j] > pivot && j >= i) { j--; }\n\t\t\tif (j > i) {\n\t\t\t\ttemp = A[i];\n\t\t\t\tA[i] = A[j];\n\t\t\t\tA[j] = temp;\n\t\t\t}\n\t\t}\n\t\ttemp = A[p];\n\t\tA[p] = A[j];\n\t\tA[j] = temp;\n\t\treturn j;\n\t\n\t}", "private int pivotIndex(int left, int right){\n\t\treturn left+ (int)(Math.random()*(right - left + 1));\n\t}", "private static int pickPivot(int[] A, int lo, int hi){\n\t\tint[] arr = new int[A.length-1];\n\t\tfor(int i = 0; i < arr.length; i++){\n\t\t\tarr[i] = A[i];\n\t\t}\n\t\t\n\t\tif((hi - lo) < 5){\n\t\t\treturn findMedian(arr, lo, hi);\n\t\t}\n\t\t\n\t\tint index = lo;\n\t\tfor(int i = lo; i < hi; i += 5){\n\t\t\tint rightEnd = i + 4;\n\t\t\t\n\t\t\tif(rightEnd > hi){\n\t\t\t\trightEnd = hi;\n\t\t\t}\n\t\t\t\n\t\t\tint median = findMedian(arr, i, rightEnd);\n\t\t\tswap(arr, median, index);\n\t\t\tindex++;\n\t\t}\n\t\t\n\t\treturn pickPivot(arr, lo, (lo + (int)Math.ceil((hi-lo)/5)));\n\t}", "public Matrix[] palu() {\n\t\tHashMap<Integer, Integer> permutations = new HashMap<Integer,Integer>();\n\t\tMatrix m = copy();\n\t\tint pivotRow = 0;\n\t\tfor (int col = 0; col < m.N; col++) {\n\t\t\tif (pivotRow < m.M) {\n\t\t\t\tint switchTo = m.M - 1;\n\t\t\t\twhile (pivotRow != switchTo && \n\t\t\t\t\t\tm.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\tm = m.rowSwitch(pivotRow, switchTo);\n\t\t\t\t\tpermutations.put(pivotRow, switchTo);\n\t\t\t\t\tswitchTo--;\n\t\t\t\t}\n\t\t\t\tif (!m.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < m.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = m.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = m.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tm = m.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tMatrix p = identity(m.M);\n\t\tfor (Integer rowI : permutations.keySet()) {\n\t\t\tp.rowSwitch(rowI, permutations.get(rowI));\n\t\t}\n\t\tMatrix l = identity(m.M);\n\t\tMatrix u = p.multiply(copy());\n\t\t\n\t\tpivotRow = 0;\n\t\tfor (int col = 0; col < u.N; col++) {\n\t\t\tif (pivotRow < u.M) {\n\t\t\t\t// Should not have to do any permutations\n\t\t\t\tif (!u.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < u.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = u.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = u.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tu = u.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t\tl = l.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tl = l.inverse();\n\t\tMatrix[] palu = {p, this, l, u};\n\t\treturn palu;\n\t}", "public interface IPivotStrategy<T>\r\n{\r\n /**\r\n * Returns the index of the element selected as the pivot value\r\n * within the subarray between first and last (inclusive).\r\n * \r\n * @param arr the array in which to select the pivot\r\n * @param first beginning of the subarray\r\n * @param last end of the subarray\r\n * @param comp the comparator to be used\r\n * @return index of the element selected as the pivot value\r\n * @throws IllegalArgumentException if the length of the subarray\r\n * (last - first + 1) is less than the value returned by minLength().\r\n */\r\n int indexOfPivotElement(T[] arr, int first, int last, Comparator<? super T> comp);\r\n\r\n /**\r\n * Returns the minimum length of the subarray to which this \r\n * partitioning strategy can be applied.\r\n * \r\n * @return minimum size of the subarray required to apply this\r\n * pivot selection strategy\r\n */\r\n int minLength();\r\n\r\n /**\r\n * Returns the number of comparisons performed in the most recent call\r\n * to indexOfPivotElement\r\n * @return number of comparisons\r\n */\r\n int getComparisons();\r\n \r\n /**\r\n * Returns the number of swaps performed in the most recent call\r\n * to indexOfPivotElement. For algorithms that do not use swapping, \r\n * this method returns an estimate of swaps equivalent to one-third\r\n * the number of times that an array element was assigned.\r\n * @return equivalent number of swaps\r\n */\r\n int getSwaps();\r\n \r\n}", "PivotFunction createPivotFunction();", "private static int getPivot(int left, int right) {\n\t\treturn (left+right)/2;\n\t}", "public int[] partitionRangeWithOnePivot\n ( int[] vArray, int start\n , int stop, int pivotIndex) {\n int boundary2 \n = part1.partitionRange\n ( vArray, start, stop, pivotIndex );\n int boundary1 \n = part2.swapEqualToRight\n ( vArray, start, boundary2, vArray[boundary2] );\n return new int[] \n { start, boundary1, boundary2+1, stop };\n }", "static int findPivot(int[] a) {\n int start = 0, end = a.length - 1;\n\n while (start <= end) {\n int mid = start + (end - start) / 2;\n\n if (mid < end && a[mid] > a[mid + 1])\n return mid;\n if (mid > start && a[mid] < a[mid - 1])\n return mid - 1;\n if (a[mid] <= a[start])\n end = mid - 1;\n else\n start = mid + 1;\n }\n\n return -1;\n }", "interface PivotPicker {\n int getPivot(int[] arr, int left, int right);\n }", "static\nint\nfindPivot(\nint\narr[], \nint\nn) \n{ \n\nint\ni; \n\nfor\n(i = \n0\n; i < n; i++) \n\n{ \n\nif\n(arr[i] > arr[(i + \n1\n) % n]) \n\nreturn\ni; \n\n} \n\nreturn\n0\n; \n}", "private static int partition2(int[] a, int p, int r) {\n int pivot = a[p];\n int left = p+1;\n int right = r;\n boolean flag= false;\n while (!flag) {\n while (left <= right && a[left] <= pivot) {\n left++;\n }\n while (left <= right && a[right] >= pivot) {\n right--;\n }\n if (left > right) {\n flag = true;\n } else {\n int tmp = a[left];\n a[left] = a[right];\n a[right] = tmp;\n }\n }\n\n // exchange a[p] and a[right].\n int tmp = a[p];\n a[p] = a[right];\n a[right] = tmp;\n\n // the right is the index of pivot.\n return right;\n }", "public void setPivot(int x, int y) {\n pivot = new Point(x, y);\n }", "public static int findPivot(int[] arr) {\n\t int low=0;\n\t int high=arr.length-1;\n\t while(low<high)\n\t {\n\t int mid= (low+high)/2;\n\t if(arr[mid]<arr[high])\n\t {\n\t high=mid;\n\t }\n\t else\n\t {\n\t low=mid+1;\n\t }\n\t }\n\t return arr[low];\n\t }", "private int partition (Column A, int [] ix, int p, int r, int begin) {\n\t\tint i = p - 1;\n\t\tint j = r + 1;\n\t\tboolean isMissing = A.isValueMissing(ix[p]);\n\t\twhile (true) {\n\t\t\tif (isMissing) {\n\t\t\t\tj--;\n\t\t\t\tdo {\n\t\t\t\t\ti++;\n\t\t\t\t} while (!A.isValueMissing(ix[i]));\n\t\t\t} else {\n\n\t\t\t\t// find the first entry [j] <= entry [p].\n\t\t\t\tdo {\n\t\t\t\t\tj--;\n\t\t\t\t} while (A.isValueMissing(ix[j]) || A.compareRows (ix[j], ix[p]) > 0);\n\t\n\t\t\t\t// now find the first entry [i] >= entry [p].\n\t\t\t\tdo {\n\t\t\t\t\ti++;\n\t\t\t\t} while (!A.isValueMissing(ix[i]) && A.compareRows (ix[i], ix[p]) < 0);\n\t\t\t}\n\n\t\t\tif (i < j) {\n\t\t\t\tthis.swapRows(i+begin, j+begin);\n\t\t\t\tint tmp = ix[i];\n\t\t\t\tix[i] = ix[j];\n\t\t\t\tix[j] = tmp;\n\t\t\t} else\n\t\t\t\treturn j;\n\t\t}\n\t}", "private static int partition(int[] a, int l, int r)\r\n {\r\n int pivot = a[(l + r)/ 2];\r\n while(l <= r)\r\n {\r\n while(a[l] < pivot)\r\n l++;\r\n \r\n while(pivot < a[r])\r\n r--;\r\n \r\n if(l <= r)\r\n {\r\n int temp = a[l];\r\n a[l] = a[r];\r\n a[r] = temp;\r\n l++;\r\n r--;\r\n }\r\n }\r\n return l;\r\n }", "int indexOfPivotElement(T[] arr, int first, int last, Comparator<? super T> comp);", "public final AstValidator.pivot_clause_return pivot_clause() throws RecognitionException {\n AstValidator.pivot_clause_return retval = new AstValidator.pivot_clause_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree PIVOT123=null;\n CommonTree INTEGER124=null;\n\n CommonTree PIVOT123_tree=null;\n CommonTree INTEGER124_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:304:5: ( ^( PIVOT INTEGER ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:304:7: ^( PIVOT INTEGER )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n PIVOT123=(CommonTree)match(input,PIVOT,FOLLOW_PIVOT_in_pivot_clause1319); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n PIVOT123_tree = (CommonTree)adaptor.dupNode(PIVOT123);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(PIVOT123_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n INTEGER124=(CommonTree)match(input,INTEGER,FOLLOW_INTEGER_in_pivot_clause1321); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n INTEGER124_tree = (CommonTree)adaptor.dupNode(INTEGER124);\n\n\n adaptor.addChild(root_1, INTEGER124_tree);\n }\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "private int random_partition(Object arr[], int left, int right) {\n\t\t\n\t\tint n = right - left + 1, i = left;\n\t\tint pivot_index = ThreadLocalRandom.current().nextInt(n);\n\t\tswap(arr, left + pivot_index, right); // randomly select a pivot and exchange it with the rightmost element\n\t\tObject pivot = arr[right];\n\t\tfor (int j = left; j <= right - 1; j++) {\n\t\t\tif (((Comparable)arr[j]).compareTo(pivot) > 0) {\n\t\t\t\tswap(arr, i, j);\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tswap(arr, i, right);\n\t\treturn i;\n\t}", "@Nonnull\n public double [] getDoublePivot ()\n {\n final double [] vals = new double [m_nRows];\n for (int i = 0; i < m_nRows; i++)\n vals[i] = m_aPivot[i];\n return vals;\n }", "PivotForClause createPivotForClause();", "static int findPivot(int[] arr){\n int start = 0;\n int end = arr.length-1;\n\n while(start<=end){\n int mid = start + (end - start) / 2;\n\n if(mid < end && arr[mid] > arr[mid+1]){\n return mid;\n }\n else if(mid > start && arr[mid] < arr[mid-1]){\n return mid - 1;\n }\n// Pivot lies on the left-hand side and mid is currently in section 2\n else if(arr[start] >= arr[mid]){\n end = mid - 1;\n }\n// Pivot lies on the right-hand side and mid is currently in section1\n// arr[start] < arr[mid]\n else {\n start = mid + 1;\n }\n }\n return -1;\n }", "private int quickSelect(int[] a, int low, int high,int k) {\n //using quick sort\n //put nums that are <= pivot to the left\n //put nums that are > pivot to the right\n int i = low, j = high, pivot = a[high];\n while(i < j) {\n if(a[i++] > pivot)\n swap(a, --i, --j);\n }\n swap(a, i, high);\n\n //count the nums that are <= pivot from low\n int m = i - low + 1;\n if(m == k)\n return i;\n //pivot is too big\n else if(m > k)\n return quickSelect(a, low, i-1, k);\n else\n return quickSelect(a, i+1, high, k - m);\n }", "public int quickSelect(int[] a, int l, int h, int k){\n int pivot=a[h],pIndex=l;\n for(int i=l;i<h;i++){\n if(a[i]<=pivot){\n swap(a,i,pIndex);\n pIndex++;\n }\n }\n \n swap(a,pIndex,h);\n if(k==pIndex)return a[pIndex]);\n else if(k>pIndex){\n return quickSelect(a,l,pIndex-1,k);\n }else return quickSelect(a,pIndex+1,h,k); \n \n }", "public void permutate(int[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "private static int partition(int left, int right, int pivot, List<Integer> A) {\n int pivotValue = A.get(pivot);\n int largerIndex = left;\n\n Collections.swap(A, pivot, right);\n for (int i = left; i < right; ++i) {\n if (A.get(i) > pivotValue) {\n Collections.swap(A, i, largerIndex++);\n }\n }\n Collections.swap(A, right, largerIndex);\n return largerIndex;\n }", "com.google.analytics.data.v1beta.OrderBy.PivotOrderBy getPivot();", "private int partition(int p, int r) {\n int i = p, temp = 0;\n for (int j = p; j < r; j++) {\n if (data[j] <= data[r]) {\n if (i != j) {\n temp = data[i];\n data[i] = data[j];\n data[j] = temp;\n }\n i++;\n }\n }\n temp = data[i];\n data[i] = data[r];\n data[r] = temp;\n return i;\n }", "private int partition(int first, int n) {\n int pivotIndex = first;\n int last = first + n - 1;\n int pivotValue = a[first++];\n while (first <= last) {\n\t while (first <= last && a[first] <= pivotValue)\n\t first++;\n\t while (last >= first && a[last] > pivotValue)\n last--;\n if (first < last) \n\t swap(first, last);\n }\n swap(pivotIndex, last);\n return last;\n }", "private static int partion(int[] arr, int lo, int hi) {\n int pivot = arr[hi];\n int i = lo;\n for (int j = lo; j <= hi; j++) {\n if (arr[j] < pivot) {\n int tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n i++;\n }\n }\n int tmp = arr[i];\n arr[i] = arr[hi];\n arr[hi] = tmp;\n return i;\n }", "protected abstract int quickSelect(Integer[] map, int right, int idx);", "public static int partition(int[] arr, int left,int right)\n\t{\n//\t\tint pivot = arr[pivotIndex];\n\t\tint random = generateRandom(left, right);\n\t\tint pivot = arr[random];\n\t\tswap(arr,left,random);\n\t\n\t\tint tmp=left;//tmp is the index to partition the array for the given pivot\n\t\tfor(int i=left+1;i<=right;i++)\n\t\t{\n\t\t\tif(arr[i] <= pivot) \n\t\t\t{\n\t\t\t\ttmp++;\n\t\t\t\tswap(arr,tmp,i);\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\tswap(arr, left, tmp);\n\t\treturn tmp;\n\t\t\t\n\t}", "private static int partition(int[] arry,int first,int last){\n int pivot = first + new Random().nextInt(last - first + 1);\n swap(arry,last,pivot);\n for(int i = first;i<last;i++){\n if(arry[i]>arry[last]){\n swap(arry,i,first);\n first++;\n }\n }\n swap(arry,first,last);\n return first;\n }", "public static int twoWaypartitionWithRandomPivot(int[] nums, int lo, int hi) {\n\t\tint pivotIndex = randomPivot(lo, hi);\n\t\tint pivot = nums[pivotIndex];\n\t\tint i = lo;\n\t\tint j = hi + 1;\n\t\t// swap the pivot at the head of the array\n\t\tif (pivotIndex != lo) {\n\t\t\tswap(nums, pivotIndex, lo);\n\t\t}\n\n\t\twhile (true) {\n\n\t\t\twhile (nums[--j] > pivot)\n\t\t\t\tif (j == lo)\n\t\t\t\t\tbreak;\n\t\t\twhile (nums[++i] < pivot)\n\t\t\t\tif (i == hi)\n\t\t\t\t\tbreak;\n\n\t\t\tif (i >= j)\n\t\t\t\tbreak;\n\n\t\t\t// swap i j\n\t\t\tswap(nums, i, j);\n\n\t\t}\n\t\tswap(nums, lo, j);\n\n\t\treturn j;\n\t}", "DMatrixRMaj covariancePivotTransform(Vec aP) {\n // aP are the helix parameters for the new pivot point, assumed already to be\n // calculated by pivotTransform()\n // Note that no field rotation is assumed or accounted for here\n DMatrixRMaj mF = new DMatrixRMaj(5,5);\n helix.makeF(aP, mF);\n CommonOps_DDRM.multTransB(helix.C, mF, tempM);\n CommonOps_DDRM.mult(mF, tempM, tempA);\n return tempA;\n }", "private static int QuickSelect(int[] arr, int lo, int hi, int k){\n if(hi <= lo) return arr[lo];\n\t\t\n\t\tint p = pickPivot(arr, lo, hi);\n\t\tint j = partition(arr, lo, hi, p);\n\t\t\n\t\tif(k <= j){\n\t\t\treturn QuickSelect(arr, lo, j-1, k);\n\t\t} else if (k == j+1){\n\t\t\treturn arr[j];\n\t\t} else {\n\t\t\treturn QuickSelect(arr, j+1, hi, k);\n\t\t}\n }", "int permute(int p) {\n int index = wrap(p);\n if (_map != null && _map.containsKey(index)) {\n return _map.get(index);\n } else {\n return index;\n }\n }", "@Override\n public Vector viewRow(int row) {\n if (row < 0 || row >= rowSize()) {\n throw new IndexException(row, rowSize());\n }\n return new PermutedVectorView(base.viewRow(rowPivot[row]), columnPivot, columnUnpivot);\n }", "private static int partition(Array A, int iStart, int iEnd, int pivot)\n\t{\n\t\tA.swap(iStart, pivot);\n\t\tint p = A.get(iStart); // the value of the pivot element\n\t\tint i = iStart + 1;\n\t\tfor (int j = iStart + 1; j <= iEnd; ++j)\n\t\t{\n\t\t\tif (A.get(j) < p)\n\t\t\t{\n\t\t\t\tA.swap(i,j);\n\t\t\t\t++i;\n\t\t\t}\n\t\t}\n\t\tA.swap(iStart, i - 1);\n\t\treturn i - 1; // return the final position of the pivot\n\t}", "public void permutate(double[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "static int[] permutationEquation(int[] p) {\n int[] ret = new int[p.length];\n HashMap<Integer,Integer> values = new HashMap<>();\n for(int i = 0; i < p.length; i++){\n values.put(p[i],i+1);\n }\n for(int i = 1; i <=p.length; i++){\n int index1 = values.get(i);\n int index2 = values.get(index1);\n ret[i-1] = index2;\n }\n return ret;\n }", "private int choosePivot(int leftPos, int rightPos)\n {\n // iden \n int midPos = (leftPos+rightPos)/2;\n\n int firstCode = cardAry[leftPos].hashCode();\n int midCode = cardAry[midPos].hashCode(); \n int lastCode = cardAry[rightPos].hashCode();\n\n int medianCode = pickMedian(firstCode,midCode,lastCode);\n\n this.nqSortComparisons+=4;\n if( medianCode==firstCode)\n return leftPos;\n if(medianCode==midCode)\n return midPos;\n\n return rightPos; \n }", "private static <T> void quickSort(@Nonnull List<T> x, @Nonnull Comparator<? super T> comparator, int off, int len) {\n if (len < 7) {\n for (int i = off; i < len + off; i++) {\n for (int j = i; j > off && comparator.compare(x.get(j), x.get(j - 1)) < 0; j--) {\n swapElements(x, j, j - 1);\n }\n }\n return;\n }\n\n // Choose a partition element, v\n int m = off + (len >> 1); // Small arrays, middle element\n if (len > 7) {\n int l = off;\n int n = off + len - 1;\n if (len > 40) { // Big arrays, pseudomedian of 9\n int s = len / 8;\n l = med3(x, comparator, l, l + s, l + 2 * s);\n m = med3(x, comparator, m - s, m, m + s);\n n = med3(x, comparator, n - 2 * s, n - s, n);\n }\n m = med3(x, comparator, l, m, n); // Mid-size, med of 3\n }\n T v = x.get(m);\n\n // Establish Invariant: v* (<v)* (>v)* v*\n int a = off;\n int b = a;\n int c = off + len - 1;\n int d = c;\n while (true) {\n while (b <= c && comparator.compare(x.get(b), v) <= 0) {\n if (comparator.compare(x.get(b), v) == 0) {\n swapElements(x, a++, b);\n }\n b++;\n }\n while (c >= b && comparator.compare(v, x.get(c)) <= 0) {\n if (comparator.compare(x.get(c), v) == 0) {\n swapElements(x, c, d--);\n }\n c--;\n }\n if (b > c) break;\n swapElements(x, b++, c--);\n }\n\n // Swap partition elements back to middle\n int n = off + len;\n int s = Math.min(a - off, b - a);\n vecswap(x, off, b - s, s);\n s = Math.min(d - c, n - d - 1);\n vecswap(x, b, n - s, s);\n\n // Recursively sort non-partition-elements\n if ((s = b - a) > 1) quickSort(x, comparator, off, s);\n if ((s = d - c) > 1) quickSort(x, comparator, n - s, s);\n }", "public static int findPivot(int[] arr) {\n // write your code here\n /*\n - if arr[rhs]<arr[mid] then min-val will lie in rhs\n else if arr[rhs]>arr[mid] then min-val will lie in lhs\n else if(i==j) means we have found the min-val, so return its value.\n */\n int i=0, j = arr.length-1, mid = (i+j)/2;\n while(i<=j) {\n mid = (i+j)/2;\n if(arr[j]<arr[mid])\n i = mid+1;\n else if(arr[j]>arr[mid])\n j = mid;\n else if(i==j)\n return arr[mid];\n }\n return -1;\n }", "public void quickSort(int[] list, int p, int r){\r\n\t\tif(p<r){\r\n\t\t\tint q = partition(list, p, r);\r\n\t\t\tquickSort(list, p, q-1);\r\n\t\t\tquickSort(list, q+1, r); \r\n\t\t}\r\n\t}", "Pivots createPivots();", "@Override\n public Matrix like() {\n return new PivotedMatrix(base.like());\n }", "public static int partition(int[] data, int i, int pivot){\n\t\tint left = i - 1;\n\t\tint right = i;\n\t\twhile(right < data.length){\n\t\t\tif(pivot >= data[right]){\n\t\t\t\tint tmp = data[++left];\n\t\t\t\tdata[left] = data[right];\n\t\t\t\tdata[right] = tmp;\n\t\t\t}\n\t\t\tright++;\n\t\t}\n\t\treturn left;\n\t}", "public int Select(int[] A, int k, int l, int h){\n\tint low = l;\n\tint high = h-1;\n\tint pivot= A[l];\n\tint index = 0;\n\t//switches the two\n\tint first= A[l];\n\tint second= A[h];\n\tA[l]=second;\n\tA[h]=first;\n\twhile(low < high) {\n\t if (A[low] < pivot) {\n\t\tlow++;\n\t } else {\n\t\tint uno= A[low];\n\t\tA[low]= A[high];\n\t\tA[high]=uno;\t\n\t\thigh--;\n\t }\n\t}\n\tif (A[low] < pivot){\n\t A[h] = A[low + 1];\n\t index = low + 1;\n\t A[index] = pivot;\n\n\t}\n if (A[low] > pivot){\n\t A[h] = A[low];\n\t index = low;\n\t A[index] = pivot;\n\t}\n\t//rec\n\tif (low < k) {\n\t Select(A,k,index+1,h);\n\t}\n if (low > k) {\n\t Select(A,k,l,index-1);\n\t}\n\treturn A[k];\n }", "public PointF getRotationPivot()\n {\n return rotationPivot;\n }", "protected abstract void partialQuickSort(Integer[] map, int left, int right, int minIdx, int maxIdx);", "public Integer[] createPermutation() {\n Integer[] value = createSortedArray();\n\n for (int c = 0; c < 5; c++) {\n for (int i = 0; i<value.length; i++) {\n int j = (int)(Math.random()*value.length);\n int temp = value[i];\n value[i] = value[j];\n value[j] = temp;\n }\n }\n \n return value;\n }", "public static int partition(int[] arr, int pivot, int lo, int hi) {\n System.out.println(\"pivot -> \" + pivot);\n int i = lo, j = lo;\n while (i <= hi) {\n if (arr[i] <= pivot) {\n swap(arr, i, j);\n i++;\n j++;\n } else {\n i++;\n }\n }\n System.out.println(\"pivot index -> \" + (j - 1));\n return (j - 1);\n }", "public static int partition(int[] data, int start, int end) {\n int pivotIndex = (int) (Math.random()*(end - start) + start);\n int pivot = data[pivotIndex];\n int low = start + 1;\n int high = end;\n data[pivotIndex] = data[0];//swap pivot and index\n data[0] = pivot;//swap pivot and index\n while(low <= high){//while still within bounds\n if(data[low] > pivot){//if less than the pivot\n swap(data, low, high);\n high--;\n }else{\n low++;//start moves over by one\n }\n }\n swap(data, start, high);\n return high;\n }", "private static void sort1(int[] x, IntComparator comp, int off, int len) {\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && comp.compare(x[j-1],x[j])>0; j--)\n\t\t\t\t\tswap(x, j, j-1);\n\t\t}\n\t\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x,comp, l, l+s, l+2*s);\n\t\t\t\tm = med3(x,comp, m-s, m, m+s);\n\t\t\t\tn = med3(x,comp, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x,comp, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tint v = x[m];\n\t\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && comp.compare(x[b],v)<=0) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && comp.compare(x[c],v)>=0) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x, b++, c--);\n\t\t}\n\t\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,b, n-s, s);\n\t\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,comp, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,comp, n-s, s);\n\t}", "public static <T extends Comparable<T>> int partition(T[] array, int p, int r)\n {\n T x = array[r];\n int i = p - 1;\n for (int j = p; j < r; j++) {\n if (array[j].compareTo(x) <= 0) {\n i++;\n SortHelper.exchange(array, i, j);\n }\n }\n SortHelper.exchange(array, i + 1, r);\n\n return i + 1;\n }", "private int randomPartition(int p, int r) {\n int n = r - p + 1;\n int i = ran.nextInt(n);\n int temp = data[r];\n data[r] = data[p + i];\n data[p + i] = temp;\n return partition(p, r);\n }", "PivotInClause createPivotInClause();", "public static int hoarePartitioning(Point[] A, int left, int right) {\n int p = A[left].x;\n // Pivot selected as the first element in the array list.\n // Init internal indices for double-scans.\n int i = left;\n // First item to be considered is at i+1 (see do-while).\n int j = right + 1;\n // First item to be considered is at j-1 (see do-while).\n // Loop to perform multiple double-scans.\n do {\n // Left-to-right scan.\n while ((i <= (A.length - 1)) && (A[i].x < p)) {\n i++;\n }\n // Right-to-left scan.\n do {\n j--;\n } while ((j >= 0) && (A[j].x > p));\n // Swap A[i] with A[j].\n Point temp = A[i];\n A[i] = A[j];\n A[j] = temp;\n } while (i < j);\n // Stop when double-scans indices met.\n // Undo the last swap because i was >= than j (re-swap A[i] with A[j]).\n Point temp = A[i];\n A[i] = A[j];\n A[j] = temp;\n // Put pivot in correct position (swap pivot at A[left] with A[j]).\n temp = A[left];\n A[left] = A[j];\n A[j] = temp;\n // Return index of pivot in final partitioning.\n return j;\n }", "public static int[] quickselect(int[] arr, int start, int end) {\n if(start < end) return new int[] {};\n int pivot = partition(arr, start ,end );\n //int mid = (0 + arr.length)/2;\n quickselect(arr, start, pivot);\n quickselect(arr, pivot + 1, end);\n return arr;\n }", "private static int select (int[] arr, int p, int n, int k){\n //threshold of 17\n if(n < 17 ){\n insertionSort(arr, p, p+n-1);\n return arr[p + n - k];\n }else{\n int q = randomizedPartition(arr,p,p+n-1);\n int left = q-p;\n int right = n - left - 1;\n if(right >= k)\n return select(arr,q+1,right,k);\n else if(right + 1 == k )\n return arr[q];\n else\n return select(arr,p,left,k-right-1);\n }\n }", "@Override\n public Matrix like(int rows, int columns) {\n return new PivotedMatrix(base.like(rows, columns));\n }", "public int partition(int[] list, int p, int r){\r\n\t\tint x=list[r];\r\n\t\tint i=p-1;\r\n\t\tfor(int j=p; j<=r-1; j++){\r\n\t\t\tif(list[j]<=x){\r\n\t\t\t\ti++;\r\n\t\t\t\tint temp = list[j];\r\n\t\t\t\tlist[j]=list[i];\r\n\t\t\t\tlist[i]=temp;\r\n\t\t\t}\r\n\t\t}\r\n\t\tint temp = list[r];\r\n\t\tlist[r] = list[i+1];\r\n\t\tlist[i+1] = temp;\r\n\t\treturn i+1;\r\n\t}", "public void setPivotX(float f) {\n this.pivotX = f;\n }", "public pair[] modifyAPosition(pair[] p, int[] values){\n int parameter = values.length;\n pair[] res = new pair[p.length];\n int index = random.nextInt(p.length);\n int j = 0;\n for(int i = 0; i < p.length; i++){\n if(i != index){\n res[j] = new pair(p[i].par, p[i].val);\n j++;\n\t }\n\t}\n\tint par = random.nextInt(parameter);\n while(containsPar(res, res.length - 1, par))\n\t par = random.nextInt(parameter);\n res[res.length - 1] = new pair(par, random.nextInt(values[par]));\n return res;\n }", "private Integer chooseMedianPivot(Integer[] pivotChoices) {\n\t\tthis.qs.sort(pivotChoices);\n\t\tif ((pivotChoices.length % 2) == 0) {\n\t\t\treturn (pivotChoices[pivotChoices.length / 2 - 1]);\n\t\t} else {\n\t\t\treturn (pivotChoices[pivotChoices.length / 2]);\n\t\t}\n\t}", "private int partition(MyNode[] arr, int lo, int hi) {\n MyNode pivot = arr[lo];\n int left = lo + 1;\n int right = hi;\n transitions.add(colorNode(arr, PIVOT_COLOR, lo));\n while (true)\n {\n while ((left <= right) && arr[left].getValue() < pivot.getValue())\n {\n transitions.add(colorNode(arr, LEFT_COLOR, left));\n transitions.add(colorNode(arr, START_COLOR, left));\n left++;\n }\n while ((left <= right) && arr[right].getValue() >= pivot.getValue())\n {\n transitions.add(colorNode(arr, RIGHT_COLOR, right));\n transitions.add(colorNode(arr, START_COLOR, right));\n right--;\n }\n if (left < right)\n {\n transitions.add(colorNode(arr, SELECT_COLOR, left, right));\n transitions.add(swap(arr, left, right));\n transitions.add(colorNode(arr, START_COLOR, left, right));\n left++;\n right--;\n }\n else\n {\n break;\n }\n }\n transitions.add(colorNode(arr, SELECT_COLOR, lo, right));\n transitions.add(swap(arr, lo, right));\n transitions.add(colorNode(arr, START_COLOR, lo, right));\n return right;\n }", "PivotTable createPivotTable();", "public static void quickSort(int[] a, int startIndex, int endIndex) {\r\n int pivotIndex; // the index of pivot returned by the quicksort partition\r\n // if the set has more than one element, then partition\r\n if (startIndex < endIndex) {\r\n // partition and return the pivotIndex\r\n pivotIndex = partition(a, startIndex, endIndex);\r\n // recursive call to quicksort on low half\r\n quickSort(a, startIndex, pivotIndex - 1);\r\n // recursive call to quicksort on high half \r\n quickSort(a, pivotIndex + 1, endIndex);\r\n } // end if\r\n }", "public static void quicksortByX(Point[] A, int left, int right) {\n if (left < right) {\n // Array partitioning (any partitioning algorithm can be used here).\n int pivot = hoarePartitioning(A, left, right);\n // Recursive application of Quicksort to left-part and right-part.\n quicksortByX(A, left, pivot - 1);\n quicksortByX(A, pivot + 1, right);\n }\n }", "PivotCol createPivotCol();", "public double[] getRowPackedCopy() {\n double[] vals = new double[m*n];\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n vals[i*n+j] = data[i][j];\n }\n }\n return vals;\n }", "@Override\n public Vector viewColumn(int column) {\n if (column < 0 || column >= columnSize()) {\n throw new IndexException(column, columnSize());\n }\n return new PermutedVectorView(base.viewColumn(columnPivot[column]), rowPivot, rowUnpivot);\n }", "public int select(int[] nums, int left, int right) {\n\t\tif (left >= right) {\n\t\t\treturn left;\n\t\t}\n\t\t\n\t\tint pivot = nums[left];\n\t\tint p = left;\n\t\tfor (int i = left+1; i <= right; i++) {\n\t\t\tif (smaller(nums[i], pivot)) {\n\t\t\t\tp++;\n\t\t\t\tswap(nums, i, p);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tswap(nums, left, p);\n\t\t\n\t\treturn p;\n\t}", "PivotFunctions createPivotFunctions();", "public void permutate(float[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "private static <E extends Comparable<? super E>> int partition(\r\n\t\t\tComparable<E>[] data, int left, int right, E pivot) {\r\n\t\tint i = left;\r\n\t\tint j = right - 1;\r\n\r\n\t\twhile (true) {\r\n\t\t\twhile (data[++i].compareTo(pivot) < 0) {\r\n\t\t\t}\r\n\t\t\twhile (data[--j].compareTo(pivot) > 0) {\r\n\t\t\t}\r\n\t\t\tif (i < j)\r\n\t\t\t\tswap(data, i, j);\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tswap(data, i, right - 1);\r\n\t\treturn i;\r\n\t}", "private static <AnyType extends Comparable<? super AnyType>> void quickSelect(AnyType[] a, int left, int right, int k)\n {\n if(left + CUTOFF <= right)\n {\n AnyType pivot = median3(a, left, right);\n\n // Begin partitioning\n int i = left, j = right - 1;\n for( ; ; )\n {\n while(a[++i].compareTo(pivot) < 0);\n while(a[--j].compareTo(pivot) > 0);\n if(i < j)\n CommonFunc.swapReference(a, i, j);\n else \n break;\n }\n\n CommonFunc.swapReference(a, i, right - 1);\n\n // if k = i + 1, the a[i] is the kth smallest item\n if(k <= i)\n quickSelect(a, left, i - 1, k);\n else if(k > i + 1)\n quickSelect(a, i + 1, right, k);\n }\n else // Do an insertion sort on the subarray\n Insertionsort.insertionsort(a, left, right);\n }", "public int doPartition(int[] A, int start, int end) {\n\t\tint pivot = A[end]; // PIVOT element is the last element of array (as per convention)\n\t\tSystem.out.println(\"Pivot-Value = A[\" + end + \"] = \" + pivot);\n\t\tint i = start;\n\t\t\n\t\tfor(int j=i; j<=end-1; j++) {\n\t\t\tif(A[j] <= pivot) {\n\t\t\t\tSystem.out.println(\"Exchanging A[\" + i + \"] with A[\" + j + \"]\");\n\t\t\t\tint temp1 = A[i];\n\t\t\t\tA[i] = A[j];\n\t\t\t\tA[j] = temp1;\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Array state of A after Exchange steps:\");\n\t\tprintArray(A);\n\t\t\n\t\tSystem.out.println(\"Moving PIVOT to index \" + i + \" Exchanging A[\" + i + \"] with A[\" + end + \"]\");\n\t\tint temp2 = A[i];\n\t\tA[i] = A[end];\n\t\tA[end] = temp2;\n\t\t\n\t\treturn i;\n\t}", "public void permutate(Object[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }", "public double[] getColumnPackedCopy() {\n double[] vals = new double[m*n];\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n vals[i+j*m] = data[i][j];\n }\n }\n return vals;\n }", "public static double[] solveSing(double[][] A) {\n\t\t//TODO: Diese Methode ist zu implementieren\n\t\t\n\t\tdouble T [][];\n\t\tdouble v [];\n\t\t\n\t\tif(A.length != A[0].length) {\n\t\t\tdouble error[] = {0};\n\t\t\treturn error;\n\t\t}\n\t\t\n\t\tdouble calc_A[][] = new double[A.length][A.length];\n\t\tSystem.arraycopy(A,0,calc_A,0,A.length);\n\t\t\n\t\tfor(int i = 0; i < A.length; i++) {\n\t\t\t// Pivot Suche\n\t\t\tint pivot_index = i;\n\t\t\tdouble pivot_element = calc_A[i][i];\n\t\t\tfor(int k = i; k < A.length; k++) {\n\t\t\t\tif(Math.abs(calc_A[i][k]) > Math.abs(pivot_element)) {\n\t\t\t\t\tpivot_index = k;\n\t\t\t\t\tpivot_element = calc_A[i][k];\n\t\t\t\t}\n\t\t\t}\n\t\t\t// matrix can't be solved by Gauss anymore\n\t\t\tif(Math.abs(pivot_element) <= 1E-10) {\n\t\t\t\tT = new double[i][i];\n\t\t\t\tv = new double[i];\n\t\t\t\t\n\t\t\t\t// copy the values into the triangle T\n\t\t\t\tfor(int a = 0; a < i; a++) {\n\t\t\t\t\tfor(int b = 0; b < i; b++) {\n\t\t\t\t\t\tT[a][b] = calc_A[a][b];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// copy the values into the vector v\n\t\t\t\tfor(int a = 0; a < i; a++) {\n\t\t\t\t\tv[a] = -1 * calc_A[i][a];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble x[] = backSubst(T,v);\n\t\t\t\tdouble result[] = new double[A.length];\n\t\t\t\tfor(int c = 0; c < x.length; c++) {\n\t\t\t\t\tresult[c] = x[c];\n\t\t\t\t}\n\t\t\t\tresult[x.length] = 1;\n\t\t\t\t// the rest is initialized as zero anyways in Java\n\t\t\t\treturn result;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(pivot_index != i) {\t// check if even necessary\n\n\t\t\t\t// switch pivot element line\n\t\t\t\tdouble buffer = 0D;\n\t\t\t\tfor(int k = 0; k < A.length; k++) {\n\t\t\t\t\tbuffer = calc_A[k][i];\n\t\t\t\t\tcalc_A[k][i] = calc_A[k][pivot_index]; \n\t\t\t\t\tcalc_A[k][pivot_index] = buffer;\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t// subtracting every row j > i by a(j,i)/a(i,i)\n\t\t\tdouble divisor = calc_A[i][i];\n\t\t\tif(divisor == 0) {\n\t\t\t\tdouble error[] = {0};\n\t\t\t\treturn error;\n\t\t\t}\n\t\t\tfor(int j = i+1; j < A.length; j++) {\n\t\t\t\tdouble add = calc_A[i][j]/divisor;\n\t\t\t\tfor(int k = 0; k < A.length; k++) {\n\t\t\t\t\tif(add != 0D) {\n\t\t\t\t\t\tcalc_A[k][j] -= calc_A[k][i]*add;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tdouble null_vector[] = new double[A.length];\n\t\treturn null_vector;\n\t\t\n\t}", "public static int[] permutation(int lower, int upper)\n\t{\n\t\tint[] permutation = null;\n\t\tif (upper - lower > 0)\n\t\t{\n\t\t\tpermutation = new int[upper - lower];\n\t\t\tRandom random = new Random();\n\t\t\tfor (int index = 0; index < permutation.length; index++)\n\t\t\t{\n\t\t\t\tpermutation[index] = index + (lower);\n\t\t\t}\n\t\t\tfor (int index = 0; index < permutation.length; index++)\n\t\t\t{\n\t\t\t\tint randomIndex = random.nextInt(upper - lower);\n\t\t\t\tint holder = permutation[randomIndex];\n\t\t\t\tpermutation[randomIndex] = permutation[index];\n\t\t\t\tpermutation[index] = holder;\n\t\t\t}\n\t\t}\n\t\treturn permutation;\n\t}", "private void doSort (Column A, int [] i, int p, int r, int begin) {//double[] A, int p, int r, MutableTable t) {\n\t\tif (p < r) {\n\t\t\tint q = partition(A, i, p, r, begin);\n\t\t\tdoSort(A, i, p, q, begin);\n\t\t\tdoSort(A, i, q + 1, r, begin);\n\t\t}\n\t}", "public static int pivotInteger(int n) {\n int total = n * (n + 1) / 2;\n\n int sum = 0;\n\n for (int i = 1; i <= n; i++) {\n sum += i;\n\n if ((total + i) % 2 == 0 && (total + i) / 2 == sum) {\n return i;\n }\n }\n\n return -1;\n }", "public int partition(int[] array, int left, int right, int pivot){\r\n while(left<=right){\r\n while(array[left] < pivot){\r\n left++;\r\n }\r\n while(array[right] > pivot){\r\n right--;\r\n }\r\n if(left <= right){\r\n\r\n int temp = array[left];\r\n array[left] = array[right];\r\n array[right] = temp;\r\n left++;\r\n right--;\r\n }\r\n }\r\n return left;\r\n }", "@VTID(15)\n com.exceljava.com4j.excel.SlicerPivotTables getPivotTables();", "private int partition(int[] array, int left, int right){\n int pivotId = getPivot(array,left,right);\n int pivot = array[pivotId];\n swap(array,pivotId,right);\n int i = left;\n int j = right-1;\n while(i<=j){\n if(array[i]<pivot){\n i++;\n }else if(array[i]>=pivot){\n swap(array,i,j);\n j--;\n }\n }\n swap(array,i,right);\n return i;\n }", "@Override\n protected int quickSelect(Integer[] map, int right, int idx) {\n int left = 0;\n do {\n int i = left;\n int j = right;\n int x = map[i + ((j - i) >> 1)];\n do {\n while (i < map.length && this.compareKeys(x, map[i]) > 0)\n i++;\n\n while (j >= 0 && this.compareKeys(x, map[j]) < 0)\n j--;\n\n if (i > j)\n break;\n\n if (i < j) {\n int temp = map[i];\n map[i] = map[j];\n map[j] = temp;\n }\n\n i++;\n j--;\n } while (i <= j);\n\n if (i <= idx)\n left = i + 1;\n else\n right = j - 1;\n\n if (j - left <= right - i) {\n if (left < j)\n right = j;\n\n left = i;\n } else {\n if (i < right)\n left = i;\n\n right = j;\n }\n } while (left < right);\n\n return map[idx];\n }", "public int partition(ArrayList<Integer> arr, int l, int r) {\n int pivot = arr.get(r);\n int pivotIndex = l;\n for (int i = l; i < r; i++) {\n if (arr.get(i) <= pivot) {\n swap(arr, i, pivotIndex);\n pivotIndex++;\n }\n }\n \n swap(arr, pivotIndex, r);\n return pivotIndex;\n }", "private static int partition(int[] arr, int left, int right) {\n\t\t\n\t\tint pivot = arr[(left + right) / 2];\n\t\t\n\t\twhile(left <= right) {\n\t\t\twhile(arr[left] < pivot) {\n\t\t\t\tleft++;\n\t\t\t}\n\t\t\twhile(arr[right] > pivot) {\n\t\t\t\tright--;\n\t\t\t}\n\t\t\tif(left <= right) { // once we find element > pivot on left and element < pivot on right :: swap\n\t\t\t\tswap(arr, left, right);\n\t\t\t\tleft++;\n\t\t\t\tright--;\n\t\t\t}\n\t\t}\n\t\treturn left;\n\t}", "private static int partition(int[] input, int start, int end) {\n int pivot = input[start];\n int i = start;\n int j = end;\n\n while (i < j) {\n while (i < j && input[--j] >= pivot) ; // empty loop body\n if (i < j) input[i] = input[j];\n\n while (i < j && input[++i] <= pivot) ; // empty loop body\n if (i < j) input[j] = input[i];\n }\n\n input[j] = pivot;\n return j;\n }", "@Override\n public double getQuick(int row, int column) {\n return base.getQuick(rowPivot[row], columnPivot[column]);\n }", "private static int[] generateArray(int i, int j) {\n int[] col = new int[j+1];\n for(int k = 0; k <= j; k++)\n {\n col[k] = (i+k)%Algo.x.length;\n } \n return col;\n }", "private int chooseInitialPivot(int beginIndex, int endIndex) {\n\t\treturn beginIndex + (endIndex - beginIndex) / 2; // Guard against\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// boundary\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// overflows\n\n\t}", "public static int quickSelect(int[] array, int startIdx, int endIdx, int position) {\n\n while (true) {\n if (startIdx > endIdx) {\n throw new RuntimeException(\"Your algorithm should never arrive here\");\n }\n\n int pivotIdx = startIdx;\n //left pointer always looks for the elements greater than pivot\n int leftIdx = startIdx + 1;\n //right pointer always looks for the elements lesser than pivot\n int rightIdx = endIdx;\n\n //when leftIdx > rightIdx => leftIdx always looks for elements greater than pivot but since rightIdx always looks for\n //elements lesser than pivot . since leftIdx > rightIdx => all elements from leftIdx are greater than pivot\n while (leftIdx <= rightIdx) {\n if (array[leftIdx] > array[pivotIdx] && array[rightIdx] < array[pivotIdx]) {\n swap(leftIdx, rightIdx, array);\n }\n if (array[leftIdx] <= array[pivotIdx]) {\n leftIdx++;\n }\n if (array[rightIdx] >= array[pivotIdx]) {\n rightIdx--;\n }\n }\n swap(pivotIdx, rightIdx, array);\n if (rightIdx == position) {\n return array[rightIdx];\n } else if (rightIdx < position) {\n startIdx = rightIdx + 1;\n } else {\n endIdx = rightIdx - 1;\n }\n }\n }", "private static void quickSort(Array A, int iStart, int iEnd)\n\t{\n\t\tif (iStart == iEnd)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tint pivot = Rand.randInt(iStart, iEnd);\n\t\tpivot = partition(A, iStart, iEnd, pivot);\n\t\tif (pivot > iStart)\n\t\t{\n\t\t\tquickSort(A, iStart, pivot - 1);\n\t\t}\n\t\tif (pivot < iEnd)\n\t\t{\n\t\t\tquickSort(A, pivot + 1, iEnd);\n\t\t}\n\t}" ]
[ "0.57781523", "0.5531806", "0.55115485", "0.55048555", "0.5449076", "0.54427415", "0.5429248", "0.54249495", "0.5399947", "0.5392511", "0.53891027", "0.53601855", "0.5357913", "0.53016037", "0.5300354", "0.518396", "0.5171313", "0.5168382", "0.5129235", "0.50570387", "0.4973278", "0.4958611", "0.49456164", "0.494109", "0.49394777", "0.4902663", "0.48752072", "0.48694783", "0.4852899", "0.48400512", "0.48198718", "0.48038876", "0.47966486", "0.47881344", "0.47868714", "0.47864464", "0.4760981", "0.4759963", "0.47244883", "0.47188732", "0.4700978", "0.46982786", "0.4696594", "0.46958014", "0.46890166", "0.46847624", "0.46772075", "0.4673095", "0.46675518", "0.46630862", "0.46537006", "0.46451813", "0.46395656", "0.46131018", "0.4601535", "0.46000624", "0.45886806", "0.45836344", "0.45751274", "0.45742756", "0.4562088", "0.45554772", "0.45545763", "0.45519003", "0.4542778", "0.4517897", "0.45067337", "0.44981724", "0.44862965", "0.44847035", "0.44836918", "0.44709507", "0.44684306", "0.4465707", "0.44627905", "0.44595078", "0.4457624", "0.44575", "0.44549027", "0.4454141", "0.4449884", "0.44477305", "0.44435188", "0.4442095", "0.44415373", "0.44351184", "0.44347706", "0.44338477", "0.4429099", "0.44250345", "0.44094545", "0.44068405", "0.4401337", "0.43866852", "0.43763366", "0.4364012", "0.43584254", "0.43568352", "0.43544418", "0.4345198" ]
0.55571955
1
TODO Autogenerated method stub
@Override public void draw() { System.out.println("Triangle was drawing."); System.out.println("new line"); System.out.println("second line "); //add comments // add more comments }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
collects user inputed data from textfields and creates a sample entry for the table
public void addEntry(ActionEvent event) { if(checkEntryInputs()) { BacteroidesSample newBacteroidesSample = new BacteroidesSample(sampleNumberTF.getText(),materialDescriptionTF.getText(),bacteroidesConcentration.getText()); newBacteroidesSample.setConclusionCase(); table.getItems().add(newBacteroidesSample); newReport2.addSample(newBacteroidesSample); addConclusionNumber(newBacteroidesSample); sampleNumberTF.clear(); materialDescriptionTF.clear(); bacteroidesConcentrationTF.clear(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private MyTable generateTable()\n\t{\n\t\t//this creates the column headers for the table\n\t\tString[] titles = new String[] {\"Name\"};\n\t\t//fields will store all of the entries in the database for the GUI\n\t\tArrayList<String[]> fields = new ArrayList<String[]>();\n\t\tfor (food foodStuff: items) //for each element in items do the following\n\t\t{\n\t\t\t//creates a single row of the table\n\t\t\tString[] currentRow = new String[1]; //creates an array for this row\n\t\t\tcurrentRow[1] = foodStuff.getName(); //sets this row's name\n\t\t\tfields.add(currentRow); //adds this row to the fields ArrayList\n\t\t}\n\t\t//builds a table with titles and a downgraded fields array\n\t\tMyTable builtTable = new MyTable(fields.toArray(new String[0][1]), titles);\n\t\treturn builtTable; // return\n\t}", "void newentry() {\r\n System.out.print(\"Enter regno: \");\r\n regno = KB.nextLine();\r\n System.out.print(\"Enter Name: \");\r\n name = KB.nextLine();\r\n System.out.print(\"Enter mark1: \");\r\n m1 = KB.nextLong();\r\n System.out.print(\"Enter mark2: \");\r\n m2 = KB.nextLong();\r\n System.out.print(\"Enter mark3: \");\r\n m3 = KB.nextLong();\r\n }", "public static void addRecord() {\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter name: \");\r\n\t\tString name = in.nextLine();\r\n\t\tSystem.out.println(\"Enter number: \");\r\n\t\tString number = in.nextLine();\r\n\t\ttd.addRecord(name,number);\r\n\t\t\r\n\t\tSystem.out.println(\"Added record for \" + name + \" along with their number \" + number);\r\n\t}", "private void createTable(int columns, int rows, String[] column_name,\n\t\t\tObject[] row_data) {\n\t\ttblStationary = new Table(canvas2, SWT.MULTI | SWT.BORDER\n\t\t\t\t| SWT.FULL_SELECTION);\n\t\ttblStationary.setLinesVisible(true);\n\t\ttblStationary.setHeaderVisible(true);\n\n\t\tfor (int i = 0; i < columns; i++) {\n\t\t\tcolumn = new TableColumn(tblStationary, SWT.NONE);\n\n\t\t\tif (i == 0) {\n\t\t\t\tcolumn.setText(column_name[i]);\n\t\t\t\tcolumn.setWidth(50);\n\t\t\t} else if (i == 1) {\n\t\t\t\tcolumn.setText(column_name[i]);\n\t\t\t\tcolumn.setWidth(230);\n\t\t\t} else {\n\t\t\t\tcolumn.setText(column_name[i]);\n\t\t\t\tcolumn.setWidth(100);\n\t\t\t}\n\t\t}\n\n\t\teditor1 = new TableEditor[rows];\n\t\ttxtTopay = new Text[rows];\n\n\t\teditor2 = new TableEditor[rows];\n\t\ttxtPaid = new Text[rows];\n\n\t\teditor3 = new TableEditor[rows];\n\t\ttxtBilling = new Text[rows];\n\n\t\teditor4 = new TableEditor[rows];\n\t\ttxtCr = new Text[rows];\n\n\t\t// Drawing initial table items\n\t\tfor (int rowId = 0; rowId < rows; rowId++) {\n\n\t\t\titem = new TableItem(tblStationary, SWT.NONE);\n\n\t\t\titem.setText(0, Integer.toString((rowId + 1)));\n\n\t\t\t// First Column station\n\t\t\titem.setText(1, (((StationsDTO) (row_data[rowId])).getName()\n\t\t\t\t\t+ \" - \" + ((StationsDTO) row_data[rowId]).getId()));\n\n\t\t\t// Draw Text Field\n\t\t\teditor1[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtTopay[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtTopay[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor1[rowId].grabHorizontal = true;\n\t\t\teditor1[rowId].setEditor(txtTopay[rowId], item, 2);\n\n\t\t\t// Draw Text Field\n\t\t\teditor2[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtPaid[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtPaid[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor2[rowId].grabHorizontal = true;\n\t\t\teditor2[rowId].setEditor(txtPaid[rowId], item, 3);\n\n\t\t\t// Draw Text Field\n\t\t\teditor3[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtBilling[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtBilling[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor3[rowId].grabHorizontal = true;\n\t\t\teditor3[rowId].setEditor(txtBilling[rowId], item, 4);\n\n\t\t\t// Draw Text Field\n\t\t\teditor4[rowId] = new TableEditor(tblStationary);\n\t\t\ttxtCr[rowId] = new Text(tblStationary, SWT.NONE);\n\t\t\ttxtCr[rowId].addVerifyListener(new NumericValidation());\n\t\t\teditor4[rowId].grabHorizontal = true;\n\t\t\teditor4[rowId].setEditor(txtCr[rowId], item, 5);\n\n\t\t}\n\t\ttblStationary.setBounds(32, 43, 750, 380);\n\n\t}", "public static void chooseAdd(ArrayList<Map<String, String>> tables)throws IOException{\n\t\tBufferedReader input = new BufferedReader (new InputStreamReader(System.in));\n\t\tSystem.out.println(\"1. Row\\t2. Key and Value\");\n\t\tint inputNumber = Integer.parseInt(input.readLine());\n\t\t//String aa = inp.readLine();\n\t\t//int i = Integer.parseInt(aa);\n\t\t//Process pr = new Process();\n\t\tArrayList<Map<String, String>> tempTable;\n\t\t\n\t\tint specifiedRow;\n\t\tint specifiedColumn;\n\t\tint specifiedArrangement;\n\t\tswitch(inputNumber){\n\t\t\t\n\t\t\tcase 1:\n\t\t\t\tRowList rows;\n\t\t\t\tSystem.out.println(\"Enter number of row\");\n\t\t\t\tspecifiedRow = Integer.parseInt(input.readLine())-1;\n\t\t\t\trows = new RowList(tables, specifiedRow);\n\t\t\t\trows.addRows();\n\t\t\t\ttempTable = rows.getArrayTable();\n\t\t\t\t//printResults(rows.getArrayTable());\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tColumnList columns;\n\t\t\t\tSystem.out.println(\"Enter number of row\");\n\t\t\t\tspecifiedRow = Integer.parseInt(input.readLine())-1;\n\t\t\t\tSystem.out.println(\"Arrangement for Key\");\n\t\t\t\tspecifiedColumn = Integer.parseInt(input.readLine())-1;\n\t\t\t\tcolumns = new ColumnList(tables,specifiedRow, specifiedColumn);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Enter Key:\");\n\t\t\t\tString inputKey = input.readLine();\n\t\t\t\tSystem.out.println(\"Enter Value:\");\n\t\t\t\tString inputValue = input.readLine();\n\t\t\t\tcolumns.addColumns1(specifiedColumn, inputKey, inputValue);\n\t\t\t\t//printResults(columns.getArrayTable());\n\t\t\t\tbreak;\n\t\t\t/*case 3:\n\t\t\t\tArrangementList values;\n\t\t\t\tSystem.out.println(\"Enter number of row\");\n\t\t\t\tspecifiedRow = Integer.parseInt(input.readLine())-1;\n\t\t\t\tSystem.out.println(\"Enter number of Column\");\n\t\t\t\tspecifiedColumn = Integer.parseInt(input.readLine())-1;\n\t\t\t\tSystem.out.println(\"Enter number of arrangement\");\n\t\t\t\tspecifiedArrangement = Integer.parseInt(input.readLine())-1;\n\t\t\n\t\t\t\tSystem.out.println(\"Enter Value: \");\n\t\t\t\tString inputValue = input.readLine();\n\t\t\t\tvalues = new ArrangementList(tables,specifiedRow, specifiedColumn,specifiedArrangement);\n\t\t\t\tvalues.addValues(inputValue);\n\t\t\t\tprintResults(values.getArrayTable());\n\t\t\t\tbreak;*/\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Out of choices\");\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void createInputRow() throws IOException {\n\t\tStringBuilder fileData = new StringBuilder();\n\t\tfileData.append(\"package dbmsProject;\\n\");\n\t\tfileData.append(\"public class InputRow{\\n\");\n\t\tArrayList<String> list = new ArrayList<String>( Arrays.asList(new String[]{\"cust\", \"prod\", \"day\", \"month\", \"year\", \"state\", \"quant\"}));\n\t\tfor(int i=0;i<list.size();i++ ) {\n\t\t\tString select = list.get(i);\n\t\t\tboolean found=false;\n\t\t\tfor(String str: payload.getselect_variables()) {\n\t\t\t\tif(str.contains(select)) {\n\t\t\t\t\tprojectionVars.add(select);\n\t\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\t\tfound=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tfor(String str: payload.getgrouping_attributes()) {\n\t\t\t\tif(str.contains(select)) {\n\t\t\t\t\tprojectionVars.add(select);\n\t\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\t\tfound=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tfor(String str: payload.getaggregate_functions()) {\n\t\t\t\tif(str.contains(select)) {\n\t\t\t\t\tprojectionVars.add(select);\n\t\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\t\tfound=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tfor(String str: payload.getsuch_that_predicates()) {\n\t\t\t\tif(str.contains(select)) {\n\t\t\t\t\tprojectionVars.add(select);\n\t\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\t\tfound=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tif(payload.isHavingClause() && payload.getHavingClause().contains(select)) {\n\t\t\t\tprojectionVars.add(select);\n\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\tfound=true;\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tif(payload.getIsWhereClause() && payload.getWhereClause().contains(select)) {\n\t\t\t\tprojectionVars.add(select);\n\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfileData.append(\"}\\n\");\n\t\tFileOutputStream fos = new FileOutputStream(\"src/dbmsProject/InputRow.java\");\n\t\tfos.write(fileData.toString().getBytes());\n\t\tfos.flush();\n\t\tfos.close();\n\t}", "private void buildTable() {\n\t\tObservableList<Record> data;\r\n\t\tdata = FXCollections.observableArrayList();\r\n\r\n\t\t// get records from the database\r\n\t\tArrayList<Record> list = new ArrayList<Record>();\r\n\t\tlist = getItemsToAdd();\r\n\r\n\t\t// add records to the table\r\n\t\tfor (Record i : list) {\r\n\t\t\tSystem.out.println(\"Add row: \" + i);\r\n\t\t\tdata.add(i);\r\n\t\t}\r\n\t\ttableView.setItems(data);\r\n\t}", "private void insertFields()\n {\n RideDetails details=new RideDetails();\n details.setStartPt(editStartingPt.getText().toString());\n details.setEndPt(editEndingPt.getText().toString());\n\n try {\n details.setTravelDate(dateFormatter.parse(editDate.getText().toString()));\n\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n details.setNoSpot(Integer.parseInt(editNoSpot.getText().toString()));\n\n\n dbOperations(details);\n\n }", "private Record collectInputs() {\n Record bg = new Record();\n // collect current inputs\n\n\n String inputIn = insulinInput.getText().toString();\n String inputInTy = insulinType.getSelectedItem().toString();\n String inputOthM = otherMed.getText().toString();\n String inputUpBp = bpUpperInupt.getText().toString();\n String inputLoBp = bpLowerInput.getText().toString();\n String inputHr = heartRateInput.getText().toString();\n String inputEx = getSelectedExercise();\n String inputExTM = exTimeM.getText().toString();\n String inputExTh = exTimeH.getText().toString();\n String inputOthEx = otherExercise.getText().toString();\n String inputNote = note.getText().toString();\n\n // blood glucose\n String inputGlucose = bloodGlucoseLevel.getText().toString();\n if (!inputGlucose.isEmpty()) {\n bg.setBloodGlucose(Double.parseDouble(inputGlucose));\n }\n\n // ketone\n String inputKetone = ketoneInput.getText().toString();\n if (!inputKetone.isEmpty()) {bg.setKetone(new Ketone(Double.parseDouble(inputKetone)));}\n else {bg.setKetone(new Ketone());}\n\n // date time\n if (!dateString.isEmpty() && !timeString.isEmpty()) {\n bg.setDate(dateString);\n bg.setTime(timeString);\n String format = getResources().getString(R.string.date_from_format);\n SimpleDateFormat dateFormat = new SimpleDateFormat(format, Locale.CHINA);\n dateTimeString = dateToStore+\" \"+timeString;\n Log.d(TAG,\"format: \"+format+\" datetime: \"+dateTimeString);\n try {\n dateTime = dateFormat.parse(dateTimeString);\n Log.d(TAG,\"formated: \"+dateTime);\n bg.setDateTime(dateTime);\n } catch (ParseException e){\n Log.d(TAG, \"When parsing date and time: \" + e);\n }\n } else {Log.d(TAG, \"date and time inputs are null.\");}\n\n // food\n Food f = new Food();\n f.setMealTag(getFoodTag());\n f.setMealTagTime(getFoodTagTime());\n if (!foodDetail.getText().toString().isEmpty()){\n f.setNote(foodDetail.getText().toString());\n }\n bg.setFood(f);\n\n // if insulin option is not empty, store insulin usage and type. Else store only other med\n if (!inputIn.isEmpty()) {\n bg.setMedication(new Medication(Integer.parseInt(inputIn), inputInTy, inputOthM));\n } else {bg.setMedication(new Medication(inputOthM));}\n // if bp and hr are both not empty, store them\n if (!inputUpBp.isEmpty() && !inputLoBp.isEmpty() && !inputHr.isEmpty()) {\n bg.setBpHr(new BpHr(Integer.parseInt(inputUpBp),Integer.parseInt(inputLoBp),Integer.parseInt(inputHr)));\n } else if (!inputUpBp.isEmpty() && !inputLoBp.isEmpty()) {// store only bp\n bg.setBpHr(new BpHr(Integer.parseInt(inputUpBp),Integer.parseInt(inputLoBp)));\n } else if (!inputHr.isEmpty()) {// store only hr\n bg.setBpHr(new BpHr(Integer.parseInt(inputHr)));\n } else {// store nothing\n bg.setBpHr(new BpHr());\n }\n\n // if exercise time is not empty store all, else only store type and other exercise note\n if (!inputExTM.isEmpty() && !inputExTh.isEmpty()) {\n bg.setExercise(new Exercise(inputEx, Integer.parseInt(inputExTM),Integer.parseInt(inputExTh),inputOthEx));\n } else if (!inputExTM.isEmpty()) { // minute set 0\n bg.setExercise(new Exercise(inputEx, Integer.parseInt(inputExTM),0,inputOthEx));\n } else if (!inputExTh.isEmpty()) { // hour set 0\n bg.setExercise(new Exercise(inputEx, 0,Integer.parseInt(inputExTh),inputOthEx));\n } else {\n bg.setExercise(new Exercise(inputEx, inputOthEx));\n }\n\n if (!inputNote.isEmpty()) {\n bg.setNotes(inputNote);\n } else {bg.setNotes(\"\");}\n\n return bg;\n\n }", "private void createPageContent() \n\t{\n\t\tGridLayout gl = new GridLayout(4, true);\n gl.verticalSpacing = 10;\n\t\t\n\t\tGridData gd;\n\t\tfinal Label wiz1Label = new Label(shell, SWT.NONE);\n\t\twiz1Label.setText(\"Enter Fields\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\twiz1Label.setLayoutData(gd);\n\t\twiz1Label.pack();\n\t\tText nameInput = new Text(shell, SWT.BORDER);\n\t\tnameInput.setMessage(\"Name\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tnameInput.setLayoutData(gd);\n\t\tnameInput.pack();\n\t\t//Component\n\t\tText componentInput = new Text(shell, SWT.BORDER);\n\t\tcomponentInput.setMessage(\"Component\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tcomponentInput.setLayoutData(gd);\n\t\tcomponentInput.pack();\n\t\t//school\n\t\tText schoolInput = new Text(shell, SWT.BORDER);\n\t\tschoolInput.setMessage(\"School\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tschoolInput.setLayoutData(gd);\n\t\tschoolInput.pack();\n\t\t//range\n\t\tText rangeInput = new Text(shell, SWT.BORDER);\n\t\trangeInput.setMessage(\"Range\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\trangeInput.setLayoutData(gd);\n\t\trangeInput.pack();\n\t\t//Effect\n\t\tText effectInput = new Text(shell, SWT.BORDER);\n\t\teffectInput.setMessage(\"Effect\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\teffectInput.setLayoutData(gd);\n\t\teffectInput.pack();\n\t\t//castingtime\n\t\tText castimeInput = new Text(shell, SWT.BORDER);\n\t\tcastimeInput.setMessage(\"Casting Time\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tcastimeInput.setLayoutData(gd);\n\t\tcastimeInput.pack();\n\t\t//materialcomponent\n\t\tText materialInput = new Text(shell, SWT.BORDER);\n\t\tmaterialInput.setMessage(\"Material Component\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tmaterialInput.setLayoutData(gd);\n\t\tmaterialInput.pack();\n\t\t//Savingthrow\n\t\tText savthrowInput = new Text(shell, SWT.BORDER);\n\t\tsavthrowInput.setMessage(\"Saving Throw\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tsavthrowInput.setLayoutData(gd);\n\t\tsavthrowInput.pack();\n\t\t//Focus\n\t\tText focusInput = new Text(shell, SWT.BORDER);\n\t\tfocusInput.setMessage(\"Focus\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tfocusInput.setLayoutData(gd);\n\t\tfocusInput.pack();\n\t\t//Duration\n\t\tText durationInput = new Text(shell, SWT.BORDER);\n\t\tdurationInput.setMessage(\"Duration\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tdurationInput.setLayoutData(gd);\n\t\tdurationInput.pack();\n\t\t//spellresistance\n\t\tLabel resistanceLabel = new Label(shell, SWT.NONE);\n\t\tresistanceLabel.setText(\"Can Spell Be Resisted\");\n\t\tgd = new GridData(GridData.CENTER, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tresistanceLabel.setLayoutData(gd);\n\t\tresistanceLabel.pack();\n\t\tButton resistanceInput = new Button(shell, SWT.CHECK);\n\t\tgd = new GridData(GridData.CENTER, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tresistanceInput.setLayoutData(gd);\n\t\tresistanceInput.pack();\n\t\t//level\n\t\tText levelInput = new Text(shell, SWT.BORDER);\n\t\tlevelInput.setMessage(\"Level\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tlevelInput.setLayoutData(gd);\n\t\tlevelInput.pack();\n\t\t//Damage\n\t\tText damageInput = new Text(shell, SWT.BORDER);\n\t\tdamageInput.setMessage(\"Damage\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 1;\n\t\tdamageInput.setLayoutData(gd);\n\t\tdamageInput.pack();\n\t\t//DamageAlternative\n\t\tText damagealterInput = new Text(shell, SWT.BORDER);\n\t\tdamagealterInput.setMessage(\"Damage Alternative\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tdamagealterInput.setLayoutData(gd);\n\t\tdamagealterInput.pack();\n\t\n\t\t//description\n\t\t\n\t\tText descriptionInput = new Text(shell, SWT.WRAP | SWT.V_SCROLL);\n\t\tdescriptionInput.setText(\"Description (Optional)\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\tgd.verticalSpan = 15;\n\t\tdescriptionInput.setLayoutData(gd);\n\t\tdescriptionInput.pack();\n\t\tLabel blank = new Label(shell, SWT.NONE);\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, true);\n\t\tgd.horizontalSpan = 4;\n\t\tblank.setLayoutData(gd);\n\t\tblank.pack();\n\t\tButton save = new Button(shell, SWT.PUSH);\n\n\t\tsave.setText(\"Save\");\n\t\tsave.addListener(SWT.Selection, new Listener()\n\t\t{\n\t\t\tpublic void handleEvent(Event event)\n\t\t\t{\n\t\t\t\tBoolean checkfault = false;\n\t\t\t\tLinkedHashMap<String, String> a = new LinkedHashMap<String, String>();\n\t\t\t\tif(nameInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tnameInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(componentInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tcomponentInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(schoolInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tschoolInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(castimeInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tcastimeInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(levelInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tlevelInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(checkfault)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ta.put(\"NAME\", nameInput.getText());\n\t\t\t\ta.put(\"COMPONENTS\", componentInput.getText());\n\t\t\t\ta.put(\"SCHOOL\", schoolInput.getText());\n\t\t\t\ta.put(\"CASTINGTIME\", castimeInput.getText());\n\t\t\t\ta.put(\"LEVEL\", levelInput.getText());\n\t\t\t\tif(resistanceInput.getSelection())\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SPELLRESISTANCE\", \"YES\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SPELLRESISTANCE\", \"NO\");\n\t\t\t\t}\n\t\t\t\tif(!materialInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"MATERIALCOMPONENT\", materialInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!savthrowInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SAVINGTHROW\", savthrowInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!focusInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"FOCUS\", focusInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!durationInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DURATION\", durationInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!damageInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DAMAGE\", damageInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!damagealterInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DAMAGEALTERNATE\", damagealterInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!rangeInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"RANGE\", rangeInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!effectInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"EFFECT\", effectInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ta.put(\"DESCRIPTION\", descriptionInput.getText());\n\t\t\t\tnewspell = new SpellEntity(a);\n\t\t\t\tMain.gameState.abilities.put(newspell.getName(), newspell);\n\t\t\t\tMain.gameState.customContent.put(newspell.getName(), newspell);\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t}\n\t\t);\n\t\tgd = new GridData(GridData.FILL, GridData.CENTER, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tsave.setLayoutData(gd);\n\t\tsave.pack();\n\t\tshell.setLayout(gl);\n\t\tshell.layout();\n\t\tshell.pack();\n//\t\t//wizard\n//\t\t\t\tfinal Composite wizPanel = new Composite(shell, SWT.BORDER);\n//\t\t\t\twizPanel.setBounds(0,0,WIDTH, HEIGHT);\n//\t\t\t\tfinal StackLayout wizLayout = new StackLayout();\n//\t\t\t\twizPanel.setLayout(wizLayout);\n//\t\t\t\t\n//\t\t\t\t//Page1 -- Name\n//\t\t\t\tfinal Composite wizpage1 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\twizpage1.setBounds(0,0,WIDTH,HEIGHT);\n//\t\t\t\t\n//\t\t\t\tfinal Label wiz1Label = new Label(wizpage1, SWT.NONE);\n//\t\t\t\twiz1Label.setText(\"Enter Name (required)\");\n//\t\t\t\twiz1Label.pack();\n//\t\t\t\tfinal Text wizpage1text = new Text(wizpage1, SWT.BORDER);\n//\t\t\t\twizpage1text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage1text.setText(\"FireBall\");\n//\t\t\t\tButton next1 = createNextButton(wizpage1);//TODO cancel and previous button\n//\t\t\t\tcreateBackButton(wizpage1, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage1, wizPanel, wizLayout);\n//\t\t\t\tnext1.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage1text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellname = wizpage1text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tSystem.out.println(\"PANIC: ITEM WIZARD PAGE 1 OUT\");\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz1Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\t);\n//\t\t\t\t\n//\t\t\t\twizPages.add(wizpage1);\n//\t\t\t\t//Page2 -- component\n//\t\t\t\tfinal Composite wizpage2 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz2Label = new Label(wizpage2, SWT.NONE);\n//\t\t\t\twiz2Label.setText(\"Enter Component: (required)\");\n//\t\t\t\twiz2Label.pack();\n//\t\t\t\tfinal Text wizpage2text = new Text(wizpage2, SWT.BORDER);\n//\t\t\t\twizpage2text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage2text.setText(\"Fire\");\n//\t\t\t\tButton next2 = createNextButton(wizpage2);\n//\t\t\t\tcreateBackButton(wizpage2, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage2, wizPanel, wizLayout);\n//\t\t\t\tnext2.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage2text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellcomp = wizpage2text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz2Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage2);\n//\t\t\t\t//Page3 -- School\n//\t\t\t\tfinal Composite wizpage3 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz3Label = new Label(wizpage3, SWT.NONE);\n//\t\t\t\twiz3Label.setText(\"Enter School: (required)\");\n//\t\t\t\twiz3Label.pack();\n//\t\t\t\tfinal Text wizpage3text = new Text(wizpage3, SWT.BORDER);\n//\t\t\t\twizpage3text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage3text.setText(\"Descruction\");\n//\t\t\t\tButton next3 = createNextButton(wizpage3);\n//\t\t\t\tcreateBackButton(wizpage3, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage3, wizPanel, wizLayout);\n//\t\t\t\tnext3.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage3text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellschool = wizpage3text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz3Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage3);\n//\t\t\t\t//Page4 -- Range\n//\t\t\t\tfinal Composite wizpage4 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz4Label = new Label(wizpage4, SWT.NONE);\n//\t\t\t\twiz4Label.setText(\"Enter Range: (required)\");\n//\t\t\t\twiz4Label.pack();\n//\t\t\t\tfinal Text wizpage4text = new Text(wizpage4, SWT.BORDER);\n//\t\t\t\twizpage4text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage4text.setText(\"50 feet\");\n//\t\t\t\tButton next4 = createNextButton(wizpage4);\n//\t\t\t\tcreateBackButton(wizpage4, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage4, wizPanel, wizLayout);\n//\t\t\t\tnext4.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage4text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellrange = wizpage4text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz4Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage4);\n//\t\t\t\t//Page5 -- effect\n//\t\t\t\tfinal Composite wizpage5 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz5Label = new Label(wizpage5, SWT.NONE);\n//\t\t\t\twiz5Label.setText(\"Enter Effect: (required)\");\n//\t\t\t\twiz5Label.pack();\n//\t\t\t\tfinal Text wizpage5text = new Text(wizpage5, SWT.BORDER);\n//\t\t\t\twizpage5text.setBounds(50, 50, 250, 150);\n//\t\t\t\twizpage5text.setText(\"No effect\");\n//\t\t\t\tButton next5 = createNextButton(wizpage5);\n//\t\t\t\tcreateBackButton(wizpage5, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage5, wizPanel, wizLayout);\n//\t\t\t\tnext5.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage5text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspelleffect = wizpage5text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz5Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage5);\n//\t\t\t\t//Page6 -- casting time\n//\t\t\t\tfinal Composite wizpage6 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz6Label = new Label(wizpage6, SWT.NONE);\n//\t\t\t\twiz6Label.setText(\"Enter Casting Time: (required)\");\n//\t\t\t\twiz6Label.pack();\n//\t\t\t\tfinal Text wizpage6text = new Text(wizpage6, SWT.BORDER);\n//\t\t\t\twizpage6text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage6text.setText(\"1 turn\");\n//\t\t\t\tButton next6 = createNextButton(wizpage6);\n//\t\t\t\tcreateBackButton(wizpage6, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage6, wizPanel, wizLayout);\n//\t\t\t\tnext6.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage5text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellcastime = wizpage6text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz6Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage6);\n//\t\t\t\t//Page7 -- Material Component\n//\t\t\t\tfinal Composite wizpage7 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz7Label = new Label(wizpage7, SWT.NONE);\n//\t\t\t\twiz7Label.setText(\"Enter Material Component: (required)\");\n//\t\t\t\twiz7Label.pack();\n//\t\t\t\tfinal Text wizpage7text = new Text(wizpage7, SWT.BORDER);\n//\t\t\t\twizpage7text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage7text.setText(\"None\");\n//\t\t\t\tButton next7 = createNextButton(wizpage7);\n//\t\t\t\tcreateBackButton(wizpage7, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage7, wizPanel, wizLayout);\n//\t\t\t\tnext7.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage7text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellmaterial = wizpage7text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz7Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage7);\n//\t\t\t\t//Page8 -- saving throw\n//\t\t\t\tfinal Composite wizpage8 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz8Label = new Label(wizpage8, SWT.NONE);\n//\t\t\t\twiz8Label.setText(\"Enter Saving Throw: (required)\");\n//\t\t\t\twiz8Label.pack();\n//\t\t\t\tfinal Text wizpage8text = new Text(wizpage8, SWT.BORDER);\n//\t\t\t\twizpage8text.setBounds(50, 50, 200, 100);\n//\t\t\t\twizpage8text.setText(\"Will negate XX\");\n//\t\t\t\tButton next8 = createNextButton(wizpage8);\n//\t\t\t\tcreateBackButton(wizpage8, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage8, wizPanel, wizLayout);\n//\t\t\t\tnext8.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage8text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellsaving = wizpage8text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz8Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage8);\n//\t\t\t\t//Page9 -- Focus\n//\t\t\t\tfinal Composite wizpage9 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz9Label = new Label(wizpage9, SWT.NONE);\n//\t\t\t\twiz9Label.setText(\"Enter Focus: (required)\");\n//\t\t\t\twiz9Label.pack();\n//\t\t\t\tfinal Text wizpage9text = new Text(wizpage9, SWT.BORDER);\n//\t\t\t\twizpage9text.setBounds(50, 50, 200, 100);\n//\t\t\t\twizpage9text.setText(\"A dart\");\n//\t\t\t\tButton next9 = createNextButton(wizpage9);\n//\t\t\t\tcreateBackButton(wizpage9, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage9, wizPanel, wizLayout);\n//\t\t\t\tnext9.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage9text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellfocus = wizpage9text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz9Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage9);\n//\t\t\t\t//Page10 -- Duration\n//\t\t\t\tfinal Composite wizpage10 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz10Label = new Label(wizpage10, SWT.NONE);\n//\t\t\t\twiz10Label.setText(\"Enter Duration: (required)\");\n//\t\t\t\twiz10Label.pack();\n//\t\t\t\tfinal Text wizpage10text = new Text(wizpage10, SWT.BORDER);\n//\t\t\t\twizpage10text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage10text.setText(\"5 Turns\");\n//\t\t\t\tButton next10 = createNextButton(wizpage10);\n//\t\t\t\tcreateBackButton(wizpage10, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage10, wizPanel, wizLayout);\n//\t\t\t\tnext10.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage10text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellduration = wizpage10text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz10Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage10);\n//\t\t\t\t//Page11 -- Level\n//\t\t\t\tfinal Composite wizpage11 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz11Label = new Label(wizpage11, SWT.NONE);\n//\t\t\t\twiz11Label.setText(\"Enter Level (required)\");\n//\t\t\t\twiz11Label.pack();\n//\t\t\t\tfinal Text wizpage11text = new Text(wizpage11, SWT.BORDER);\n//\t\t\t\twizpage11text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage11text.setText(\"1\");\n//\t\t\t\tButton next11 = createNextButton(wizpage11);\n//\t\t\t\tcreateBackButton(wizpage11, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage11, wizPanel, wizLayout);\n//\t\t\t\tnext11.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage11text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\ttry\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tif(Integer.parseInt(wizpage11text.getText()) >= 0)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspelllevel = String.valueOf(Integer.parseInt(wizpage11text.getText()));\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\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{\n//\t\t\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tcatch(NumberFormatException a)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage11);\n//\t\t\t\t//Page12 -- resistance\n//\t\t\t\tfinal Composite wizpage12 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz12Label = new Label(wizpage12, SWT.NONE);\n//\t\t\t\twiz12Label.setText(\"Enter Spell resistance: (Yes/No)\");\n//\t\t\t\twiz12Label.pack();\n//\t\t\t\tfinal Text wizpage12text = new Text(wizpage12, SWT.BORDER);\n//\t\t\t\twizpage12text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage12text.setText(\"Yes\");\n//\t\t\t\tButton next12 = createNextButton(wizpage12);\n//\t\t\t\tcreateBackButton(wizpage12, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage12, wizPanel, wizLayout);\n//\t\t\t\tnext12.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage12text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellresistance = wizpage12text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz12Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage12);\n//\t\t\t\t//Page13 - Description\n//\t\t\t\tfinal Composite wizpage13 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tLabel wiz13Label = new Label(wizpage13, SWT.NONE);\n//\t\t\t\twiz13Label.setText(\"Enter Description (Optional)\");\n//\t\t\t\twiz13Label.pack(); \n//\t\t\t\tfinal Text wizpage13text = new Text(wizpage13, SWT.BORDER);\n//\t\t\t\twizpage13text.setBounds(50, 50, 300, 200);\n//\t\t\t\twizpage13text.setText(\"Description here\");\n//\t\t\t\tButton next13 = createNextButton(wizpage13);\n//\t\t\t\tcreateBackButton(wizpage13, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage13, wizPanel, wizLayout);\n//\t\t\t\tnext13.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage13text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellscript = wizpage13text.getText();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellscript = \"<empty>\";\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tCreateVerificationPage(wizPanel, wizLayout);\n//\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\n//\t\t\t\t\t\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage13);\n//\t\t\t\t\n//\t\t\t\twizLayout.topControl = wizpage1;\n//\t\t\t\twizPanel.layout();\n\t}", "private void addData(){\n\n for (Recipe obj : frecipes)\n {\n /** Create a TableRow dynamically **/\n tr = new TableRow(this);\n tr.setLayoutParams(new TableRow.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n\n /** Creating a TextView to add to the row **/\n name = new TextView(this);\n name.setText(obj.getName());\n name.setWidth(320);\n name.setTypeface(Typeface.DEFAULT, Typeface.NORMAL);\n name.setPadding(5, 5, 5, 5);\n tr.addView(name); // Adding textView to tablerow.\n\n // Add the TableRow to the TableLayout\n tl.addView(tr, new TableLayout.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n }\n }", "public void prepareData(){\n\tAssert.pre( data!=null, \"data must be aquired first\");\n\t//post: creates a vector of items with a maximum size, nullifies the original data. This prevents us from having to loop through the table each time we need a random charecter (only once to prepare the table). this saves us more time if certain seeds are used very often.\n\n\t//alternate post: changes frequencies in data vector to the sum of all the frequencies so far. would have to change getrandomchar method\n\n\n\t //if the array is small, we can write out all of the Strings\n\t \n\ttable = new Vector(MAX_SIZE);\n\n\tif (total < MAX_SIZE){\n\t\t\n\t\n\t\t//steps through data, creating a new vector\n\t\tfor(int i = 0; i<data.size(); i++){\n\n\t\t count = data.get(i);\n\n\t\t Integer fr = count.getValue();\n\t\t int f = fr.intValue();\n\n\t\t if(total<MAX_SIZE){\n\t\t\tf = (f*MAX_SIZE)/total;\n\t\t }\n\t\t\t\n\t\t //ensures all are represented (biased towards small values)\n\t\t //if (f == 0){ f == 1;}\n\n\n\t\t String word = (String)count.getKey();\n\t \n\t\t for (int x = 0; x< f; x++){\n\t\t\ttable.add( word);\n\t\t }\n\n\t\t}\n\t }\n\n\t//because of division with ints, the total might not add up 100.\n\t//so we redefine the total at the end of this process\n\ttotal = table.size();\n\n\t //we've now prepared the data\n\t dataprepared = true;\n\n\t //removes data ascociations to clear memory\n\t data = null;\n\t}", "tbls createtbls();", "@Before\r\n\tpublic void setUp() {\r\n\t\tRandom r = new Random();\r\n\t\tmyID = r.nextInt(100);\r\n\t\tmyEntryData = new Entry_Database();\r\n\t\tfor (int i = 0; i < 20; i++) {\r\n\t\t\tEntry e = new Entry(myID);\r\n\t\t\te.setCat(\"Science\");\r\n\t\t\te.setEntry(new File(\"example.txt\"));\r\n\t\t\te.setName(\"Test Name\");\r\n\t\t\te.setNotes(\"\");\r\n\t\t\te.setScore(0);\r\n\t\t\tmyEntryData.addEntry(myID, e);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n Database db = new Database();\n \n while (true) {\n String input = scanner.nextLine();\n if (input.equals(\"Quit\")) {\n break;\n } else if (input.equals(\"Add\")) {\n System.out.print(\"Name: \");\n String name = scanner.nextLine();\n System.out.print(\"Latin Name: \");\n String lname = scanner.nextLine();\n db.add(name, lname);\n } else if (input.equals(\"Observation\")) {\n System.out.print(\"What was observed:? \");\n String name = scanner.nextLine();\n db.addObservant(name);\n } else if (input.equals(\"Show\")) {\n System.out.print(\"What? \");\n String name = scanner.nextLine();\n db.printBird(name);\n } else if (input.equals(\"Statistics\")) {\n db.show();\n }\n \n }\n }", "private void addInputFields() {\n dogName = new JTextField();\n dogName.setBounds(205, 160, 140, 25);\n\n weight = new JTextField();\n weight.setBounds(205, 180, 140, 25);\n\n food = new JTextField();\n food.setBounds(205, 200, 140, 25);\n\n this.add(dogName);\n this.add(weight);\n this.add(food);\n }", "public static void main(String[] args) throws SQLException {\n\t\tConnection con = getCon();\r\n\t\tStatement stmt = con.createStatement();\r\n\t\tMap<String, String> maps = new HashMap<String, String>();\r\n\t\tmaps.put(\"word\", \"String\");\r\n\t\tmaps.put(\"user\", \"String\");\r\n\t\tmaps.put(\"tfidf\", \"String\");\r\n//\t\tdropTable(con, \"hivetest324\");\r\n//\t\tSystem.out.println(createTable(con, \"hivetest324\", maps));\r\n\t\tString sql = \"select num from mytest\";\r\n\t\tselectTable(con, sql);\r\n\t\t\r\n//\t\tsql = \"load data local inpath 'E:/work/tfidf' overwrite into table tfidf\";\r\n//\t\tSystem.out.println(loadData(con, sql));\r\n\t\t\r\n//\t\tsql = \"show tables\";\r\n//\t\tResultSet res = stmt.executeQuery(sql);\r\n//\t\twhile(res.next()){\r\n//\t\t\tSystem.out.println(res.getString(1));\r\n//\t\t}\r\n\t}", "private void buildTable() {\n rowData = new Object[4];\n infoTable = new JTable();\n tableModel = new DefaultTableModel();\n tableModel.setColumnIdentifiers(columnNames);\n infoTable.setModel(tableModel);\n String line;\n \n try {\n FileInputStream fin = new FileInputStream(\"ContactInfo.txt\");\n BufferedReader br = new BufferedReader(new InputStreamReader(fin)); \n \n while((line = br.readLine()) != null)\n {\n rowData[0] = line;\n for(int i = 1; i < 4; i++) {\n rowData[i] = br.readLine();\n }\n tableModel.addRow(rowData);\n } \n br.close();\n }\n catch (FileNotFoundException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n catch (IOException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "private void setupTable() {\n\t\tString[] columns = { \"Course Name\", \"Course Number\" };\n\n\t\ttableModel = new DefaultTableModel(null, columns) {\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\t@Override\n\t\t\tpublic boolean isCellEditable(int row, int column) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\n\t\ttable = new JTable(tableModel);\n\t\ttable.setColumnSelectionAllowed(false);\n\t\ttable.setRowSelectionAllowed(true);\n\t\ttable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\n\t\ttable.getSelectionModel().addListSelectionListener((ListSelectionEvent event) -> {\n\t\t\tif (table.getSelectedRow() >= 0) {\n\t\t\t\tString name = table.getValueAt(table.getSelectedRow(), 0).toString();\n\t\t\t\tint num = Integer.parseInt(table.getValueAt(table.getSelectedRow(), 1).toString());\n\t\t\t\tupdateTextArea((Course) adCon.search(name, num));\n\t\t\t}\n\t\t});\n\n\t\tJScrollPane scrollPane = new JScrollPane(table);\n\t\tscrollPane.setPreferredSize(new Dimension(350, 175));\n\t\tdisplay.add(scrollPane);\n\t}", "private void processRecords()\n {\n // This is the way to connect the file to an inputstream in android\n InputStream inputStream = getResources().openRawResource(R.raw.products);\n\n Scanner scanner = new Scanner(inputStream);\n\n\n // skipping first row by reading it before loop and displaying it as column names\n String[] tableRow = scanner.nextLine().split(\",\");\n\n //Log.e(\"COLUMN NAMES\", Arrays.toString(tableRow));\n //Log.e(\"COLUMN NAMES SIZE\", String.valueOf(tableRow.length));\n\n\n // --- Truncate table (delete all rows and reset auto increment --\n // this line of code will be useful because for now we are forced to read file\n // everytime we open app, this way we do not have duplicate data.\n db.resetTable();\n\n while (scanner.hasNextLine())\n {\n tableRow = scanner.nextLine().split(\",\");\n //Log.e(\"COLUMN VALUES\", Arrays.toString(tableRow));\n //Log.e(\"COLUMN VALUES SIZE\", String.valueOf(tableRow.length));\n\n /*\n * Possible Change:\n * On each iteration a new Product() can be created and call the setter to set\n * its fields to the elements of the String array, example\n * product = new Product();\n * product.setNumber(tableRow[0]);\n * product.setBusinessName(tableRow[1]);\n * ...\n * db.insertData(product); // because the new insertData method would expect a\n * Product object instead\n *\n */\n\n // insert data\n if (db.insertData(tableRow))\n {\n //Log.e(\"Insert\", \"SUCCESSFUL INSERT AT \" + tableRow[0]);\n }\n else\n {\n //Log.e(\"Insert\", \"UNSUCCESSFUL INSERT\");\n }\n\n }\n }", "private static void generalDetails()\r\n\t{\r\n\t\tSystem.out.println(\"Enter the name of waiter:\");\r\n\t\tname = scan.nextLine();\r\n\t\tSystem.out.println(\"Enter table number:\");\r\n\t\tboolean check = false;\r\n\t\t//while check is false, keep trying to get a valid table number\r\n\t\twhile(check==false)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\ttableNo = Integer.parseInt(scan.nextLine());\r\n\t\t\t\tcheck = true;\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Please enter a valid table number!\");\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "public static void addPopSample() {\n if (forests_cache == null) {\n forests_cache = QueryManager.getForestNamesFromDB();\n }\n if (species_cache == null) {\n species_cache = QueryManager.getSpeciesNamesFromDB();\n }\n\n // Do the thing\n var scanner = new Scanner(System.in);\n var forest = \"\";\n var species = \"\";\n System.out.format(\"\\t%s\\n\", \"Population Sample Entry Tool\");\n System.out.println(\"Enter 'cancel' to quit tool.\");\n System.out.print(\"Enter forest name > \");\n var input = scanner.nextLine();\n if (input.equals(\"cancel\")) return;\n while (!forests_cache.contains(input)) {\n System.out.format(\"Forests database does not contain any forest with name: %s\\n\", input);\n System.out.println(\"Enter an existing forest or leave and add forest to forest database.\");\n System.out.print(\"Enter forest name > \");\n input = scanner.nextLine();\n if (input.equals(\"cancel\")) return;\n }\n forest = input;\n // Valid forest name entered, enter species\n System.out.print(\"Enter species name > \");\n input = scanner.nextLine();\n if (input.equals(\"cancel\")) return;\n while (!species_cache.contains(input)) {\n System.out.format(\"Animals database does not contain any species with name: %s\\n\", input);\n System.out.println(\"Enter an existing species or leave and add species to animal database.\");\n System.out.print(\"Enter species name > \");\n input = scanner.nextLine();\n if (input.equals(\"cancel\")) return;\n }\n species = input;\n // Both valid forest and species entered, validate that a population exists\n var pop = QueryManager.getPopulationFromDB(forest, species);\n // sanity check, there should be only one population per forest/species pair\n if (pop == null) {\n System.err.format(\"\"\"\n There is no population of %s in %s\n Or the connection could not be established.\n Add a new population and then start collecting samples.\n \"\"\", species, forest);\n return;\n }\n\n var headCount = 0;\n var sampleTime = LocalDateTime.now();\n var sampleId = UUID.randomUUID();\n var tempCount = -1;\n while (tempCount < 0) {\n System.out.print(\"Enter headcount > \");\n tempCount = scanner.nextInt();\n if (tempCount < 0) {\n System.out.println(\"Please enter a non-negative value (or 0).\");\n }\n }\n headCount = tempCount;\n if (QueryManager.addPopulationSampleToDB(\n new PopulationSample(sampleId, Timestamp.valueOf(sampleTime), headCount, species, forest))) {\n System.out.println(\"Successfully added sample to the database!\");\n } else {\n System.out.println(\"Failed to add sample to the database!\");\n }\n }", "private void addTable(Composite parent) {\n \n providers = new Table(parent, SWT.CHECK | SWT.BORDER\n | SWT.V_SCROLL | SWT.H_SCROLL);\n providers.setHeaderVisible(true);\n \n //Just for testing: Add some content to the table\n for (int i = 0; i < TITLES.length; i++) {\n TableColumn column = new TableColumn(providers, SWT.NULL);\n column.setText(TITLES[i]);\n }\n \n for (int i = 0; i < VilArgumentProvider.getProviderCount(); i++) {\n //Create new TableItem for each provider\n TableItem item = new TableItem(providers, SWT.NONE);\n\n VilArgumentProvider provider = VilArgumentProvider.getProvider(i);\n \n //Set Checkboxes\n if (VilArgumentProvider.getProvider(i).isActive()) {\n item.setChecked(true);\n } else {\n item.setChecked(false);\n }\n \n /*\n * Firstly we add the first 4 columns to the table-items because this is\n * essential for the decision whether a row is modifiable or not.\n * After that we add the free arguments to the items.\n * This is important because the method \"makeModifiable\" replaces certain cells in the table.\n */\n \n item.setText(0, String.valueOf(provider.getName()));\n item.setText(1, String.valueOf(provider.getParameterName()));\n item.setText(2, String.valueOf(provider.getParameterType()));\n item.setText(3, String.valueOf(provider.acceptsFreeArguments()));\n \n //make editor modifiable\n makeModifiable();\n \n try {\n item.setText(4, (provider.getFreeArguments().toString()));\n } catch (NullPointerException e) {\n item.setText(4, \"\");\n }\n \n }\n }", "protected void createInputAnnotations() {\n\t\tString source = \"http://www.eclipse.org/ecl/input\";\t\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getPrint_Input(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getWriteCsvFile_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getExcludeColumns_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getSelectColumns_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\t\t\t\t\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getReadLines_Uri(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getSelectRows_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getExcludeRows_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getAsTableData_Input(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\n\t}", "private void createStressTestRowIncomingTable(int payloadColumns) {\n Column[] defaultColumns = getDefaultStressTestRowColumns();\n Table table = new Table(STRESS_TEST_ROW_INCOMING, defaultColumns);\n List<Column> payloads = getPayloadColumns(payloadColumns);\n\n table.addColumns(payloads);\n engine.getDatabasePlatform().createTables(true, true, table);\n }", "public void populateFields(String userName){\n this.userNameLabel.setText(userName);\n \n if(this.dbConnection.ConnectDB()){\n //we connected\n String[] temp = this.dbConnection.getUserInformation(userName);\n //take this array and populate the input fields for firstName, lastName,Email,\n this.firstNameInputField.setText(temp[0]);\n this.lastNameInputField.setText(temp[1]);\n this.emailInputField.setText(temp[4]);\n this.roleDropdown.promptTextProperty().set(temp[2]);\n this.departmentDropdown.promptTextProperty().set(temp[3]);\n //add these default values to the map\n this.defaultFirstname = temp[0];\n this.defaultLastname = temp[1];\n this.defaultEmail = temp[4];\n this.defaultRole = temp[2];\n this.defaultDepartment = temp[3];\n \n //repopulate the map\n populateMap();\n //unlock the checkboxes\n this.unlockCheckboxes(this.boxes);\n \n// //print out the mapfor testing purposes\n// for(Map.Entry<String,String> mapObj: this.defaultValuesMap.entrySet()){\n// System.out.println(mapObj.getKey());\n// System.out.println(mapObj.getValue());\n// }\n \n \n }\n }", "private void create(Hashtable fieldValues,DataHRecordData myData) throws LRException\n\t{\n\t\t// First, to permit searching for a field name\n\t\t// the passed table must be converted to change the\n\t\t// keys from LVValues to Strings.\n\t\tHashtable ht=new Hashtable();\n\t\tEnumeration en=fieldValues.keys();\n\t\twhile (en.hasMoreElements())\n\t\t{\n\t\t\tLVValue v=(LVValue)en.nextElement();\n\t\t\tht.put(v.getStringValue(),fieldValues.get(v));\n\t\t}\n\t\tfieldValues=ht;\n\t\tgetBackground();\n\t\tDataHSpecification spec=myData.spec;\n\t\tif (spec==null) throw new LRException(DataRMessages.hasNoSpec(getName()));\n\t\tmyData.record=createRecord(spec,fieldValues);\n\t}", "private void initTable() {\n// String col[] = {\"Seq#\",\"PCode\",\"BCode\",\"ProductName\",\"PurPCS\",\"PurCTN\",\"PurQTY\",\"PurDMG\",\"PurRate\",\"GrossAmount\",\"Disc%\",\"DiscRS\",\"Tax%\",\"TaxRS\",\"TOPcs\",\"UCHRS\",\"SCHRS\",\"FMR%\",\"FMRRS\",\"TaxRS\",\"Expiry\",\"Batch\",\"NetAmount\"};\n String col[] = {\"Seq#\",\"PCode\",\"BCode\"};\n int k=0; \n Object row[][] = new Object[][] { { \"1\", new ButtonTextFieldCellTest.ButtonTextFieldCell(), new ButtonTextFieldCellTest.ButtonTextFieldCell() },\n { \"2\", new ButtonTextFieldCellTest.ButtonTextFieldCell(), new ButtonTextFieldCellTest.ButtonTextFieldCell() },\n { \"3\", new ButtonTextFieldCellTest.ButtonTextFieldCell(), new ButtonTextFieldCellTest.ButtonTextFieldCell() },\n { \"4\", new ButtonTextFieldCellTest.ButtonTextFieldCell(), new ButtonTextFieldCellTest.ButtonTextFieldCell() } };\n// String row[][] =new String[3][23];\n /*\n for(int i = 0; i < 3; i++){\n for(int j = 0; j < 23; j++){\n row[i][j]=\"\"+k++;\n }\n }\n \n */\n// row=new String[][]{{\"Seq#\",\"PCode\",\"BCode\",\"ProductName\",\"PurPCS\",\"PurCTN\",\"PurQTY\",\"PurDMG\",\"PurRate\",\"GrossAmount\",\"Disc%\",\"DiscRS\",\"Tax%\",\"TaxRS\",\"TOPcs\",\"UCHRS\",\"SCHRS\",\"FMR%\",\"FMRRS\",\"TaxRS\",\"Expiry\",\"Batch\",\"NetAmount\"},\n// {\"1Seq#\",\"1PCode\",\"1BCode\",\"ProductName\",\"PurPCS\",\"PurCTN\",\"PurQTY\",\"PurDMG\",\"PurRate\",\"GrossAmount\",\"Disc%\",\"DiscRS\",\"Tax%\",\"TaxRS\",\"TOPcs\",\"UCHRS\",\"SCHRS\",\"FMR%\",\"FMRRS\",\"TaxRS\",\"Expiry\",\"Batch\",\"NetAmount\"},\n// {\"2Seq#\",\"2PCode\",\"2BCode\",\"ProductName\",\"PurPCS\",\"PurCTN\",\"PurQTY\",\"PurDMG\",\"PurRate\",\"GrossAmount\",\"Disc%\",\"DiscRS\",\"Tax%\",\"TaxRS\",\"TOPcs\",\"UCHRS\",\"SCHRS\",\"FMR%\",\"FMRRS\",\"TaxRS\",\"Expiry\",\"Batch\",\"NetAmount\"}};\n model = new DefaultTableModel(row,col);\n jTable1=new JTable(model);\n jTable1.setRowHeight(30);\n jTable1.setRowHeight(0,30);\n jTable1.setPreferredSize(new Dimension(purchaseScrollPane.getWidth(), 35));\n purchaseScrollPane.setViewportView(jTable1);\n }", "com.indosat.eai.catalist.standardInputOutput.DummyInputDocument.DummyInput addNewDummyInput();", "public void prepareInputData(List<Contract> contracts, InputData inputData)\n {\n for (Contract contract : contracts)\n {\n for (ContractLineItem lineItem : contract.getLineItems())\n {\n Product product = lineItem.getProduct();\n String manufacturer = product.getManufacturer();\n String productCode = product.productCode();\n String productName = product.getDescription();\n \n // Get all that is necessary to build report data.\n double price = lineItem.getPrice();\n String contractName = null;\n if (!inputData.compact)\n {\n contractName = contract.getDescription() + \" - \" +\n dateFormat.format(contract.getBeginDate()) + \"-\" +\n dateFormat.format(contract.getEndDate());\n }\n String distributor = contract.getDistributor();\n InputRowKey key = new InputRowKey(\n manufacturer, productCode, contractName);\n // Look up by key\n InputRow inputRow = inputData.inputRowMap.get(key);\n if (inputRow == null) \n {\n inputRow = new InputRow();\n inputRow.productName = productName;\n inputData.inputRowMap.put(key, inputRow);\n }\n DistributorPrice newDistributorPrice = new DistributorPrice(distributor, price);\n boolean priceExists = false;\n for (DistributorPrice distributorPrice : inputRow.prices)\n {\n if (distributorPrice.distributorName.equals(newDistributorPrice.distributorName))\n priceExists = true;\n }\n if (!priceExists)\n inputRow.prices.add(newDistributorPrice);\n }\n }\n }", "public void generateTable() {\n if (Reference.ean != null) {\n //create a new Table\n TableLayout ll = (TableLayout) findViewById(R.id.table);\n\n //loop through each intolerance we use\n int index = 0;\n\n for (int i = 0; i < Reference.binaryFieldNames.length; i++) {\n //create a new table row\n TableRow row = new TableRow(this);\n\n TableRow.LayoutParams lp = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT);\n row.setLayoutParams(lp);\n\n //create a new text view\n TextView tv = new TextView(this);\n tv.setText(Reference.binaryFieldNamesFormatted[i]);\n\n //setup the radio buttons\n RadioGroup group = new RadioGroup(this);\n group.setId(index + GROUP_OFFSET);\n\n RadioButton yes = new RadioButton(this);\n yes.setText(POSITIVE);\n\n RadioButton no = new RadioButton(this);\n no.setText(NEGATIVE);\n\n //add the radio buttons to the group\n group.addView(yes);\n group.addView(no);\n\n\n //turn on the previous settings\n switch (data[index]) {\n case Reference.ANY:\n no.toggle();\n break;\n case Reference.NONE:\n yes.toggle();\n break;\n }\n\n //add the views to the row and then add the row\n row.addView(tv);\n row.addView(group);\n ll.addView(row, index);\n\n //add listener for the radio button group\n group.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n //figure out the row the radio button was in\n int row = group.getId() - GROUP_OFFSET;\n //figure out the amount this represents\n String text = ((RadioButton)findViewById(checkedId)).getText().toString();\n int amount = Reference.UNKNOWN;\n //re-map the values because currently 2 is traces and 1 is any amount\n switch (text) {\n case POSITIVE:\n amount = Reference.NONE;\n break;\n case NEGATIVE:\n amount = Reference.ANY;\n break;\n }\n //set this in the profile array\n data[row] = amount;\n }\n });\n index++;\n }\n\n for (int i = 0; i < Reference.tertiaryFieldNames.length; i++) {\n //create a new table row\n TableRow row = new TableRow(this);\n\n TableRow.LayoutParams lp = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT);\n row.setLayoutParams(lp);\n\n //create a new text view\n TextView tv = new TextView(this);\n tv.setText(Reference.tertiaryFieldNamesFormatted[i]);\n\n //setup the radio buttons\n RadioGroup group = new RadioGroup(this);\n group.setId(index + GROUP_OFFSET);\n\n\n RadioButton any = new RadioButton(this);\n any.setText(ANY);\n RadioButton traces = new RadioButton(this);\n traces.setText(TRACES);\n RadioButton none = new RadioButton(this);\n none.setText(NONE);\n\n //add the radio buttons to the group\n group.addView(any);\n group.addView(traces);\n group.addView(none);\n\n\n //turn on the previous settings\n switch (data[index]) {\n case Reference.ANY:\n any.toggle();\n break;\n case Reference.TRACE:\n traces.toggle();\n break;\n case Reference.NONE:\n none.toggle();\n break;\n }\n\n //add the views to the row and then add the row\n row.addView(tv);\n row.addView(group);\n ll.addView(row, index);\n\n //add listener for the radio button group\n group.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n //figure out the row the radio button was in\n int row = group.getId() - GROUP_OFFSET;\n String text = ((RadioButton)findViewById(checkedId)).getText().toString();\n //figure out the amount this represents\n int amount = Reference.UNKNOWN;\n //re-map the values because currently 2 is traces and 1 is any amount\n switch (text) {\n case ANY:\n amount = Reference.ANY;\n break;\n case TRACES:\n amount = Reference.TRACE;\n break;\n case NONE:\n amount = Reference.NONE;\n break;\n }\n //figure out the row the radio butto\n\n //set this in the profile array\n data[row] = amount;\n }\n });\n index++;\n }\n } else {\n ((TextView)findViewById(R.id.title)).setText(\"Scan a barcode to edit a products data\");\n findViewById(R.id.push_button).setVisibility(View.INVISIBLE);\n findViewById(R.id.name).setVisibility(View.INVISIBLE);\n }\n }", "public void prepareTable(){\n\n TableColumn<Student, String> firstNameCol = new TableColumn<>(\"FirstName\");\n firstNameCol.setMinWidth(100);\n firstNameCol.setCellValueFactory(new PropertyValueFactory<>(\"firstname\"));\n\n TableColumn<Student, String> lastNameCol = new TableColumn<>(\"LastName\");\n lastNameCol.setMinWidth(100);\n lastNameCol.setCellValueFactory(new PropertyValueFactory<>(\"lastname\"));\n\n TableColumn<Student, String> formCol = new TableColumn<>(\"Form\");\n formCol.setMinWidth(100);\n formCol.setCellValueFactory(new PropertyValueFactory<>(\"form\"));\n\n TableColumn<Student, String> streamCol = new TableColumn<>(\"Stream\");\n streamCol.setMinWidth(100);\n streamCol.setCellValueFactory(new PropertyValueFactory<>(\"stream\"));\n\n TableColumn<Student, String> dateOfBirthCol = new TableColumn<>(\"Favorite Game\");\n dateOfBirthCol.setMinWidth(100);\n dateOfBirthCol.setCellValueFactory(new PropertyValueFactory<>(\"dateOfBirth\"));\n\n TableColumn<Student, String> genderCol = new TableColumn<>(\"Gender\");\n genderCol.setMinWidth(100);\n genderCol.setCellValueFactory(new PropertyValueFactory<>(\"gender\"));\n\n TableColumn<Student, Integer> ageCol = new TableColumn<>(\"age\");\n ageCol.setMinWidth(100);\n ageCol.setCellValueFactory(new PropertyValueFactory<>(\"age\"));\n\n TableColumn<Student, Integer> admissionCol = new TableColumn<>(\"Admission\");\n admissionCol.setMinWidth(100);\n admissionCol.setCellValueFactory(new PropertyValueFactory<>(\"admission\"));\n\n\n table.getColumns().addAll(admissionCol,firstNameCol,lastNameCol,formCol,streamCol,dateOfBirthCol,genderCol,ageCol);\n table.setItems(dao.selectAll());\n\n }", "private void insertEntry() {\n String desiredId = idField.getText();\n String desiredName = nameField.getText();\n String desiredMajor = majorField.getText();\n\n if (studentHashMap.containsKey(desiredId)) {\n this.displayStatusPanel(\n \"Error: A student with this information already exists.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n } else {\n studentHashMap.put(desiredId, new Student(desiredName, desiredMajor));\n\n this.displayStatusPanel(\n \"Success: \" + desiredName + \" has been added.\",\n \"Success\",\n JOptionPane.INFORMATION_MESSAGE\n );\n }\n }", "private void listControllerAdd(TextField fNameText, TextField lNameText, TextField phoneText, TextField emailText,\n\t\t\tTableView<Person> table, ObservableList<Person> tableData, Button add)\n\t{\n\t\tadd.setOnAction(e ->\n\t\t{\n\t\t\tString firstName = fNameText.getText();\n\t\t\tString lastName = lNameText.getText();\n\t\t\tString phone = phoneText.getText();\n\t\t\tString email = emailText.getText();\n\n\t\t\tFirstName firstNameObj;\n\t\t\tLastName lastNameObj;\n\t\t\tPhone phoneObj;\n\t\t\tEmail emailObj;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tfirstNameObj = new FirstName(firstName);\n\t\t\t\tlastNameObj = new LastName(lastName);\n\t\t\t\tphoneObj = new Phone(phone);\n\t\t\t\temailObj = new Email(email);\n\n\t\t\t\tif (firstNameObj.isValidName(firstName) && lastNameObj.isValidName(lastName)\n\t\t\t\t\t\t&& phoneObj.isValidPhone(phone) && emailObj.isValidEmail(email))\n\t\t\t\t{\n\t\t\t\t\ttableData.add(new Person(firstNameObj, lastNameObj, phoneObj, emailObj));\n\t\t\t\t\tfNameText.clear();\n\t\t\t\t\tlNameText.clear();\n\t\t\t\t\tphoneText.clear();\n\t\t\t\t\temailText.clear();\n\t\t\t\t}\n\t\t\t} catch (BadInput e1)\n\t\t\t{\n\t\t\t\tAlert dialog = new Alert(Alert.AlertType.ERROR);\n\t\t\t\tdialog.setHeaderText(null);\n\t\t\t\tdialog.setContentText(e1.getMessage());\n\t\t\t\tdialog.showAndWait();\n\t\t\t}\n\n\t\t});\n\n\t}", "private void populateData() {\n\t\tList<TrafficRecord> l = TestHelper.getSampleData();\r\n\t\tfor(TrafficRecord tr: l){\r\n\t\t\tput(tr);\r\n\t\t}\r\n\t\t \r\n\t}", "private void fillQuestionsTable() {\n Question q1 = new Question(\"Who is NOT a Master on the Jedi council?\", \"Anakin Skywalker\", \"Obi Wan Kenobi\", \"Mace Windu\", \"Yoda\", 1);\n Question q2 = new Question(\"Who was Anakin Skywalker's padawan?\", \"Kit Fisto\", \"Ashoka Tano\", \"Barris Ofee\", \"Jacen Solo\",2);\n Question q3 = new Question(\"What Separatist leader liked to make find additions to his collection?\", \"Pong Krell\", \"Count Dooku\", \"General Grevious\", \"Darth Bane\", 3);\n Question q4 = new Question(\"Choose the correct Response:\\n Hello There!\", \"General Kenobi!\", \"You are a bold one!\", \"You never should have come here!\", \"You turned her against me!\", 1);\n Question q5 = new Question(\"What ancient combat technique did Master Obi Wan Kenobi use to his advantage throughout the Clone Wars?\", \"Kendo arts\", \"The High ground\", \"Lightsaber Form VIII\", \"Force healing\", 2);\n Question q6 = new Question(\"What was the only surviving member of Domino squad?\", \"Fives\", \"Heavy\", \"Echo\", \"Jesse\", 3);\n Question q7 = new Question(\"What Jedi brutally murdered children as a part of his descent to become a Sith?\", \"Quinlan Vos\", \"Plo Koon\", \"Kit Fisto\", \"Anakin Skywalker\", 4);\n Question q8 = new Question(\"What Sith was the first to reveal himself to the Jedi after a millenia and was subsquently cut in half shortly after?\", \"Darth Plagieus\", \"Darth Maul\", \"Darth Bane\", \"Darth Cadeus\", 2);\n Question q9 = new Question(\"What 4 armed creature operates a diner on the upper levels of Coruscant?\", \"Dexter Jettster\", \"Cad Bane\", \"Aurua Sing\", \"Dorme Amidala\", 1);\n Question q10 = new Question(\"What ruler fell in love with an underage boy and subsequently married him once he became a Jedi?\", \"Aurua Sing\", \"Duttchess Satine\", \"Mara Jade\", \"Padme Amidala\", 4);\n\n // adds them to the list\n addQuestion(q1);\n addQuestion(q2);\n addQuestion(q3);\n addQuestion(q4);\n addQuestion(q5);\n addQuestion(q6);\n addQuestion(q7);\n addQuestion(q8);\n addQuestion(q9);\n addQuestion(q10);\n }", "void fillDatabase() {\n Type.type( \"FOOD\" );\n Type.type( \"HOT\" );\n Type.type( \"SNACK\" );\n }", "public void showTable(View view){\n EditText name = findViewById(R.id.editNumber);\n String input = name.getText().toString().trim();\n if(input.length() == 0){\n Toast.makeText(this, \"Invalid input!\", Toast.LENGTH_SHORT).show();\n return;\n }\n StringBuffer result = getTable(input);\n display(result);\n }", "private void initTable() {\n \t\t// init table\n \t\ttable.setCaption(TABLE_CAPTION);\n \t\ttable.setPageLength(10);\n \t\ttable.setSelectable(true);\n \t\ttable.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);\n \t\ttable.setColumnCollapsingAllowed(true);\n \t\ttable.setColumnReorderingAllowed(true);\n \t\ttable.setSelectable(true);\n \t\t// this class handles table actions (see handleActions method below)\n \t\ttable.addActionHandler(this);\n \t\ttable.setDescription(ACTION_DESCRIPTION);\n \n \t\t// populate Toolkit table component with test SQL table rows\n \t\ttry {\n \t\t\tQueryContainer qc = new QueryContainer(\"SELECT * FROM employee\",\n \t\t\t\t\tsampleDatabase.getConnection());\n \t\t\ttable.setContainerDataSource(qc);\n \t\t} catch (SQLException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\t// define which columns should be visible on Table component\n \t\ttable.setVisibleColumns(new Object[] { \"FIRSTNAME\", \"LASTNAME\",\n \t\t\t\t\"TITLE\", \"UNIT\" });\n \t\ttable.setItemCaptionPropertyId(\"ID\");\n \t}", "public void createAll() {\n SQLFormater SQLFormaterMoods = new SQLFormater(MOODS_TABLE_NAME, ID_FIELD); // objects help to form sql strings for creating tables\n SQLFormater SQLFormaterAnswers = new SQLFormater(ANSWERS_TABLE_NAME, ID_FIELD);\n\n String[] answersTableFields = {ANSWERS_FIELD, ID_MOODS_FIELD}; // ordered fields\n String[] moodsTableFields = {MOODS_FIELD, HI_FIELD, BYBY_FIELD};\n\n SQLFormaterMoods.setNewField(MOODS_FIELD, STRING_TYPE, \"NOT NULL\"); // creating tables\n SQLFormaterMoods.setNewField(HI_FIELD, STRING_TYPE, null);\n SQLFormaterMoods.setNewField(BYBY_FIELD, STRING_TYPE, null);\n dbConnection.execute(SQLFormaterMoods.getStringToCreateDB(null));\n\n SQLFormaterAnswers.setNewField(ANSWERS_FIELD, STRING_TYPE, \"NOT NULL\");\n SQLFormaterAnswers.setNewField(ID_MOODS_FIELD, INTEGER_TYPE, null);\n String reference = \"FOREIGN KEY (\" + ID_MOODS_FIELD + \")\" +\n \" REFERENCES \" + MOODS_TABLE_NAME +\n \"(\" + ID_FIELD + \")\";\n dbConnection.execute(SQLFormaterAnswers.getStringToCreateDB(reference)); // create table with reference\n\n insertTableValues(SQLFormaterMoods, moodsTableFields, getMoodsTableValues()); // inserting ordered values into tables\n insertTableValues(SQLFormaterAnswers, answersTableFields, getAnswersTableValues());\n }", "private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }", "public void newDataFile(Stage primaryStage) {\n String title = \"Upload Data File\";\n\n VBox vbox = vboxFormat();\n\n Label title1 = new Label(\"Input CSV File Name\");\n title1.setFont(new Font(\"Arial\", 15));\n Label direction2 = new Label(\"enter file name, hit enter, then done\");\n direction2.setFont(new Font(\"Arial\", 10));\n TextField userInput = new TextField(\"file name with .csv extension\");\n // TODO program text field event, this is where the file name will be collected,\n // send to another class to handle!\n // Input file class called to check syntax of file name and read.\n userInput.setOnAction(e -> {\n new InputFile(userInput.getText(), report);\n updateTable();\n }); // working\n\n // Add done button\n Button done = buttonFormat(\"Done\", 3);\n\n vbox.getChildren().addAll(title1, userInput, direction2, done);\n showDialogWindow(primaryStage, vbox, title, done);\n updateTable();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n customer = guiControl.getController().getAccountControl().vecAcc.searchCustomer(Integer.parseInt(textField1.getText()));\n String valued = \"\";\n if (customer.getValued() == 1) {\n valued += \"Valued\";\n } else {\n valued += \"Regular\";\n }\n //Creates the table model so that a table can be dispalyed\n defaultTableModel = new DefaultTableModel();\n table1.setModel(defaultTableModel);\n //Sets the column names\n defaultTableModel.addColumn(\"Account Number\");\n defaultTableModel.addColumn(\"Name\");\n defaultTableModel.addColumn(\"Phone\");\n defaultTableModel.addColumn(\"Customer Type\");\n //Checks to see if a customer name exists or not. If it doeesnt exist then it shows N/A as the\n if (customer.getName().equals(\"\")) {\n defaultTableModel.addRow(new Object[]{\"N/A\", \"N/A\", \"N/A\", \"N/A\"});\n } else {\n //Otherwise gets the values from customer class, and adds them as the rows\n defaultTableModel.addRow(new Object[]{\n customer.getAccountNo(), customer.getName(), customer.getPhone(), valued\n });\n }\n }", "private void insertProjectTable() {\n name.setCellValueFactory(new PropertyValueFactory<>(\"nameId\"));\n dateStart.setCellValueFactory(new PropertyValueFactory<>(\"dateStart\"));\n dateFinish.setCellValueFactory(new PropertyValueFactory<>(\"dateFinish\"));\n place.setCellValueFactory(new PropertyValueFactory<>(\"place\"));\n car.setCellValueFactory(new PropertyValueFactory<>(\"cars\"));\n instructors.setCellValueFactory(new PropertyValueFactory<>(\"instructors\"));\n description.setCellValueFactory(new PropertyValueFactory<>(\"description\"));\n author.setCellValueFactory(new PropertyValueFactory<>(\"author\"));\n }", "private void fillTable(){\n tblModel.setRowCount(0);// xoa cac hang trong bang\n \n for(Student st: list){\n tblModel.addRow(new String[]{st.getStudentId(), st.getName(), st.getMajor(),\"\"\n + st.getMark(), st.getCapacity(), \"\" + st.isBonnus()});\n // them (\"\" + )de chuyen doi kieu float va boolean sang string\n \n }\n tblModel.fireTableDataChanged();\n }", "private void initFields(){\r\n \tintDocumentFilter = new IntegerDocumentFilter();\r\n \tJLabel label;\r\n \r\n \tlabel=new JLabel(\"Gen Chain Length\");\r\n \r\n \tgenChainLengthField = new JTextField(5);\r\n \tdoc = (PlainDocument)genChainLengthField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(genChainLengthField);\r\n \r\n \tlabel=new JLabel(\"Gen Chain Length Flux\");\r\n \r\n \tgenChainLengthFluxField = new JTextField(5);\r\n \tdoc = (PlainDocument)genChainLengthFluxField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(genChainLengthFluxField);\r\n \r\n \tlabel=new JLabel(\"Step Gen Distance\");\r\n \r\n \tstepGenDistanceField = new JTextField(5);\r\n \tdoc = (PlainDocument)stepGenDistanceField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(stepGenDistanceField);\r\n \r\n \tlabel=new JLabel(\"Rows\");\r\n \r\n \trowsField = new JTextField(5);\r\n \tlabel.setToolTipText(\"Number of total rows in maze\");\r\n \tdoc = (PlainDocument)rowsField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(rowsField);\r\n \r\n \tlabel=new JLabel(\"Columns\");\r\n \r\n \tcolsField = new JTextField(5);\r\n \tlabel.setToolTipText(\"Number of total columns in maze.\");\r\n \tdoc = (PlainDocument)colsField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(colsField);\r\n \r\n \tlabel=new JLabel(\"Start Row\");\r\n \r\n \tstartRowField = new JTextField(5);\r\n \tlabel.setToolTipText(\"Row of starting position (0,0 is top left)\");\r\n \tdoc = (PlainDocument)startRowField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(startRowField);\r\n \r\n \tlabel=new JLabel(\"Start Column\");\r\n \r\n \tstartColField = new JTextField(5);\r\n \tlabel.setToolTipText(\"Column of starting position (0,0 is top left)\");\r\n \tdoc = (PlainDocument)startColField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(startColField);\r\n \r\n \tlabel=new JLabel(\"End Row\");\r\n \r\n \tendRowField = new JTextField(5);\r\n \tlabel.setToolTipText(\"Row of ending (goal) position (0,0 is top left)\");\r\n \tdoc = (PlainDocument)endRowField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(endRowField);\r\n \r\n \tlabel=new JLabel(\"End Column\");\r\n \r\n \tendColField = new JTextField(5);\r\n \tlabel.setToolTipText(\"Column of ending (goal) position (0,0 is top left)\");\r\n \tdoc = (PlainDocument)endColField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(endColField);\r\n \r\n \tlabel=new JLabel(\"Cell Width\");\r\n \r\n \tcellWidthField = new JTextField(5);\r\n \tlabel.setToolTipText(\"Width of a single cell in pixels\");\r\n \tdoc = (PlainDocument)cellWidthField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(cellWidthField);\r\n \r\n \tlabel=new JLabel(\"Progressive Reveal Radius\");\r\n \r\n \tprogRevealRadiusField = new JTextField(5);\r\n \tdoc = (PlainDocument)progRevealRadiusField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(progRevealRadiusField);\r\n \r\n \tlabel=new JLabel(\"Progressive Draw\");\r\n \r\n \tprogDrawCB = new JCheckBox();\r\n \tlabel.setToolTipText(\"Whether maze should be drawn progressively or not (immediately)\");\r\n \tthis.add(label);\r\n \tthis.add(progDrawCB);\r\n \r\n \tlabel=new JLabel(\"Progressive Draw Speed\");\r\n \r\n \tprogDrawSpeedField = new JTextField(5);\r\n \tlabel.setToolTipText(\"Size of chunks in which maze should be drawn progressively (larger is faster)\");\r\n \tdoc = (PlainDocument)progDrawSpeedField.getDocument();\r\n \tdoc.setDocumentFilter(intDocumentFilter);\r\n \tthis.add(label);\r\n \tthis.add(progDrawSpeedField);\r\n \r\n \r\n \r\n \r\n \tokButton = new JButton(\"OK\");\r\n \tokButton.addActionListener(new ActionListener(){\r\n \t\tpublic void actionPerformed(ActionEvent e){\r\n \t\t writeback();\r\n \t\t JDialog parentDialog = (JDialog)(getRootPane().getParent());\r\n \t\t parentDialog.setVisible(false);\r\n \t\t}\r\n \t });\r\n \tthis.add(okButton);\r\n \r\n \tcancelButton = new JButton(\"Cancel\");\r\n \tcancelButton.addActionListener(new ActionListener(){\r\n \t\tpublic void actionPerformed(ActionEvent e){\r\n \t\t JDialog parentDialog = (JDialog)(getRootPane().getParent());\r\n \t\t parentDialog.setVisible(false);\r\n \t\t}\r\n \t });\r\n \tthis.add(cancelButton);\r\n }", "private JTextField generateTextEntryPanel(String label, int textColumns, \r\n\t\t\tJPanel containingPanel) {\r\n\t\tJPanel entryPanel = new JPanel();\r\n\t\tentryPanel.add(new JLabel(label));\r\n\t\tJTextField textEntry = new JTextField(10);\r\n\t\ttextEntry.addKeyListener(new TextFieldEditListener());\r\n\t\tentryPanel.add(textEntry);\r\n\t\tcontainingPanel.add(entryPanel);\r\n\t\treturn textEntry;\r\n\t}", "public void insertData(String tableName) {\n //SQL statement\n String query = \"insert into \" + tableName +\n \"(\" +\n \"myName, address) \" +\n \"values ('Michael', 'my adress'), \" +\n \"('Nanna', 'Her adress'), \" +\n \"('Mathias', 'Their adress'), \" +\n \"('Maja', 'Their adress')\";\n\n try {\n //connection\n stmt = con.createStatement();\n //execute query\n stmt.executeUpdate(query);\n System.out.println(\"\\n--Data inserted into table \" + tableName + \"--\");\n } catch (SQLException ex) {\n //Handle SQL exceptions\n System.out.println(\"\\n--Query did not execute--\");\n ex.printStackTrace();\n }\n }", "public void create() {\n\n\t\tthis.data = new Object[lb.getBoardLen()+3][3];\n\t\tdata[0][0] = \"RANK\";\n\t\tdata[0][1] = \"PLAYER\";\n\t\tdata[0][2] = \"POINTS\";\n\t\t\n\t\tfor (int i = 1; i <= lb.getBoardLen(); i++) {\n\t\t\tdata[i][0] = \"#\" + Integer.toString(i);\n\t\t\tdata[i][1] = lb.getUserPointsList().get(i-1).username;\n\t\t\tdata[i][2] = Integer.toString(lb.getUserPointsList().get(i-1).points);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif (Sfunctions.sUserPull(user.getUsername(), user.getPassword()).getWeek() == -1) {\n\t\t\tdata[lb.getBoardLen() + 1][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][1] = \"THE SEASON HAS ENDED.\";\n\t\t\tdata[lb.getBoardLen() + 1][2] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][1] = \"THANKS FOR PLAYING!\";\n\t\t\tdata[lb.getBoardLen() + 2][2] = \"\";\n\t\t}\n\t\telse {\n\t\t\tdata[lb.getBoardLen() + 1][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][1] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][2] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][1] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][2] = \"\";\n\t\t}\n\t\n\tJTable table = new JTable(data, headers);\n\ttable.setBackground(new Color(104, 0, 0));\n\ttable.setForeground(Color.WHITE);\n\ttable.setFont(textFont);\n\ttable.setShowGrid(false);\n\ttable.setEnabled(false);\n\n\t//Depending on where the ME is\n\tme_row = getRowByValue(table, user.getUsername());\n\ttable.setRowSelectionInterval(me_row, me_row);\n\t\n\t\n\n\t\n\tTableColumn column = null;\n\tfor (int i = 0; i < 3; i++) {\n\t column = table.getColumnModel().getColumn(i);\n\t if (i == 0) {\n\t \t\tcolumn.setPreferredWidth(60);\n\t }\n\t if (i == 1) {\n\t column.setPreferredWidth(210); //third column is bigger\n\t } else {\n\t \t\tcolumn.setPreferredWidth(80);\n\t }\n\t}\n\n\t\n\tthis.add(table);\n\tthis.setBackground(new Color(104, 0, 0));\n\t}", "private static void populateTable(String name, File fileObj, Statement stat) {\n\t\tString tableName = \"\";\n\t\tScanner scan = null;\n\t\tString line = \"\";\n\t\tString[] splitLine = null;\n\t\t\n\t\ttableName = \"stevenwbroussard.\" + name;\n\t\ttry {\n\t\t\tscan = new Scanner(fileObj);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"Failed make thread with file.\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\t//use a for loop to go through, later use a while loop\n\t\twhile (scan.hasNext() != false) {\n\t\t//for (int i = 0; i < 10; i++) {\n\t\t\tline = scan.nextLine();\n\t\t\tsplitLine = line.split(\"\\\\,\");\n\t\t\t\n\t\t\t//if the type for integer column is NULL\n\t\t\tif (splitLine[0].equals(\"NULL\")) {\n\t\t\t\tsplitLine[0] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[1].equals(\"NULL\")) {\n\t\t\t\tsplitLine[1] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[4].equals(\"NULL\")) {\n\t\t\t\tsplitLine[4] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[5].equals(\"NULL\")) {\n\t\t\t\tsplitLine[5] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[7].equals(\"NULL\")) {\n\t\t\t\tsplitLine[7] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[9].equals(\"NULL\")) {\n\t\t\t\tsplitLine[9] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[11].equals(\"NULL\")) {\n\t\t\t\tsplitLine[11] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[13].equals(\"NULL\")) {\n\t\t\t\tsplitLine[13] = \"-1\";\n\t\t\t}\n\t\t\t\n\t\t\t//if the type for double column is NULL\n\t\t\tif (splitLine[6].equals(\"NULL\")) {\n\t\t\t\tsplitLine[6] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[8].equals(\"NULL\")) {\n\t\t\t\tsplitLine[8] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[10].equals(\"NULL\")) {\n\t\t\t\tsplitLine[10] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[12].equals(\"NULL\")) {\n\t\t\t\tsplitLine[12] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[14].equals(\"NULL\")) {\n\t\t\t\tsplitLine[14] = \"-1.0\";\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tstat.executeQuery(comd.insert(tableName, \n\t\t\t\t\t \t Integer.parseInt(splitLine[0]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[1]), \n\t\t\t\t\t \t splitLine[2], \n\t\t\t\t\t \t splitLine[3], \n\t\t\t\t\t \t Integer.parseInt(splitLine[4]),\n\t\t\t\t\t \t Integer.parseInt(splitLine[5]),\n\t\t\t\t\t \t Double.parseDouble(splitLine[6]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[7]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[8]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[9]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[10]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[11]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[12]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[13]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[14])));\n\t\t\t}\n\t\t\tcatch(SQLException s) {\n\t\t\t\tSystem.out.println(\"SQL insert statement failed.\");\n\t\t\t\ts.printStackTrace();\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void createRow( String name )\n {\n logger.log(Level.FINE, \"Creating Row\");\n\n JLabel label = new JLabel( name, SwingConstants.RIGHT );\n if (!isHeadless)\n label.setFont(new Font(\"Monospaced\", Font.PLAIN, 15));\n label.setHorizontalAlignment(SwingConstants.CENTER);\n label.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.DARK_GRAY));\n if (name.equals(PROFIT_LOSS))\n bottomPanel.add(label, BorderLayout.NORTH);\n else\n leftPanel.add(label);\n\n JTextField field = new JTextField( 30 );\n field.setEditable(false);\n if (!isHeadless)\n field.setFont(new Font(\"Serif\", Font.BOLD, 30));\n field.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.DARK_GRAY));\n field.setHorizontalAlignment(SwingConstants.CENTER);\n if (name.equals(PROFIT_LOSS)) {\n if (!isHeadless)\n field.setFont(new Font(\"Monospaced\", Font.BOLD, 55));\n bottomPanel.add(field, BorderLayout.CENTER);\n } else\n rightPanel.add(field);\n\n fields.put(name, field);\n\n logger.log(Level.FINE, \"Created Row\");\n\n }", "public void run() throws DatabaseException, FileNotFoundException {\n new File(FileName).delete();\n\n // Create the database object.\n // There is no environment for this simple example.\n DatabaseConfig config = new DatabaseConfig();\n config.setErrorStream(System.err);\n config.setErrorPrefix(\"BulkAccessExample\");\n config.setType(DatabaseType.BTREE);\n config.setAllowCreate(true);\n config.setMode(0644);\n Database table = new Database(FileName, null, config);\n\n //\n // Insert records into the database, where the key is the user\n // input and the data is the user input in reverse order.\n //\n InputStreamReader reader = new InputStreamReader(System.in);\n\n for (;;) {\n String line = askForLine(reader, System.out, \"input> \");\n if (line == null || (line.compareToIgnoreCase(\"end\") == 0))\n break;\n\n String reversed = (new StringBuffer(line)).reverse().toString();\n\n // See definition of StringEntry below\n //\n StringEntry key = new StringEntry(line);\n StringEntry data = new StringEntry(reversed);\n\n try {\n if (table.putNoOverwrite(null, key, data) == OperationStatus.KEYEXIST)\n System.out.println(\"Key \" + line + \" already exists.\");\n } catch (DatabaseException dbe) {\n System.out.println(dbe.toString());\n }\n System.out.println(\"\");\n }\n\n // Acquire a cursor for the table.\n Cursor cursor = table.openCursor(null, null);\n DatabaseEntry foo = new DatabaseEntry();\n\n MultipleKeyDataEntry bulk_data = new MultipleKeyDataEntry();\n bulk_data.setData(new byte[1024 * 1024]);\n bulk_data.setUserBuffer(1024 * 1024, true);\n\n // Walk through the table, printing the key/data pairs.\n //\n while (cursor.getNext(foo, bulk_data, null) == OperationStatus.SUCCESS) {\n StringEntry key, data;\n key = new StringEntry();\n data = new StringEntry();\n\n while (bulk_data.next(key, data))\n System.out.println(key.getString() + \" : \" + data.getString());\n }\n cursor.close();\n table.close();\n }", "private void createTextFieldLabels() {\n // initialize empty textfield\n this.name = new TextField();\n this.id = new TextField();\n this.fiber = new TextField();\n this.calories = new TextField();\n this.fat = new TextField();\n this.carbohydrate = new TextField();\n this.protein = new TextField();\n // initialize labels\n this.nameLabel = new Label(\"Name:\");\n this.idLabel = new Label(\"ID:\");\n this.fiberLabel = new Label(\"Fiber:\");\n this.caloriesLabel = new Label(\"Calories:\");\n this.fatLabel = new Label(\"Fat:\");\n this.carbohydrateLabel = new Label(\"Carbohydrate:\");\n this.proteinLabel = new Label(\"Protein:\");\n }", "private void createContents() {\r\n shell = new Shell(getParent(), getStyle());\r\n shell.setSize(650, 300);\r\n shell.setText(getText());\r\n\r\n shell.setLayout(new FormLayout());\r\n\r\n lblSOName = new Label(shell, SWT.CENTER);\r\n lblSOName.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.NORMAL));\r\n FormData fd_lblSOName = new FormData();\r\n fd_lblSOName.bottom = new FormAttachment(0, 20);\r\n fd_lblSOName.right = new FormAttachment(100, -2);\r\n fd_lblSOName.top = new FormAttachment(0, 2);\r\n fd_lblSOName.left = new FormAttachment(0, 2);\r\n lblSOName.setLayoutData(fd_lblSOName);\r\n lblSOName.setText(soName);\r\n\r\n tableParams = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);\r\n tableParams.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.NORMAL));\r\n FormData fd_tableParams = new FormData();\r\n fd_tableParams.bottom = new FormAttachment(100, -40);\r\n fd_tableParams.right = new FormAttachment(100, -2);\r\n fd_tableParams.top = new FormAttachment(0, 22);\r\n fd_tableParams.left = new FormAttachment(0, 2);\r\n tableParams.setLayoutData(fd_tableParams);\r\n tableParams.setHeaderVisible(true);\r\n tableParams.setLinesVisible(true);\r\n fillInTable(tableParams);\r\n tableParams.addControlListener(new ControlAdapter() {\r\n\r\n @Override\r\n public void controlResized(ControlEvent e) {\r\n Table table = (Table)e.getSource();\r\n table.getColumn(0).setWidth((int)(table.getClientArea().width*nameSpace));\r\n table.getColumn(1).setWidth((int)(table.getClientArea().width*valueSpace));\r\n table.getColumn(2).setWidth((int)(table.getClientArea().width*hintSpace));\r\n }\r\n });\r\n tableParams.pack();\r\n //paramName.pack();\r\n //paramValue.pack();\r\n\r\n final TableEditor editor = new TableEditor(tableParams);\r\n //The editor must have the same size as the cell and must\r\n //not be any smaller than 50 pixels.\r\n editor.horizontalAlignment = SWT.LEFT;\r\n editor.grabHorizontal = true;\r\n editor.minimumWidth = 50;\r\n // editing the second column\r\n tableParams.addSelectionListener(new SelectionAdapter() {\r\n @Override\r\n public void widgetSelected(SelectionEvent e) {\r\n // Identify the selected row\r\n TableItem item = (TableItem) e.item;\r\n if (item == null) {\r\n return;\r\n }\r\n\r\n // The control that will be the editor must be a child of the Table\r\n IReplaceableParam<?> editedParam = (IReplaceableParam<?>)item.getData(DATA_VALUE_PARAM);\r\n if (editedParam != null) {\r\n // Clean up any previous editor control\r\n Control oldEditor = editor.getEditor();\r\n if (oldEditor != null) {\r\n oldEditor.dispose();\r\n }\r\n\r\n Control editControl = null;\r\n String cellText = item.getText(columnValueIndex);\r\n switch (editedParam.getType()) {\r\n case BOOLEAN:\r\n Combo cmb = new Combo(tableParams, SWT.READ_ONLY);\r\n String[] booleanItems = {Boolean.toString(true), Boolean.toString(false)};\r\n cmb.setItems(booleanItems);\r\n cmb.select(1);\r\n if (Boolean.parseBoolean(cellText)) {\r\n cmb.select(0);\r\n }\r\n editControl = cmb;\r\n cmb.addSelectionListener(new SelectionAdapter() {\r\n\r\n @Override\r\n public void widgetSelected(SelectionEvent se) {\r\n Combo text = (Combo) editor.getEditor();\r\n editor.getItem().setText(columnValueIndex, text.getText());\r\n }\r\n });\r\n break;\r\n case DATE:\r\n IReplaceableParam<LocalDateTime> calParam = (IReplaceableParam<LocalDateTime>)editedParam;\r\n LocalDateTime calToUse = calParam.getValue();\r\n Composite dateAndTime = new Composite(tableParams, SWT.NONE);\r\n RowLayout rl = new RowLayout();\r\n rl.wrap = false;\r\n dateAndTime.setLayout(rl);\r\n //Date cellDt;\r\n try {\r\n LocalDateTime locDT = LocalDateTime.parse(cellText, dtFmt);\r\n if (locDT != null) {\r\n calToUse = locDT;\r\n }\r\n /*cellDt = dateFmt.parse(cellText);\r\n if (cellDt != null) {\r\n calToUse.setTime(cellDt);\r\n }*/\r\n } catch (DateTimeParseException e1) {\r\n log.error(\"widgetSelected \", e1);\r\n }\r\n\r\n DateTime datePicker = new DateTime(dateAndTime, SWT.DATE | SWT.MEDIUM | SWT.DROP_DOWN);\r\n datePicker.setData(DATA_VALUE_PARAM, calParam);\r\n DateTime timePicker = new DateTime(dateAndTime, SWT.TIME | SWT.LONG);\r\n timePicker.setData(DATA_VALUE_PARAM, calParam);\r\n // for the date picker the months are zero-based, the first month is 0 the last is 11\r\n // for LocalDateTime the months range 1-12\r\n datePicker.setDate(calToUse.getYear(), calToUse.getMonthValue() - 1,\r\n calToUse.getDayOfMonth());\r\n timePicker.setTime(calToUse.getHour(), calToUse.getMinute(),\r\n calToUse.getSecond());\r\n\r\n datePicker.addSelectionListener(new SelectionAdapter() {\r\n\r\n @Override\r\n public void widgetSelected(SelectionEvent se) {\r\n DateTime source = (DateTime)se.getSource();\r\n IReplaceableParam<LocalDateTime> calParam1 = (IReplaceableParam<LocalDateTime>)source.getData(DATA_VALUE_PARAM);\r\n if (calParam1 != null) {\r\n LocalDateTime currDt = calParam1.getValue();\r\n // for the date picker the months are zero-based, the first month is 0 the last is 11\r\n // for LocalDateTime the months range 1-12\r\n calParam1.setValue(currDt.withYear(source.getYear()).withMonth(source.getMonth() + 1).withDayOfMonth(source.getDay()));\r\n String resultText = dtFmt.format(calParam1.getValue());\r\n log.debug(\"Result Text \" + resultText);\r\n editor.getItem().setText(columnValueIndex, resultText);\r\n } else {\r\n log.warn(\"widgetSelected param is null\");\r\n }\r\n }\r\n\r\n });\r\n timePicker.addSelectionListener(new SelectionAdapter() {\r\n\r\n @Override\r\n public void widgetSelected(SelectionEvent se) {\r\n DateTime source = (DateTime)se.getSource();\r\n IReplaceableParam<LocalDateTime> calParam1 = (IReplaceableParam<LocalDateTime>)source.getData(DATA_VALUE_PARAM);\r\n if (calParam1 != null) {\r\n LocalDateTime currDt = calParam1.getValue();\r\n calParam1.setValue(currDt.withHour(source.getHours()).withMinute(source.getMinutes()).withSecond(source.getSeconds()));\r\n String resultText = dtFmt.format(calParam1.getValue());\r\n log.debug(\"Result Text \" + resultText);\r\n editor.getItem().setText(columnValueIndex, resultText);\r\n } else {\r\n log.warn(\"widgetSelected param is null\");\r\n }\r\n }\r\n\r\n });\r\n dateAndTime.layout();\r\n editControl = dateAndTime;\r\n break;\r\n case INTEGER:\r\n Text intEditor = new Text(tableParams, SWT.NONE);\r\n intEditor.setText(item.getText(columnValueIndex));\r\n intEditor.selectAll();\r\n intEditor.addModifyListener(new ModifyListener() {\r\n @Override\r\n public void modifyText(ModifyEvent se) {\r\n Text text = (Text) editor.getEditor();\r\n Integer resultInt = null;\r\n try {\r\n resultInt = Integer.parseInt(text.getText());\r\n } catch (NumberFormatException nfe) {\r\n log.error(\"NFE \", nfe);\r\n }\r\n if (resultInt != null) {\r\n editor.getItem().setText(columnValueIndex, resultInt.toString());\r\n }\r\n }\r\n });\r\n editControl = intEditor;\r\n break;\r\n case STRING:\r\n default:\r\n Text newEditor = new Text(tableParams, SWT.NONE);\r\n newEditor.setText(item.getText(columnValueIndex));\r\n newEditor.setFont(tableParams.getFont());\r\n newEditor.selectAll();\r\n newEditor.addModifyListener(new ModifyListener() {\r\n @Override\r\n public void modifyText(ModifyEvent se) {\r\n Text text = (Text) editor.getEditor();\r\n editor.getItem().setText(columnValueIndex, text.getText());\r\n }\r\n });\r\n editControl = newEditor;\r\n break;\r\n }\r\n\r\n editControl.setFont(tableParams.getFont());\r\n editControl.setFocus();\r\n editor.setEditor(editControl, item, columnValueIndex);\r\n }\r\n }\r\n });\r\n\r\n\r\n btnOK = new Button(shell, SWT.NONE);\r\n btnOK.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.NORMAL));\r\n FormData fd_btnOK = new FormData();\r\n fd_btnOK.bottom = new FormAttachment(100, -7);\r\n fd_btnOK.right = new FormAttachment(40, 2);\r\n fd_btnOK.top = new FormAttachment(100, -35);\r\n fd_btnOK.left = new FormAttachment(15, 2);\r\n btnOK.setLayoutData(fd_btnOK);\r\n btnOK.setText(\"OK\");\r\n btnOK.addSelectionListener(new SelectionAdapter() {\r\n @Override\r\n public void widgetSelected(SelectionEvent e) {\r\n result = new DialogResult<>(SWT.OK, getParamMap());\r\n shell.close();\r\n }\r\n\r\n });\r\n shell.setDefaultButton(btnOK);\r\n\r\n btnCancel = new Button(shell, SWT.NONE);\r\n btnCancel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.NORMAL));\r\n FormData fd_btnCancel = new FormData();\r\n fd_btnCancel.bottom = new FormAttachment(100, -7);\r\n fd_btnCancel.left = new FormAttachment(60, -2);\r\n fd_btnCancel.top = new FormAttachment(100, -35);\r\n fd_btnCancel.right = new FormAttachment(85, -2);\r\n btnCancel.setLayoutData(fd_btnCancel);\r\n btnCancel.setText(\"Cancel\");\r\n btnCancel.addSelectionListener(new SelectionAdapter() {\r\n @Override\r\n public void widgetSelected(SelectionEvent e) {\r\n result = new DialogResult<>(SWT.CANCEL, null);\r\n shell.close();\r\n }\r\n\r\n });\r\n tableParams.redraw();\r\n }", "public void addRow(String data){//adds a new row of data to the table\n\t\t\t\tif(row_count<100){//checks to see if there is space left in the current datum for an additional rows\n\t\t\t\t\tif(row_count<50){//halvs the data for more efficiant row insertion\n\t\t\t\t\t\tif(row_count<10){//checks to see if it is in the first inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[0].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[0]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[0].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<20){//checks to see if it is in the second inner datum\n\t\t\t\t\t\t\tf(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[1].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[1]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[1].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<30){//checks to see if it is in the third inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[2].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[2]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[2].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<40){//checks to see if it is in the fourth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[3].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[3]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[3].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{//checks to see if it is in the fifth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[4].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[4]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[4].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\t\n\t\t\t\t\t\tif(row_count<60){//checks to see if it is in the sixth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[5].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[5]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[5].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<70){//checks to see if it is in the seventh inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[6].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[6]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[6].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<80){//checks to see if it is in the eighth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[7].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[7]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[7].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(row_count<90){//checks to see if it is in the ninth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[8].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[8]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[8].addRow(data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{//checks to see if it is in the tenth inner datum\n\t\t\t\t\t\t\tif(dataarr!=null){//makes suhure there is an innerdatum to send the data to\n\t\t\t\t\t\t\t\tdataarr[9].addRow(data);\n\t\t\t\t\t\t\t}else{//if there is not an inner datum in the current spot this adds a new one\n\t\t\t\t\t\t\t\tdataarr[9]=new InnerDatum();\n\t\t\t\t\t\t\t\tdataarr[9].addRow(data);\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}else{//acctivated when there is no room left in the current outer datum}\n\t\t\t\t\tif(next==null){//checks to see if there is a next outer datum\n\t\t\t\t\t\tnext=new OuterDatum();\t\n\t\t\t\t\t}\n\t\t\t\t\tnext.addRow(data);\n\t\t\t\t}\n\t\t\t}", "public static void main(String[] args) throws SQLException {\n\t\tDeptHandler d=new DeptHandler();\r\n\t\tVector<String> input=new Vector<>();\r\n\t\tinput.add(\"100\");\r\n\t\tinput.add(\"수원점\");\r\n\t\tinput.add(\"수원\");\r\n\t\tinput.add(\"031-333-3333\");\r\n\t\tinput.add(\"202\");\r\n\t\t\r\n\t\td.InsertRow(input);\r\n\t\t//d.deleteRow(100);\r\n\t\tVector<String> update=new Vector<>();\r\n\t\tupdate.add(\"100\");\r\n\t\tupdate.add(\"\");\r\n\t\tupdate.add(\"서울\");\r\n\t\tupdate.add(\"02-333-3333\");\r\n\t\tupdate.add(\"\");\r\n\t\td.updateRow(100,update);\r\n\t\t\r\n\r\n\t}", "public void importUserMadeTable(BufferedReader br) {\r\n\t\tString line;\r\n\t\tTable table = null;\r\n\t\ttry {\r\n\t\t\tString tableName = br.readLine();\r\n\t\t\ttable = new Table(tableName);\r\n\t\t\tint[] types = convertTypes(br.readLine().split(\",\"));\r\n\t\t\tString[] names = br.readLine().split(\",\");\r\n\t\t\tassert (types.length == names.length);\r\n\t\t\tfor (int i = 0 ; i < types.length; i++) {\r\n\t\t\t\ttable.newAttribute(names[i], types[i]);\r\n\t\t\t}\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tString[] entries = line.split(\",\");\r\n\t\t\t\tfor (int i = 0; i < entries.length; i++) {\r\n\t\t\t\t\tif (!table.getAttributes(i + 1).checkType(entries[i]))\r\n\t\t\t\t\t\tentries[i] = \"--\";\r\n\t\t\t\t}\r\n\t\t\t\ttable.newEntry(entries);\r\n\t\t\t}\r\n\t\t\tbr.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\ttable.delete();\r\n\t\t}\r\n\t}", "public boolean createTable(String input) throws IOException{\n\t\tString orgQuery = input;\n\t\torgQuery = orgQuery.trim();\n\t\tString query = input.toLowerCase().trim();\n\t\tboolean queryFailed = false;\n\t\t//Schema Instance \n\t\tSchema currentSchema = Schema.getSchemaInstance();\n\t\tString currentSchemaName = currentSchema.getCurrentSchema();\n\n\t\t//TableSchemaManager Instance\n\t\tTableSchemaManager currentTableSchemaManager = TableSchemaManager.getTableSchemaManagerInstance();\n\n\t\t//Extracting Table name\n\t\ttableName = orgQuery.substring(query.indexOf(\"table \")+6,query.indexOf(\"(\")).trim();\n\n\t\t//Updating SCHEMA.TABLE.TBL\n\t\tif(updateInformationSchemaTable()){\n\t\t\tqueryFailed = true;\n\t\t\treturn queryFailed;\n\t\t}\n\n\t\t//Extracting Table contents\n\t\tString tableContentsWithQuotes = orgQuery.substring(orgQuery.indexOf(\"(\")+1,orgQuery.length());\n\t\tString tableContents = tableContentsWithQuotes.replace(\"))\", \")\");\n\t\ttableContents = tableContents.trim();\n\n\t\tTableSchemaManager.ordinalMap = new TreeMap<Integer,List<String>>();\n\t\tTableSchemaManager.tableMap = new TreeMap<String,TreeMap<Integer,List<String>>>();\n\t\t\n\t\t//Creating n instances of Table helper\n\t\tString[] createTableContents = tableContents.split(\"\\\\,\"); \n\t\tnoOfColumns = createTableContents.length;\n\t\tCreateTableHelper[] th = new CreateTableHelper[noOfColumns];\n\n\t\t\n\t\t//Handles single row of Create Table \n\t\tfor(int item = 0; item < noOfColumns ; item++){\n\t\t\tth[item] = new CreateTableHelper(); \n\t\t\t//To remove any leading or trailing spaces\n\t\t\tcreateTableContents[item] = createTableContents[item].trim();\n\t\t\tString columnName = createTableContents[item].substring(0, createTableContents[item].indexOf(\" \"));\n\t\t\tth[item].setColumnName(columnName);\n\n\t\t\t//Setting Primary Key\n\t\t\tString primaryKeyExp = \"(.*)[pP][rR][iI][mM][aA][rR][yY](.*)\";\n\t\t\tif (createTableContents[item].matches(primaryKeyExp))\n\t\t\t\tth[item].setPrimaryKey(true);\n\t\t\telse\n\t\t\t\tth[item].setPrimaryKey(false);\n\n\t\t\t//Setting Null Value\t\n\t\t\tString notNullExp = \"(.*)[nN][uU][lL][lL](.*)\";\n\t\t\tif (createTableContents[item].matches(notNullExp))\n\t\t\t\tth[item].setNull(true);\n\t\t\telse\n\t\t\t\tth[item].setNull(false);\n\n\t\t\t//Extracting data types \n\t\t\t//BYTE\n\t\t\tString byteExp = \"(.*)[bB][yY][tT][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(byteExp)){\n\t\t\t\tth[item].setDataType(\"BYTE\");\n\t\t\t}\n\t\t\t//SHORT\n\t\t\tString shortExp = \"(.*)[sS][hH][oO][rR][tT](.*)\";\n\t\t\tif (createTableContents[item].matches(shortExp)){\n\t\t\t\tth[item].setDataType(\"SHORT\");\n\t\t\t}\n\t\t\t//INT\n\t\t\tString intExp = \"(.*)[iI][nN][tT](.*)\";\n\t\t\tif (createTableContents[item].matches(intExp)){\n\t\t\t\tth[item].setDataType(\"INT\");\n\t\t\t}\n\t\t\t//LONG\n\t\t\tString longExp = \"(.*)[lL][oO][nN][gG](.*)\";\n\t\t\tif (createTableContents[item].matches(longExp)){\n\t\t\t\tth[item].setDataType(\"LONG\");\n\t\t\t}\n\t\t\t//CHAR\n\t\t\tString charExp = \"(.*)[cC][hH][aA][rR](.*)\";\n\t\t\tif (createTableContents[item].matches(charExp)){\n\t\t\t\tString size = createTableContents[item].substring(createTableContents[item].indexOf(\"(\")+1, createTableContents[item].indexOf(\")\"));\n\t\t\t\tth[item].setDataType(\"CHAR(\" + size + \")\");\n\t\t\t}\n\t\t\t//VARCHAR\n\t\t\tString varcharExp = \"(.*)[vV][aA][rR][cC][hH][aA][rR](.*)\";\n\t\t\tif (createTableContents[item].matches(varcharExp)){\n\t\t\t\tString size = createTableContents[item].substring(createTableContents[item].indexOf(\"(\")+1, createTableContents[item].indexOf(\")\"));\n\t\t\t\tth[item].setDataType(\"VARCHAR(\" + size + \")\");\n\t\t\t}\n\t\t\t//FLOAT\n\t\t\tString floatExp = \"(.*)[fF][lL][oO][aA][tT](.*)\";\n\t\t\tif (createTableContents[item].matches(floatExp)){\n\t\t\t\tth[item].setDataType(\"FLOAT\");\t\t\t\t\n\t\t\t}\n\t\t\t//DOUBLE\n\t\t\tString doubleExp = \"(.*)[dD][oO][uU][bB][lL][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(doubleExp)){\n\t\t\t\tth[item].setDataType(\"DOUBLE\");\n\t\t\t}\n\t\t\t//DATETIME\n\t\t\tString dateTimeExp = \"(.*)[dD][aA][tT][eE][tT][iI][mM][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(dateTimeExp)){\n\t\t\t\tth[item].setDataType(\"DATETIME\");\n\t\t\t}\n\t\t\t//DATE\n\t\t\tString dateExp = \"(.*)[dD][aA][tT][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(dateExp)){\n\t\t\t\tth[item].setDataType(\"DATE\");\n\t\t\t}\n\n\t\t\tcurrentTableSchemaManager.newTableSchema(\n\t\t\t\t\ttableName,\n\t\t\t\t\titem,\n\t\t\t\t\tth[item].getColumnName(),\n\t\t\t\t\tth[item].getDataType(),\n\t\t\t\t\tth[item].isNull(),\n\t\t\t\t\tth[item].isPrimaryKey()\n\t\t\t\t\t);\n\n\t\t\t//Updating SCHEMA.COLUMNS.TBL\n\t\t\tupdateInformationSchemaColumn(\n\t\t\t\t\tth[item].getColumnName(),\n\t\t\t\t\titem,\n\t\t\t\t\tth[item].getDataType(),\n\t\t\t\t\tth[item].isNull(),\n\t\t\t\t\tth[item].isPrimaryKey()\n\t\t\t\t\t);\n\t\t\t//Create tables to insert index\n\t\t\tString newTableIndexName = currentSchemaName + \".\" + tableName + \".\" +th[item].getColumnName()+ \".tbl.ndx\";\n\t\t\tRandomAccessFile newTableIndexFile = new RandomAccessFile(newTableIndexName, \"rw\");\n\t\t\tnewTableIndexFile.close();\n\n\t\t}\n\n\t\tTableSchemaManager.tableMap.put(tableName, TableSchemaManager.ordinalMap);\n\t\tcurrentTableSchemaManager.updateTableSchema(currentSchemaName,tableName);\n\t\t\n\t\t//Create tables to insert data \n\t\tString newTableDataName = currentSchemaName + \".\" + tableName + \".tbl\";\n\t\tRandomAccessFile newTableDataFile = new RandomAccessFile(newTableDataName, \"rw\");\n\t\tnewTableDataFile.close();\n\t\treturn queryFailed;\n\t}", "Rows createRows();", "public static void main_addApplicant(){\n String applicantName, college;\n String[] skills = new String[3], companyNames = new String[3];\n double gpa;\n System.out.println(\"Enter Applicant Name: \");\n applicantName = input.nextLine();\n if(!Character.isLetter(applicantName.charAt(0))) {\n System.out.println(\"Invalid input.\");\n main_menu();\n }\n System.out.println(\"Enter Applicant GPA: \");\n gpa = input.nextDouble();\n while(gpa <= 0 || gpa >= 4){\n System.out.println(\"Invalid input: GPA must be greater than 0.0 and less than 4.0\");\n main_menu();\n }\n input.nextLine();\n System.out.println(\"Enter Applicant College: \");\n college = input.nextLine();\n if(!Character.isLetter(college.charAt(0))) {\n System.out.println(\"Invalid input.\");\n main_menu();\n }\n\n int x = 0;\n\n while(x < 3){\n System.out.println(\"Enter up to \" + (3 - x) + \" Companies: \");\n String companyX = input.nextLine();\n if(!companyX.equals(\"\")){\n companyNames[x] = companyX;\n x++;\n }\n else if(companyX.equals(\"\") && x == 0){\n System.out.println(\"Error: Applicant must have at least one company.\");\n x = 0;\n }\n else\n x = 3;\n }\n\n x = 0;\n\n while(x < 3){\n System.out.println(\"Enter up to \" + (3 - x) + \" Skills: \");\n String skillX = input.nextLine();\n if(!skillX.equals(\"\")){\n skills[x] = skillX;\n x++;\n }\n else if(skillX.equals(\"\") && x == 0) {\n System.out.println(\"Error: Applicant must have at least one skill.\");\n x = 0;\n }\n else\n x = 3;\n }\n\n Applicant app = new Applicant(companyNames, applicantName,\n gpa, college, skills);\n\n try {\n table.addApplicant(app);\n }\n catch (FullTableException ex) {\n System.out.println(\"Full table.\");\n main_menu();\n }\n\n\n\n\n }", "@Before\n public void setUp() {\n table = new Table();\n ArrayList<Column> col = new ArrayList<Column>();\n col.add(new NumberColumn(\"numbers\"));\n\n table.add(new Record(col, new Value[] {new NumberValue(11)}));\n table.add(new Record(col, new Value[] {new NumberValue(13)}));\n table.add(new Record(col, new Value[] {new NumberValue(22)}));\n table.add(new Record(col, new Value[] {new NumberValue(28)}));\n table.add(new Record(col, new Value[] {new NumberValue(44)}));\n table.add(new Record(col, new Value[] {new NumberValue(23)}));\n table.add(new Record(col, new Value[] {new NumberValue(46)}));\n table.add(new Record(col, new Value[] {new NumberValue(56)}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NullValue()}));\n table.add(new Record(col, new Value[] {new NumberValue(45)}));\n table.add(new Record(col, new Value[] {new NumberValue(34)}));\n table.add(new Record(col, new Value[] {new NumberValue(5)}));\n table.add(new Record(col, new Value[] {new NumberValue(123)}));\n table.add(new Record(col, new Value[] {new NumberValue(48)}));\n table.add(new Record(col, new Value[] {new NumberValue(50)}));\n table.add(new Record(col, new Value[] {new NumberValue(13)}));\n }", "protected void constructTable(Logger l, Statement s, int run)\n throws SQLException{\n createTable(s, run);\n insertResults(l,s,run);\n }", "private void constructRecord(List<String> values, Table table) {\n // Add the table name to the record\n builder.append(\"{\\\"\").append(TABLE_NAME_FIELD_NAME).append(\"\\\":\\\"\").append(table.getName()).append(\"\\\"\");\n\n // Build the record data\n for (int counter = 0; counter < values.size(); counter++) {\n\n // If the value is null, no need to check for the column type\n if (values.get(counter) == null) {\n builder.append(\",\\\"\");\n builder.append(table.getColumns()[counter].getName());\n builder.append(\"\\\":\");\n builder.append(values.get(counter));\n continue;\n }\n\n String fieldName = table.getColumns()[counter].getName();\n String stringValue = values.get(counter);\n\n // Convert the value to the appropriate type based on the column type\n switch (table.getColumns()[counter].getType().getBase()) {\n case INTEGER:\n builder.append(\",\\\"\").append(fieldName).append(\"\\\":\").append(Integer.valueOf(stringValue));\n break;\n case DECIMAL:\n builder.append(\",\\\"\").append(fieldName).append(\"\\\":\").append(Double.valueOf(stringValue));\n break;\n // IDENTIFIER type could be any value, so we're taking it as a string\n // DATE and TIME are not supported, they are stored as strings and can be modified with date functions\n // CHAR and VARCHAR are handled as strings\n // any other type (default case) is handled as a string value\n case IDENTIFIER:\n case DATE:\n case TIME:\n case CHAR:\n case VARCHAR:\n default:\n builder.append(\",\\\"\").append(fieldName).append(\"\\\":\\\"\").append(stringValue).append(\"\\\"\");\n break;\n }\n }\n\n builder.append(\"}\");\n }", "protected void constructTable(Logger l, Statement s, int run)\n throws SQLException{\n createTable(s, run);\n insertResults(l,s,run);\n }", "void populateTable(List<String[]> entries) throws SQLException;", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n String input = request.getParameter(\"input\");\n String sql = \"INSERT INTO EXAMPLES VALUES \" + input;\n\n try {\n Statement stmt = conn.createStatement();\n ResultSet results = stmt.executeQuery(sql);\n System.out.println(\"look what the database said! \" + results);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "private void callForRecords() throws SQLException, NumberFormatException, ClassNotFoundException{\n\t\tResultSet rs;\n\t\toutputTA.setText(\"PURCHASE ID\"\n\t\t\t\t+\"\\t\"+\"| CUSTOMER\"\n\t\t\t\t+\"\\t\\t\"+\"| NO. OF ITEMS\"\n\t\t\t\t+\"\\t\"+\"| AMOUNT\"\n\t\t\t\t+\"\\t\"+\"| MODE OF PAYMENT\"\n\t\t\t\t+\"\\t\"+\"| TIME OF PURCHASE\"\n\t\t\t\t+\"\\n\");\n\t\tif(custTypeCB.getSelectedIndex() == 3)\n\t\t\trs = dBConnection.getRecords(Integer.parseInt(custIdTF.getText()));\n\t\telse\n\t\t\trs = dBConnection.getRecords(custTypeCB.getSelectedIndex());\n\t\t\n\t\twhile(rs.next()){\n\t\t\tString name = rs.getString(2);\n\t\t\t\n\t\t\t//trick to make all name length same so that they line up correctly in output textarea.\n\t\t\tif(name.length()<20){\n\t\t\t\tint spacesRequired = 20 - name.length();\n\t\t\t\tfor(int i = 0; i< spacesRequired; i++)\n\t\t\t\t\tname.concat(\" \");\n\t\t\t}\n\t\t\t\n\t\t\toutputTA.append(\"_________________________________________________________________\"\n\t\t\t\t\t+ \"___________________________________________\\n\");\n\t\t\toutputTA.append(rs.getString(1)\n\t\t\t\t\t+\"\\t \"+name\n\t\t\t\t\t+\"\\t\\t \"+rs.getString(3)\n\t\t\t\t\t+\"\\t \"+rs.getString(4)\n\t\t\t\t\t+\"\\t \"+rs.getString(5)\n\t\t\t\t\t+\"\\t\\t \"+rs.getString(6)+\"\\n\");\n\t\t}\n\t\tdBConnection.disconnect();\n\t}", "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\tString[] arr= new String[colName.length];\n\t\t\t\t\tfor(int i =0 ; i<colName.length; i++){\n\t\t\t\t\t\tarr[i] =tfInsert[i].getText();\n\t\t\t\t\t}\n\n\t\t\t\t\tboolean insertOrDelete = false; \n\t\t\t\t\tboolean full = checkInput(arr);\n\t\t\t\t\tboolean right = isRightType(arr);\n\t\t\t\t\t\n\t\t\t\t\tif(full && right){\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif(whichAction.getText().equals(\"Insert\")){\n\t\t\t\t\t\t\t\tinsertOrDelete= db.insertData(arr);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tinsertOrDelete = db.deleteData(arr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\tAlertBox noInsertDelete = new AlertBox();\n\t\t\t\t\t\t\tnoInsertDelete.display(whichAction.getText() + \" Fail\", \"Unable to \" +whichAction.getText() +\". Please try again.\");\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(!full){\n\t\t\t\t\t\t\tAlertBox noInsertDelete = new AlertBox();\n\t\t\t\t\t\t\tnoInsertDelete.display(\"Not enough data\", \"Unable to \" +whichAction.getText() +\". All inputs are required.\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tAlertBox notRight= new AlertBox();\n\t\t\t\t\t\t\tnotRight.display(\"Incorrect Data\", \"Unable to \" +whichAction.getText() +\".One of your inputs is not a valid type\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(insertOrDelete){\n\t\t\t\t\t\tAlertBox done = new AlertBox();\n\t\t\t\t\t\tdone.display(whichAction.getText() + \" Successful.\",\n\t\t\t\t\t\t\t\twhichAction.getText()+\" completed.\");\n\t\t\t\t\t}else;\n\n\t\t\t\t}", "public void firstfilltable3 (){\n\t\nContext mContext = getApplicationContext();\n\t\n \n\t//InputStream csvStream;\n\t\n\t String reader = \"\";\n\t\tString date = null;\n\t\tString value;\n\t\tString f_id;\n\t\t\n\t\t\n\t\t\n\t\ttry {\n\n\n assert mContext != null;\n InputStream csvStream = mContext.getResources().openRawResource(R.raw.food);\n\t\t\t\n\t\t\tDataInputStream data = new DataInputStream(csvStream);\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(data));\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\twhile ((reader = in.readLine())!=null){\n\t\t\t\tString[] RowData = reader.split(\",\");\n\t\t\t\t\n\t\t\t\tf_id=RowData[0];\n\t\t\t\t\n\t\t\t date =RowData[1];\n\t\t\t \n\t\t\t value = RowData[2];\n\t\t\t \n\t\t\t \n\t\t\t\tdb.addRow_foods(f_id,date,value);\n\t\t\t \n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \n\t\n\t\t\t\n}", "@Override\n\tpublic void handle(ActionEvent arg0) {\n\t\tCreateTables creator = new CreateTables(tlp);\n\t\tcreator.createLogTable();\n//\t\tcreator.createRacesTable();\n//\t\tcreator.createTravelHistoryTable();\n\t\tSystem.out.println(\"log exist: \"+creator.checkExistingTable(\"log\"));\n\t\tSystem.out.println(\"races exist: \"+creator.checkExistingTable(\"races\"));\n\t\tSystem.out.println(\"travelhistory exist: \"+creator.checkExistingTable(\"travelhistory\"));\n\t}", "private void fillSummaryTab(int key, String dataIn) {\n switch (key) {\n case 1:\n SummaryDestinationField.setText(dataIn);\n break;\n case 2:\n SummaryHotelField.setText(dataIn);\n break;\n case 3:\n SummaryCarField.setText(dataIn);\n break;\n case 4:\n SummaryExcursionsField.setText(dataIn);\n break;\n default:\n // something of course\n }\n }", "Row createRow();", "public void showInputs() {\n\t\tCIVLTable tbl_inputTable = (CIVLTable) getComponentByName(\"tbl_inputTable\");\n\t\tDefaultTableModel inputModel = (DefaultTableModel) tbl_inputTable\n\t\t\t\t.getModel();\n\n\t\tif (inputModel.getRowCount() != 0) {\n\t\t\tinputModel.setRowCount(0);\n\t\t\ttbl_inputTable.clearSelection();\n\t\t}\n\n\t\t// GMCSection gmcs = currConfig.getGmcConfig().getAnonymousSection();\n\t\tArrayList<CIVL_Input> inputList = currConfig.getInputs();\n\t\tfor (int i = 0; i < inputList.size(); i++) {\n\t\t\tCIVL_Input input = inputList.get(i);\n\t\t\tinputModel.addRow(new Object[] { input.getName(), input.getType(),\n\t\t\t\t\tinput.getValue(), input.getInitializer() });\n\t\t}\n\n\t}", "public static void main(String[] args) {\n Connection conn = null;\n Statement s;\n ResultSet rs = null;\n String dbName = \"myDB\";\n String url = protocol + dbName + \";create=true\";\n\n try {\n // create a connection object\n conn = DriverManager.getConnection(url);\n // somewhere to put our SQL statements\n s = conn.createStatement();\n // declare some SQL statements\n String createTable = \"CREATE TABLE IMAGETABLE \" +\n \"( ID INT PRIMARY KEY, \" +\n \"FILENAME VARCHAR(32), \" +\n \"PHOTOGRAPHER VARCHAR(32), \" +\n \"CATEGORY VARCHAR(32),\" +\n \"DESCRIPTION VARCHAR(32) )\";\n String insertData = \"INSERT INTO IMAGETABLE\" +\n \" VALUES \" +\n \" (1, 'animals01', 'Emily Kim', 'animals', 'some creature'),\" +\n \" (2, 'city02', 'Ada Long', 'city', 'some place'),\" +\n \" (3, 'people03', 'Fred Hoyle', 'people', 'some person')\";\n String readData = \"SELECT * FROM IMAGETABLE\";\n\n // execute SQL statements\n //s.execute(createTable);\n //s.execute(insertData);\n rs = s.executeQuery(readData);\n while (rs.next()){\n System.out.println(\"\" + rs.getInt(1)\n +\"\\t\"+rs.getString(2)\n +\"\\t\"+rs.getString(3)\n +\"\\t\"+rs.getString(4)\n );\n }\n }\n catch(SQLException sqle) {\n System.out.println(sqle);\n }\n finally {\n\n }\n\n\n\n\n\n\n\n\n\n }", "public void addRecord() {\n int numOverflowRecords = Integer.parseInt(getNumberOfRecords(\"overflow\"));\n\n int rankForNewRecord = Integer.parseInt(getHighestRank()) + 1;\n\n byte [] companyNameBytes = new byte[Constants.NUM_BYTES_COMPANY_NAME];\n byte [] companyCityBytes = new byte[Constants.NUM_BYTES_COMPANY_CITY];\n byte [] companyStateBytes = new byte[Constants.NUM_BYTES_COMPANY_STATE];\n byte [] companyZipCodeBytes = new byte[Constants.NUM_BYTES_COMPANY_ZIP];\n byte [] companyEmployeesBytes = new byte[Constants.NUM_BYTES_COMPANY_EMPLOYEES];\n\n // User input for each of the fields ******************\n byte [] companyRankBytes = HelperFunctions.addWhitespacesToEnd(Integer.toString(rankForNewRecord), Constants.NUM_BYTES_RANK).getBytes();\n\n // Input for name of company\n System.out.println(\"Please enter the name of the company (truncated at \" + Constants.NUM_BYTES_COMPANY_NAME + \" characters): \");\n companyNameBytes = HelperFunctions.getInputDataBytes(Constants.NUM_BYTES_COMPANY_NAME);\n\n // Input for city the company is located in\n System.out.println(\"Please enter the city the company is located in (truncated at \" + Constants.NUM_BYTES_COMPANY_CITY + \" characters): \");\n companyCityBytes = HelperFunctions.getInputDataBytes(Constants.NUM_BYTES_COMPANY_CITY);\n\n // Input for state the company is located in\n System.out.println(\"Please enter the state the company is located in (truncated at \" + Constants.NUM_BYTES_COMPANY_STATE + \" characters): \");\n companyStateBytes = HelperFunctions.getInputDataBytes(Constants.NUM_BYTES_COMPANY_STATE);\n\n // Input for zip code of company\n System.out.println(\"Please enter the zip code of the company (truncated at \" + Constants.NUM_BYTES_COMPANY_ZIP + \" characters): \");\n companyZipCodeBytes = HelperFunctions.getInputDataBytes(Constants.NUM_BYTES_COMPANY_ZIP);\n\n // Input for number of employees of company\n System.out.println(\"Please enter the company's number of employees (truncated at \" + Constants.NUM_BYTES_COMPANY_EMPLOYEES + \" charactes): \");\n companyEmployeesBytes = HelperFunctions.getInputDataBytes(Constants.NUM_BYTES_COMPANY_EMPLOYEES);\n\n byte [] newLineBytes = System.getProperty(\"line.separator\").getBytes();\n\n // End user input ************************************\n\n // Add bytes to overflow file\n addRecordToOverflow(companyRankBytes, numOverflowRecords * Constants.NUM_BYTES_LINUX_RECORD);\n addRecordToOverflow(companyNameBytes, numOverflowRecords * Constants.NUM_BYTES_LINUX_RECORD + 5);\n addRecordToOverflow(companyCityBytes, numOverflowRecords * Constants.NUM_BYTES_LINUX_RECORD + 45);\n addRecordToOverflow(companyStateBytes, numOverflowRecords * Constants.NUM_BYTES_LINUX_RECORD + 65);\n addRecordToOverflow(companyZipCodeBytes, numOverflowRecords * Constants.NUM_BYTES_LINUX_RECORD + 68);\n addRecordToOverflow(companyEmployeesBytes, numOverflowRecords * Constants.NUM_BYTES_LINUX_RECORD + 74);\n addRecordToOverflow(newLineBytes, numOverflowRecords * Constants.NUM_BYTES_LINUX_RECORD + 84);\n\n numOverflowRecords++;\n\n if (numOverflowRecords > 4) {\n mergeSortRecords(numOverflowRecords);\n updateNumRecords(\"overflow\", 0);\n\n try {\n PrintWriter clearOverflow = new PrintWriter(this.databaseName + \".overflow\");\n clearOverflow.write(\"\");\n clearOverflow.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n } else {\n updateNumRecords(\"overflow\", numOverflowRecords);\n }\n\n String currentHighestRank = getHighestRank().trim();\n updateHighestRank(Integer.parseInt(currentHighestRank) + 1);\n\n System.out.println(\"Record Added...\");\n }", "public void getData(AccessInputMeta in)\n\t{\n\t\tif (in.getFileName() !=null) \n\t\t{\n\t\t\twFilenameList.removeAll();\n\n\t\t\tfor (int i=0;i<in.getFileName().length;i++) \n\t\t\t{\n\t\t\t\twFilenameList.add(new String[] { in.getFileName()[i], in.getFileMask()[i] , in.getExludeFileMask()[i],in.getRequiredFilesDesc(in.getFileRequired()[i]), in.getRequiredFilesDesc(in.getIncludeSubFolders()[i])} );\n\t\t\t}\t\n\t\t\twFilenameList.removeEmptyRows();\n\t\t\twFilenameList.setRowNums();\n\t\t\twFilenameList.optWidth(true);\n\t\t}\n\t\twInclFilename.setSelection(in.includeFilename());\n\t\twInclTablename.setSelection(in.includeTablename());\n\t\twInclRownum.setSelection(in.includeRowNumber());\n\t\twAddResult.setSelection(in.isAddResultFile());\n\t\t\n\t\twFileField.setSelection(in.isFileField());\n\t\t\n\t\tif (in.getTableName()!=null) wTable.setText(in.getTableName());\n\t\tif (in.getFilenameField()!=null) wInclFilenameField.setText(in.getFilenameField());\n\t\tif (in.getDynamicFilenameField()!=null) wFilenameField.setText(in.getDynamicFilenameField());\n\t\t\n\t\t\n\t\tif (in.gettablenameField()!=null) wInclTablenameField.setText(in.gettablenameField());\n\t\tif (in.getRowNumberField()!=null) wInclRownumField.setText(in.getRowNumberField());\n\t\twResetRownum.setSelection(in.resetRowNumber());\n\t\twLimit.setText(\"\"+in.getRowLimit());\n\n\t\tlogDebug(BaseMessages.getString(PKG, \"AccessInputDialog.Log.GettingFieldsInfo\"));\n\t\tfor (int i=0;i<in.getInputFields().length;i++)\n\t\t{\n\t\t AccessInputField field = in.getInputFields()[i];\n\t\t \n if (field!=null)\n {\n \t\t\tTableItem item = wFields.table.getItem(i);\n \t\t\tString name = field.getName();\n \t\t\tString xpath\t= field.getColumn();\n \t\t\tString type = field.getTypeDesc();\n \t\t\tString format = field.getFormat();\n \t\t\tString length = \"\"+field.getLength();\n \t\t\tString prec = \"\"+field.getPrecision();\n \t\t\tString curr = field.getCurrencySymbol();\n \t\t\tString group = field.getGroupSymbol();\n \t\t\tString decim = field.getDecimalSymbol();\n \t\t\tString trim = field.getTrimTypeDesc();\n \t\t\tString rep = field.isRepeated()?BaseMessages.getString(PKG, \"System.Combo.Yes\"):BaseMessages.getString(PKG, \"System.Combo.No\");\n \t\t\t\n if (name !=null) item.setText( 1, name);\n if (xpath !=null) item.setText( 2, xpath);\n \t\t\tif (type !=null) item.setText( 3, type);\n \t\t\tif (format !=null) item.setText( 4, format);\n \t\t\tif (length !=null && !\"-1\".equals(length)) item.setText( 5, length);\n \t\t\tif (prec !=null && !\"-1\".equals(prec)) item.setText( 6, prec);\n \t\t\tif (curr !=null) item.setText( 7, curr);\n \t\t\tif (decim !=null) item.setText( 8, decim);\n \t\t\tif (group !=null) item.setText( 9, group);\n \t\t\tif (trim !=null) item.setText(10, trim);\n \t\t\tif (rep !=null) item.setText(11, rep); \n }\n\t\t}\n \n wFields.removeEmptyRows();\n wFields.setRowNums();\n wFields.optWidth(true);\n if(in.getShortFileNameField()!=null) wShortFileFieldName.setText(in.getShortFileNameField());\n if(in.getPathField()!=null) wPathFieldName.setText(in.getPathField());\n if(in.isHiddenField()!=null) wIsHiddenName.setText(in.isHiddenField());\n if(in.getLastModificationDateField()!=null) wLastModificationTimeName.setText(in.getLastModificationDateField());\n if(in.getUriField()!=null) wUriName.setText(in.getUriField());\n if(in.getRootUriField()!=null) wRootUriName.setText(in.getRootUriField());\n if(in.getExtensionField()!=null) wExtensionFieldName.setText(in.getExtensionField());\n if(in.getSizeField()!=null) wSizeFieldName.setText(in.getSizeField());\n\n\n\t\tsetIncludeFilename();\n\t\tsetIncludeTablename();\n\t\tsetIncludeRownum();\n\n\t\twStepname.selectAll();\n\t}", "private void initTable() {\n\t\tDefaultTableModel dtm = (DefaultTableModel)table.getModel();\n\t\tdtm.setRowCount(0);\t\t\n\t\tfor(int i=0;i<MainUi.controller.sale.items.size();i++){\n\t\t\tVector v1 = new Vector();\n\t\t\tv1.add(MainUi.controller.sale.items.get(i).getProdSpec().getTitle());\n\t\t\tv1.add(MainUi.controller.sale.items.get(i).getCopies());\n\t\t\tdtm.addRow(v1);\n\t\t}\n\t\tlblNewLabel.setText(\"\"+MainUi.controller.sale.getTotal());\n\t}", "private TextField initHBoxTextField(GridPane container, int size, String initText, boolean editable, int col, int row, int colSpan, int rowSpan) {\n TextField tf = new TextField();\n tf.setPrefColumnCount(size);\n tf.setText(initText);\n tf.setEditable(editable);\n container.add(tf, col, row, colSpan, rowSpan);\n return tf;\n }", "@Test(priority = 1)\n\tpublic void enterInputs() throws Exception {\n\n\t\ttest = reports.startTest(pageName + \"Sample test to validate Webpage title\");\n\t\tif (homePage.validateTitle(test)) {\n\t\t\ttest.log(LogStatus.PASS, \"Text is Successfully inserted.\");\n\t\t\tBaseUtil.CaptureScreen(driver,passScreenShotPath + this.getClass().getSimpleName().replaceAll(\"Test\", \"\") + \"//isTitleCorrect\");\n\t\t} else {\n\t\t\tBaseUtil.CaptureScreen(driver,failScreenShotPath + this.getClass().getSimpleName().replaceAll(\"Test\", \"\") + \"//isTitleCorrect\");\n\t\t\ttest.log(LogStatus.FAIL, \"Text is not Successfully inserted.\");\n\t\t}\n\t\treports.endTest(test);\n\t\t// Thread.sleep(5000);\n\t}", "public void setupEditFields(Dialog dialog, HashMap bookData) {\n ButtonType addButtontype = new ButtonType(\"Confirm\", ButtonBar.ButtonData.OK_DONE);\r\n dialog.getDialogPane().getButtonTypes().addAll(addButtontype, ButtonType.CANCEL);\r\n\r\n // Creates TextFields\r\n GridPane grid = new GridPane();\r\n grid.setHgap(10);\r\n grid.setVgap(10);\r\n grid.setPadding(new Insets(20, 150, 10, 10));\r\n\r\n TextField title = new TextField();\r\n title.setPromptText(\"Book Title\");\r\n if (!bookData.isEmpty()) {\r\n title.setText(bookData.get(\"title\").toString());\r\n }\r\n\r\n TextField author = new TextField();\r\n author.setPromptText(\"Book Author\");\r\n if (!bookData.isEmpty()) {\r\n author.setText(bookData.get(\"authors\").toString());\r\n }\r\n\r\n TextField location = new TextField();\r\n location.setPromptText(\"Location\");\r\n if (!bookData.isEmpty()) {\r\n location.setText(bookData.get(\"location\").toString());\r\n }\r\n\r\n TextField copies = new TextField();\r\n copies.setPromptText(\"Copies\");\r\n if (!bookData.isEmpty()) {\r\n copies.setText(bookData.get(\"copies_in_stock\").toString());\r\n }\r\n\r\n grid.add(new Label(\"Title:\"), 0, 0);\r\n grid.add(title, 1, 0);\r\n\r\n grid.add(new Label(\"Author:\"), 0, 1);\r\n grid.add(author, 1, 1);\r\n\r\n TextField isbn = new TextField();\r\n if (bookData.isEmpty()) {\r\n isbn.setPromptText(\"ISBN\");\r\n grid.add(new Label(\"ISBN:\"), 0, 2);\r\n grid.add(isbn, 1, 2);\r\n }\r\n\r\n grid.add(new Label(\"Location:\"), 0, 3);\r\n grid.add(location, 1, 3);\r\n\r\n grid.add(new Label(\"Copies:\"), 0, 4);\r\n grid.add(copies, 1, 4);\r\n\r\n\r\n // Activate edit button when all fields have text\r\n Node addButton = dialog.getDialogPane().lookupButton(addButtontype);\r\n BooleanBinding booleanBind = title.textProperty().isEmpty()\r\n .or(author.textProperty().isEmpty())\r\n .or(location.textProperty().isEmpty())\r\n .or(copies.textProperty().isEmpty());\r\n\r\n addButton.disableProperty().bind(booleanBind);\r\n\r\n dialog.getDialogPane().setContent(grid);\r\n dialog.show();\r\n\r\n addButton.addEventFilter(ActionEvent.ACTION, clickEvent -> {\r\n try {\r\n if (this.books.getByColumn(\"isbn\", isbn.getText()).isEmpty()) {\r\n HashMap bookChange = new HashMap();\r\n if (bookData.isEmpty()) {\r\n bookChange.put(\"isbn\", isbn.getText());\r\n bookChange.put(\"title\", title.getText());\r\n bookChange.put(\"authors\", author.getText());\r\n bookChange.put(\"location\", location.getText());\r\n bookChange.put(\"copies_in_stock\", Integer.parseInt(copies.getText()));\r\n } else {\r\n bookChange.put(\"title\", QueryBuilder.escapeValue(title.getText()));\r\n bookChange.put(\"authors\", QueryBuilder.escapeValue(author.getText()));\r\n bookChange.put(\"location\", QueryBuilder.escapeValue(location.getText()));\r\n bookChange.put(\"copies_in_stock\", Integer.parseInt(copies.getText()));\r\n }\r\n\r\n if (bookData.isEmpty()) {\r\n this.books.insert(bookChange);\r\n } else {\r\n this.books.update(bookChange, Integer.parseInt(bookData.get(\"id\").toString()));\r\n }\r\n\r\n QueryBuilder queryBooks = new QueryBuilder(\"books\");\r\n twg.setTable(queryBooks.select(Books.memberVisibleFields).build(), tableBooks);\r\n\r\n } else {\r\n Screen.popup(\"WARNING\", \"The ISBN typed in already exists, please edit the existing entry.\");\r\n clickEvent.consume();\r\n }\r\n\r\n } catch (NumberFormatException e) {\r\n Screen.popup(\"WARNING\", \"The 'copies' field should contain a number.\");\r\n clickEvent.consume();\r\n }\r\n });\r\n\r\n Platform.runLater(() -> title.requestFocus());\r\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n\n super.test = \"bbb\";\n \tsuper.onCreate(savedInstanceState);\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n \n TableLayout tableLayout = new TableLayout(this);\n tableLayout.setBackgroundColor(Color.rgb(255, 255, 255));\n setContentView(tableLayout, new LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.FILL_PARENT));\n\n TableRow tableRow1 = new TableRow(this);\n userId=new EditText(this);\n userId.setText(\"userId\", EditText.BufferType.NORMAL);\n// userId.setFilters(filters);\n TableRow.LayoutParams rowLayout = new TableRow.LayoutParams();\n rowLayout.span = 2;\n tableRow1.addView(userId,rowLayout);\n \n TableRow tableRow2 = new TableRow(this);\n passwd=new EditText(this);\n passwd.setText(\"passwd\", EditText.BufferType.NORMAL);\n passwd.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);\n tableRow2.addView(passwd, rowLayout);\n \n TableRow tableRow3 = new TableRow(this);\n //OKボタンの生成\n okBtn = new Button(this);\n okBtn.setText(\"OK\");\n okBtn.setOnClickListener(this);\n okBtn.setTag(\"ok\");\n tableRow3.addView(okBtn);\n \n //CANCELボタンの生成\n cancelBtn = new Button(this);\n cancelBtn.setText(\"CANCEL\");\n cancelBtn.setOnClickListener(this);\n cancelBtn.setTag(\"cancel\");\n tableRow3.addView(cancelBtn);\n \n //ユーザ作成ボタンの生成\n newBtn = new Button(this);\n newBtn.setText(\"新規作成\");\n newBtn.setOnClickListener(this);\n newBtn.setTag(\"new\");\n tableRow3.addView(newBtn);\n\n tableLayout.addView(tableRow1);\n tableLayout.addView(tableRow2);\n tableLayout.addView(tableRow3);\n }", "private void createMainTable(Section subCatPart)\r\n throws BadElementException, MalformedURLException, IOException {\r\n \r\n \r\n PdfPTable table = new PdfPTable(model.getColumnCount());\r\n table.setWidthPercentage(100.0f);\r\n \r\n PdfPCell c1;\r\n for(int i = 0; i < model.getColumnCount(); i++){\r\n c1 = new PdfPCell(new Phrase(model.getColumnName(i)));\r\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n table.addCell(c1);\r\n }\r\n table.setHeaderRows(1);\r\n\r\n for(int row = 0; row < model.getRowCount(); row++){\r\n for (int col = 0; col < model.getColumnCount(); col++) {\r\n String input = model.getValueAt(row, col).toString();\r\n if(input.equals(\"true\"))\r\n input = \"X\";\r\n if(input.equals(\"false\"))\r\n input = \"\";\r\n PdfPCell cell = new PdfPCell(new Phrase(input));\r\n cell.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n table.addCell(cell);\r\n \r\n }\r\n }\r\n subCatPart.add(table);\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString a=search_textField1.getText();\n\t\t\t\tString b=search_textField2.getText();\n\t\t\t\t\n\t\t\t\tif(a.equals(\"\"))a=\"any(select lei from goods)\";\n\t\t\t\telse a=\"'\"+a+\"'\";\n\t\t\t\tif(b.equals(\"\"))b=\"any(select name from goods)\";\n\t\t\t\telse b=\"'\"+b+\"'\";\n\t\t\t\t\n\t\t\t\ttable.removeAll();\n\t\t\t\ttableValueV.removeAllElements();\n\t\t\t\ttry {//插入\n\t\t\t\t\t\n\t\t Connection con = DriverManager.getConnection(conURL, Test.mysqlname, Test.mysqlpassword); // 连接数据库\n\n\t\t Statement s = con.createStatement(); // Statement类用来提交SQL语句\n\n\t\t \n\t\t String select=\"select * from goods where lei=\"+a+\" and name =\"+b; \n\t\t ResultSet rs = s.executeQuery(select); // 提交查询,返回的表格保存在rs中\n\t\t \n\t\t while(rs.next()) { // ResultSet指针指向下一个“行”\n\t\t \t\n\t\t \tVector<String> rowV = new Vector<String>();\n\t\t \trowV.add(rs.getString(\"lei\"));\n\t\t \t\t\trowV.add(rs.getString(\"name\"));\n\t\t \t\t\ttableValueV.add(rowV);\n\t\t \t\t\tSystem.out.println(rs.getString(\"lei\"));\n\t\t \t\t\t\n\t\t }\n\t\t tableModel.setDataVector(tableValueV,columnNameV); \n\t \t\t\tint rowCount = table.getRowCount(); \n\t \t\t\ttable.getSelectionModel().setSelectionInterval(rowCount-1 , rowCount- 1 ); \n\t \t\t\tRectangle rect = table.getCellRect(rowCount-1 , 0 , true );\n\t \t\t\ttable.scrollRectToVisible(rect); \n\t\t s.close(); // 释放Statement对象\n\t\t con.close(); // 关闭到MySQL服务器的连接\n\t\t TableColumnModel cm = table.getColumnModel(); \n\t\t \t\tTableColumn column = cm.getColumn(0);//得到第i个列对象 \n\t\t \t\t column.setPreferredWidth(210);//将此列的首选宽度设置为 preferredWidth。\n\t\t \t\t TableColumn column1 = cm.getColumn(1);//得到第i个列对象 \n\t\t \t\t column1.setPreferredWidth(210);//将此列的首选宽度设置为 preferredWidth。\n\t\t \t\t \n\t\t }\n\t\t catch(SQLException sql_e) { // 都是SQLExceptionss\n\t\t System.out.println(sql_e);\n\t\t }\n\t\t\t\t\n\t\t\t}", "RowValues createRowValues();", "FromTable createFromTable();", "private void createContents() throws SQLException {\n\t\tshell = new Shell(getParent(), SWT.SHELL_TRIM);\n\t\tshell.setImage(user.getIcondata().BaoduongIcon);\n\t\tshell.setLayout(new GridLayout(2, false));\n\t\tsetText(\"Tạo Công việc (Đợt Bảo dưỡng)\");\n\t\tshell.setSize(777, 480);\n\t\tnew FormTemplate().setCenterScreen(shell);\n\n\t\tFill_ItemData fi = new Fill_ItemData();\n\n\t\tSashForm sashForm = new SashForm(shell, SWT.NONE);\n\t\tsashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));\n\n\t\tSashForm sashForm_3 = new SashForm(sashForm, SWT.VERTICAL);\n\n\t\tSashForm sashForm_2 = new SashForm(sashForm_3, SWT.NONE);\n\t\tComposite composite = new Composite(sashForm_2, SWT.NONE);\n\t\tcomposite.setLayout(new GridLayout(2, false));\n\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setText(\"Tên đợt Bảo dưỡng*:\");\n\n\t\ttext_Tendot_Baoduong = new Text(composite, SWT.BORDER);\n\t\ttext_Tendot_Baoduong.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\n\t\tLabel label_3 = new Label(composite, SWT.NONE);\n\t\tGridData gd_label_3 = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_label_3.verticalIndent = 3;\n\t\tlabel_3.setLayoutData(gd_label_3);\n\t\tlabel_3.setText(\"Loại phương tiện:\");\n\n\t\tcombo_Loaiphuongtien = new Combo(composite, SWT.READ_ONLY);\n\t\tcombo_Loaiphuongtien.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif (ViewAndEdit_MODE_dsb != null) {\n\t\t\t\t\tFill_ItemData f = new Fill_ItemData();\n\t\t\t\t\tif ((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText()) == f.getInt_Xemay()) {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setLOAI_PHUONG_TIEN(f.getInt_Xemay());\n\t\t\t\t\t\ttree_PTTS.removeAll();\n\t\t\t\t\t} else if ((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText()) == f.getInt_Oto()) {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setLOAI_PHUONG_TIEN(f.getInt_Oto());\n\t\t\t\t\t\ttree_PTTS.removeAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tcombo_Loaiphuongtien.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));\n\t\tfi.setComboBox_LOAIPHUONGTIEN_Phuongtien_Giaothong(combo_Loaiphuongtien, 0);\n\n\t\tLabel label_4 = new Label(composite, SWT.NONE);\n\t\tGridData gd_label_4 = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_label_4.verticalIndent = 3;\n\t\tlabel_4.setLayoutData(gd_label_4);\n\t\tlabel_4.setText(\"Mô tả:\");\n\n\t\ttext_Mota = new Text(composite, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);\n\t\ttext_Mota.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1));\n\t\tnew Label(composite, SWT.NONE);\n\n\t\tbtnNgunSaCha = new Button(composite, SWT.NONE);\n\t\tGridData gd_btnNgunSaCha = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnNgunSaCha.widthHint = 85;\n\t\tbtnNgunSaCha.setLayoutData(gd_btnNgunSaCha);\n\t\tbtnNgunSaCha.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tChonNguonSuachua_Baoduong cnsb = new ChonNguonSuachua_Baoduong(shell, SWT.DIALOG_TRIM, user);\n\t\t\t\t\tcnsb.open();\n\t\t\t\t\tnsb = cnsb.getResult();\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb == null) {\n\t\t\t\t\t\tfillNguonSuachuaBaoduong(nsb);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (nsb == null) {\n\t\t\t\t\t\tMessageBox m = new MessageBox(shell, SWT.ICON_QUESTION | SWT.YES | SWT.NO | SWT.CLOSE);\n\t\t\t\t\t\tm.setText(\"Xóa dữ liệu cũ?\");\n\t\t\t\t\t\tm.setMessage(\"Bạn muốn xóa dữ liệu cũ?\");\n\t\t\t\t\t\tint rc = m.open();\n\t\t\t\t\t\tswitch (rc) {\n\t\t\t\t\t\tcase SWT.CANCEL:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase SWT.YES:\n\t\t\t\t\t\t\tViewAndEdit_MODE_dsb.setMA_NGUONSUACHUA_BAODUONG(-1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase SWT.NO:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setMA_NGUONSUACHUA_BAODUONG(nsb.getMA_NGUONSUACHUA_BAODUONG());\n\t\t\t\t\t}\n\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG(ViewAndEdit_MODE_dsb);\n\t\t\t\t\tfillNguonSuachuaBaoduong(ViewAndEdit_MODE_dsb);\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnNgunSaCha.setText(\"Liên hệ\");\n\t\tbtnNgunSaCha.setImage(user.getIcondata().PhoneIcon);\n\n\t\tComposite composite_1 = new Composite(sashForm_2, SWT.NONE);\n\t\tcomposite_1.setLayout(new GridLayout(2, false));\n\n\t\tLabel lblSXut = new Label(composite_1, SWT.NONE);\n\t\tlblSXut.setText(\"Số đề xuất: \");\n\n\t\ttext_Sodexuat = new Text(composite_1, SWT.NONE);\n\t\ttext_Sodexuat.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Sodexuat.setEditable(false);\n\t\ttext_Sodexuat.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyThng = new Label(composite_1, SWT.NONE);\n\t\tlblNgyThng.setText(\"Ngày tháng: \");\n\n\t\ttext_NgaythangVanban = new Text(composite_1, SWT.NONE);\n\t\ttext_NgaythangVanban.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_NgaythangVanban.setEditable(false);\n\t\ttext_NgaythangVanban.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblnV = new Label(composite_1, SWT.NONE);\n\t\tlblnV.setText(\"Đơn vị: \");\n\n\t\ttext_Donvi = new Text(composite_1, SWT.NONE);\n\t\ttext_Donvi.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Donvi.setEditable(false);\n\t\ttext_Donvi.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyXL = new Label(composite_1, SWT.NONE);\n\t\tlblNgyXL.setText(\"Ngày xử lý:\");\n\n\t\ttext_Ngaytiepnhan = new Text(composite_1, SWT.NONE);\n\t\ttext_Ngaytiepnhan.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Ngaytiepnhan.setEditable(false);\n\t\ttext_Ngaytiepnhan.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyGiao = new Label(composite_1, SWT.NONE);\n\t\tlblNgyGiao.setText(\"Ngày giao:\");\n\n\t\ttext_Ngaygiao = new Text(composite_1, SWT.NONE);\n\t\ttext_Ngaygiao.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Ngaygiao.setEditable(false);\n\t\ttext_Ngaygiao.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblTrchYu = new Label(composite_1, SWT.NONE);\n\t\tGridData gd_lblTrchYu = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblTrchYu.verticalIndent = 3;\n\t\tlblTrchYu.setLayoutData(gd_lblTrchYu);\n\t\tlblTrchYu.setText(\"Ghi chú: \");\n\n\t\ttext_Trichyeu = new Text(composite_1, SWT.NONE);\n\t\ttext_Trichyeu.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Trichyeu.setEditable(false);\n\t\tGridData gd_text_Trichyeu = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);\n\t\tgd_text_Trichyeu.heightHint = 27;\n\t\ttext_Trichyeu.setLayoutData(gd_text_Trichyeu);\n\t\tnew Label(composite_1, SWT.NONE);\n\n\t\tbtnThemDexuat = new Button(composite_1, SWT.NONE);\n\t\tbtnThemDexuat.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tInsert_dx = null;\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb != null\n\t\t\t\t\t\t\t&& ViewAndEdit_MODE_dsb.getMA_DOT_THUCHIEN_SUACHUA_BAODUONG() > 0) {\n\t\t\t\t\t\tInsert_dx = controler.getControl_DEXUAT().get_DEXUAT(ViewAndEdit_MODE_dsb);\n\t\t\t\t\t}\n\t\t\t\t\tif (Insert_dx != null) {\n\t\t\t\t\t\tTAPHOSO ths = controler.getControl_TAPHOSO().get_TAP_HO_SO(Insert_dx.getMA_TAPHOSO());\n\t\t\t\t\t\tTaphoso_View thsv = new Taphoso_View(shell, SWT.DIALOG_TRIM, user, ths, false);\n\t\t\t\t\t\tthsv.open();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tNhapDeXuat ndx = new NhapDeXuat(shell, SWT.DIALOG_TRIM, user);\n\t\t\t\t\t\tndx.open();\n\t\t\t\t\t\tInsert_dx = ndx.result;\n\t\t\t\t\t\tif (Insert_dx == null)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tfillDexuat(Insert_dx);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ViewAndEdit_MODE_dsb == null)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tif (ViewAndEdit_MODE_dsb.getMA_DOT_THUCHIEN_SUACHUA_BAODUONG() <= 0)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tint Ma_Quatrinh_Dexuat_thuchien = getMaQuantrinhDexuatThuchien(Insert_dx);\n\t\t\t\t\t\tif (Ma_Quatrinh_Dexuat_thuchien <= 0)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tboolean ict = controler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG_Update_QUATRINH_DEXUAT_THUCHIEN(\n\t\t\t\t\t\t\t\t\t\tViewAndEdit_MODE_dsb, Ma_Quatrinh_Dexuat_thuchien);\n\t\t\t\t\t\tif (ict) {\n\t\t\t\t\t\t\tMessageBox m = new MessageBox(shell, SWT.ICON_WORKING);\n\t\t\t\t\t\t\tm.setText(\"Hoàn tất\");\n\t\t\t\t\t\t\tm.setMessage(\"Thêm Đề xuất Hoàn tất\");\n\t\t\t\t\t\t\tm.open();\n\t\t\t\t\t\t\tfillDexuat(Insert_dx);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (NullPointerException | SQLException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnThemDexuat.setImage(user.getIcondata().DexuatIcon);\n\t\tbtnThemDexuat.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, false, 1, 1));\n\t\tbtnThemDexuat.setText(\"Thêm Hồ sơ\");\n\t\tsashForm_2.setWeights(new int[] { 1000, 618 });\n\n\t\tSashForm sashForm_1 = new SashForm(sashForm_3, SWT.NONE);\n\t\ttree_PTTS = new Tree(sashForm_1, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI);\n\t\ttree_PTTS.setLinesVisible(true);\n\t\ttree_PTTS.setHeaderVisible(true);\n\t\ttree_PTTS.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event arg0) {\n\t\t\t\tTreeItem[] til = tree_PTTS.getSelection();\n\t\t\t\tif (til.length > 0) {\n\t\t\t\t\tRow_PTTSthamgia_Baoduong pttg = (Row_PTTSthamgia_Baoduong) til[0].getData();\n\t\t\t\t\tsetHinhthuc_Baoduong(pttg.getHtbd());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\ttree_PTTS.addListener(SWT.SetData, new Listener() {\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tif (tree_PTTS.getItems().length > 0) {\n\t\t\t\t\tcombo_Loaiphuongtien.setEnabled(false);\n\t\t\t\t} else {\n\t\t\t\t\tcombo_Loaiphuongtien.setEnabled(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tTreeColumn trclmnStt = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnStt.setWidth(50);\n\t\ttrclmnStt.setText(\"Stt\");\n\n\t\tTreeColumn trclmnTnMT = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnTnMT.setWidth(100);\n\t\ttrclmnTnMT.setText(\"Tên, mô tả\");\n\n\t\tTreeColumn trclmnHngSnXut = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnHngSnXut.setWidth(100);\n\t\ttrclmnHngSnXut.setText(\"Hãng sản xuất\");\n\n\t\tTreeColumn trclmnDngXe = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnDngXe.setWidth(100);\n\t\ttrclmnDngXe.setText(\"Dòng xe\");\n\n\t\tTreeColumn trclmnBinS = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnBinS.setWidth(100);\n\t\ttrclmnBinS.setText(\"Biển số\");\n\n\t\tTreeColumn trclmnNgySDng = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnNgySDng.setWidth(100);\n\t\ttrclmnNgySDng.setText(\"Ngày sử dụng\");\n\n\t\tTreeColumn trclmnMPhngTin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnMPhngTin.setWidth(90);\n\t\ttrclmnMPhngTin.setText(\"Mã PTTS\");\n\n\t\tMenu menu = new Menu(tree_PTTS);\n\t\ttree_PTTS.setMenu(menu);\n\n\t\tMenuItem mntmThmPhngTin = new MenuItem(menu, SWT.NONE);\n\t\tmntmThmPhngTin.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tThem_PTGT();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmntmThmPhngTin.setText(\"Thêm phương tiện tài sản\");\n\n\t\tMenuItem mntmXoa = new MenuItem(menu, SWT.NONE);\n\t\tmntmXoa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tdelete();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t\tmntmXoa.setText(\"Xóa\");\n\n\t\tTreeColumn trclmnThayNht = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayNht.setWidth(70);\n\t\ttrclmnThayNht.setText(\"Thay nhớt\");\n\n\t\tTreeColumn trclmnThayLcNht = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcNht.setWidth(100);\n\t\ttrclmnThayLcNht.setText(\"Thay lọc nhớt\");\n\n\t\tTreeColumn trclmnThayLcGi = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcGi.setWidth(100);\n\t\ttrclmnThayLcGi.setText(\"Thay lọc gió\");\n\n\t\tTreeColumn trclmnThayLcNhin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcNhin.setWidth(100);\n\t\ttrclmnThayLcNhin.setText(\"Thay lọc nhiên liệu\");\n\n\t\tTreeColumn trclmnThayDuPhanh = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuPhanh.setWidth(100);\n\t\ttrclmnThayDuPhanh.setText(\"Thay Dầu phanh - ly hợp\");\n\n\t\tTreeColumn trclmnThayDuHp = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuHp.setWidth(100);\n\t\ttrclmnThayDuHp.setText(\"Thay Dầu hộp số\");\n\n\t\tTreeColumn trclmnThayDuVi = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuVi.setWidth(100);\n\t\ttrclmnThayDuVi.setText(\"Thay Dầu vi sai\");\n\n\t\tTreeColumn trclmnLcGiGin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnLcGiGin.setWidth(100);\n\t\ttrclmnLcGiGin.setText(\"Lọc gió giàn lạnh\");\n\n\t\tTreeColumn trclmnThayDuTr = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuTr.setWidth(100);\n\t\ttrclmnThayDuTr.setText(\"Thay dầu trợ lực lái\");\n\n\t\tTreeColumn trclmnBoDngKhcs = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnBoDngKhcs.setWidth(100);\n\t\ttrclmnBoDngKhcs.setText(\"Bảo dưỡng khác\");\n\n\t\tExpandBar expandBar = new ExpandBar(sashForm_1, SWT.V_SCROLL);\n\t\texpandBar.setForeground(SWTResourceManager.getColor(SWT.COLOR_LIST_FOREGROUND));\n\n\t\tExpandItem xpndtmLoiHnhBo = new ExpandItem(expandBar, SWT.NONE);\n\t\txpndtmLoiHnhBo.setText(\"Loại hình bảo dưỡng\");\n\n\t\tComposite grpHnhThcBo = new Composite(expandBar, SWT.NONE);\n\t\txpndtmLoiHnhBo.setControl(grpHnhThcBo);\n\t\tgrpHnhThcBo.setLayout(new GridLayout(1, false));\n\n\t\tbtnDaudongco = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDaudongco.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDaudongco.setText(\"Dầu động cơ\");\n\n\t\tbtnLocdaudongco = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocdaudongco.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocdaudongco.setText(\"Lọc dầu động cơ\");\n\n\t\tbtnLocgio = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocgio.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocgio.setText(\"Lọc gió\");\n\n\t\tbtnLocnhienlieu = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocnhienlieu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocnhienlieu.setText(\"Lọc nhiên liệu\");\n\n\t\tbtnDauphanh_lyhop = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauphanh_lyhop.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauphanh_lyhop.setText(\"Dầu phanh và dầu ly hợp\");\n\n\t\tbtnDauhopso = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauhopso.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauhopso.setText(\"Dầu hộp số\");\n\n\t\tbtnDauvisai = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauvisai.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauvisai.setText(\"Dầu vi sai\");\n\n\t\tbtnLocgiogianlanh = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocgiogianlanh.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocgiogianlanh.setText(\"Lọc gió giàn lạnh\");\n\n\t\tbtnDautroluclai = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDautroluclai.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDautroluclai.setText(\"Dầu trợ lực lái\");\n\n\t\tbtnBaoduongkhac = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnBaoduongkhac.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnBaoduongkhac.setText(\"Bảo dưỡng khác\");\n\t\txpndtmLoiHnhBo.setHeight(xpndtmLoiHnhBo.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT).y);\n\n\t\tExpandItem xpndtmLinH = new ExpandItem(expandBar, SWT.NONE);\n\t\txpndtmLinH.setText(\"Liên hệ\");\n\n\t\tComposite composite_2 = new Composite(expandBar, SWT.NONE);\n\t\txpndtmLinH.setControl(composite_2);\n\t\tcomposite_2.setLayout(new GridLayout(2, false));\n\n\t\tLabel lblTnLinH = new Label(composite_2, SWT.NONE);\n\t\tlblTnLinH.setText(\"Tên liên hệ: \");\n\n\t\ttext_Tenlienhe = new Text(composite_2, SWT.BORDER);\n\t\ttext_Tenlienhe.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblGiiThiu = new Label(composite_2, SWT.NONE);\n\t\tGridData gd_lblGiiThiu = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblGiiThiu.verticalIndent = 3;\n\t\tlblGiiThiu.setLayoutData(gd_lblGiiThiu);\n\t\tlblGiiThiu.setText(\"Giới thiệu: \");\n\n\t\ttext_Gioithieu = new Text(composite_2, SWT.BORDER);\n\t\ttext_Gioithieu.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\n\t\tLabel lblLinH = new Label(composite_2, SWT.NONE);\n\t\tGridData gd_lblLinH = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblLinH.verticalIndent = 3;\n\t\tlblLinH.setLayoutData(gd_lblLinH);\n\t\tlblLinH.setText(\"Liên hệ: \");\n\n\t\ttext_Lienhe = new Text(composite_2, SWT.BORDER);\n\t\ttext_Lienhe.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\t\txpndtmLinH.setHeight(120);\n\t\tsashForm_1.setWeights(new int[] { 543, 205 });\n\t\tsashForm_3.setWeights(new int[] { 170, 228 });\n\t\tsashForm.setWeights(new int[] { 1000 });\n\n\t\tbtnLuu = new Button(shell, SWT.NONE);\n\t\tbtnLuu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tif (dataCreate != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tTaoMoi_DotSuachua_Baoduong();\n\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tupdateField();\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprivate void TaoMoi_DotSuachua_Baoduong() throws SQLException {\n\t\t\t\tif (checkTextNotNULL()) {\n\t\t\t\t\tDOT_THUCHIEN_SUACHUA_BAODUONG dsb = getDOT_SUACHUA_BAODUONG();\n\t\t\t\t\tint key = controler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t.InsertDOT_THUCHIEN_SUACHUA_BAODUONG(dsb, null, null);\n\t\t\t\t\tdsb.setMA_DOT_THUCHIEN_SUACHUA_BAODUONG(key);\n\t\t\t\t\tif (key >= 0) {\n\t\t\t\t\t\tif (nsb != null)\n\t\t\t\t\t\t\tdsb.setMA_NGUONSUACHUA_BAODUONG(nsb.getMA_NGUONSUACHUA_BAODUONG());\n\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG().update_DOT_THUCHIEN_SUACHUA_BAODUONG(dsb);\n\t\t\t\t\t\tint Ma_Quatrinh_Dexuat_thuchien = getMaQuantrinhDexuatThuchien(Insert_dx);\n\t\t\t\t\t\tif (Ma_Quatrinh_Dexuat_thuchien > 0)\n\t\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG_Update_QUATRINH_DEXUAT_THUCHIEN(dsb,\n\t\t\t\t\t\t\t\t\t\t\tMa_Quatrinh_Dexuat_thuchien);\n\t\t\t\t\t\tTreeItem[] til = tree_PTTS.getItems();\n\t\t\t\t\t\tif (til.length > 0) {\n\t\t\t\t\t\t\tfor (TreeItem ti : til) {\n\t\t\t\t\t\t\t\tdsb.setMA_DOT_THUCHIEN_SUACHUA_BAODUONG(key);\n\t\t\t\t\t\t\t\tRow_PTTSthamgia_Baoduong rp = (Row_PTTSthamgia_Baoduong) ti.getData();\n\t\t\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG_TAISAN()\n\t\t\t\t\t\t\t\t\t\t.set_DOT_THUCHIEN_SUACHUA_TAISAN(dsb, rp);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tshowMessage_Succes();\n\t\t\t\t\t\tshell.dispose();\n\t\t\t\t\t\tGiaoViec gv = new GiaoViec(user);\n\t\t\t\t\t\tgv.open();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowMessage_Fail();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tshowMessage_FillText();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprivate DOT_THUCHIEN_SUACHUA_BAODUONG getDOT_SUACHUA_BAODUONG() {\n\t\t\t\tDOT_THUCHIEN_SUACHUA_BAODUONG dsb = new DOT_THUCHIEN_SUACHUA_BAODUONG();\n\t\t\t\tdsb.setTEN_DOT_THUCHIEN_SUACHUA_BAODUONG(text_Tendot_Baoduong.getText());\n\t\t\t\tdsb.setLOAI_PHUONG_TIEN(\n\t\t\t\t\t\tInteger.valueOf((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText())));\n\t\t\t\tdsb.setSUACHUA_BAODUONG(fi.getInt_Baoduong());\n\t\t\t\tdsb.setMO_TA(text_Mota.getText());\n\t\t\t\treturn dsb;\n\t\t\t}\n\n\t\t});\n\t\tGridData gd_btnLu = new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1);\n\t\tgd_btnLu.widthHint = 75;\n\t\tbtnLuu.setLayoutData(gd_btnLu);\n\t\tbtnLuu.setText(\"Xong\");\n\n\t\tbtnDong = new Button(shell, SWT.NONE);\n\t\tbtnDong.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb != null) {\n\t\t\t\t\t\tupdateField();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if (Insert_dx != null)\n\t\t\t\t\t\t// controler.getControl_DEXUAT().delete_DEXUAT(Insert_dx);\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tGridData gd_btnDong = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnDong.widthHint = 75;\n\t\tbtnDong.setLayoutData(gd_btnDong);\n\t\tbtnDong.setText(\"Đóng\");\n\t\tinit_loadMODE();\n\t\tinit_CreateMode();\n\t}", "public static void buildTable() {\r\n\t\t//This method keeps the user from editing the table\r\n\t\ttableModel = new DefaultTableModel() {\r\n\t\t\tprivate static final long serialVersionUID = 1L;\r\n\t\t\t@Override\r\n\t\t\tpublic boolean isCellEditable(int row, int column) {\r\n\t\t\t\t//All cells false\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\ttableModel.setNumRows(dblogic.getSize());\r\n\t\ttableModel.setColumnCount(COL_COUNT);\r\n\t\ttableModel.setColumnIdentifiers(columnNames);\r\n\t\ttable.setRowSelectionAllowed(true);\r\n\t\ttable.setColumnSelectionAllowed(false);\r\n\t\ttable.setDragEnabled(false);\r\n\t\ttable.getTableHeader().setReorderingAllowed(false);\r\n\t\ttable.setModel(tableModel);\r\n\r\n\t\t//Build rows\r\n\t\tfor (int i = 0; i < dblogic.getSize(); i++) {\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getLastName(), i, COL_LAST);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getFirstName(), i, COL_FIRST);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getPatronEmail(), i, COL_EMAIL);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getDOB(), i, COL_BIRTH);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getPatronSinceString(), i, COL_ADDED);\r\n\t\t\ttable.setValueAt(dblogic.getPatronFromDB(i).getAnniv().toString(), i, COL_ANNIV);\r\n\t\t}\r\n\t}", "public void technological(){\n\t\tSystem.out.println(\"Name:\");\n\t\tString nameRegistered = reader.nextLine();\n\t\tSystem.out.println(\"Nit:\");\n\t\tString nit = reader.nextLine();\n\t\tSystem.out.println(\"Address:\");\n\t\tString address = reader.nextLine();\n\t\tSystem.out.println(\"Contact number:\");\n\t\tString contactNumber = reader.nextLine();\n\t\tSystem.out.println(\"Number of employees:\");\n\t\tint employees = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Value of the actives:\");\n\t\tdouble value = reader.nextDouble();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Legal representative:\");\n\t\tString legalRepresentative = reader.nextLine();\n\t\tSystem.out.println(\"Constitution date:\");\n\t\tSystem.out.println(\"Day:\");\n\t\tint day = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Month:\");\n\t\tint month = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Year:\");\n\t\tint year = reader.nextInt();\n\t\treader.nextLine();\n\t\tDate constitution = new Date(day, month, year);\n\t\tSystem.out.println(\"floors of the building\");\n\t\tint rows = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Type:\");\n\t\tString type = reader.nextLine();\n\t\tSystem.out.println(\"Kilowatts:\");\n\t\tint energy = reader.nextInt();\n\t\treader.nextLine();\n\t\tTechnological toAdd = new Technological(nameRegistered, nit, address, contactNumber, employees, value, legalRepresentative, constitution, rows, type, energy);\n\t\tSystem.out.println(\"How many services has the company:\");\n\t\tint quantityServices = reader.nextInt();\n\t\treader.nextLine();\n\t\tfor(int i = 0; i < quantityServices; i++){\n\t\t\tSystem.out.println(\"What service has the company:\");\n\t\t\tSystem.out.println(\"C. Consultancy\");\n\t\t\tSystem.out.println(\"T. Training\");\n\t\t\tSystem.out.println(\"D. Development\");\n\t\t\tSystem.out.println(\"I. Infrastructure\");\n\t\t\tSystem.out.println(\"S. Software\");\n\t\t\tSystem.out.println(\"P. Platform\");\n\t\t\tchar service = reader.nextLine().charAt(0);\n\t\t\ttoAdd.addService(service);\n\t\t}\n\t\ttheHolding.addSubordinate(toAdd);\n\t\tSystem.out.println(\"The company were added successfuly\");\n\t}", "public void createDataTable() {\r\n Log.d(TAG, \"creating table\");\r\n String queryStr = \"\";\r\n String[] colNames = {Constants.COLUMN_NAME_ACC_X, Constants.COLUMN_NAME_ACC_Y, Constants.COLUMN_NAME_ACC_Z};\r\n queryStr += \"create table if not exists \" + Constants.TABLE_NAME;\r\n queryStr += \" ( id INTEGER PRIMARY KEY AUTOINCREMENT, \";\r\n for (int i = 1; i <= 50; i++) {\r\n for (int j = 0; j < 3; j++)\r\n queryStr += colNames[j] + \"_\" + i + \" real, \";\r\n }\r\n queryStr += Constants.COLUMN_NAME_ACTIVITY + \" text );\";\r\n execute(queryStr);\r\n Log.d(TAG, \"created table\");\r\n try {\r\n ContentValues values = new ContentValues();\r\n values.put(\"id\", 0);\r\n insertRowInTable(Constants.TABLE_NAME, values);\r\n Log.d(TAG,\"created hist table\");\r\n }catch (Exception e){\r\n Log.d(TAG,Constants.TABLE_NAME + \" table already exists\");\r\n }\r\n }", "private void fillData() {\n jTextField1.setEnabled(false);\n jTextField11.setEnabled(false);\n\n if (owners != null && owners.get(\"editedOwner\") != null) {\n this.jTextField1.setText(owners.get(\"editedOwner\").getAsJsonObject().get(\"rc\").getAsString());\n this.jTextField11.setText(owners.get(\"editedOwner\").getAsJsonObject().get(\"share\").getAsString());\n }\n String[] header = new String[]{\"Rodné čislo\", \"Podiel v %\"};\n dtm.setColumnIdentifiers(header);\n jTableOwnerships.setModel(dtm);\n if (owners != null && owners.get(\"ownerships\") != null) {\n for (JsonElement jsonElement : owners.get(\"ownerships\").getAsJsonArray()) {\n JsonObject owner = (JsonObject) jsonElement;\n dtm.addRow(new Object[]{owner.get(\"rc\").getAsString(), owner.get(\"share\").getAsString()});\n }\n }\n }", "public adduser() {\n initComponents();\n this.setTitle(\"Borrow Book\");\n \n try{\n f=new Functions();\n }\n catch(java.io.IOException e){\n JOptionPane.showMessageDialog(this,\"Some text file is missing!\");\n }\n \n \n// TableColumnModel l=jTable1.getColumnModel();\n// l.getColumn(0).setPreferredWidth(1);\n// l.getColumn(1).setPreferredWidth(60);\n// l.getColumn(2).setPreferredWidth(64);\n// l.getColumn(4).setPreferredWidth(70);\n \n }", "private void populateFields() {\n\t\ttypeNameTF.setText(\"\");\n\t\tunitsTF.setText(\"\");\n\t\tunitMeasureTF.setText(\"\");\n\t\tvalidityDaysTF.setText(\"\");\n\t\treorderPointTF.setText(\"\");\n\t\tnotesTF.setText(\"\");\n\t\tstatusCB.getItems().addAll(\"Active\", \"Inactive\");\n\t\tstatusCB.setValue(\"Active\");\n\t}", "public void insertDummies() {\r\n\t\tinsertPersoner();\r\n\t\tinsertAnsatte();\r\n\t\tinsertEmner();\r\n\t\tinsertForfattere();\r\n\t\tinsertBoger();\r\n\t\tinsertBogEksemplare();\r\n\t\tinsertReservation();\r\n\t\tinsertLecture();\r\n\t\tinsertPlannedLectures();\r\n\t}", "INPUT createINPUT();", "public void new_record()\n {\n /*\n Prompt for data:\n Last name\n First name\n Phone\n */\n \n //Craete a scanner object\n Scanner kb = new Scanner(System.in);\n \n //prompt for the last name\n System.out.print(\"Last name: \");\n \n //input the last name\n String lastName = kb.nextLine();\n \n //the Last_name must not be empty\n if(lastName.length() > 0 )\n {\n //get the first name and the phone\n System.out.print(\"First name: \");\n String firstName = kb.nextLine();\n \n System.out.print(\"Phone: \");\n String phone = kb.nextLine(); \n \n \n \n //create the output string\n \n \n \n \n //delare variables to hold file types\n FileWriter fWrite = null;\n \n //try to open the file for writing - append the data\n try\n {\n fWrite = new FileWriter(new File(filename), true);\n \n }\n catch(IOException ioe)\n {\n System.out.println(\"new_record: Exception opening the file for writing\");\n }\n //try to wrtie the data\n try\n {\n fWrite.write(lastName + \",\" + firstName + \",\" + phone + \"\\n\");\n \n }\n catch(IOException ioe)\n {\n System.out.println(\"new_record: Exception writing to the file\");\n }\n //try to close the file\n try\n {\n fWrite.close();\n \n }\n catch(IOException ioe)\n {\n System.out.println(\"new_record: Exception closing the file\");\n }\n \n }//end of test of Last_name\n \n }", "public void setupTextFields(View v) {\n other = (EditText) v.findViewById(R.id.eText_Notes);\n totalTotes = (EditText) v.findViewById(R.id.eText_NumStacked);\n\n other.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n ((ScoutFormActivity) getActivity()).getScoutForm().setENOTES_COLUMN(other.getText().toString());\n }\n });\n\n totalTotes.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n ((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSTOTAL_COLUMN(totalTotes.getText().toString());\n }\n });\n }", "void addTabularData(TabularData data);", "protected abstract void initialiseTable();", "private void getTextFromInput() {\n firstName = firstNameField.getText();\n lastName = lastNameField.getText();\n age = ageField.getText();\n email = emailField.getText().toLowerCase();\n }", "public void insert() {\n boolean validate = true;\n code = name = \"\";\n price = quantity = saled = 0;\n System.out.print(\"Product code: \");\n while (validate) {\n code = s.nextLine();\n if (Validation.validateString(code)) {\n System.out.print(\"Product name: \");\n while (validate) {\n name = s.nextLine();\n if (Validation.validateString(name)) {\n System.out.print(\"Quantity: \");\n quantity = Validation.validateIntNumber(quantity);\n System.out.print(\"Saled: \");\n saled = Validation.validateIntNumber(saled);\n System.out.print(\"Price: \");\n price = Validation.validateDoubleNumber(price);\n validate = false;\n } else {\n System.err.println(\"Name must be required!\");\n System.err.print(\"Enter product name again: \");\n }\n }\n } else {\n System.err.println(\"Code must be required!\");\n System.err.print(\"Enter product code again: \");\n }\n }\n tree.insert(new Product(code, name, quantity, saled, price));\n }" ]
[ "0.59877425", "0.5889481", "0.5747951", "0.57325023", "0.573241", "0.5611162", "0.5599231", "0.5476239", "0.54499054", "0.54419476", "0.5431033", "0.54143816", "0.53940535", "0.53793997", "0.53667086", "0.53591186", "0.53465945", "0.5346212", "0.5317613", "0.53067386", "0.52993125", "0.52961373", "0.527528", "0.5275263", "0.527439", "0.5251248", "0.52476627", "0.52395374", "0.52319", "0.5226095", "0.5222859", "0.5210524", "0.52066696", "0.5191733", "0.5190001", "0.5182324", "0.51804423", "0.51734674", "0.51650435", "0.5162897", "0.5162803", "0.5155703", "0.5154976", "0.51383543", "0.5133785", "0.513023", "0.5128493", "0.5126418", "0.51124847", "0.51104957", "0.51100695", "0.5109834", "0.51056874", "0.51053226", "0.50996", "0.5096672", "0.5094639", "0.50855833", "0.50846255", "0.5082396", "0.50722605", "0.5071789", "0.507131", "0.5070818", "0.5065552", "0.5065296", "0.50650394", "0.5062618", "0.5061427", "0.50498736", "0.5047689", "0.50437677", "0.5037067", "0.503518", "0.50349504", "0.50300294", "0.5026063", "0.5024923", "0.502201", "0.5019956", "0.50195754", "0.5015559", "0.5012994", "0.50105524", "0.50050133", "0.500332", "0.50032014", "0.5002313", "0.50015223", "0.50010395", "0.5000967", "0.4993129", "0.49923268", "0.4990606", "0.49856248", "0.49779853", "0.49778163", "0.49768484", "0.4971464", "0.49702165" ]
0.5875384
2
removes entry from sample table and walk in report data
public void removeEntry(ActionEvent event) { newReport2.removeSample(table.getSelectionModel().getSelectedItem()); table.getItems().removeAll(table.getSelectionModel().getSelectedItem()); if(conclusionNumbers1.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber())!=-1) { conclusionNumbers1.remove(conclusionNumbers1.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber())); } else { conclusionNumbers2.remove(conclusionNumbers2.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber())); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void DeleteBurnInsOnPreviousSamples() {\n\t\tif (gibbs_sample_num <= num_gibbs_burn_in + 1 && gibbs_sample_num >= 2){\n\t\t\tgibbs_samples_of_bart_trees[gibbs_sample_num - 2] = null;\n\t\t}\n\t}", "@Override\n public final void clearData() {\n synchronized (tableRows) {\n statModel.clearData();\n tableRows.clear();\n tableRows.put(TOTAL_ROW_LABEL, new SamplingStatCalculator(TOTAL_ROW_LABEL));\n statModel.addRow(tableRows.get(TOTAL_ROW_LABEL));\n }\n }", "void unsetValueSampledData();", "public void getReportData(WalkInReport report) {\n\t\tnewReport2 = report;\n\t\tnewReport2.clearConclusions();\n\t\tfor(int i=0;i<newReport2.table.size();i++) {\n\t\t\tSample newBacteroidesSample = newReport2.table.get(i);\n\t\t\ttable.getItems().add(newBacteroidesSample);\n\t\t\taddConclusionNumber(newBacteroidesSample);\n\t\t}\n\t}", "public abstract boolean shouldRemoveReportEntry(ReportRow entry);", "private void clearData() throws SQLException {\n//Lay chi so dong cuoi cung\n int n = tableModel.getRowCount() - 1;\n for (int i = n; i >= 0; i--) {\n tableModel.removeRow(i);//Remove tung dong\n }\n }", "public void cleanAfterSample() {\n if(previousResult != null) {\n previousResult.cleanAfterSample();\n }\n samplerContext.clear();\n }", "public void unsetWholeTbl()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(WHOLETBL$2, 0);\n }\n }", "public void testRemove() {\n try {\n test1.remove();\n }\n catch (Exception e) {\n assertTrue(e instanceof NoSuchElementException);\n }\n for (int i = 0; i < 10; i++) {\n test1.insert(new Buffer(i, rec));\n }\n Buffer test = test1.remove();\n assertEquals(9, test.getRecord(3).getKey());\n for (int i = 0; i < 9; i++) {\n test1.remove();\n }\n assertTrue(test1.isEmpty());\n }", "private void tampilkan() {\n int row = table.getRowCount();\n for(int a= 0; a<row;a++){\n model.removeRow(0);\n }\n \n \n }", "private void clearLogs() {\n JXTable table = getSelectedTable();\n DefaultTableModel model = (DefaultTableModel) table.getModel();\n while (model.getRowCount() != 0) {\n model.removeRow(0);\n }\n }", "public void removeOldRecords();", "private void removefromstore()\r\n\t{\r\n\t\tFile inputFile = new File(\"InventoryItems.csv\");\r\n\t\tFile tempFile = new File(\"temp.csv\");\r\n\t\tString cvsSplitBy = \",\";\r\n\t\t\r\n\t\tBufferedReader reader;\r\n\t\ttry {\r\n\t\t\treader = new BufferedReader(new FileReader(inputFile));\r\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(tempFile));\r\n\t\t\tString currentLine;\r\n\t\t\t\r\n\t\t\twhile((currentLine = reader.readLine()) != null) {\r\n\t\t\t // trim newline when comparing with lineToRemove\r\n\t\t\t\tString[] tempItem = currentLine.split(cvsSplitBy);\r\n\t\t\t if(tempItem[0].equals(this.id)) \r\n\t\t\t \tcontinue;\r\n\t\t\t writer.write(currentLine + System.getProperty(\"line.separator\"));\r\n\t\t\t}\r\n\t\t\twriter.close(); \r\n\t\t\treader.close(); \r\n\t\t\t\r\n\t\t\t//clear the file\r\n\t\t\tPrintWriter pwriter = new PrintWriter(inputFile);\r\n\t\t\tpwriter.print(\"\");\r\n\t\t\tpwriter.close();\r\n\t\t\t\r\n\t\t\t//copy back the data\r\n\t\t\treader = new BufferedReader(new FileReader(tempFile));\r\n\t\t writer = new BufferedWriter(new FileWriter(inputFile));\r\n\t\t\t\r\n\t\t\twhile((currentLine = reader.readLine()) != null) {\r\n\t\t\t writer.write(currentLine + System.getProperty(\"line.separator\"));\r\n\t\t\t}\r\n\t\t\twriter.close(); \r\n\t\t\treader.close(); \r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\r\n\r\n\t\t\r\n\t}", "void clearRecords() {\n\t\ttry {\n\t\tPrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(\"Student.txt\")));\n\t\tpw.close();\n\t\tSystem.out.println(\"\\nAll Records cleared successfully !\");\n\t\tfor (int i = 0; i < 999999999; i++);\n\t\t}catch (IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "public void clearTable(){\n\t\tloaderImage.loadingStart();\n\t\tfullBackup.clear();\n\t\tlist.clear();\n\t\toracle.clear();\n\t\tselectionModel.clear();\n\t\tdataProvider.flush();\n\t\tdataProvider.refresh();\n\t}", "void removeBefore(double when,DystoreField fld)\n{\n if (fld == time_field && next_time >= when || tuple_data.size() == 0) return;\n\n if (tuple_data.size() > 1000000) {\n System.err.println(\"TUPLE SET SIZE = \" + tuple_data.size() + \" \" + when + \" \" + next_time +\n\t\t\t \" \" + last_check);\n for (DystoreTuple dt : tuple_data) {\n\t System.err.println(\"\\t\" + dt);\n }\n }\n\n time_field = fld;\n next_time = -1;\n for (Iterator<DystoreTuple> it = tuple_data.iterator(); it.hasNext(); ) {\n DystoreTuple dt = it.next();\n double t0 = dt.getTimeValue(fld);\n if (t0 < when) {\n\t // System.err.println(\"DYSTORE: REMOVE \" + t0 + \" \" + when + \" \" + dt);\n\t it.remove();\n }\n else if (next_time < 0 || t0 < next_time) next_time = t0;\n }\n\n last_check = when;\n}", "@Test\n\tpublic void driverDeleteReport() {\n\t\tfinal Object testingData[][] = {\n\t\t\t{\n\t\t\t\t\"report1\", \"manager1\", null\n\t\t\t},//1. All fine\n\t\t\t{\n\t\t\t\t\"player1\", \"manager1\", IllegalArgumentException.class\n\t\t\t},//2. Not report\n\t\t\t{\n\t\t\t\t\"report1\", \"president1\", IllegalArgumentException.class\n\t\t\t},//3. Invalid authority\n\n\t\t};\n\n\t\tfor (int i = 0; i < testingData.length; i++)\n\t\t\tthis.templateDeleteReport((String) testingData[i][0], (String) testingData[i][1], (Class<?>) testingData[i][2]);\n\t}", "public void clearTable() {\n\t\tfor (int i = modelCondTable.getRowCount() - 1; i >= 0; i--) {\n\t\t\tmodelCondTable.removeRow(i);\n\t\t}\n\t}", "public void removeRecord(int index) {\r\n\t\tsuper.removeRecord(index);\r\n\t\ttrackPointOverlay.removeWayPoint(index);\r\n\t}", "@Override\n public void clear() {\n for (LinkedList<Entry<K,V>> list : table) {\n list = null;\n }\n }", "public void deleteRecord() {\n try {\n System.out.println(\"Please enter the name of the company you wish to delete\");\n String companyName = HelperFunctions.getInputDataString();\n RandomAccessFile rafData = new RandomAccessFile(this.databaseName + \".data\", \"rws\");\n int deleteLocation = binarySearch(rafData, companyName);\n\n if (deleteLocation != -1) {\n\n deleteLocation = binarySearchToFindClosest(companyName, 0, Integer.parseInt(getNumberOfRecords(\"normal\")));\n rafData.getChannel().position(Constants.NUM_BYTES_LINUX_RECORD * deleteLocation + Constants.NUM_BYTES_RANK);\n\n rafData.write(HelperFunctions.addWhitespacesToEnd(\"MISSING-RECORD\", Constants.NUM_BYTES_COMPANY_NAME).getBytes(), 0, Constants.NUM_BYTES_COMPANY_NAME);\n rafData.close();\n\n System.out.println(\"Deleting Record...\");\n\n // Have to remove the record entirely on a delete, otherwise it will mess up binary search by not being sorted with the rest \n removeDeletedRecord();\n updateNumRecords(\"normal\", Integer.parseInt(getNumberOfRecords(\"normal\")) - 1);\n\n // Check overflow file if not found in normal data file\n } else {\n RandomAccessFile rafOverflow = new RandomAccessFile(this.databaseName + \".overflow\", \"rws\");\n boolean recordInOverflow = false;\n int numOverflowRecords = Integer.parseInt(getNumberOfRecords(\"overflow\"));\n int recordPosition = -1;\n\n for (int i = 0; i < numOverflowRecords; i++) {\n String record = getRecord(\"overflow\", rafOverflow, i);\n String recordName = record.substring(5,45);\n recordName = recordName.trim();\n\n if (companyName.equals(recordName)) {\n recordInOverflow = true;\n recordPosition = i;\n break;\n }\n }\n\n // If found in overflow file, set that company name to MISSING-RECORD\n if (recordInOverflow == true) {\n rafOverflow.getChannel().position(Constants.NUM_BYTES_LINUX_RECORD * recordPosition + Constants.NUM_BYTES_RANK);\n rafOverflow.write(HelperFunctions.addWhitespacesToEnd(\"MISSING-RECORD\", Constants.NUM_BYTES_COMPANY_NAME).getBytes(), 0, Constants.NUM_BYTES_COMPANY_NAME);\n rafOverflow.close();\n System.out.println(\"Deleting Record...\");\n } else {\n System.out.println(\"That record does not exist in this database\");\n }\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }", "public void removeLevel()\r\n {\r\n if( tables.size()>1 )\r\n {\r\n tables.removeFirst();\r\n }\r\n if( counts.size()>1 )\r\n {\r\n counts.removeFirst();\r\n }\r\n }", "public void clean() {\r\n\t\t\r\n\t\tlogger.trace(\"Enter clean\");\r\n\t\t\r\n\t\tdata.clear();\r\n\t\tfireTableDataChanged();\r\n\t\t\r\n\t\tlogger.trace(\"Exit clean\");\r\n\t}", "public void clearTable() {\n reportTable.getColumns().clear();\n }", "private void splice()\n {\n String dateCompare =\"\";\n int changeCount = 1;\n int numberOfHashes = sizeForHashTable();\n setUpHashMap(numberOfHashes);\n\n for (int i=0; i<= this.data.size();i++)\n {\n if (i == 0)\n {\n dateCompare = this.data.get(i).getFCTTIME().getPretty();\n loadHashTable(changeCount,this.data.get(i));\n }else if ( dateCompare != this.data.get(i).getFCTTIME().getPretty())\n {\n changeCount += 1;\n dateCompare = this.data.get(i).getFCTTIME().getPretty();\n loadHashTable(changeCount,this.data.get(i));\n }else\n {\n loadHashTable(changeCount,this.data.get(i));\n }\n }\n }", "private void deleteTestDataSet() {\n LOG.info(\"deleting test data set...\");\n try {\n Statement stmt = _conn.createStatement();\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_person\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_employee\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_payroll\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_address\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_contract\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_category\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_project\");\n } catch (Exception e) {\n LOG.error(\"deleteTestDataSet: exception caught\", e);\n }\n }", "private void repopulateTableForDelete()\n {\n clearTable();\n populateTable(null);\n }", "public void dvRemoved()\r\n/* 61: */ {\r\n/* 62:132 */ this.numDVRecords -= 1;\r\n/* 63: */ }", "private void clearData() {}", "private void removeList()\r\n {\n if (tableCheckBinding != null)\r\n {\r\n tableCheckBinding.dispose();\r\n tableCheckBinding = null;\r\n }\r\n\r\n // m_TableViewer.setInput(null);\r\n WritableList newList = new WritableList(SWTObservables.getRealm(Display.getDefault()));\r\n for (int i = 0; i < 10; ++i)\r\n {\r\n newList.add(this.generateNewDataModelItem());\r\n }\r\n m_TableViewer.setInput(newList);\r\n }", "public void clearTable() {\n this.lstDaqHware.clear();\n this.mapDevPBar.clear();\n this.mapDevMotion.clear();\n }", "public void clear() {\r\n iFormatter = null;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[15]++;\r\n iElementPairs.clear();\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[16]++;\r\n }", "void clearUsageReports();", "private void clearTableData() {\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n model.setRowCount(0);\n }", "public void deleteCopiedPendingLedgerEntries();", "private void clearTable() {\n fieldTable.removeAllRows();\n populateTableHeader();\n }", "public void clearChangeSet()\r\n\t{\n\t\toriginal = new Hashtable(10);\r\n\t\t//System.out.println(\"111111 in clearChangeSet()\");\r\n\t\tins_mov = new Hashtable(10);\r\n\t\tdel_mod = new Hashtable(10);\r\n\r\n\t\tfor (int i = 0; i < seq.size(); i++) {\r\n\t\t\tReplicated elt = (Replicated) seq.elementAt(i);\r\n\t\t\toriginal.put(elt.getObjectID(), elt);\r\n\t\t}\r\n\t}", "public void unsetFirstRow()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FIRSTROW$22, 0);\n }\n }", "private void Drop(String[]p){\n List<DeputyTableItem> dti;\n dti = Drop1(p);\n for(DeputyTableItem item:dti){\n deputyt.deputyTable.remove(item);\n }\n }", "public void removeSourceData(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(SOURCEDATA$0, i);\r\n }\r\n }", "private static void deleteTest() throws SailException{\n\n\t\tString dir2 = \"repo-temp\";\n\t\tSail sail2 = new NativeStore(new File(dir2));\n\t\tsail2 = new IndexingSail(sail2, IndexManager.getInstance());\n\t\t\n//\t\tsail.initialize();\n\t\tsail2.initialize();\n\t\t\n//\t\tValueFactory factory = sail2.getValueFactory();\n//\t\tCloseableIteration<? extends Statement, SailException> statements = sail2\n//\t\t\t\t.getConnection().getStatements(null, null, null, false);\n\n\t\tSailConnection connection = sail2.getConnection();\n\n\t\tint cachesize = 1000;\n\t\tint cached = 0;\n\t\tlong count = 0;\n\t\tconnection.removeStatements(null, null, null, null);\n//\t\tconnection.commit();\n\t}", "void removeCrashData(int i);", "public void clearLearnedTable() {\n\t\tswitchTenantVirtualNetworkMap.clear();\n\t}", "private static void removeAllElementsInContainer()\n {\n DefaultTableModel dm = (DefaultTableModel) JSoundsMainWindowViewController.table.getModel();\n for (int i = dm.getRowCount() - 1; i >= 0; i--) {\n dm.removeRow(i);\n } \n }", "private void removeTempData(CopyTable table)\n\t{\n\t\tFile dataFile = new File(config.getTempDirectory(), table.getTempFilePrefix() + \"_data.csv\");\n\t\tFile countFile = new File(config.getTempDirectory(), table.getTempFilePrefix() + \"_count.txt\");\n\t\tFile metaDataFile = new File(config.getTempDirectory(), table.getTempFilePrefix() + \"_metadata.ser\");\n\t\t\n\t\tdataFile.delete();\n\t\tcountFile.delete();\n\t\tmetaDataFile.delete();\n\t\t\n\t\tFile tempDir = new File(config.getTempDirectory());\n\t\ttempDir.delete();\n\t}", "public static void reduceReportToOurNeeds(JSONObject report) \n\t{\n\t\tJSONObject analysis = report.getJSONObject(\"analysis\");\n\t\t\n\t\tremoveGeneralElements(analysis.getJSONObject(\"general\"));\n\t\tremoveRuntimeElements(analysis.getJSONObject(\"runtime\"));\n\t\tanalysis.remove(\"hybridanalysis\");\n\t\tremoveFinalElements(analysis.getJSONObject(\"final\"));\n\t}", "protected void discard()\n {\n if (!isDiscarded())\n {\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n int cUnits = m_cUnits;\n if (cUnits == -1)\n {\n // entry is discarded; avoid repetitive events\n return;\n }\n\n if (cUnits > 0)\n {\n map.adjustUnits(-cUnits);\n }\n\n m_cUnits = -1;\n }\n\n // issue remove notification\n if (map.hasListeners())\n {\n map.dispatchEvent(map.instantiateMapEvent(\n MapEvent.ENTRY_DELETED, getKey(), getValue(), null));\n }\n }\n }", "void removeTaskmonitorrecord(int i);", "int deleteByExample(TbExpressTraceExample example);", "private void removeRedundantGreyTable()\r\n \t{\r\n \t\tdeleteNodes(XPath.GREY_TABLE.query);\r\n \t}", "private void removeFromList(Visit visit){\n\t\tfor (int i=0; i<searchResults.size(); i++) {\n\t\t\tif(searchResults.get(i).getClientRegNo().equals(visit.getClientRegNo())\n\t\t\t\t\t&& searchResults.get(i).getPropertyRegNo().equals(visit.getPropertyRegNo())\n\t\t\t\t\t&& searchResults.get(i).getDate().equals(visit.getDate())){\n\t\t\t\tsearchResults.remove(i);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t}", "public void clearData()\r\n {\r\n \r\n }", "void remove(ThreadLocal<?> key) {\n cleanUp();\n\n for (int index = key.hash & mask;; index = next(index)) {\n Object reference = table[index];\n\n if (reference == key.reference) {\n // Success!\n table[index] = TOMBSTONE;\n table[index + 1] = null;\n tombstones++;\n size--;\n return;\n }\n\n if (reference == null) {\n // No entry found.\n return;\n }\n }\n }", "public void removeAllData() {\n DefaultTableModel dm = (DefaultTableModel) table.getModel();\n dm.getDataVector().removeAllElements();\n dm.fireTableDataChanged(); // notifies the JTable that the model has changed\n }", "public org.ga4gh.models.CallSet.Builder clearSampleId() {\n sampleId = null;\n fieldSetFlags()[2] = false;\n return this;\n }", "public void remove(Record r) \n\t{\n\t\tfilled--; //reduce load factor\n\t\tif (r.placement != -1){ //if r's expected position isnt null\n\t\t\tRecord newRecord = new Record(\"deleted\"); //make a new record with value \"deleted\n\t\t\tnewRecord.placement = -2; //set position to -1 (as is standard for deleted\n\t\t\tTable[r.placement] = newRecord; //puts deleted slot in table\n\t\t}\t\n\t}", "private Map deleteSamples(SecurityInfo securityInfo, String module) throws Exception {\n Map returnValue = new HashMap();\n //get the existing sample ids for the ASM module\n AsmData asmInfo = new AsmData();\n asmInfo.setAsm_id(module);\n IcpOperationHome home = (IcpOperationHome) EjbHomes.getHome(IcpOperationHome.class);\n IcpOperation icp = home.create();\n asmInfo = (AsmData) icp.getAsmData(asmInfo, securityInfo, true, false);\n Iterator frozenIterator = ApiFunctions.safeList(asmInfo.getFrozen_samples()).iterator(); \n Iterator paraffinIterator = ApiFunctions.safeList(asmInfo.getParaffin_samples()).iterator(); \n List existingSampleIds = new ArrayList();\n SampleData sample;\n while (frozenIterator.hasNext()) {\n sample = (SampleData)frozenIterator.next();\n existingSampleIds.add(sample.getSample_id());\n }\n while (paraffinIterator.hasNext()) {\n sample = (SampleData)paraffinIterator.next();\n existingSampleIds.add(sample.getSample_id());\n }\n //for each existing sample, if it has not been checked off on the front end it is a candidate\n //for deletion. Build a list of candidate ids and if it's not empty pass the list off to\n //BtxPerformerSampleOperation for deletion. That class will enforce any business rules that\n //ensure the samples can truly be deleted. We simply need to check for errors and if any\n //ocurred pass them back to the user.\n List samplesToDelete = new ArrayList();\n Iterator existingIterator = existingSampleIds.iterator();\n while (existingIterator.hasNext()) {\n String sampleId = (String)existingIterator.next();\n //if the state is disabled, this is a sample that wasn't allowed to be unchecked\n //so it is not a candidate for deletion. We cannot check the \"present\"<sample_id>\n //parameter because disabled controls do not have their values passed in the request\n String state = ApiFunctions.safeString(request.getParameter(\"present\" + sampleId + \"state\"));\n if (state.indexOf(\"disabled\") < 0) {\n //otherwise, see if there is a parameter indicating the sample is checked. If not,\n //this sample is a candidate for deletion. Frozen and paraffin samples have \n //slightly different parameter names, so get them both\n String frozenCheck = ApiFunctions.safeString(request.getParameter(\"present\" + sampleId));\n String paraffinCheck = ApiFunctions.safeString(request.getParameter(\"pfin_present\" + sampleId));\n if (ApiFunctions.isEmpty(frozenCheck) && ApiFunctions.isEmpty(paraffinCheck)) {\n samplesToDelete.add(sampleId);\n }\n }\n }\n if (samplesToDelete.size() > 0) {\n Timestamp now = new Timestamp(System.currentTimeMillis());\n BtxDetailsDeleteSamples btxDetails = new BtxDetailsDeleteSamples();\n btxDetails.setBeginTimestamp(now);\n btxDetails.setLoggedInUserSecurityInfo(securityInfo);\n List sampleList = new ArrayList();\n Iterator sampleIterator = samplesToDelete.iterator();\n while (sampleIterator.hasNext()) {\n com.ardais.bigr.javabeans.SampleData sampleData = new com.ardais.bigr.javabeans.SampleData();\n sampleData.setSampleId((String)sampleIterator.next());\n sampleData.setConsentId(asmInfo.getCase_id());\n sampleList.add(sampleData);\n }\n btxDetails.setSampleDatas(sampleList);\n //note - I spoke with Gail about providing a default reason for deleting the samples,\n //and she requested that we leave the reason blank. Most of the time it's because the\n //samples were created in error, but there are occasionally other reasons (i.e. the\n //sample was broken).\n btxDetails = (BtxDetailsDeleteSamples)Btx.perform(btxDetails, \"iltds_sample_deleteSamples\");\n //if any errors were returned, add them to the errors list\n BtxActionErrors actionErrors = btxDetails.getActionErrors();\n if (actionErrors != null && actionErrors.size() > 0) {\n Iterator errorIterator = actionErrors.get();\n MessageResources messages = (MessageResources)servletCtx.getAttribute(Globals.MESSAGES_KEY);\n while (errorIterator.hasNext()) {\n BtxActionError error = (BtxActionError)errorIterator.next();\n String message = messages.getMessage(error.getKey(), error.getValues());\n //because these messages are shown in plain text, strip off the <li> and </li> tags\n message = StringUtils.replace(message,\"<li>\",\" \");\n message = StringUtils.replace(message,\"</li>\",\" \");\n errors.add(message.trim());\n }\n }\n else {\n //no errors occurred, so return a map of deleted sample ids\n Iterator iterator = samplesToDelete.iterator();\n String sampleId;\n while (iterator.hasNext()) {\n sampleId = (String)iterator.next();\n returnValue.put(sampleId, sampleId);\n }\n }\n }\n return returnValue;\n }", "public void clearAllTable() {\n\t\tint rowCount = dmodel.getRowCount();\n\t\tfor (int i = rowCount - 1; i >= 0; i--) {\n\t\t\tdmodel.removeRow(i);\n\t\t}\n\t}", "private void clearTable(DefaultTableModel table){\n\t\t\n\t\tfor(int i = 0; i < table.getRowCount(); i++){\n\t\t\ttable.removeRow(i);\n\t\t}\n\t}", "private void cleanUp() {\n if (rehash()) {\n // If we rehashed, we needn't clean up (clean up happens as\n // a side effect).\n return;\n }\n\n if (size == 0) {\n // No live entries == nothing to clean.\n return;\n }\n\n // Clean log(table.length) entries picking up where we left off\n // last time.\n int index = clean;\n Object[] table = this.table;\n for (int counter = table.length; counter > 0; counter >>= 1,\n index = next(index)) {\n Object k = table[index];\n\n if (k == TOMBSTONE || k == null) {\n continue; // on to next entry\n }\n\n // The table can only contain null, tombstones and references.\n @SuppressWarnings(\"unchecked\")\n Reference<ThreadLocal<?>> reference\n = (Reference<ThreadLocal<?>>) k;\n if (reference.get() == null) {\n // This thread local was reclaimed by the garbage collector.\n table[index] = TOMBSTONE;\n table[index + 1] = null;\n tombstones++;\n size--;\n }\n }\n\n // Point cursor to next index.\n clean = index;\n }", "@Test\n public void testMixedDeletes() throws Exception {\n List<WALEntry> entries = new ArrayList<>(3);\n List<Cell> cells = new ArrayList<>();\n for (int i = 0; i < 3; i++) {\n entries.add(createEntry(TestReplicationSink.TABLE_NAME1, i, Put, cells));\n }\n TestReplicationSink.SINK.replicateEntries(entries, CellUtil.createCellScanner(cells.iterator()), TestReplicationSink.replicationClusterId, TestReplicationSink.baseNamespaceDir, TestReplicationSink.hfileArchiveDir);\n entries = new ArrayList(3);\n cells = new ArrayList();\n entries.add(createEntry(TestReplicationSink.TABLE_NAME1, 0, DeleteColumn, cells));\n entries.add(createEntry(TestReplicationSink.TABLE_NAME1, 1, DeleteFamily, cells));\n entries.add(createEntry(TestReplicationSink.TABLE_NAME1, 2, DeleteColumn, cells));\n TestReplicationSink.SINK.replicateEntries(entries, CellUtil.createCellScanner(cells.iterator()), TestReplicationSink.replicationClusterId, TestReplicationSink.baseNamespaceDir, TestReplicationSink.hfileArchiveDir);\n Scan scan = new Scan();\n ResultScanner scanRes = TestReplicationSink.table1.getScanner(scan);\n Assert.assertEquals(0, scanRes.next(3).length);\n }", "@Override\n\tpublic void cleanUp() {\n\t\t table = null;\n colFam = null;\n currentEvent = null;\n\t}", "public void performSuppression() {\n \n for (int row = 0; row < dataOutput.getNumRows(); row++) {\n if (privacyModelDefinesSubset == null || privacyModelDefinesSubset.contains(row)) {\n final int hash = dataOutput.hashCode(row);\n final int index = hash & (hashTableBuckets.length - 1);\n HashGroupifyEntry m = hashTableBuckets[index];\n while ((m != null) && ((m.hashcode != hash) || !dataOutput.equalsIgnoringOutliers(row, m.row))) {\n m = m.next;\n }\n if (m == null) {\n throw new RuntimeException(\"Invalid state! Group the data before suppressing records!\");\n }\n if (!m.isNotOutlier || this.isCompletelyGeneralized(m)) {\n dataOutput.or(row, Data.OUTLIER_MASK);\n m.isNotOutlier = false;\n }\n } else {\n dataOutput.or(row, Data.OUTLIER_MASK);\n }\n }\n }", "protected void removeEldestEntry(){\n Entry lastEntry = header.before;\n\n header.before = header.before.before;\n header.before.after = header;\n\n int index = getIndexForKey(lastEntry.key);\n Entry entries = table[index];\n Entry prevEntry = null;\n for(Entry entry = entries; entry != null; entry = entry.next){\n if(entry.key == lastEntry.key){\n if(prevEntry != null){\n prevEntry.next = entry.next;\n }else{\n table[index] = entry.next;\n }\n }\n prevEntry = entry;\n }\n size--;\n }", "public void cleanup() {\n this.index = new TreeMap<String, PostingsList>();\n this.count = 0;\n }", "public void removeAllEntries() {\n }", "@Override\n public void clearRowsWithChanges() {\n }", "private void clearTable()\n {\n TableLayout table = (TableLayout) findViewById(R.id.lossesTable);\n table.removeViews(1, table.getChildCount() - 1);\n }", "public synchronized void clear() {\n Entry tab[] = table;\n for (int index = tab.length; --index >= 0; ) {\n tab[index] = null;\n }\n count = 0;\n }", "private void deleteEntry(int index){\n Log.i(\"Serving Calculator\", \"First amount: \" +String.valueOf(potList.countPots()));\n potList.deletePot(index);\n Log.i(\"Serving Calculator\", \"Second amount: \" +String.valueOf(potList.countPots()));\n arrayofpots = potList.getPotDescriptions();\n refresher(arrayofpots);\n }", "public void resetTable() {\n\t\tif (table != null) {\n\t\t\ttable.removeAll();\n\t\t}\n\t}", "private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }", "@org.junit.Test\n public void remove() throws Exception {\n assertEquals(null, hashTable.remove(\"savon\"));\n assertEquals(\"Yuliya\", hashTable.remove(\"Savon\"));\n assertEquals(null, hashTable.remove(\"Savon\"));\n\n for (int i = 0; i < 2_000_000; i++) {\n hashTable.put(Integer.toString(i), Integer.toString(i));\n }\n\n for (int i = 0; i < 2_000_000; i++) {\n String curValue = hashTable.remove(Integer.toString(i));\n assertEquals(Integer.toString(i), curValue);\n }\n }", "public void resetHighscoreTable()\r\n\t{\r\n\t\tcreateArray();\r\n\t\twriteFile();\r\n\t}", "@Test\n public void testDeleteForSureClearsAllTableRowsFromMeta() throws IOException, InterruptedException {\n final TableName tableName = TableName.valueOf(name.getMethodName());\n final Admin admin = TestEnableTable.TEST_UTIL.getAdmin();\n final HTableDescriptor desc = new HTableDescriptor(tableName);\n desc.addFamily(new HColumnDescriptor(TestEnableTable.FAMILYNAME));\n try {\n TestEnableTable.createTable(TestEnableTable.TEST_UTIL, desc, HBaseTestingUtility.KEYS_FOR_HBA_CREATE_TABLE);\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail((\"Got an exception while creating \" + tableName));\n }\n // Now I have a nice table, mangle it by removing the HConstants.REGIONINFO_QUALIFIER_STR\n // content from a few of the rows.\n try (Table metaTable = TestEnableTable.TEST_UTIL.getConnection().getTable(META_TABLE_NAME)) {\n try (ResultScanner scanner = metaTable.getScanner(MetaTableAccessor.getScanForTableName(TestEnableTable.TEST_UTIL.getConnection(), tableName))) {\n for (Result result : scanner) {\n // Just delete one row.\n Delete d = new Delete(result.getRow());\n d.addColumn(CATALOG_FAMILY, REGIONINFO_QUALIFIER);\n TestEnableTable.LOG.info((\"Mangled: \" + d));\n metaTable.delete(d);\n break;\n }\n }\n admin.disableTable(tableName);\n TestEnableTable.TEST_UTIL.waitTableDisabled(tableName.getName());\n // Rely on the coprocessor based latch to make the operation synchronous.\n try {\n TestEnableTable.deleteTable(TestEnableTable.TEST_UTIL, tableName);\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail((\"Got an exception while deleting \" + tableName));\n }\n int rowCount = 0;\n try (ResultScanner scanner = metaTable.getScanner(MetaTableAccessor.getScanForTableName(TestEnableTable.TEST_UTIL.getConnection(), tableName))) {\n for (Result result : scanner) {\n TestEnableTable.LOG.info((\"Found when none expected: \" + result));\n rowCount++;\n }\n }\n Assert.assertEquals(0, rowCount);\n }\n }", "protected void removeOldData() {\n if (!storage.isEmpty()) {\n long timeLowerbound = storage.lastKey() - maxStorageTime;\n while (!storage.isEmpty() && storage.firstKey() < timeLowerbound) {\n storage.pollFirstEntry();\n } \n }\n }", "void unsetSpecimen();", "public void clear() {\r\n\t\tfor (int i = 0; i < table.length; i++) {\r\n\t\t\ttable[i] = null;\r\n\t\t}\r\n\r\n\t\tmodificationCount++;\r\n\t\tsize = 0;\r\n\t}", "public void removeBtn(){\r\n\t\t\r\n\t\tWorkflowEntry entryToBeRemoved = (WorkflowEntry) tableView.getSelectionModel().getSelectedItem();\r\n\t\t\r\n\t\tdata.remove(entryToBeRemoved);\r\n\t\t\r\n\t}", "private void reloadPlanTable() {\n\t\t\r\n\t}", "public void DeleteAllRecordsInTable() {\n\n final List<Address> gndPlan = GetAllRecordsFromTable();\n for (int i = 0; i < gndPlan.size(); i++) {\n\n gndPlan.get(i).delete();\n //delete all item in table House\n }\n\n }", "private Entry1 removeEntryForKey(Object key){\n Object k= maskNull(key);\n int i=hCode(key,table.length);\n Entry1 previous=null;\n for(Entry1 e=table[i]; e!=null; e=e.getNext()){\n if(eq(k, maskNull(e.getKey()))){\n if(e==table[i]){\n table[i]=e.getNext();\n } else{\n previous.setNext(e.getNext());\n }\n return e;\n }\n previous=e;\n }\n return null;\n }", "public void removeRow(Patient o)\n\t{\n\t\tthis.data.remove(o);\n\t\tthis.fireTableChanged(null);\n\t}", "public void deleteInst() {\n\t\tlogger.debug(\"DeviceNameTableTester has been stopped\");\n\t}", "void removeAllEntries();", "public void DoesNeedCleaning() {\n\t\tSystem.out.println(\"Table is being cleaned right now.\");\n\t}", "void removeFinancialStatements(int i);", "public void clearData(){\r\n data.clear();\r\n this.fireTableDataChanged();\r\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJTableUtils.clearTable(allowStressTable);\r\n\t\t\t}", "void delData();", "public void clearLearnedTable(IOFSwitch sw) {\n\n\t\tMap<Tenant3, Map<VirtualNetwork, Map<Host, OFPort>>> swMap = switchTenantVirtualNetworkMap.get(sw);\n\n\t\tif (swMap != null) {\n\t\t\tIterator<Tenant3> iterator = swMap.keySet().iterator();\n\t\t\twhile(iterator.hasNext()){\t\n\t\t\t\tMap<VirtualNetwork, Map<Host, OFPort>> tenantMap = swMap.get(iterator.next());\n\t\t\t\ttenantMap.clear();\n\t\t\t}\n\t\t\tswMap.clear();\n\t\t}\n\t}", "public void clearData(){\n\r\n\t}", "@org.junit.jupiter.api.Test\n void drop1elementoColisionNoExiste() {\n String key = \"0\";\n String value =\"David\";\n HashTable hashTable = new HashTable();\n hashTable.put(key,value);\n hashTable.drop(\"11\");\n String esperado = \"bucket[0] = [0, David]\\n\";\n Assertions.assertEquals(esperado,hashTable.toString());\n int count = 1;\n Assertions.assertEquals(count,hashTable.count());\n }", "@Override\n\t\t\tpublic AnalysisResult remove(Object key) {\n\t\t\t\treturn null;\n\t\t\t}", "public void removeFromRateBookExportResults(entity.RateBookExportResult element);", "public void removeAllData() {\n dbHelper.removeAllData(db);\n }", "private void dealToTable()\r\n\t{\r\n\t\tthis.onTable.clear();\r\n\t\tif(this.deck.size() >= Config.TableCards)\r\n\t\t{\r\n\t\t\tthis.onTable.addAll(this.deck.subList(0, Config.TableCards));\r\n\t\t\tthis.deck = this.deck.subList(Config.TableCards, this.deck.size());\r\n\t\t}\r\n\t}", "public void clearData(){\n\t\t\n\t\tclearTable(conditionTableModel);\n\t\tclearTable(faultTableModel);\n\t}", "public void delete(IncomingReport incoming_report) throws DAOException;", "public void clear() {\n classifiedSamples.clear();\n classificationNameMap.clear();\n classifications.clear();\n sampleClassificationMap.clear();\n nextIndex = 0;\n }" ]
[ "0.60199827", "0.59472764", "0.58574307", "0.56293076", "0.55987644", "0.558779", "0.5550167", "0.548318", "0.54601413", "0.5427475", "0.54215616", "0.54195076", "0.54172945", "0.5381057", "0.5377001", "0.53532803", "0.53431773", "0.5341592", "0.53211147", "0.5319783", "0.53061754", "0.52982944", "0.5269119", "0.52329355", "0.5212699", "0.5204228", "0.5190483", "0.5187984", "0.51801515", "0.5171384", "0.5145929", "0.5119278", "0.5110305", "0.5106671", "0.50970113", "0.5091037", "0.5080714", "0.50760704", "0.5074742", "0.50567496", "0.5046848", "0.5045728", "0.50456196", "0.50417954", "0.50413424", "0.50377315", "0.50370634", "0.50330544", "0.50248766", "0.502428", "0.50137997", "0.50106704", "0.5008437", "0.5007358", "0.49970728", "0.49935493", "0.4991371", "0.4989497", "0.49883604", "0.49816236", "0.49805918", "0.49804887", "0.49759245", "0.49750617", "0.49738827", "0.49704942", "0.49551386", "0.49523795", "0.4950451", "0.49494132", "0.49477246", "0.49471214", "0.49435753", "0.49373367", "0.49364284", "0.4934641", "0.49301895", "0.4928352", "0.4927753", "0.4918913", "0.49134132", "0.4912314", "0.49099645", "0.48995686", "0.48973784", "0.4889748", "0.4887307", "0.48871955", "0.4883344", "0.4880391", "0.48776454", "0.4876598", "0.48735607", "0.48694193", "0.48655304", "0.48611045", "0.4859877", "0.4857344", "0.48551548", "0.48525342" ]
0.6071061
0
checks entry for invalid inputs
public boolean checkEntryInputs() { boolean isValid = true; if(sampleNumberTF.getText().equals("")) { isValid = false; } if(materialDescriptionTF.getText().equals("")) { isValid = false; } if(Double.valueOf(bacteroidesConcentrationTF.getText())==null) { isValid = false; } return isValid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isValidInput() {\n\t\treturn true;\n\t}", "public void invalid() {\r\n\t\tSystem.out.println(\"Please enter a valid input\");\r\n\t}", "private boolean isInputValid() {\n return true;\n }", "private boolean validEditInput() throws SQLException {\n // Checks if any of the fields is empty\n if(teamNameEditField.getText().equals(\"\") || abbrevationEditField.getText().equals(\"\")\n || chooseCityBox.getValue() == null || chooseLeagueBox.getValue() == null\n || chooseLeagueTeamBox.getValue() == null) {\n displayMessage(messagePane,\"Please fill all the fields\",true);\n return false;\n }\n // Checks the abbrevation length\n else if(abbrevationEditField.getText().length() > 3)\n {\n displayMessage(messagePane,\"Abbrevations must be at most 3 characters\",true);\n return false;\n }\n // Checks team name length\n else if (teamNameEditField.getText().length() > 30){\n displayMessage(messagePane,\"Team Names must be smaller than 30 characters\",true);\n return false;\n }\n return true;\n }", "private void checkUserInput() {\n }", "private boolean checkForWrongInput(){\n if(this.studentCode.getText().isEmpty())\n return true;\n //Check for length\n if(this.studentCode.getText().length() != 3)\n return true;\n //Check for invalid characters\n for(char c: this.studentCode.getText().toCharArray())\n if(!Character.isDigit(c))\n return true;\n\n return false;\n }", "protected abstract boolean isInputValid();", "public void checkInput(TextField number) {\r\n\t\ttry {\r\n\t\t\tlong num = Long.parseLong(number.getText());\r\n\t\t\tif (num < 0) \t\t\t\t\t// ako je negativan broj, pretvorit cemo ga u pozitivan\r\n\t\t\t\tnum = Math.abs(num);\r\n\t\t\tif (isValid(num)) \r\n\t\t\t\tscene2();\r\n\t\t}\r\n\t\tcatch (Exception e) {\t\t\t\t// hvatanje greske\r\n\t\t\talert(\"Wrong input, try again!\");\r\n\t\t}\r\n\t}", "private boolean checkInputValidity() {\n // if any of the input field is empty, return false directly\n if (name.getText().equals(\"\") || id.getText().equals(\"\") || fiber.getText().equals(\"\")\n || protein.getText().equals(\"\") || fat.getText().equals(\"\") || calories.getText().equals(\"\")\n || carbohydrate.getText().equals(\"\")) {\n String message = \"Make sure enter the value of all nutrient components, please try again!\";\n // display the warning windows with the assigned warning message\n Alert alert = new Alert(AlertType.INFORMATION, message);\n alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\n this.close();// close the add food stage\n alert.showAndWait().filter(response -> response == ButtonType.OK);\n return false;\n }\n // if any nutrition info input is not a number value or is negative, return false directly\n try {\n Double fibervalue = null;\n Double proteinvalue = null;\n Double fatvalue = null;\n Double caloriesvalue = null;\n Double carbohydratevalue = null;\n // trim the input to exact numeric value\n fibervalue = Double.valueOf(fiber.getText().trim());\n proteinvalue = Double.valueOf(protein.getText().trim());\n fatvalue = Double.valueOf(fat.getText().trim());\n caloriesvalue = Double.valueOf(calories.getText().trim());\n carbohydratevalue = Double.valueOf(carbohydrate.getText().trim());\n // nutrition input is suppose to be positive numbers\n // if any of the numbers is negative, return false diretcly\n if (fibervalue < 0.0 || proteinvalue < 0.0 || fatvalue < 0.0 || caloriesvalue < 0.0\n || carbohydratevalue < 0.0) {\n String message = \"The input of the nutrient can not be negative, please try again!\";\n Alert alert = new Alert(AlertType.INFORMATION, message);\n alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\n this.close();\n alert.showAndWait().filter(response -> response == ButtonType.OK);\n return false;\n }\n // if any input of the nutrition info is not a double value, catch the exception and return\n // false\n } catch (Exception e) {\n String message =\n \"At least one nutrition value input is invalid, please type a number in nutrient textbox!\";\n // display the warning windows with the assigned warning message\n Alert alert = new Alert(AlertType.INFORMATION, message);\n alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\n this.close(); // close the addfood stage\n // wait for response from ok button\n alert.showAndWait().filter(response -> response == ButtonType.OK);\n return false;\n }\n return true;\n }", "private void validateInputParameters(){\n\n }", "protected void validateInput()\r\n\t{\r\n\t\tString errorMessage = null;\r\n\t\tif ( validator != null ) {\r\n\t\t\terrorMessage = validator.isValid(text.getText());\r\n\t\t}\r\n\t\t// Bug 16256: important not to treat \"\" (blank error) the same as null\r\n\t\t// (no error)\r\n\t\tsetErrorMessage(errorMessage);\r\n\t}", "private boolean validateInput() {\n String username = editUsername.getText().toString().trim();\n String email = editEmail.getText().toString().trim();\n String password = editPassword.getText().toString().trim();\n String repeatPassword = editRepeatPassword.getText().toString().trim();\n if (!password.equals(repeatPassword)) {\n ShowMessageUtil.tosatSlow(\"Enter passwords differ\", EmailRegisterActivity.this);\n return false;\n } else if (username.equals(\"\") || email.equals(\"\") || password.equals(\"\")) {\n ShowMessageUtil.tosatSlow(\"every item can not be empty!\", EmailRegisterActivity.this);\n return false;\n }\n if (username.length()>10){\n ShowMessageUtil.tosatSlow(\"the character length of the username can't be over than 10\", EmailRegisterActivity.this);\n return false;\n }\n return true;\n }", "private boolean validateInput(EditText titleInput, EditText descriptionInput, EditText priceInput) {\n String title = titleInput.getText().toString();\n String description = descriptionInput.getText().toString();\n int price = (TextUtils.isEmpty(priceInput.getText().toString()))? -1 : Integer.parseInt(priceInput.getText().toString());\n if (TextUtils.isEmpty(title) || TextUtils.isEmpty(description) || price < 0) {\n Toast.makeText(this.getActivity(),\n \"Please, fill in all fields.\",\n Toast.LENGTH_LONG).show();\n return false;\n }\n if (photoURI == null) {\n Toast.makeText(this.getActivity(),\n \"Please, add a picture to this item before submitting it.\",\n Toast.LENGTH_LONG).show();\n return false;\n }\n return true;\n }", "private boolean isInputValid() {\n\t\tString errorMessage = \"\";\n\t\t\n\t\tif (dateField.getText() == null || dateField.getText().length() == 0) {\n\t\t\terrorMessage += \"Kein gültiges Datum!\\n\";\n\t\t} else {\n\t\t\tif (!DateUtil.validDate(dateField.getText())) {\n\t\t\t\terrorMessage += \"Kein gültiges Datum. Benutze das dd.mm.yyy Format!\\n\";\n\t\t\t}\n\t\t}\n\t\tString categoryFieldSelection = categoryField.getSelectionModel().getSelectedItem();\n\t\tif (categoryFieldSelection.isEmpty() || categoryFieldSelection.length() == 0) {\n\t\t\terrorMessage += \"Keine gültige Kategorie!\\n\";\n\t\t}\n\t\tif (useField.getText() == null || useField.getText().length() == 0) {\n\t\t\terrorMessage += \"Kein gültiger Verwendungszweck!\\n\";\n\t\t}\n\t\tif (amountField.getText() == null || amountField.getText().length() == 0) {\n\t\t\terrorMessage += \"Kein gültiger Betrag!\\n\";\n\t\t} \n\t\t/**else {\n\t\t\t// try to parse the amount into a double\n\t\t\ttry {\n\t\t\t\tDouble.parseDouble(amountField.getText());\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\terrorMessage += \"Kein zulässiger Betrag! (Nur Dezimalzahlen erlaubt)\\n\";\n\t\t\t}\n\t\t}**/\n\t\tif (distributionKindField.getText() == null || distributionKindField.getText().length() == 0) {\n\t\t\terrorMessage += \"Keine gültige Ausgabeart!\\n\";\n\t\t}\n\n\t\tif (errorMessage.length() == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\t// Show the error message.\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.initOwner(dialogStage);\n\t\t\talert.setTitle(\"Ungültige Eingaben\");\n\t\t\talert.setHeaderText(\"Bitte korrigieren Sie die Fehler in den Feldern.\");\n\t\t\talert.setContentText(errorMessage);\n\t\t\talert.showAndWait();\n\t\t\treturn false;\n\t\t}\n\t}", "protected abstract boolean checkInput();", "private boolean validateInput() {\n\tboolean valid = false;\n\ttry {\n\t if (paymentText == null | paymentText.getValue() == \"\") {\n\t\tpaymentText.focus();\n\t\tthrow new NullPointerException(\"paymentText fehlt\");\n\t }\n\t if (paymentBetrag == null | paymentBetrag.getValue() == \"\") {\n\t\tpaymentBetrag.focus();\n\t\tthrow new NullPointerException(\"paymentBetrag fehlt\");\n\t }\n\t if (!paymentBetrag.isEmpty()) {\n\t\t@SuppressWarnings(\"unused\")\n\t\tdouble d = Double.parseDouble(paymentBetrag.getValue());\n\t }\n\t // seems that everything was OK\n\t valid = true;\n\t} catch (NullPointerException e) {\n\t System.out.println(\"PaymentWindow - \" + e);\n\t} catch (NumberFormatException e) {\n\t // entered value is no number\n\t paymentBetrag.focus();\n\t}\n\treturn valid;\n }", "@Override\n\tpublic boolean checkInput() {\n\t\treturn true;\n\t}", "private void checkFields() {\n if (month.getText().toString().isEmpty()) {\n month.setError(\"enter a month\");\n month.requestFocus();\n return;\n }\n if (day.getText().toString().isEmpty()) {\n day.setError(\"enter a day\");\n day.requestFocus();\n return;\n }\n if (year.getText().toString().isEmpty()) {\n year.setError(\"enter a year\");\n year.requestFocus();\n return;\n }\n if (hour.getText().toString().isEmpty()) {\n hour.setError(\"enter an hour\");\n hour.requestFocus();\n return;\n }\n if (minute.getText().toString().isEmpty()) {\n minute.setError(\"enter the minute\");\n minute.requestFocus();\n return;\n }\n if (AMorPM.getText().toString().isEmpty()) {\n AMorPM.setError(\"enter AM or PM\");\n AMorPM.requestFocus();\n return;\n }\n if (place.getText().toString().isEmpty()) {\n place.setError(\"enter the place\");\n place.requestFocus();\n return;\n }\n }", "private boolean validateInput(){\n Window owner=root.getScene().getWindow();\n inputFileds.addAll(txtfn,txtln,txtsurname,txtDOB,txtResidence,txtMobile,txtID,username);\n for (TextField textField : inputFileds) {\n if(textField.getText().isEmpty()){\n //set css stroke\n Dialog.showMessageDialog(owner,\"Missing Details\",\"Invalid Input\",DialogIcon.WARNING);\n textField.requestFocus();\n return false;\n }\n }\n inputFileds.removeAll(txtDOB,txtMobile,username);\n for (TextField textField : inputFileds) {\n if(textField.getText().length()>30){\n //set css stroke\n Dialog.showMessageDialog(owner,\"Sorry the text you entered can not be greater that 30 characters\",\"Text too Long\",DialogIcon.WARNING);\n textField.requestFocus();\n return false;\n }\n }\n if(username.getText().length()>20 || username.getText().length()<4){\n Dialog.showMessageDialog(owner, \"Sorry your Username has to be More than 3 Characters and can not Exceed 20 Charchaters\", \"Invalid input\",DialogIcon.WARNING);\n username.requestFocus();\n return false;\n }\n if(pass.getText().isEmpty()){\n Dialog.showMessageDialog(owner,\"Missing Details\",\"Invalid Input\",DialogIcon.WARNING);\n pass.requestFocus();\n return false;\n }\n if(pass.getText().length()>20 || pass.getText().length()<4){\n Dialog.showMessageDialog(owner, \"Sorry your Password has to be More than 3 Characters and can not Exceed 20 Charchaters\", \"Invalid Input\",DialogIcon.WARNING);\n pass.requestFocus();\n return false;\n }\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n SimpleDateFormat yearFormat = new SimpleDateFormat(\"yyyy\");\n try {\n date = dateFormat.parse(txtDOB.getText());\n Calendar cal=Calendar.getInstance();\n int year=Integer.parseInt(yearFormat.format(date));\n if (year <= 1900 || year>cal.get(Calendar.YEAR)) {\n Dialog.showMessageDialog(owner,\"Invalid Date of Birth\", \"Invalid Input\",DialogIcon.WARNING);\n txtDOB.requestFocus();\n return false;\n }\n String initialEntry=txtDOB.getText();\n String parsedValue=dateFormat.format(date);\n if(!initialEntry.equals(parsedValue)){\n Dialog.showMessageDialog(owner, \"Note your Date of Birth has been corrected\", \"Date Corrected\",DialogIcon.INFORMATION);\n }\n txtDOB.setText(dateFormat.format(date));\n } catch (ParseException ex) {\n Dialog.showMessageDialog(owner,\"Invalid Date of Birth\", \"Invalid Input\",DialogIcon.WARNING);\n txtDOB.requestFocus();\n return false;\n }\n try {\n int mobile=Integer.parseInt(txtMobile.getText());\n } catch (NumberFormatException e) {\n Dialog.showMessageDialog(owner, \"Invalid Mobile Number\", \"Invalid data\",DialogIcon.WARNING);\n txtMobile.requestFocus();\n return false;\n }\n if(txtMobile.getText().length() != 10){\n Dialog.showMessageDialog(owner, \"Sorry your Mobile Number is invalid\", \"Invalid input\",DialogIcon.WARNING);\n txtMobile.requestFocus();\n return false;\n }\n String sql=\"select Username,Password from users where Username=?\";\n try(PreparedStatement prstmt=con.prepareStatement(sql)) {\n prstmt.setString(1, username.getText());\n ResultSet rs=prstmt.executeQuery();\n if(rs.next()){\n Dialog.showMessageDialog(owner, \"Sorry Username already exists\\n Please change to different Username\", \"Username Exists\",DialogIcon.WARNING);\n username.requestFocus();\n return false;\n }\n rs.close();\n } catch (SQLException e) {\n System.err.println(e);\n }\n return true;\n }", "private boolean checkForInvalidInput(){\n String email = emailTextView.getText().toString();\n String password = passwordTextView.getText().toString();\n String name = usernameTextView.getText().toString();\n\n\n if(email.isEmpty() || password.isEmpty() || name.isEmpty()){\n Toast.makeText(getApplicationContext(),\"Please fill in all fields\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n\n if(!email.contains(\"@\")){\n Toast.makeText(getApplicationContext(),\"Please enter a valid email\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n if(!isStudent && !isTeacher){\n Toast.makeText(getApplicationContext(),\"Please select Student or Teacher\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n\n\n\n\n // add more checks?\n\n return true;\n\n }", "private boolean validateInputInfo(){\n\n //Get user input\n String firstName = newContactFirstName.getText().toString();\n String lastName = newContactLastName.getText().toString();\n String email = newContactEmailAddress.getText().toString();\n String phone = newContactPhoneNumber.getText().toString();\n\n //Check to make sure no boxes were left empty\n if(firstName.isEmpty() || lastName.isEmpty() || email.isEmpty() || phone.isEmpty()){\n Toast.makeText(this, \"You must fill all fields before continuing!\", Toast.LENGTH_LONG).show();\n return false;\n }\n //Check to see if phone number is valid\n else if(!(phone.length() >= 10)){\n Toast.makeText(this, \"Make sure to input a valid 10 digit phone number!\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n return true;\n }", "private boolean checkInputValidation(){\n if(facility_EDT_value.getText().toString().trim().isEmpty()){\n Toast.makeText(getContext(), \"Please enter search value!\", Toast.LENGTH_LONG).show();\n return false;\n }\n return true;\n }", "private static void exitAsInvalidInput() {\n\t\tSystem.out.println(\n\t\t\t\t\"You have entered invalid input. Exiting the system now.\");\n\t\tSystem.exit(0);\n\t}", "private boolean checkInputFields(){\r\n\t\tString allertMsg = \"Invalid input: \" + System.getProperty(\"line.separator\");\r\n\t\t\r\n\t\t//Check input for MCS text field\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_MCSTf.getText());\r\n\t\t\tif(testValue < 0 || testValue > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a number between 0 and 1 as a MCS score.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for relevance score weight and coherence score weight text fields\r\n\t\ttry{\r\n\t\t\tFloat relScoreW = Float.parseFloat(m_RelScoreTf.getText());\r\n\t\t\tFloat cohScoreW = Float.parseFloat(m_CohScoreTf.getText());\r\n\t\t\tif(relScoreW < 0 || relScoreW > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t\tif(cohScoreW < 0 || cohScoreW > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t\tif((relScoreW + cohScoreW) != 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a number between 0 and 1 as a weight for relevance and coherence score.\" + System.getProperty(\"line.separator\");\r\n\t\t\tallertMsg += \"Sum of the weights for relevance and coherence score must be 1.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for MCS text field\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_KeyTf.getText());\r\n\t\t\tif(testValue < 0)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number as multiplier for keyword concepts.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for category confidence weight\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_CatConfTf.getText());\r\n\t\t\tif(testValue < 0)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number as a weight for the weight of the category confidence of concepts.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for weight of repeated concepts\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_RepeatTf.getText());\r\n\t\t\tif(testValue < 0)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number as a weight for repeated concepts.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for number of output categories\r\n\t\ttry{\r\n\t\t\tInteger testValue = Integer.parseInt(m_MaxCatsTf.getText());\r\n\t\t\tif(testValue < 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number for the maximum number of output categories.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\ttry{\r\n\t\t\tInteger testValue = Integer.parseInt(m_MinCatsTf.getText());\r\n\t\t\tif(testValue < 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number for the minimum number of output categories.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_MinCatScoreTf.getText());\r\n\t\t\tif(testValue < 0.0f || testValue > 1.0f)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number between 0 and 1 as minimum category score.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\tif(allertMsg.length() > 18){\r\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\r\n\t\t\talert.setContentText(allertMsg);\r\n\t\t\talert.showAndWait();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private boolean validateUserInputs() {\n ArrayList<String> errors = new ArrayList();\n \n if (this.view.getContent().equals(\"\")) {\n errors.add(\"\\t - Enter a comment\");\n }\n \n if (errors.size() > 0) {\n String errorMsg = \"Unable to save new Asset.\\nDetails:\";\n for (String error : errors) {\n errorMsg += \"\\n\" + error;\n }\n JOptionPane.showMessageDialog(this.view, errorMsg, \"Unable to Save\", JOptionPane.INFORMATION_MESSAGE);\n return false;\n }\n return true;\n }", "private boolean isInputValid() {\r\n String errorMessage = \"\";\r\n\r\n if (idLabel.getText() == null || idLabel.getText().length() == 0) {\r\n errorMessage += \"No valid ID number!\\n\"; \r\n } else {\r\n // try to parse the postal code into an int.\r\n try {\r\n Integer.parseInt(idLabel.getText());\r\n } catch (NumberFormatException e) {\r\n errorMessage += \"No valid ID number (must be an integer)!\\n\"; \r\n }\r\n }\r\n \r\n if (firstNameField.getText() == null || firstNameField.getText().length() == 0) {\r\n errorMessage += \"No valid first name!\\n\"; \r\n }\r\n if (lastNameField.getText() == null || lastNameField.getText().length() == 0) {\r\n errorMessage += \"No valid last name!\\n\"; \r\n }\r\n if (industryField.getText() == null || industryField.getText().length() == 0) {\r\n errorMessage += \"No valid industry!\\n\"; \r\n }\r\n\r\n if (workTypeField.getText() == null || workTypeField.getText().length() == 0) {\r\n errorMessage += \"No valid work type!\\n\"; \r\n }\r\n\r\n if (addressField.getText() == null || addressField.getText().length() == 0) {\r\n errorMessage += \"No valid address!\\n\";\r\n }\r\n\r\n if (errorMessage.length() == 0) {\r\n return true;\r\n } else {\r\n // Show the error message.\r\n Alert alert = new Alert(AlertType.ERROR);\r\n alert.initOwner(dialogStage);\r\n alert.setTitle(\"Invalid Fields\");\r\n alert.setHeaderText(\"Please correct invalid fields\");\r\n alert.setContentText(errorMessage);\r\n\r\n alert.showAndWait();\r\n\r\n return false;\r\n }\r\n }", "public void validateInput(Information information) {\n information.validateFirstName();\n information.validateLastName();\n information.validateZipcode();\n information.validateEmployeeID();\n }", "@When(\"^user enters an invalid \\\"([^\\\"]*)\\\"$\")\n public void userEntersAnInvalid(String arg0, DataTable args) throws Throwable {\n }", "private boolean isInputValid() {\n String errorMessage = \"\";\n\n if (gemNameField.getText() == null || gemNameField.getText().length() == 0) {\n errorMessage += \"No valid gem name!\\n\";\n }\n if (gemValueField.getText() == null || gemValueField.getText().length() == 0) {\n errorMessage += \"No valid gem value!\\n\";\n } else {\n // try to parse the gem value into an int.\n try {\n Integer.parseInt(gemValueField.getText());\n } catch (NumberFormatException e) {\n errorMessage += \"No valid gem value (must be an integer)!\\n\";\n }\n }\n if (gemDescripField.getText() == null || gemDescripField.getText().length() == 0) {\n errorMessage += \"No valid gem description!\\n\";\n }\n\n if (errorMessage.length() == 0) {\n return true;\n } else {\n // Show the error message.\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.initOwner(dialogStage);\n alert.setTitle(\"Invalid Fields\");\n alert.setHeaderText(\"Please correct invalid fields\");\n alert.setContentText(errorMessage);\n\n alert.showAndWait();\n\n return false;\n }\n }", "private boolean checkUserInputValidity() {\n // Extract Student information from the edit text views\n String studentName = mStudentNameEditText.getText().toString().trim();\n String studentGradeString = mStudentGradeEditText.getText().toString();\n\n // Check for valid student name\n if (TextUtils.isEmpty(studentName)) {\n Toast.makeText(this, R.string.please_enter_valid_name, Toast.LENGTH_SHORT).show();\n mStudentNameEditText.requestFocus();\n return false;\n }\n\n // Check for valid student birthdate\n if (mStudentBirthdate == 0) {\n Toast.makeText(this, R.string.please_enter_valid_birthdate,\n Toast.LENGTH_SHORT).show();\n return false;\n }\n if (DateUtils.isChosenDateAfterToday(mStudentBirthdate)) {\n Toast.makeText(this, R.string.please_enter_valid_birthdate,\n Toast.LENGTH_SHORT).show();\n return false;\n }\n\n // Check for valid student grade\n if (TextUtils.isEmpty(studentGradeString)) {\n Toast.makeText(this, R.string.please_enter_valid_grade, Toast.LENGTH_SHORT).show();\n mStudentGradeEditText.requestFocus();\n return false;\n } else {\n int studentGrade = Integer.parseInt(studentGradeString);\n if (studentGrade <= 0) {\n Toast.makeText(this, R.string.please_enter_valid_grade, Toast.LENGTH_SHORT).show();\n mStudentGradeEditText.requestFocus();\n return false;\n }\n }\n\n return true;\n }", "public boolean checkInput(){\n if(spelerIDField.getText().equals(\"\") || typeField.getText().equals(\"\") || codeField.getText().equals(\"\") || heeftBetaaldField.getText().equals(\"\")){\n return true;\n } else { return false; }\n }", "private boolean validInput() throws SQLException {\n if (userNameField.getText().length() == 0) {\n displayMessage(messagePane, \"Name cannot be empty\", true);\n return false;\n }\n else if (userNameField.getText().length() == 1) {\n displayMessage(messagePane, \"Name cannot be empty\", true);\n return false;\n }\n else if (!isAllLetters(userNameField.getText())) {\n displayMessage(messagePane, \"Names must be all letters\", true);\n return false;\n }\n else if (!(userNameField.getText().contains(\" \")) || userNameField.getText().charAt(0) == ' ') {\n displayMessage(messagePane, \"Name must consist of two words\", true);\n return false;\n }\n else if (!(emailField.getText().contains(\"@\"))) {\n displayMessage(messagePane, \"Invalid email\", true);\n return false;\n }\n else if (DatabaseManager.isEmailTaken(user.getDatabaseConnection(), emailField.getText()) && !(emailField.getText().equals(user.getUser().getEmail()))){\n displayMessage(messagePane, \"Email is used before\", true);\n return false;\n }\n else {\n displayMessage(messagePane,\"Changes are saved\", false);\n return true;\n }\n }", "private boolean validEntry() {\n EditText locationName = (EditText) findViewById(R.id.nameInput);\n\n // Validate required null fields\n if (locationName.getText().toString().trim().equals(\"\"))\n {\n return false;\n }\n\n // Query database to determine if name already exists in database\n String placeName = locationName.getText().toString();\n if (!placeName.equals(currentPlace.name)) {\n try {\n PlacesDB db = new PlacesDB((Context) this);\n SQLiteDatabase pDB = db.openDB();\n Cursor cur = pDB.rawQuery(\"select name from places where name=? ;\", new String[]{placeName});\n if (cur.getCount() > 0) {\n return false;\n }\n } catch (Exception ex) {\n android.util.Log.w(this.getClass().getSimpleName(), \"Unable to load places from database.\");\n }\n }\n return true;\n }", "private void inputValidation(String[] args) {\r\n\t\t// Must have two argument inputs - grammar and sample input\r\n\t\tif (args.length != 2) {\r\n\t\t\tSystem.out.println(\"Invalid parameters. Try:\\njava Main <path/to/grammar> <path/to/input>\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}", "private boolean validateData() {\r\n TASKAggInfo agg = null;\r\n int index = aggList.getSelectedIndex();\r\n if (index != 0) {\r\n agg = (TASKAggInfo)aggregators.elementAt(aggList.getSelectedIndex()-1);\r\n }\r\n\r\n if (getArgument1() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Argument 1 must be of type: \"+TASKTypes.TypeName[agg.getArgType()], \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n else if (getArgument2() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Argument 2 must be of type: \"+TASKTypes.TypeName[agg.getArgType()], \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n else if (getOperand() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Filter value must be of type integer\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }", "private boolean isInputValid() {\n String errorMessage = \"\";\n\n if (commentField.getText() == null || commentField.getText().length() == 0) {\n errorMessage += \"Не введен комментарий!\\n\";\n }\n if (timeField.getText() == null || timeField.getText().length() == 0) {\n errorMessage += \"Не введено время выполнения задачи!\\n\";\n }\n if (errorMessage.length() == 0) {\n return true;\n } if (errorMessage.length() == 0) {\n return true;\n } else {\n // Show the error message.\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Не введены все данные!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Пожалуйста, введите все данные!\");\n alert.showAndWait();\n return false;\n }\n }", "protected abstract int isValidInput();", "private boolean badEntryFound() {\n boolean flag = false;\n \n if(positionComboBox.getSelectedIndex() <= 0)\n {\n positionLabel.setForeground(Color.red);\n positionComboBox.requestFocusInWindow();\n flag = true;\n }\n else\n {\n positionLabel.setForeground(Color.black);\n }\n \n if(firstTextField.getText().trim().isEmpty())\n {\n fNameLabel.setForeground(Color.red);\n firstTextField.requestFocusInWindow();\n flag = true;\n }\n else\n {\n fNameLabel.setForeground(Color.black);\n }\n \n if(lastTextField.getText().trim().isEmpty())\n {\n lNameLabel.setForeground(Color.red);\n lastTextField.requestFocusInWindow();\n flag = true;\n }\n else\n {\n lNameLabel.setForeground(Color.black);\n }\n \n if(codeTextField.getText().trim().isEmpty())\n {\n codeLabel.setForeground(Color.red);\n codeTextField.requestFocusInWindow();\n flag = true;\n }\n else\n {\n codeLabel.setForeground(Color.black);\n }\n \n \n return flag;\n }", "public boolean validation(){\n String Venuename= venuename.getText().toString();\n String Address= address.getText().toString();\n String Details= details.getText().toString();\n String Venueimage= venueimage.getText().toString();\n if(Venuename.isEmpty()){\n venuename.setError(\"Please enter the item name\");\n venuename.requestFocus();\n return false;\n }\n if(Address.isEmpty()){\n address.setError(\"Please enter the item name\");\n address.requestFocus();\n return false;\n }\n if(Details.isEmpty()){\n details.setError(\"Please enter the item name\");\n details.requestFocus();\n return false;\n }\n if(Venueimage.isEmpty()){\n venueimage.setError(\"Please Select the image first\");\n return false;\n }\n\n\n return true;\n }", "public boolean checkInput();", "private boolean isInputValid() {\r\n String errorMessage = \"\";\r\n\r\n if (nameField.getText() == null || nameField.getText().length() == 0) {\r\n errorMessage += \"请输入直播名!\\n\";\r\n }\r\n if (urlField.getText() == null || urlField.getText().length() == 0) {\r\n errorMessage += \"请输入直播流!\\n\";\r\n }\r\n\r\n if (errorMessage.length() == 0) {\r\n return true;\r\n } else {\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"输入错误\");\r\n alert.setContentText(errorMessage);\r\n return false;\r\n }\r\n }", "private boolean isInputValid() {\r\n String errorMessage = \"\";\r\n\r\n if (errorMessage.length() == 0) {\r\n return true;\r\n } else {\r\n// Show the error message.\r\n Dialogs.create()\r\n .title(\"Invalid Fields\")\r\n .masthead(\"Please correct invalid fields\")\r\n .message(errorMessage)\r\n .showError();\r\n return false;\r\n }\r\n }", "private boolean validateInput(){\n boolean result = false;\n\n if(!us.setUsername(userField.getText())){\n errorLabel.setText(\"Nombre de usuario invalido\");\n } else if(!us.setPassword(passField.getText())){ //Valido 1 por uno los campos que ingreso el usuario\n errorLabel.setText(\"Contraseña invalida\");\n } else if(!us.setName(nameField.getText())){\n errorLabel.setText(\"Nombre Invalido\");\n } else if(!us.setSurname(surnameField.getText())){\n errorLabel.setText(\"Apellido Invalido\");\n } else if(!us.setDni(dniField.getText())){\n errorLabel.setText(\"Dni invalido\");\n } else if(!ageField.getText().matches(\"\\\\d{2}\")){\n errorLabel.setText(\"Edad invalida\");\n }\n else{\n us.setAge(Integer.parseInt(ageField.getText()));\n result = true;\n }\n return result;\n }", "private boolean isInputValid() {\n String errorMessage = \"\";\n\n if (ServiceName.getText() == null || ServiceName.getText().length() == 0) {\n errorMessage += \"No valid name!\\n\";\n }\n if (Serviceemail.getText() == null || Serviceemail.getText().length() == 0) {\n Pattern p = Pattern.compile(\"[_A-Za-z0-9][A-Za-z0-9._]*?@[_A-Za-z0-9]+([.][_A-Za-z]+)+\");\n Matcher m = p.matcher(Serviceemail.getText());\n if (m.find() && m.group().equals(Serviceemail.getText())) {\n errorMessage += \"No valid Mail Forment!\\n\";\n }\n }\n if (servicedescrip.getText() == null || servicedescrip.getText().length() == 0) {\n errorMessage += \"No valid description !\\n\";\n }\n if (f == null && s.getImage() == null) {\n errorMessage += \"No valid photo ( please upload a photo !)\\n\";\n }\n if (Serviceprice.getText() == null || Serviceprice.getText().length() == 0) {\n errorMessage += \"No valid prix !\\n\";\n } else {\n // try to parse the postal code into an int.\n try {\n Float.parseFloat(Serviceprice.getText());\n } catch (NumberFormatException e) {\n errorMessage += \"No valid prix (must be a Float)!\\n\";\n }\n }\n if ( !Weekly.isSelected() && !Daily.isSelected() && !Monthly.isSelected()) {\n errorMessage += \"No valid Etat ( select an item !)\\n\";\n }\n if (Servicesatet.getSelectionModel().getSelectedIndex() == -1) {\n errorMessage += \"No valid etat ( select an item !)\\n\";\n }\n if (ServiceCity.getSelectionModel().getSelectedIndex() == -1) {\n errorMessage += \"No valid City ( select an item !)\\n\";\n }\n if (servicetype.getSelectionModel().getSelectedIndex() == -1) {\n errorMessage += \"No valid Type ( select an item !)\\n\";\n }\n if (errorMessage.length() == 0) {\n return true;\n } else {\n // Show the error message.\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Invalid Fields\");\n alert.setHeaderText(\"Please correct invalid fields\");\n alert.setContentText(errorMessage);\n alert.showAndWait();\n return false;\n }\n }", "private boolean validateInput() {\n boolean isValid = true;\n Alert errMsg = Util.getAlert(Alert.AlertType.ERROR);\n if (connectionsCB.getEditor().getText() == null || !Util.isValidAddress(connectionsCB.getEditor().getText())) {\n errMsg.setContentText(\"Invalid TRex Host Name or IP address\");\n isValid = false;\n } else if (!Util.isValidPort(rpcPort.getText())) {\n errMsg.setContentText(\"Invalid TRex Sync Port Number(\" + rpcPort.getText() + \")\");\n isValid = false;\n } else if (!Util.isValidPort(asyncPort.getText())) {\n errMsg.setContentText(\"Invalid Async Port Number(\" + asyncPort.getText() + \")\");\n isValid = false;\n } else if (Util.isNullOrEmpty(nameTF.getText())) {\n errMsg.setContentText(\"Name should not be empty\");\n isValid = false;\n }\n\n if (!isValid) {\n errMsg.show();\n }\n return isValid;\n }", "public boolean isInputValid()\n {\n String[] values = getFieldValues();\n if(values[0].length() > 0 || values[1].length() > 0 || values[2].length() > 0)\n return true;\n else\n return false;\n }", "public boolean validateInput(String title) {\n \t\n \tboolean valid = true;\n \tString error = \"\";\n \t\n \tif(title.equals(\"\")) {\n \t\terror += \"Invalid title\";\n \t\tvalid = false;\n \t}else if(currentTaskItems.size() == 0) {\n \t\terror += \"Please attach an item to your task\";\n \t\tvalid = false;\n \t}else if(!propertiesGrabbed) {\n \t\terror += \"Please enter the tasks properties\";\n \t\tvalid = false;\n \t}\n \t\n \t//if valid return else toast\n \tif(valid){\n \t\treturn true;\n \t}else{\n\n \t\tContext context = getApplicationContext();\n \t\tToast toast = Toast.makeText(context, error, Toast.LENGTH_SHORT);\n \t\ttoast.show();\n \t\treturn false;\n \t}\n }", "private boolean isInputValid() {\n String errorMessage = \"\";\n\n if (ID.getText() == null || ID.getText().length() == 0) {\n errorMessage += \"No valid id!\\n\";\n System.out.println(\"fl\");\n }\n if (password.getText() == null || password.getText().length() == 0) {\n errorMessage += \"No valid password!\\n\"; \n }\n if (errorMessage.length() == 0) {\n return true;\n } else {\n // Show the error message.\n Dialogs.create()\n .title(\"Invalid Fields\")\n .masthead(\"Please correct invalid fields\")\n .message(errorMessage)\n .showError();\n return false;\n }\n }", "protected void validate() {\n\t\tString quantity=editText.getText().toString().trim();\n\t\tif(quantity.length()==0){\n\t\t\tAlertUtils.showToast(mContext, \"Enter quantity\");\n\t\t\treturn;\n\t\t}else if(!isValidNumber(quantity)){\n\t\t\tAlertUtils.showToast(mContext, \"Enter valid quantity\");\n\t\t\treturn;\n\t\t}\n//\t\tif(((HomeActivity)mContext).checkInternet())\n//\t\t\tdialogCallback.setQuantity(item);\n\t}", "public void validateInputs(ActionEvent actionEvent) {\n //retrieve the inputs\n try {\n productNameInput = productNameField.getText();\n if (productNameInput.equals(\"\")) {\n throw new myExceptions(\"Product Name: Enter a string.\\n\");\n }\n }\n catch (myExceptions ex) {\n errorMessageContainer += ex.getMessage();\n isInputValid = false;\n }\n\n try {\n productPriceInput = Double.parseDouble(productPriceField.getText());\n if (productPriceField.getText().equals(\"\")) {\n throw new myExceptions(\"Price field: enter a value..\\n\");\n }\n if (productPriceInput <= 0) {\n throw new myExceptions(\"Price field: enter a value greater than 0.\\n\");\n }\n }\n catch (myExceptions priceValidation) {\n errorMessageContainer += priceValidation.getMessage();\n isInputValid = false;\n\n }\n catch (NumberFormatException ex) {\n errorMessageContainer += \"Price field: enter a positive number. Your input can contain decimals. \\n\";\n isInputValid = false;\n\n }\n\n try {\n maxInventoryLevelInput = Integer.parseInt(maxInventoryField.getText());\n minInventoryLevelInput = Integer.parseInt(minInventoryField.getText());\n if (maxInventoryField.getText().equals(\"\") || minInventoryField.getText().equals(\"\") || maxInventoryLevelInput <= 0 || minInventoryLevelInput <= 0) {\n throw new myExceptions(\"Min and Max fields: enter values for the minimum and maximum inventory fields.\\n\");\n }\n if (maxInventoryLevelInput < minInventoryLevelInput) {\n throw new myExceptions(\"Max inventory MUST be larger than the minimum inventory.\\n\");\n }\n\n }\n catch (NumberFormatException ex) {\n errorMessageContainer += \"Min and Max fields: enter a positive whole number.\\n\";\n isInputValid = false;\n\n }\n catch (myExceptions minMaxValidation) {\n errorMessageContainer += minMaxValidation.getMessage();\n isInputValid = false;\n\n }\n\n try {\n productInventoryLevel = Integer.parseInt(inventoryLevelField.getText());\n if (inventoryLevelField.getText().equals(\"\")) {\n throw new myExceptions(\"Inventory level: enter a number greater than 0.\\n\");\n }\n if (productInventoryLevel <= 0) {\n throw new myExceptions(\"Inventory level: enter a number greater than 0.\\n\");\n }\n if (productInventoryLevel > maxInventoryLevelInput || productInventoryLevel < minInventoryLevelInput) {\n throw new myExceptions(\"Inventory level: value must be between max and min.\\n\");\n }\n }\n catch (NumberFormatException ex) {\n errorMessageContainer += \"Inventory level: enter a positive whole number.\\n\";\n isInputValid = false;\n\n }\n catch (myExceptions stockValidation) {\n errorMessageContainer += stockValidation.getMessage();\n isInputValid = false;\n\n }\n\n errorMessageLabel.setText(errorMessageContainer);\n errorMessageContainer = \"\";\n\n }", "private static boolean validateInteger(Map.Entry<String, CheckState> entry) {\n String prop = System.getProperty(entry.getKey());\n if (entry.getValue().isOptional && prop == null) {\n return true;\n }\n try {\n Integer.parseInt(prop);\n } catch (NumberFormatException e) {\n return false;\n }\n return !\"\".equals(prop);\n }", "private boolean validateInput(){\n boolean operationOK = true;\n //perform input validation on the double values in the form\n String integrationTime = this.integrationTimeText.getText();\n String integrationFrequency = this.integrationFrequencyText.getText();\n \n if(!integrationTime.equals(\"\")){\n try {\n Double itime = Double.parseDouble(integrationTime);\n integrationTimeText.setBackground(Color.WHITE);\n integrationTimeText.setToolTipText(\"Time in seconds (s)\");\n } catch (NumberFormatException ex) {\n integrationTimeText.setBackground(Color.RED);\n operationOK=false;\n integrationTimeText.setToolTipText(\"This field has to be a valid double (eg. 1.5)\");\n }\n }\n if(!integrationFrequency.equals(\"\")){\n try {\n Double itime = Double.parseDouble(integrationFrequency);\n integrationFrequencyText.setBackground(Color.WHITE);\n integrationFrequencyText.setToolTipText(\"Frequency in Hertz (Hz)\");\n \n } catch (NumberFormatException ex) {\n operationOK=false;\n integrationFrequencyText.setBackground(Color.RED);\n integrationFrequencyText.setToolTipText(\"This field has to be a valid double (eg. 1.5)\");\n }\n }\n if(currentStepOperationsPanel!=null){\n operationOK = this.currentStepOperationsPanel.validateInput();\n \n }\n return operationOK;\n }", "private boolean validateInput() {\n String departmentInput = mDepartmentField.getText().toString();\n String emailInput = mEmailField.getText().toString();\n String passwordInput = mPasswordField.getText().toString();\n\n if (departmentInput.isEmpty()) {\n mDepartmentField.setError(\"Please enter your department number\");\n mDepartmentField.requestFocus();\n return false;\n } else {\n mPasswordField.setError(null);\n }\n\n\n if (emailInput.isEmpty() || !Patterns.EMAIL_ADDRESS.matcher(emailInput).matches()) {\n mEmailField.setError(\"Please enter a valid email address\");\n mEmailField.requestFocus();\n return false;\n } else {\n mEmailField.setError(null);\n }\n\n if (passwordInput.isEmpty()) {\n mPasswordField.setError(\"Please enter your password\");\n mPasswordField.requestFocus();\n return false;\n } else {\n mPasswordField.setError(null);\n }\n\n return true;\n }", "boolean validateInput() {\n if (etFullname.getText().toString().equals(\"\")) {\n etFullname.setError(\"Please Enter Full Name\");\n return false;\n }\n if (etId.getText().toString().equals(\"\")) {\n etId.setError(\"Please Enter ID\");\n return false;\n }\n if (etEmail.getText().toString().equals(\"\")) {\n etEmail.setError(\"Please Enter Email\");\n return false;\n }\n if (etHall.getText().toString().equals(\"\")) {\n etHall.setError(\"Please Enter Hall Name\");\n return false;\n }\n if (etAge.getText().toString().equals(\"\")) {\n etAge.setError(\"Please Enter Age\");\n return false;\n }\n if (etPhone.getText().toString().equals(\"\")) {\n etPhone.setError(\"Please Enter Contact Number\");\n return false;\n }\n if (etPassword.getText().toString().equals(\"\")) {\n etPassword.setError(\"Please Enter Password\");\n return false;\n }\n\n // checking the proper email format\n if (!isEmailValid(etEmail.getText().toString())) {\n etEmail.setError(\"Please Enter Valid Email\");\n return false;\n }\n\n // checking minimum password Length\n if (etPassword.getText().length() < MIN_PASSWORD_LENGTH) {\n etPassword.setError(\"Password Length must be more than \" + MIN_PASSWORD_LENGTH + \"characters\");\n return false;\n }\n\n\n return true;\n }", "private boolean validateInputs() {\n if (Constants.NULL.equals(review)) {\n reviewET.setError(\"Must type a review!\");\n reviewET.requestFocus();\n return false;\n }\n if (Constants.NULL.equals(heading)) {\n headingET.setError(\"Heading cannot be empty\");\n headingET.requestFocus();\n return false;\n }\n return true;\n }", "@Override\n\t@FXML\n\tpublic boolean validate() {\n\t\t\n\t\tboolean isDataEntered = true;\n\t\tLocalDate startDate = Database.getInstance().getStartingDate();\n\t\tSystem.out.println();\n\t\tif(amountField.getText() == null || amountField.getText().trim().isEmpty())\n\t\t\tisDataEntered = setErrorTxt(\"You left the amount field empty.\");\n\t\telse if(!(Validation.validateAmount(amountField.getText())))\n\t\t\tisDataEntered = setErrorTxt(\"Please enter a valid amount\");\n\t\telse if(creditTextField.getText() == null || creditTextField.getText().trim().isEmpty())\n\t\t\tisDataEntered = setErrorTxt(\"You left the credit text field empty.\");\n\t\telse if(!(Validation.validateChars(creditTextField.getText())))\n\t\t\tisDataEntered = setErrorTxt(\"Please only enter valid characters\");\n\t\telse if(dateField.getValue() == null) {\n\t\t\tisDataEntered = setErrorTxt(\"You left the date field empty.\");\t\t\t\n\t\t}\n\t\telse if(dateField.getValue().isBefore(startDate))\n\t\t\tisDataEntered = setErrorTxt(\"Sorry, the date you entered is before the starting date.\");\n\t\treturn isDataEntered;\n\t}", "private static boolean validateString(Map.Entry<String, CheckState> entry) {\n String prop = System.getProperty(entry.getKey());\n if (entry.getValue().isOptional && prop == null) {\n return true;\n }\n return prop != null && !\"\".equals(prop);\n }", "private static boolean isBadInput(String s) {\n\t\tString[] split = s.split(\"\\\\s+\");\n\t\tif (split.length != 3) {\n\t\t\tSystem.err.printf(\"Unknow length: %d\\n\", split.length);\n\t\t\treturn true;\n\t\t}\n\t\ttry {\n\t\t\tInteger.parseInt(split[0]);\n\t\t\tInteger.parseInt(split[2]);\n\t\t} catch (NumberFormatException e) {\n\t\t\tSystem.err.printf(\"Input numbers only.\\n\");\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (split[1].length() != 1) {\n\t\t\tSystem.err.printf(\"Operator should be one character.\\n\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private void validateData() {\n }", "private boolean validateInputs() {\n return !proID.getText().isEmpty() || \n !proName.getText().isEmpty() ||\n !proPrice.getText().isEmpty();\n }", "public Boolean validEntries() {\n String orderNumber = orderNo.getText();\n String planTime = plannedTime.getText();\n String realTime = actualTime.getText();\n String worker = workerSelected();\n String productType = productTypeSelected();\n Boolean validData = false;\n if (orderNumber.equals(\"\")) {\n warning.setText(emptyOrderNum);\n } else if (!Validation.isValidOrderNumber(orderNumber)) {\n warning.setText(invalidOrderNum);\n } else if (worker.equals(\"\")) {\n warning.setText(workerNotSelected);\n } else if (productType.equals(\"\")) {\n warning.setText(productTypeNotSelected);\n } else if (planTime.equals(\"\")) {\n warning.setText(emptyPlannedTime);\n } else if (!Validation.isValidPlannedTime(planTime)) {\n warning.setText(invalidPlannedTime);\n } else if (!actualTime.getText().isEmpty() && !Validation.isValidActualTime(realTime)) {\n warning.setText(invalidActualTime);\n } else if (comboStatus.getSelectionModel().isEmpty()) {\n warning.setText(emptyStatus);\n } else validData = true;\n return validData;\n }", "private boolean isInputValid(){\n\t\tString errorMessage = \"\";\n\t\tif((nameField.getText() == null) || (nameField.getText().length() == 0)){\n\t\t\terrorMessage += \"No valid product name!\\n\";\n\t\t}\n\t\tif((amountAvailableField.getText() == null) || (amountAvailableField.getText().length() == 0)){\n\t\t\terrorMessage += \"No valid amount available value!\\n\";\n\t\t}\n\t\tif((amountSoldField.getText() == null) || (amountSoldField.getText().length() == 0)){\n\t\t\terrorMessage += \"No valid amount sold value!\\n\";\n\t\t}\n\t\tif((priceEachField.getText() == null) || (priceEachField.getText().length() == 0)){\n\t\t\terrorMessage += \"No valid price for each!\\n\";\n\t\t}\n\t\tif((priceMakeField.getText() == null) || (priceMakeField.getText().length() == 0)){\n\t\t\terrorMessage += \"No valid price to make the product!\\n\";\n\t\t}\n\t\tif(errorMessage.length() == 0){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "@When(\"^user enters valid \\\"([^\\\"]*)\\\"$\")\n public void userEntersValid(String arg0) throws Throwable {\n }", "private boolean validate() {\n if (category.equals(\"n/a\")) {\n AppUtils.displayToast(mContext, \"Please select category!!!\");\n return false;\n } else if (category.equals(AppUtils.CREATE_CATEGORY) && mCustomCategory.getText().toString().length() == 0) {\n AppUtils.displayToast(mContext, \"Please enter custom category name!!!\");\n return false;\n } else if (mTaskTile.getText().toString().length() == 0) {\n AppUtils.displayToast(mContext, \"Please enter task Title!!!\");\n return false;\n } else if (dueDate == 0) {\n AppUtils.displayToast(mContext, \"Please enter due date!!\");\n return false;\n } else if (mTaskContent.getText().toString().length() == 0) {\n AppUtils.displayToast(mContext, \"Please enter task content!!!\");\n return false;\n } else\n return true;\n\n\n }", "public String checkFormat() {\r\n\t\t\r\n\t\tString msg = null;\r\n\t\t\r\n\t\ttry {\t\t\t\t\t\t\t\t\t\t\t//input is not a number\r\n\t\t\t\r\n\t\t\tDouble.parseDouble(price.getText());\r\n\t\t\tInteger.parseInt(quantity.getText());\r\n\t\t\t \r\n\t\t}\r\n\t\t\r\n\t\tcatch(Exception e) {\r\n\t\t\t\r\n\t\t\treturn msg = \"Data format is invalid\";\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(name.getText().isEmpty() \t\t\t\t\t//wine name is empty\r\n\t\t\t\t|| name.getText().length() > 30\t\t\t//wine name is more than 30 letters\r\n\t\t\t\t\t|| quantity.getText().isEmpty()\t\t//quantity is empty\r\n\t\t\t\t\t\t||price.getText().isEmpty()\t\t//price is empty\r\n\t\t\t\t\t\t\t||((!(price.getText().length() - price.getText().indexOf('.') == 3))\t//price is not two decimal spaces \r\n\t\t\t\t\t\t\t\t\t&& price.getText().indexOf('.') != -1))\r\n\t\t{\r\n\t\t\t\r\n\t\t\tmsg = \"Data format is invalid\";\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tmsg = null;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn msg;\r\n\t\t\r\n\t}", "private boolean validate() {\n if (activityAddTodoBinding.etTitle.getText().toString().trim().isEmpty())\n {\n activityAddTodoBinding.etTitle.setError(getString(R.string.enter_title));\n return false;\n }\n else if (activityAddTodoBinding.etDesc.getText().toString().trim().isEmpty())\n {\n activityAddTodoBinding.etDesc.setError(getString(R.string.enter_desc));\n return false;\n }\n return true;\n }", "private long validateInput() {\n\t\tdouble[] inputs = getUserInputFromUIControls();\n\t\tif (inputs == null) {\n\t\t\treturn 9;\n\t\t}\n\t\tif (inputs[8] != 0.0) {\n\t\t\treturn (long) inputs[8];\n\t\t}\n\t\tif (inputs[0] > 90.0 || inputs[0] < -90.0) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (inputs[1] > 180.0 || inputs[1] < -180.0) {\n\t\t\treturn 2;\n\t\t}\n\t\t// Year can be any number that can be fit within an integer.\n\t\tif (inputs[2] > Integer.MAX_VALUE || inputs[2] < Integer.MIN_VALUE) {\n\t\t\treturn 3;\n\t\t}\n\t\tif (inputs[3] > 12.0 || inputs[3] < 1.0) {\n\t\t\treturn 4;\n\t\t}\n\t\tif (inputs[4] > 31.0 || inputs[4] < 1.0) {\n\t\t\treturn 5;\n\t\t}\n\t\tif (inputs[5] > 23.0 || inputs[5] < 0.0) {\n\t\t\treturn 6;\n\t\t}\n\t\tif (inputs[6] > 59.0 || inputs[6] < 0.0) {\n\t\t\treturn 7;\n\t\t}\n\t\tif (inputs[7] > 59.0 || inputs[7] < 0.0) {\n\t\t\treturn 8;\n\t\t}\n\t\treturn 0;\n\t}", "public boolean validateForm() {\r\n\t\tint validNum;\r\n\t\tdouble validDouble;\r\n\t\tString lengthVal = lengthInput.getText();\r\n\t\tString widthVal = widthInput.getText();\r\n\t\tString minDurationVal = minDurationInput.getText();\r\n\t\tString maxDurationVal = maxDurationInput.getText();\r\n\t\tString evPercentVal = evPercentInput.getText();\r\n\t\tString disabilityPercentVal = disabilityPercentInput.getText();\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.1 - Ensure all inputs are numbers\r\n\t\t */\r\n\t\t\r\n\t\t// Try to parse length as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(lengthVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Length must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(widthVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Width must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(minDurationVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Min Duration must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(maxDurationVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Max Duration must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidDouble = Double.parseDouble(evPercentVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"EV % must be a number\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidDouble = Double.parseDouble(disabilityPercentVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Disability % must be a number\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.2 - Ensure all needed inputs are non-zero\r\n\t\t */\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(lengthVal);\r\n\t\tif (validNum <= 0) {\r\n\t\t\tsetErrorMessage(\"Length must be greater than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(widthVal);\r\n\t\tif (validNum <= 0) {\r\n\t\t\tsetErrorMessage(\"Width must be greater than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(minDurationVal);\r\n\t\tif (validNum < 10) {\r\n\t\t\tsetErrorMessage(\"Min Duration must be at least 10\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(maxDurationVal);\r\n\t\tif (validNum < 10) {\r\n\t\t\tsetErrorMessage(\"Max Duration must be at least 10\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidDouble = Double.parseDouble(evPercentVal);\r\n\t\tif (validDouble < 0) {\r\n\t\t\tsetErrorMessage(\"EV % can't be less than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidDouble = Double.parseDouble(disabilityPercentVal);\r\n\t\tif (validDouble < 0) {\r\n\t\t\tsetErrorMessage(\"Disability % can't be less than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.3 - Ensure Max Duration can't be smaller than Min Duration\r\n\t\t */\r\n\t\t\r\n\t\tif (Integer.parseInt(minDurationVal) > Integer.parseInt(maxDurationVal)) {\r\n\t\t\tsetErrorMessage(\"Max Duration can't be less than Min Duration\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.4 - Ensure values aren't too large for the system to handle\r\n\t\t */\r\n\t\t\r\n\t\tif (Integer.parseInt(lengthVal) > 15) {\r\n\t\t\tsetErrorMessage(\"Carpark length can't be greater than 15 spaces\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (Integer.parseInt(widthVal) > 25) {\r\n\t\t\tsetErrorMessage(\"Carpark width can't be greater than 25 spaces\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (Integer.parseInt(minDurationVal) > 150) {\r\n\t\t\tsetErrorMessage(\"Min Duration can't be greater than 150\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Integer.parseInt(maxDurationVal) > 300) {\r\n\t\t\tsetErrorMessage(\"Max Duration can't be greater than 300\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.parseDouble(evPercentVal) > 100) {\r\n\t\t\tsetErrorMessage(\"EV % can't be greater than 100\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.parseDouble(disabilityPercentVal) > 100) {\r\n\t\t\tsetErrorMessage(\"Disability % can't be greater than 100\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Integer.parseInt(minDurationVal) > 150) {\r\n\t\t\tsetErrorMessage(\"Min Duration can't be greater than 150\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "private boolean validCreateInput() throws SQLException {\n // Checks if any of the fields is empty\n if(teamNameCreateField.getText().equals(\"\") || abbrevationCreateField.getText().equals(\"\")\n || chooseCityBoxCreate.getValue() == null || chooseLeagueBoxCreate.getValue() == null\n || chooseAgeGroupCreate.getValue() == null || chooseLeagueTeamBoxCreate.getValue() == null){\n displayMessage(messagePane,\"Please fill all the fields\",true);\n return false;\n }\n // Checks the abbrevation length\n else if(abbrevationCreateField.getText().length() > 3)\n {\n displayMessage(messagePane,\"Abbrevations must be at most 3 characters\",true);\n return false;\n }\n // Checks team name length\n else if (teamNameCreateField.getText().length() > 30){\n displayMessage(messagePane,\"Team Names must be smaller than 30 characters\",true);\n return false;\n }\n return true;\n }", "private boolean validateInputs() {\n if (KEY_EMPTY.equals(tenchuxe)) {\n etTenChuXe.setError(\"Vui lòng điền Tên chủ xe\");\n etTenChuXe.requestFocus();\n return false;\n\n }\n if (KEY_EMPTY.equals(sdt)) {\n etSDT.setError(\"Vui lòng điền Số điện thoại\");\n etSDT.requestFocus();\n return false;\n\n }\n if (KEY_EMPTY.equals(mota)) {\n edMoTa.setError(\"Vui lòng điền Mô tả xe\");\n edMoTa.requestFocus();\n return false;\n\n }\n if (KEY_EMPTY.equals(biensoxe)) {\n etBienSoXe.setError(\"Vui lòng điền Biển số xe\");\n etBienSoXe.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(passwordtx)) {\n etPasswordtx.setError(\"Vui lòng điền Mật khẩu\");\n etPasswordtx.requestFocus();\n return false;\n }\n\n if (KEY_EMPTY.equals(confirmPassword)) {\n etConfirmPassword.setError(\"Vui lòng điền Xác nhận mật khẩu\");\n etConfirmPassword.requestFocus();\n return false;\n }\n if (!passwordtx.equals(confirmPassword)) {\n etConfirmPassword.setError(\"Xác nhận mật khẩu sai !\");\n etConfirmPassword.requestFocus();\n return false;\n }\n\n return true;\n }", "public static String invalidInput() {\n return \"Invalid input!\";\n }", "private boolean isInputOkay() {\n // checks the text fields\n if (mBinding.date.getText() == null || mBinding.date.getText().toString().equals(\"\")) {\n snackBar(\"Please select the date.\");\n return false;\n }\n\n if (mBinding.time.getText() == null || mBinding.time.getText().toString().equals(\"\")) {\n snackBar(\"Please select the time.\");\n return false;\n }\n\n if (mBinding.stress.getText() == null || mBinding.stress.getText().toString().equals(\"\")) {\n snackBar(\"Please select the stress level.\");\n return false;\n }\n\n if (mBinding.tired.getText() == null || mBinding.tired.getText().toString().equals(\"\")) {\n snackBar(\"Please select the tiredness level.\");\n return false;\n }\n\n if (mBinding.mv0.getText() == null || mBinding.mv0.getText().toString().equals(\"\")) {\n snackBar(\"Please select at least the start glucose value.\");\n return false;\n }\n\n return true;\n }", "private boolean validFormInputs() {\n String email = etEmail.getText().toString();\n String password = etPassword.getText().toString();\n String institutionName = etInstitutionName.getText().toString();\n String addressFirst = etInstitutionAddressFirst.getText().toString();\n String addressSecond = etInstitutionAddressSecond.getText().toString();\n String CIF = etCIF.getText().toString();\n\n String[] allInputs = {email, password, institutionName, addressFirst, addressSecond, CIF};\n for (String currentInput : allInputs) {\n if (currentInput.matches(\"/s+\")) // Regex pt cazul cand stringul e gol sau contine doar spatii\n return false; // formular invalid - toate inputurile trebuie sa fie completate\n }\n String[] stringsAddressFirst = addressFirst.split(\",\");\n String[] stringsAddressSecond = addressSecond.split(\",\");\n if (stringsAddressFirst.length != 4 ||\n stringsAddressSecond.length != 3)\n return false;\n\n //<editor-fold desc=\"Checking if NUMBER and APARTMENT are numbers\">\n try {\n Integer.parseInt(stringsAddressSecond[0]);\n Integer.parseInt(stringsAddressSecond[2]);\n return true; // parsed successfully without throwing any parsing exception from string to int\n }catch (Exception e) {\n Log.v(LOG_TAG, \"Error on converting input to number : \" + e);\n return false; // parsed unsuccessfully - given strings can not be converted to int\n }\n //</editor-fold>\n }", "private static void checkValidity(boolean valid) throws InvalidExpression\r\n {\r\n if(!valid)\r\n {\r\n throw new InvalidExpression(\"The expression entered is not valid\");\r\n }\r\n }", "@Override\n protected boolean validater(String[] line) {\n if (line.length != 9) {\n errorCounter(0);\n return false;\n }\n\n changeNulls(line);\n\n if (!isAirlineValid(line[airline])) {\n errorCounter(1);\n return false;\n }\n\n if (!isAirlineIDValid(line[airlineID])) {\n errorCounter(2);\n return false;\n }\n\n if (!isAirportValid(line[sourceAirport])) {\n errorCounter(3);\n return false;\n }\n\n if (!isAirportIDValid(line[sourceAirportID])) {\n errorCounter(4);\n return false;\n }\n\n if (!isAirportValid(line[destinationAirport])) {\n errorCounter(5);\n return false;\n }\n\n if (!isAirportIDValid(line[destinationAirportID])) {\n errorCounter(6);\n return false;\n }\n\n if (!isCodeshareValid(line[codeshare])) {\n errorCounter(7);\n return false;\n }\n\n if (!isStopsValid(line[stops])) {\n errorCounter(8);\n return false;\n }\n\n if (!isEquipmentValid(line[equipment])) {\n errorCounter(9);\n return false;\n }\n\n return true;\n }", "public final void invalidInput() {\n\t\tout.println(\"Command not recognized. Please try again.\");\n\t}", "private boolean validInput()\n {\n boolean completeForm = true; //all textfields have been filled in\n boolean noExceptions = true; //all textfields (except name) have int\n boolean selectionMade = true; //user has selected a ship type\n\n if (shipNameInput.getText()==\"Ship name\" ||\n xcoordInput.getText()==\"Starting x coordinate\" ||\n ycoordInput.getText()==\"Starting y coordinate\")\n {\n System.out.println(\"ERROR: Please fill in all text fields before \"+\n \"adding your ship.\");\n completeForm = false;\n }\n try\n {\n xcoord = Integer.parseInt(xcoordInput.getText());\n ycoord = Integer.parseInt(ycoordInput.getText());\n }\n catch (NumberFormatException except)\n {\n System.out.println(\"ERROR: Ship coordinates and speed need to be \"+\n \"entered as integers.\");\n noExceptions = false;\n }\n if (directionInput.getResponse() == \"none\")\n {\n System.out.println(\"ERROR: Please choose a direction.\");\n selectionMade = false;\n }\n else\n {\n String d = directionInput.getResponse();\n if (d == \"N\") direction = 0;\n else if (d == \"NE\") direction = Ship.NE;\n else if (d == \"E\") direction = Ship.E;\n else if (d == \"SE\") direction = Ship.SE;\n else if (d == \"S\") direction = Ship.S;\n else if (d == \"SW\") direction = Ship.SW;\n else if (d == \"W\") direction = Ship.W;\n else if (d == \"NW\") direction = Ship.NW;\n }\n shipName = shipNameInput.getText();\n speed = speedSlider.getValue();\n\n return (completeForm && noExceptions && selectionMade);\n }", "private boolean isValidEntry(String answer) {\n\t\tAnswer[] ans = Answer.values();\n\t\tfor (Answer a : ans) {\n\t\t\tif (answer == a.toString())\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void validate(){\r\n\t\ttry{\r\n\t\t\t//First name, last name, date of birth and email are compulsory.\r\n\t\tif(FirstName==null||LastName==null||Dob==null||Email==null) \r\n\t\t\tthrow new Exception(\"One of the field is Empty :\\n(First name / last name / dob / email )\");\r\n\t\tif(TelephoneNumber!=0||MobileNumber!=0)\r\n\t\t\tthrow new Exception(\"Enter Contact Number\");\r\n\t\t\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t\t/*finally{\r\n\t\t\tSystem.out.println(\"Program Executed\");\r\n\t\t}*/\r\n\t}", "private boolean checkFields() {\n if (editTxtName.getText().equals(\"\")) return false;//name\n if (editTxtDesc.getText().equals(\"\")) return false;//desc\n if (editClrColor.getValue() == null) return false;//color\n if (oldEnvironment == null) return false;//environment is null\n return true;//everything is valid\n }", "private void validateData(String input) {\n String[] inputStringArray = input.split(\" \");\n\n for (String s : inputStringArray) {\n try {\n Integer.parseInt(s);\n } catch (NumberFormatException e) {\n throw new NumberFormatException(\n \"Looks like your input - \" + s + \", is not a number. Try again\");\n }\n }\n }", "public boolean checkValidity() {\n String sep = DECIMAL_FORMAT.getDecimalFormatSymbols().getDecimalSeparator() + \"\";\n String name = nameField.getText().trim();\n String priceText = valueField.getText().trim();\n if (name.equals(\"\") || priceText.equals(\"\")) {\n Utils.showWarningMessage(getRootPane(), \"The fields can not be empty!\");\n return false;\n }\n String price = priceText.replace(sep, \"\");\n if (!price.matches(\"^[0-9]+$\")) {\n Utils.showWarningMessage(getRootPane(), \"Please enter a valid price!\");\n return false;\n }\n int priceInt = Integer.parseInt(price);\n if (priceInt == 0) {\n Utils.showWarningMessage(getRootPane(), \"The price can not be 0.\");\n return false;\n }\n return true;\n }", "private void InputTextValidator () {\n isNotNull = !txtCategoryNo.getText().equals(\"\") && !txtCategoryName.getText().equals(\"\");\n }", "private static String validateMainMenuChoice(String choice)\r\n {\t\t\r\n boolean isValid = false;\r\n\r\n //loops until user enters A C or E\r\n while (isValid == false)\r\n {\t\t\r\n if (choice.equals(\"A\") || choice.contentEquals(\"C\") || choice.contentEquals(\"E\"))\r\n {\r\n isValid = true;\r\n }else\r\n {\r\n System.out.println(\"\\n!!!!!!!!!!!!!!\\nYOUR CHOICE WAS NOT VALID.\"\r\n + \"\\n\\tPlease enter 'A', 'C', or 'E'\");\t\t\t\r\n\r\n choice = scanner.nextLine();\r\n }\r\n }\t\t\t\r\n return choice;\r\n }", "public void checkInputEmployee(TextField nameTF, TextField cprNo, TextField phoneNo, KeyEvent event) {\n if (event.getSource() == nameTF) {\n checkIfRedName(nameTF, event);\n } else if (event.getSource() == phoneNo) {\n redFieldNumber(phoneNo, event);\n } else if (event.getSource() == cprNo) {\n redFieldCPRNoAndZip(cprNo, event);\n }\n }", "private static String[] checkInput(String input) throws Exception{\n String[] in = input.trim().split(\" \");\n\n if(in.length == 0){\n throw new CommandException(ExceptionEnum.INCORRECT_COMMAND_EXCEPTION);\n }\n\n if(CommandEnum.getCommandEnumFrom(in[0]) == null){\n throw new CommandException(ExceptionEnum.INCORRECT_COMMAND_EXCEPTION);\n }\n\n if(isSpecificCommandENum(in[0],BYE)){\n return in;\n }\n if(isSpecificCommandENum(in[0],TERMINATE)){\n return in;\n }\n\n if(in.length < MIN_PARAM){\n throw new CommandException(ExceptionEnum.LESS_INPUT_EXCEPTION);\n }\n\n if(in.length > MAX_PARAM){\n throw new CommandException(ExceptionEnum.EXTRA_INPUT_EXCEPTION);\n }\n\n //check input value\n for(int i = 1; i < in.length; i++){\n try{\n Integer.parseInt(in[i]);\n }catch(NumberFormatException e){\n throw new CommandException(ExceptionEnum.INVALID_INPUT_EXCEPTION);\n }\n }\n\n return in;\n }", "public void validateInput(String fName, String lName, String zipCode, String employID){\n boolean firstname = firstNameTwoCharactersLong(fName);\n //boolean firstFilled = firstNameFilled\n boolean firstFilled = firstNameFilled(fName);\n //boolean lastname = lastNameTwoCharactersLong\n boolean lastname = lastNameTwoCharactersLong(lName);\n //boolean lastFilled = lastNameFilled\n boolean lastFilled = lastNameFilled(lName);\n //boolean the rest\n boolean employeeID = employeeIDValid(employID);\n boolean zCode = zipCodeValid(zipCode);\n\n //if all of them are valid=true then error prints \"there are no errors found\n if (firstname && firstFilled && lastname && lastFilled && employeeID && zCode){\n errorMessage = \"There were no errors found\";\n }\n //Display error message\n System.out.println(errorMessage);\n\n }", "public void textFieldValidator(KeyEvent event) {\n TextFieldLimited source =(TextFieldLimited) event.getSource();\n if (source.equals(partId)) {\n isIntegerValid(event);\n } else if (source.equals(maximumInventory)) {\n isIntegerValid(event);\n } else if (source.equals(partName)) {\n isCSVTextValid(event);\n } else if (source.equals(inventoryCount)) {\n isIntegerValid(event);\n } else if (source.equals(minimumInventory)) {\n isIntegerValid(event);\n } else if (source.equals(variableTextField)) {\n if (inHouse.isSelected()) {\n isIntegerValid(event);;\n } else {\n isCSVTextValid(event);\n }\n } else if (source.equals(partPrice)) {\n isDoubleValid(event);\n } else return;\n }", "private static double checkInput(String input) {\n\t\tdouble parsedValue = 0;\n\t\ttry {\n\t\t\tparsedValue = Double.parseDouble(input);\n\t\t} catch (NumberFormatException parseFailed) {\n\t\t\tSystem.out.println(\"'\" + input + \"' se ne može protumačiti kao broj.\");\n\t\t\treturn ERROR;\n\t\t}\n\n\t\tif (parsedValue > 0) {\n\t\t\treturn parsedValue;\n\t\t} else if (parsedValue < 0) {\n\t\t\tSystem.out.println(\"Unijeli ste negativnu vrijednost.\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Ne postoji pravokutnik sa stranicom duljine nula.\");\n\t\t}\n\t\treturn ERROR;\n\t}", "@Test(priority=6)\n\tpublic void validatePleaseEnterTheValueErrorMsg2()\n\t{\n\t\tc.enterNiftyPriceField.sendKeys(\"gvd&$vdh\");\n\t\tc.addButton.click();\n\t\tAssert.assertTrue(c.msg.getText().equalsIgnoreCase(\"Please Enter A Value.\"));\n\t}", "private int errorCheckingInt(String display) {\n\n\t\tint tempChoice;\n\t\tScanner input = new Scanner(System.in);\n\n\t\twhile (true) {\n\t\t\tSystem.out.print(\"\\n\" + display);\n\t\t\ttry {\n\t\t\t\ttempChoice = input.nextInt();\n\t\t\t\tif(display.equals(\"Enter number of kids: \")) { //only for kids\n\t\t\t\t\tif(tempChoice < 0)\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Error input\\n\");\n\t\t\t\t}\n\t\t\t\telse if (tempChoice < 1)\n\t\t\t\t\tthrow new IllegalArgumentException(\"Error input\\n\");\n\t\t\t\tbreak;\n\t\t\t} catch (InputMismatchException e) {\n\t\t\t\tSystem.out.println(\"Error input \\n\");\n\t\t\t\tinput.next();\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\t\t}\n\n\t\tinput.nextLine();\n\n\t\treturn tempChoice;\n\t}", "private void validate() {\n\t\t// just in case;\n\t\tfor (int i=0;i<NR_OF_FIELDS; i++) {\n\t\t\tvalid[i] = \"0\";\n\t\t}\n\t\t//\n\t\t// Validate name and surname:\n\t\t//\n\t\tif ( ! this.isUpperAlpha(nume)) {\n\t\t\tfields[0] = \"1\";\n\t\t}\n\t\t\n\t\tif ( ! this.isUpperAlphaWithSpace(nume)) {\n\t\t\tfields[1] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate seria\n\t\t//\n\t\tvalid[2] = \"1\";\t\t\t\t\t\t\t// presupun ca seria este invalida, si incerc sa o validez\n\t\tfor (int i=0; i<seriiBuletin.length; i++) {\n\t\t\tif (seriiBuletin[i].equals(seria)) {\n\t\t\t\tvalid[2] = \"0\";\n\t\t\t}\n\t\t}\n\t\t//\n\t\t// validate numarul\n\t\t//\n\t\ttry {\n\t\t\tvalid[3] = \"1\";\n\t\t\tint nr = Integer.valueOf(numarul);\n\t\t\tif ( nr >= 100000 && nr <= 999999 ) {\n\t\t\t\tvalid[3] = \"0\";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLog.d(TAG, \"Error validating seria.\");\n\t\t}\n\n\t\t//\n\t\t// validate sex\n\t\t//\n\t\tif ( ! (sex == 'M' || sex == 'F')) {\n\t\t\tvalid[6] = \"1\";\n\t\t}\n\t\t//\n\t\t// Validate valabilitate\n\t\t//\n\t\tif ( ! isNumber(this.valabilitate)) {\n\t\t\tvalid[7] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate CNP\n\t\t//\n\t\tif ( ! (isNumber(CNP) && isValidCNP(CNP))) {\n\t\t\tvalid[8] = \"1\";\n\t\t}\n\t\t\n\t}", "private void validateInput(Label info, Label updateLabel, TextField field, String carValue, double min, double max) {\r\n\t\tif (! isValidDouble(field.getText())) {\r\n\t\t\tvalidateAndUpdate(field, false, updateLabel, \"Invalid number\");\r\n\t\t}\r\n\t\telse if (! isInsideBounderies(Double.valueOf(field.getText()), min, max)) {\r\n\t\t\tvalidateAndUpdate(field, false, updateLabel, min + \" <= value <= \" + max);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdouble valueR = formatDoubleWithTwoDeci(Double.valueOf(field.getText()));\r\n\t\t\tcarData.updateValue(carValue, valueR);\r\n\t\t\t\r\n\t\t\tvalidateAndUpdate(field, true, updateLabel, \"Successfully updated\");\r\n\t\t\tswitch (carValue) {\r\n\t\t\tcase DOOR_LENGTH: case REAR_DOOR_LENGTH: case BLIND_ZONE_VALUE: case FRONT_PARK_DISTANCE: info.setText(valueR + \"m\"); break;\r\n\t\t\tcase TOP_SPEED: info.setText(valueR + \"km/h\"); break;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean validateInput(double input){\n\t\tif(input >= -1 && input <= 1)\n\t\t return true;\n\t\treturn false;\t\n\t}", "public static void notValidNumberErr(){\n printLine();\n System.out.println(\" Oops! Please enter a valid task number\");\n printLine();\n }", "private static Boolean errorCheck(String Buffer){\n if(Buffer.matches(\"Y\")) return true;\n if(Buffer.matches(\"N\")) return false;\n screenClear(); //Clears the screen and applies an error message.\n return moreInput(); //Recursive repeat upon error.\n }", "private boolean isInputValid() {\n String errorMessage = \"\";\n\n //for now just check they actually typed something\n if ((userField.getText() == null) || userField.getText().isEmpty()) {\n errorMessage += \"No username entered\\n\";\n }\n if ((pwField.getText() == null) || pwField.getText().isEmpty()) {\n errorMessage += \"No password entered\\n\";\n }\n\n //no error message means success / good input\n if (errorMessage.isEmpty()) {\n return true;\n } else {\n // Show the error message if bad data\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.initOwner(_dialogStage);\n alert.setTitle(\"Invalid Fields\");\n alert.setHeaderText(\"Please correct invalid fields\");\n alert.setContentText(errorMessage);\n\n alert.showAndWait();\n\n return false;\n }\n }", "void checkValid();", "private boolean validateInputs() {\n question = txtQuestion.getText().trim();\n option1 = txtOption1.getText().trim();\n option2 = txtOption2.getText().trim();\n option3 = txtOption3.getText().trim();\n option4 = txtOption4.getText().trim();\n correctOption = jcCorrectAns.getSelectedItem().toString();\n //System.out.println(correctOption);\n if(question.isEmpty() || option1.isEmpty() || option2.isEmpty() || \n option3.isEmpty() || option4.isEmpty() || correctOption.isEmpty()){\n return false;\n }\n return true;\n }", "private boolean isEditValid ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint value = Integer.parseInt (super.getText ());\r\n\t\t\tboolean isValid = isInsideValidRange (value);\r\n\r\n\t\t\tif (isValid)\r\n\t\t\t{\r\n\t\t\t\tcommitEdit (value);\r\n\t\t\t}\r\n\r\n\t\t\treturn (isValid);\r\n\t\t}\r\n\t\tcatch (NumberFormatException e)\r\n\t\t{\r\n\t\t\t// Parse failed; therefore invalid\r\n\t\t\treturn (false);\r\n\t\t}\r\n\t}" ]
[ "0.6799951", "0.67713463", "0.6750688", "0.6732097", "0.66751814", "0.654032", "0.6485251", "0.64620125", "0.6450413", "0.64350975", "0.63955843", "0.63930917", "0.63749653", "0.63641655", "0.6345012", "0.6339771", "0.63357687", "0.6331645", "0.63127893", "0.62896717", "0.6260326", "0.6246046", "0.62262887", "0.621162", "0.6204519", "0.61972487", "0.6196407", "0.6177972", "0.6177843", "0.61772275", "0.6174141", "0.6155094", "0.61542135", "0.6121074", "0.6115015", "0.61101824", "0.6097656", "0.6081297", "0.6066344", "0.60629284", "0.6062728", "0.6041592", "0.600849", "0.6003971", "0.6001263", "0.5998816", "0.59964114", "0.59850985", "0.5984656", "0.598444", "0.5980404", "0.59716916", "0.59704906", "0.59631103", "0.5960359", "0.59380853", "0.5927204", "0.5913784", "0.5909068", "0.590626", "0.59056747", "0.59054893", "0.5894006", "0.58765745", "0.5875235", "0.5871159", "0.58652115", "0.5863783", "0.5856302", "0.58536416", "0.58411586", "0.58293027", "0.582886", "0.58175945", "0.5810565", "0.5806957", "0.58061945", "0.5790643", "0.57884276", "0.5788415", "0.578646", "0.57785237", "0.57780826", "0.5772243", "0.576947", "0.57656527", "0.57636935", "0.57515275", "0.57510966", "0.57404304", "0.5737948", "0.57342017", "0.57300854", "0.57284814", "0.5728413", "0.57028186", "0.5700048", "0.56996864", "0.5699212", "0.56901973" ]
0.7201128
0
returns to previous prompt
public void goBack(ActionEvent event) { try { FXMLLoader loader = new FXMLLoader(getClass().getResource("/application/walkin/BasicInfoPrompt.fxml")); Parent root = (Parent) loader.load(); GenerateReportController reportVariables = loader.getController(); reportVariables.getReport(newReport2); Stage stage = (Stage)((Node)event.getSource()).getScene().getWindow(); stage.setScene(new Scene(root)); stage.show(); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String promptLoadOrNew(){\r\n Object[] options = {\"Start A New Game!\", \"Load A Previous Game.\"};\r\n String result = (String) JOptionPane.showInputDialog(\r\n null,\r\n \"What would you like to do?\",\r\n \"Welcome!\",\r\n JOptionPane.PLAIN_MESSAGE,\r\n null,\r\n options,\r\n 1);\r\n return result;\r\n \r\n }", "private void prompt() {\n System.out.print(Strings.MAIN_PROMPT);\n System.out.flush();\n }", "private void prompt() {\n System.out.print(\"> \");\n System.out.flush();\n }", "private static void askForContinue() {\n\t\t\t\n\t\t}", "public static void prompt() {\n\t\tSystem.out.printf(\"\\n입력 > \");\n\t}", "private static char askIfGoBack() {\n Scanner input = new Scanner(System.in);\n\n\t System.out.print(\"Enter (b)ack to go back: \");\n\t char go = input.next().toLowerCase().charAt(0);\n\n\t return go;\n }", "private boolean promptCommand() {}", "abstract void mainPrompt();", "public static void previous() {\n\t\tsendMessage(PREVIOUS_COMMAND);\n\t}", "public static void toContinue() {\n System.out.println(EOF + \"Presiona ENTER para continuar...\");\n new Scanner(System.in).nextLine();\n }", "static void goback() \r\n\t {\n\t\t\t System.out.println(\"Do you want to conytinue Press - yes and for exit press - No\" );\r\n\t\t\t Scanner sc = new Scanner(System.in);\r\n\t\t\t n = sc.next();\r\n \t\t if(n.equalsIgnoreCase(\"yes\"))\r\n\t\t\t {\r\n\t\t\t\t MainMenu();\r\n\t\t\t }\r\n\t\t\t if(n.equalsIgnoreCase(\"No\"))\r\n\t\t\t {\r\n\t\t\t\t exit();\r\n\t\t\t }\r\n\t\t\t else \r\n\t\t\t {\r\n\t\t\t\t System.out.println(\"please enter a valid input 0 or 1 ! \");\r\n\t\t\t\t goback();\r\n\t\t\t }\r\n\t\t\r\n\t }", "public Scene deliverPrompt()\n {\n System.out.println(prompt);\n deliverOptions();\n return takeResponse();\n }", "public void back(){\n\t\tswitch(state){\n\t\tcase LOGINID:\n\t\t\tbreak; //do nothing, already at top menu\n\t\tcase LOGINPIN:\n\t\t\tloginMenu();\n\t\t\tbreak;\n\t\tcase TRANSACTION:\n\t\t\tbreak; //do nothing, user must enter the choice to log out\n\t\tcase DEPOSIT:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase DEPOSITNOTIFICATION:\n\t\t\tbreak; //do nothing, user must press ok\n\t\tcase WITHDRAW:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase BALANCE:\n\t\t\tbreak; //do nothing, user must press ok\n\t\tcase WITHDRAWALNOTIFICATION:\n\t\t\tbreak; //do onthing, user must press ok\n\t\t}\n\t\t\n\t\tcurrentInput = \"\";\n\t}", "static void actionPrompt() {\n prompt:\n while (true) {\n String line = \"\";\n System.out.println(\"\\nWhat do you want to do: (S)ave, (F)ill, (L)ine, (V)isible, (Q)uit: \");\n while (line.length() < 1)\n line = scan.nextLine().toUpperCase();\n char action = line.charAt(0);\n switch (action) {\n case 'Q':\n break prompt;\n case 'V':\n visible(); break;\n case 'L':\n line(); break;\n case 'F':\n fill(); break;\n case 'S':\n save(); break;\n default:\n System.out.println(\"Not a valid command.\");\n }\n }\n }", "public String getPrompt(){ return _prompt ; }", "private void promptForSomething() {\n userInputValue = prompt(\"Please enter something: \", true);\n System.out.println(\"Thank you. You can see your input by choosing the Display Something menu\");\n }", "public void requestExit()\r\n {\r\n // WE MAY HAVE TO SAVE CURRENT WORK\r\n boolean continueToExit = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE\r\n continueToExit = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO EXIT THE APP\r\n if (continueToExit)\r\n {\r\n // EXIT THE APPLICATION\r\n System.exit(0);\r\n }\r\n }", "public String askOriginOrReturn();", "private static boolean backToMenu() {\n boolean exit = false;\n System.out.println(\"Return to Main Menu? Type Yes / No\");\n Scanner sc2 = new Scanner(System.in);\n if (sc2.next().equalsIgnoreCase(\"no\"))\n exit = true;\n return exit;\n }", "public void generalPrompt() {\n System.out.println(\"What would you like to do?\");\n }", "static void backtocheckpoint1() {\n System.out.println(\"You came back to the main entrance of challenge 1...Are you ready to restart this challenge?\");\n strings = responses.nextLine();\n Door1challenge();\n }", "public String getPrompt() { return prompt; }", "public void finish(){\n \t\tString congrats=\"Congratulations, you won in \" + model.getNumberOfSteps()+\" steps! \";\n \t\tJFrame frame = new JFrame();\n\t\tString[] options = new String[2];\n\t\toptions[0] = new String(\"Play again\");\n\t\toptions[1] = new String(\"Quit\");\n\t\tint result= JOptionPane.showOptionDialog(frame.getContentPane(),congrats,\"Won! \", 0,JOptionPane.INFORMATION_MESSAGE,null,options,null);\n\t\tif (result == JOptionPane.NO_OPTION) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\tif (result == JOptionPane.YES_OPTION) {\n\t\t\t\t\tcontroller.reset(); }\n \t}", "public static void showPrompt() {\r\n \r\n System.out.print(\"> \");\r\n \r\n }", "private void newGame() \n {\n int input = JOptionPane.showConfirmDialog(null, \"Would you like to play again?\\n\",\"Game has ended\",JOptionPane.YES_NO_OPTION);\n if (input == JOptionPane.NO_OPTION){\n JOptionPane.showMessageDialog(null, \"Thank you for playing! \\n\\nBye Bye!\",\"Game Over\", JOptionPane.PLAIN_MESSAGE);\n System.exit(0);\n }\n else if (input == JOptionPane.YES_OPTION){\n isFirst = false;\n init();\n gameLogic();\n }\n }", "String prompt(String message) throws IOException;", "private static void promptName() {\n\t\tSystem.out.print(\"Please enter a name: \");\n\t}", "String promptString();", "public String getPrompt(){\n\t\treturn getString(KEY_PROMPT);\n\t}", "static void backtocheckpoint1_version2() {\n System.out.println(\"You arrived to the main entrance of challenge 1... Are you ready to restart this challenge?\");\n strings = responses.nextLine();\n if (strings.contains(\"n\")) {\n System.out.println(\"It's not an option\"); \n backtocheckpoint1_version2();\n }else if (strings.contains(\"y\")) { \n Door2challenge();\n }else {\n System.out.println(\"I don't understand...type it correctly\");\n backtocheckpoint1_version2();//in case the player types something else that the system can't read\n }\n \n \n \n }", "public void setPrompt() {\n\t\tcommandLine.append(\"$ \");\n\t}", "public static void printPrompt() {\n System.out.print(\" > \");\n }", "private void askUser()\n { \n System.out.println(\"What is your command?\");\n\n String command = scanner.nextLine();\n commandPrompt(command);\n }", "public static void enterToContinue()\r\n\t{\r\n\t\tScanner keyboard = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Press enter to continue the game : \");\r\n\t\tkeyboard.nextLine();\r\n\t}", "private void doExit() {\n\t\tif (userMadeChanges()) {\n showSaveChangesBeforeExitPrompt();\n\t\t} else {\n\t\t\tfinish();\n\t\t}\n\t}", "public String getPrompt() {\r\n\t\treturn \"oui/non\";\r\n\t}", "private boolean askToLeave(){\n\t\tint ask_leave_prompt = JOptionPane.YES_NO_OPTION;\n\t\tint ask_leave_result = JOptionPane.showConfirmDialog(this, \"Would you like to return to main menu?\\nYou will lose all progress\", \"Return To Main Menu\", ask_leave_prompt);\n\t\tif (ask_leave_result == JOptionPane.YES_OPTION){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private String selectString(String prompt) {\n System.out.println(\"\\n\" + prompt);\n return input.next();\n }", "private static char askIfQuit() \n {\n Scanner input = new Scanner(System.in);\n\n\t System.out.print(\"Enter (q)uit to quit: \");\n\t char go = input.next().toLowerCase().charAt(0);\n\n\t return go;\n }", "protected void goBack() {\r\n\t\tfinish();\r\n\t}", "public void displaySecond() {\r\n System.out.println(secondPrompt);\r\n }", "public static void tryAgain() {\n Input input = new Input(new Scanner(System.in));\n System.out.println(\"Do you want to choose another option? [ yes/no ]\");\n String more = input.getString();\n if (more.equalsIgnoreCase(\"yes\")) {\n askUser();\n } else {\n endGame();\n }\n }", "public void invalidMovePrompt() {\n\t\tinvalidPrompted = true;\n\t\tSystem.out.println(\"Invalid move. Please try again\");\n\t}", "String ask();", "@Override\n\tpublic void askReset() {\n\t}", "public void returnToPrev(){\r\n Stage stage = (Stage) exitButton.getScene().getWindow();\r\n stage.close();\r\n }", "public boolean displayPrompt(String msg);", "private void exitWithoutSave()\n {\n String reply = \"\";\n Scanner console = new Scanner(System.in);\n \n do\n {\n boolean valid = false;\n while (!valid)\n {\n System.out.print(\"\\t\\tSo, you want to exit without saving your changes?(y/n) \");\n reply = console.nextLine().trim().toLowerCase();\n valid = validation.checkNoBlank(reply);\n }\n reply = reply.substring(0, 1);\n if (reply.equals(\"y\"))\n exitRegards();\n else\n if (reply.equals(\"n\"))\n return; \n else\n System.out.println(\"\\t\\tPlease enter your answer again (y/n) \");\n }while (!reply.equals(\"n\") && !reply.equals(\"y\")); \n }", "public void displayPrompt()\n\t{\n\t\tif (ch.usingJog.length() > 0)\n\t\t\treturn;\n\t\t\t\n\t\tif (showPrompt)\n\t\t{\n\t\t\t// Show the pageMode prompt if necessary.\n\t\t\tif (pageMode)\n\t\t\t{\n\t\t\t\tpageMode = false;\n\t\t\t\tsendln(\"\");\n\t\t\t\tsendln(\"{Y[== {CPAGE MODE: {wPush enter to continue. See {W'{chelp pagemode{W' {wfor details. {Y==]{x\");\n\t\t\t\tshowPrompt = false;\n\t\t\t\tpageMode = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// Show the editor prompt if necessary.\n\t\t\tif (cs == ConnState.EDITING)\n\t\t\t{\n\t\t\t\tsend(\"{G > {x\");\n\t\t\t\tshowPrompt = false;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsend(\"{x\");\n\t\t\tif (!prefs.get(\"compact\"))\n\t\t\t\tsendln(\"\");\n\t\t\tif (tempPrompt.length() > 0)\n\t\t\t\tsendln(tempPrompt);\n\t\t\telse\n\t\t\t{\n\t\t\t\tString pr = prompt;\n\t\t\t\tif (ch.fighting != null)\n\t\t\t\t\tpr = bprompt;\n\t\t\t\tif (!prefs.get(\"prompt\"))\n\t\t\t\t\tpr = \"\";\n\t\t\t\t\n\t\t\t\tString exitLine = \"\";\n\t\t\t\tfor (Exit e : ch.currentRoom.exits)\n\t\t\t\t\tif (e.flags.get(\"hidden\") && !(e.flags.get(\"door\") && !e.flags.get(\"closed\")))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse if (e.flags.get(\"door\") && e.flags.get(\"closed\"))\n\t\t\t\t\t\texitLine = exitLine+e.direction.substring(0, 1).toLowerCase();\n\t\t\t\t\telse\n\t\t\t\t\t\texitLine = exitLine+e.direction.substring(0, 1).toUpperCase();\n\t\t\t\t\n\t\t\t\tString lightString = \"\";\n\t\t\t\tint hour = Fmt.getHour();\n\t\t\t\tint season = Fmt.getSeason();\n\t\t\t\tint sunrise = Fmt.getSunrise(season);\n\t\t\t\tint sunset = Fmt.getSunset(season);\n\t\t\t\tif (hour < sunrise || hour > sunset)\n\t\t\t\t\tlightString = \"{D(){x\";\n\t\t\t\telse if (hour >= sunrise && hour < sunrise+2)\n\t\t\t\t\tlightString = \"{D({Y){x\";\n\t\t\t\telse if (hour <= sunset && hour > sunset-2)\n\t\t\t\t\tlightString = \"{Y({D){x\";\n\t\t\t\telse\n\t\t\t\t\tlightString = \"{Y(){x\";\n\n\t\t\t\tpr = pr.replace(\"%%\", \"SPEC_PERCENT\");\n\n\t\t\t\tpr = pr.replace(\"%h\", \"\"+ch.hp);\n\t\t\t\tpr = pr.replace(\"%H\", \"\"+ch.maxHp());\n\t\t\t\tpr = pr.replace(\"%p\", \"\"+((ch.hp*100)/ch.maxHp()));\n\t\t\t\tpr = pr.replace(\"%m\", \"\"+ch.mana);\n\t\t\t\tpr = pr.replace(\"%M\", \"\"+ch.maxMana());\n\t\t\t\tpr = pr.replace(\"%n\", \"\"+((ch.mana*100)/ch.maxMana()));\n\t\t\t\tpr = pr.replace(\"%s\", \"\"+ch.energy);\n\t\t\t\tpr = pr.replace(\"%S\", \"\"+ch.maxEnergy());\n\t\t\t\tpr = pr.replace(\"%i\", \"\"+((ch.energy*100)/ch.maxEnergy()));\n\t\t\t\t\n\t\t\t\tpr = pr.replace(\"%x\", \"\"+ch.tnl);\n\t\t\t\tpr = pr.replace(\"%g\", \"\"+ch.gold);\n\t\t\t\tpr = pr.replace(\"%G\", \"\"+ch.bank);\n\t\t\t\tpr = pr.replace(\"%c\", \"\"+ch.combatQueue.size()/2);\n\n\t\t\t\tpr = pr.replace(\"%a\", ch.currentArea().name);\n\t\t\t\tpr = pr.replace(\"%r\", ch.currentRoom.name);\n\t\t\t\tpr = pr.replace(\"%e\", \"\"+exitLine);\n\t\t\t\tpr = pr.replace(\"%t\", \"\"+savedTells.size());\n\t\t\t\tpr = pr.replace(\"%T\", \"\"+timeFrmt.format(System.currentTimeMillis()));\n\t\t\t\tpr = pr.replace(\"%d\", \"\"+dateFrmt.format(System.currentTimeMillis()));\n\t\t\t\tpr = pr.replace(\"%D\", \"\"+longDateFrmt.format(System.currentTimeMillis()));\n\t\t\t\tpr = pr.replace(\"%l\", lightString);\n\t\t\t\t\n\t\t\t\tpr = pr.replace(\"%A\", \"\"+ch.currentArea().id);\n\t\t\t\tpr = pr.replace(\"%R\", \"\"+ch.currentRoom.id);\n\t\t\t\tpr = pr.replace(\"%o\", olcMode);\n\n\t\t\t\tif (ch.fighting != null)\n\t\t\t\t{\n\t\t\t\t\tpr = pr.replace(\"%O\", Fmt.seeName(ch, ch.fighting));\n\t\t\t\t\tpr = pr.replace(\"%P\", \"\"+((ch.fighting.hp*100)/ch.fighting.maxHp()));\n\t\t\t\t\tpr = pr.replace(\"%N\", \"\"+((ch.fighting.mana*100)/ch.fighting.maxMana()));\n\t\t\t\t\tpr = pr.replace(\"%I\", \"\"+((ch.fighting.energy*100)/ch.fighting.maxEnergy()));\n\t\t\t\t}\n\n\t\t\t\tpr = pr.replace(\"SPEC_PERCENT\", \"%\");\n\t\t\t\t\n\t\t\t\tsend(pr+\"{x\");\n\t\t\t}\n\t\t\tshowPrompt = false;\n\t\t}\n\t}", "public String prompt(String newPrompt, boolean newLine)\n\t{\n\t\ttempPrompt = newPrompt;\n\t\tif (newLine)\n\t\t\tsendln(tempPrompt);\n\t\telse\n\t\t\tsend(tempPrompt);\n\t\tString commandLine = read();\n\t\ttempPrompt = \"\";\n\t\treturn commandLine;\n\t}", "public String getPrompt() {\n return prompt;\n }", "private void continueGame() {\n System.out.println(\"\\n\" + \"Do you want to play more games or quit?\\n\" + \"1. Lotto\\n\" + \"2. Small Lotto\\n\" + \"3. Quit\");\n input = scanner.next();\n changeGame();\n }", "public void returnToMenu(){\n client.moveToState(ClientState.WELCOME_SCREEN);\n }", "public void printPrompt() {\r\n\t\tif (!promptVisible) {\r\n\t\t\tsetPromptVisible(true);\r\n\t\t}\r\n\t\tprompt(rPrompt);\r\n\t}", "private void proceed() {\n finish();\n Intent onReturnView = new Intent(ChatMessage.this, MainActivity.class);\n startActivity(onReturnView);\n }", "@Override\n public void onBackPressed() {\n confirmExit();\n }", "public static void end(){\n try{\n System.out.println(\"\\nPress Enter key to continue: \");\n\t\t System.in.read();\n System.out.print(\"\\033[H\\033[2J\"); \n System.out.flush();\n }catch(Exception e){\n System.err.println(e.getMessage());\n }\n }", "public boolean promptToSave()\r\n {\r\n // PROMPT THE USER TO SAVE UNSAVED WORK\r\n AnimatedSpriteEditorGUI gui = AnimatedSpriteEditor.getEditor().getGUI();\r\n int selection =JOptionPane.showOptionDialog(gui, \r\n PROMPT_TO_SAVE_TEXT, PROMPT_TO_SAVE_TITLE_TEXT, \r\n JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, \r\n null, null, null);\r\n \r\n // IF THE USER SAID YES, THEN SAVE BEFORE MOVING ON\r\n if (selection == JOptionPane.YES_OPTION)\r\n {\r\n poseIO.savePose(currentFile, false);\r\n poseIO.savePoseImage(currentPoseName, poseID);\r\n saved = true;\r\n }\r\n \r\n // IF THE USER SAID CANCEL, THEN WE'LL TELL WHOEVER\r\n // CALLED THIS THAT THE USER IS NOT INTERESTED ANYMORE\r\n else if (selection == JOptionPane.CANCEL_OPTION)\r\n {\r\n return false;\r\n }\r\n\r\n // IF THE USER SAID NO, WE JUST GO ON WITHOUT SAVING\r\n // BUT FOR BOTH YES AND NO WE DO WHATEVER THE USER\r\n // HAD IN MIND IN THE FIRST PLACE\r\n return true;\r\n }", "public void actionPerformed(ActionEvent e) {\n Object[] options ={ \"Yes\", \"No\" };\r\n //yes = 0 no = 1\r\n int m = JOptionPane.showOptionDialog(null, \"Go Back?\", \"tips\",JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);\r\n\r\n if (m == 0)\r\n {\r\n frame.dispose();\r\n new init();\r\n }\r\n }", "public String getPrompt() {\n\t\treturn prompt;\n\t}", "public void clearPrompt()\n\t{\n\t\tpromptTarget = \"\";\n\t\tpromptType = \"\";\n\t\ttempPrompt = \"\";\n\t\tshowPrompt = true;\n\t}", "protected void exitByBackKey() {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(\"EXIT\");\n builder.setMessage(\"ARE YOU SURE?\");\n builder.setPositiveButton(\"EXIT\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n\n builder.setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n return;\n }\n });\n builder.show();\n\n }", "public static void keepGoing() {\n System.out.println(\"Would you like to continue? \");\n char contin= sc.next().charAt(0); \n }", "static String promptForString(String prompt) {\n String line = \"\";\n\n System.out.println(prompt);\n while (line.compareTo(\"\") == 0) {\n System.out.print(\">\");\n if (Menus.reader.hasNext()) {\n line = Menus.reader.nextLine().strip();\n }\n }\n return line;\n }", "public void toExit() {\n int sure=JOptionPane.showConfirmDialog(rootPane,\"Are you sure to Exit?\");\n if(sure==JOptionPane.YES_OPTION)\n { \n System.exit(0);\n } \n }", "public static void checkFromUser() {\n\t\tif (askUser(\"Please type y to execute program and any other key to stop\").contentEquals(\"y\")) {\n\t\t\tSystem.out.println(\"Continuing\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Terminating program\");\n\t\t\tSystem.exit(0); \n\t\t}\n\t\tSystem.out.println(\"Calculating the greatest house income, the greatest income after expenditure and greatest savings from the given 3 families\");\n\t}", "private void dialogExit() {\n\t\tint result = showConfirmDialog(frmRentCalc, \"Вы действительно ходите выйти?\", \"Окно подтверждения\", YES_NO_OPTION, QUESTION_MESSAGE);\r\n\t\tif (result == YES_OPTION) {\r\n\t\t\tSystem.exit(0);\r\n\t\t} else {\r\n\t\t\tif (result == NO_OPTION) {\r\n\t\t\t}\r\n\t\t}\r\n\t}", "static String promptForString() {\n String line = \"\";\n\n while (line.compareTo(\"\") == 0) {\n System.out.print(\">\");\n if (Menus.reader.hasNext()) {\n line = Menus.reader.nextLine().strip();\n }\n }\n return line;\n }", "public void exit() {\n System.out.println(\"Thank you for playing Nim\");\n }", "static String promptForString(String prompt, String defaultOption) {\n String line;\n System.out.println(prompt + \" (default=\" + defaultOption + \")\");\n\n System.out.print(\">\");\n // if (Menus.reader.()) {\n line = Menus.reader.nextLine().strip();\n //}\n\n if (line.compareTo(\"\") == 0)\n return defaultOption;\n return line;\n }", "int promptOption(IMenu menu);", "public String printNewEmailPrompt() {\n return \"Please enter new email: \";\n }", "public String printNewUsernamePrompt() {\n return \"Please enter new username: \";\n }", "public String promptMenu() {\n String selection;\n promptMenu: do {\n selection = promptString(\n \"\\n======== FLOORING PROGRAM MAIN MENU ========\\n\" + \n \"DISPLAY - Display Orders\\n\" + \n \"ADD - Add an Order\\n\" + \n \"EDIT - Edit an Order\\n\" + \n \"REMOVE - Remove an Order\\n\" + \n \"EXPORT - Export all data to file\\n\" + \n \"EXIT - Exit\\n\" +\n \"What would you like to do?\"\n );\n \n switch(selection.toLowerCase()) {\n case \"display\":\n case \"add\":\n case \"edit\":\n case \"remove\":\n case \"export\":\n case \"exit\":\n break promptMenu;\n default:\n continue;\n }\n } while(true);\n \n return selection;\n }", "private void endingAction() {\n this.detectChanges();\n if (this.isModifed) {\n //System.out.println(JOptionPane.showConfirmDialog(null, \"Do you want to save unsaved changes?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION));\n switch (JOptionPane.showConfirmDialog(null, \"Do you want to save current data?\", \"Hey User!\", JOptionPane.YES_NO_CANCEL_OPTION)) {\n case 0: {\n if (this.file != null) {\n INSTANCE.saveData();\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n case 1: {\n INSTANCE.dispose();\n System.exit(0);\n break;\n }\n }\n\n //cancel op 2\n //no op 1\n //yes op 0\n } else {\n INSTANCE.dispose();\n System.exit(0);\n }\n }", "public void back() {\n //noinspection ResultOfMethodCallIgnored\n previous();\n }", "public static void pause(){\n System.out.print(\"Enter anything to continue: \"); // prompts the user to enter anything\n input.nextLine(); // receiving the user's input, but not storing it\n clear(); // clears the screen\n }", "public void promptUser(String string) {\n\t\tJOptionPane.showMessageDialog(frame,string);\n\t\t\n\t}", "public abstract void printPromptMessage();", "public void returnHall() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirm Exit\");\n alert.setHeaderText(\"Confirmation\");\n alert.setContentText(\"Are you sure you want to exit this game ?\");\n Optional result = alert.showAndWait();\n if (result.get() == ButtonType.OK) {\n HallController.getStage().close();\n Game.getPrimaryStage().show();\n Game.returnToHall();\n }\n }", "@Override\n public void onBackPressed() {\n if(!databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.STATE).equals(DatabaseHandler.FINISHED)) {\n new AlertDialog.Builder(this)\n .setTitle(\"Cancel experiment?\")\n .setCancelable(false)\n .setPositiveButton(\"yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n })\n .setNegativeButton(\"no\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n return;\n }\n }).show();\n } else {\n finish();\n }\n }", "private static void displayPrompt() {\n System.out.println(\"This program converts a temperature in degrees Celsius into\");\n System.out.println(\"a temperature in degrees Fahrenheit. Enter a temperature in\");\n System.out.print(\"degrees Celsius: \");\n }", "private void replay(){\r\n System.out.println(\"Do you want to play again? (Y/N)\");\r\n guess = input.next();\r\n if (Character.toLowerCase(guess.charAt(0)) == 'y'){\r\n reset();\r\n start();\r\n } else if(Character.toLowerCase(guess.charAt(0)) == 'n'){\r\n System.out.println(\"Thanks for playing!\");\r\n System.exit(0);\r\n } else {\r\n System.out.println(\"Invalid input!\");\r\n replay();\r\n }\r\n }", "public void setPrompt(Prompt prmpt) {\n this.prompt = prmpt;\n }", "protected abstract void fillPromptText();", "private void remindGoal()\n {\n System.out.println(\"you have to Pick up all three items and get back outside!\");\n }", "public void showNextMovePrompt() {\n\n if(model.isXTurn()){\n resultLabel.setText(\"X's Turn\");\n }\n else{\n resultLabel.setText(\"O's Turn\");\n }\n }", "private boolean PlayAgain() {\n int choice = Main.HandleInput(\"Play Again\", 2);\n if (choice == 1){\n ResetGame();\n return true;\n }\n else{\n return false;\n }\n }", "static void fork(Callback goback, Callback next)\n {\n System.out.print(\"\\nAre you sure (y/n)? \");\n String option = input.next().toLowerCase();\n\n if (option.contains(\"y\"))\n {\n System.out.println(\"A'ight then.\");\n next.call();\n }\n else if (option.contains(\"n\"))\n {\n System.out.println(\"Yeah I wasn't sure either.\");\n goback.call();\n }\n else\n {\n System.out.println(\"Didn't get that. You need to be specific.\");\n fork(goback, next);\n }\n }", "public static int welcomeUser(){\n \n int answer;\n JOptionPane.showMessageDialog(null, \"Welcome to Rock, Paper, Scissors, Lizard, Spock!\");\n JOptionPane.showMessageDialog(null, \"In this twist of the popular Rock, Paper, Scissors game a\"+\n \"\\nlizard and Captain Spock join in the epic battle of decision making.\");\n JOptionPane.showMessageDialog(null, \"The rules are as follows: \\nRock beats Scissors. \\nScissors beats Paper.\"+\n \"\\nPaper beats Rock. \\nLizard poisons Spock. \\nSpock vaporizes Rock. \"+\n \"\\nScissors decapitates Lizard. \\nLizard eats Paper. \\nRock smashes Lizard\"+\n \"\\nSpock smashes Scissors.\\nPaper disproves Spock.\");\n JOptionPane.showMessageDialog(null, \"Enter a R for rock,\"+\"\\nEnter a P for paper,\"+ \n \"\\nEnter an S for scissors\"+ \"\\nEnter an L for Lizard,\"+\n \"\\nEnter an X for Capt. Spock.\");\n \n answer = JOptionPane.showConfirmDialog(null,\"\\n Would you like to play now?\", null, JOptionPane.YES_NO_OPTION);\n return answer;\n }", "@Click(R.id.ivReturn)\n\tvoid toReturn() {\n\t\tfinish();\n\t}", "public String printNewPasswordPrompt() {\n return \"Please enter new password: \";\n }", "private void doExit() {\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(\n BookingActivity.this);\n\n alertDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //finish();\n //System.exit(0);\n goBack();\n }\n });\n\n alertDialog.setNegativeButton(\"No\", null);\n\n alertDialog.setMessage(\"Do you want to exit?\");\n alertDialog.setTitle(\" \");\n alertDialog.show();\n }", "private static char availabilityOrGoBack() {\n Scanner input = new Scanner(System.in);\n\n System.out.print(\"Enter (a)vailability, or \"\n\t + \"(b)ack to go back: \");\n char option = input.next().toLowerCase().charAt(0);\n\n return option;\n }", "public void handleExit(){\n if(JOptionPane.showConfirmDialog(null,\"Do you really wanna exit\",\"Confirm\",JOptionPane.WARNING_MESSAGE,\n JOptionPane.YES_OPTION)==JOptionPane.YES_OPTION){System.exit(0);}\n else{\n return;\n }\n\n\n\n }", "static boolean promptForComfirmation(String prompt) {\n String line;\n\n line = promptWithOptions(Arrays.asList(\"y\", \"n\"), prompt);\n\n return (line.compareTo(\"y\") == 0);\n }", "private void askConfirm(String question) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString confirm = \"y\";\n\t\twhile (!confirm.equals(\"y\") && !confirm.equals(\"n\")) {\n\t\t\tSystem.out.println(question);\n\t\t\tconfirm = scanner.nextLine();\n\t\t\tif (confirm.equals(\"y\")) {\n\t\t\t\tSystem.out.println(\"Thank you.\");\n\t\t\t} else if (confirm.equals(\"n\")) {\n\t\t\t\tSystem.out.println(\"You can edit the config settings in src/main/config\");\n\t\t\t\tSystem.exit(1);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Really funny. Try again.\");\n\t\t\t}\n\n\t\t}\n\t\tscanner.close();\n\t}", "public void Sair() {\r\n\t\t\t\r\n\t\t\tnome = JOptionPane.showInputDialog(\"Informe o seu nome ou SAIR para finalizar\");\r\n }", "String prompt(String message, Color color) throws IOException;", "private void promptTurn()\n \t{\n \t\tUserInfo curr;\n\t\tString meow;\n \t\tcurr = players[turnIndex];\n \t\tString[] tokens;\n \t\tint x;\n \t\tint y;\n \t\n// PROTOCOL \t\n \t\tcurr.sendMessage(prtcl.makePacket(\"Please enter a move\", \"message\")); \n\t\tmeow = curr.getMessage();\n\t\ttokens = meow.split(\" \");\n// PROTOCOL\n \t\tx = Integer.parseInt(tokens[0]);\n \t\ty = Integer.parseInt(tokens[1]);\n \t\n \t\t// Should have a method to process the user's input, and provide an error message back to them if necessary. \n \t\tif(game.remove(x, y))\n \t\t{\n \t\t\tplayers[(turnIndex + 1) % 2].sendMessage(prtcl.makePacket(\"Other player took \" + tokens[0] + \" items from row \" + tokens[1] + \".\", \"message\"));\n \t\t\tbroadcast(prtcl.makePacket(game.toString(), \"message\"));\n \t\t\t// This is where the check to see if the game is won occurs. If so, a winner (the person who just moved) is \n \t\t\t// congratulated. \n \t\t\tif(!game.isDone())\n \t\t\t{\n \t\t\t\tturnIndex += 1;\n \t\t\t\tturnIndex %= 2;\n \t\t\t}\n \t\t} else\n \t\t{\n // PROTOCOL\n \t\t\tplayers[turnIndex].sendMessage(prtcl.makePacket(\"Something was wrong with that. Try again.\", \"ERROR\"));\n // PROTOCOL\n \t\t}\t\n \t}" ]
[ "0.70086694", "0.69701356", "0.6759813", "0.6733255", "0.6720643", "0.6633814", "0.6518465", "0.6506277", "0.64516366", "0.6445492", "0.6421213", "0.641118", "0.64071536", "0.6395226", "0.6386886", "0.6377847", "0.63509476", "0.6333066", "0.63171685", "0.6278453", "0.62689555", "0.6236352", "0.6235147", "0.6232373", "0.62234014", "0.6194221", "0.61751187", "0.6149291", "0.61468583", "0.612766", "0.61040515", "0.61008084", "0.60928154", "0.6083715", "0.60560507", "0.60480154", "0.6038918", "0.6034496", "0.60210735", "0.60068864", "0.5996499", "0.59810185", "0.59760195", "0.5959059", "0.59570616", "0.5953808", "0.5949697", "0.59331256", "0.592239", "0.59175605", "0.5917312", "0.59156626", "0.5909928", "0.5908842", "0.59010154", "0.58884966", "0.5888156", "0.5875351", "0.58668303", "0.5865793", "0.5861657", "0.5858915", "0.58570665", "0.5855815", "0.5853288", "0.58527863", "0.58365655", "0.5829066", "0.5825864", "0.5821528", "0.5805951", "0.58050174", "0.5789347", "0.57872903", "0.5784823", "0.57833076", "0.5782906", "0.5777658", "0.5771846", "0.5771786", "0.57652915", "0.57561123", "0.573832", "0.57336295", "0.57259214", "0.57026875", "0.57020944", "0.57005763", "0.56958133", "0.56954205", "0.5689121", "0.56865865", "0.5683814", "0.5681166", "0.56803215", "0.56793094", "0.5667954", "0.5664901", "0.5664247", "0.5662772" ]
0.5707903
85
gets report data from prior prompt
public void getReportData(WalkInReport report) { newReport2 = report; newReport2.clearConclusions(); for(int i=0;i<newReport2.table.size();i++) { Sample newBacteroidesSample = newReport2.table.get(i); table.getItems().add(newBacteroidesSample); addConclusionNumber(newBacteroidesSample); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPrompt(){ return _prompt ; }", "private static String promptFileContent(String prompt) {\n\t\tSystem.out.println(prompt);\n\t\tString line = null;\n\t\tString content = \"\";\n\t\twhile (!(line = scnr.nextLine()).equals(\"q\")) {\n\t\t\tcontent += line + \"\\n\";\n\t\t}\n\t\treturn content;\n\t}", "public String getPrompt() { return prompt; }", "InputPromptTransmitter getInputPromptTransmitter();", "static String promptForString(String prompt) {\n String line = \"\";\n\n System.out.println(prompt);\n while (line.compareTo(\"\") == 0) {\n System.out.print(\">\");\n if (Menus.reader.hasNext()) {\n line = Menus.reader.nextLine().strip();\n }\n }\n return line;\n }", "private String getCommandWithPrompt() {\n print(\"dbg<\" + pc + getLabel(pc) + \">\");\n return nextLine();\n }", "public String getPrompt(){\n\t\treturn getString(KEY_PROMPT);\n\t}", "private void getDateForAnalysisReport() {\n \tArrayList<Object> answer = new ArrayList<>();\n\t\tanswer.add(\"performingAnActivityTracking\");\n\t\tanswer.add(\"/getActivityData\");\n\t\tString star = reportStartDate.getValue().toString();\n\t\tString end = reportEndDate.getValue().toString();\n\t\tanswer.add(star);\n\t\tanswer.add(end);\n\t\t\n\t\tchs.client.handleMessageFromClientUI(answer);\n\t}", "private Message getExecutionReport(Message input) {\n Message msg = null;\n try {\n String clOrdId = input.getString(protocolConfig.getTagForName(\"ClOrdID\"));\n Cdr cdr = new Cdr(MsgType.ORDER_SINGLE);\n cdr.set(\"ClOrdID\", clOrdId);\n } catch (UnknownTagException e) {\n LOG.error(\"Unknown Tag\", e);\n } catch (FieldNotFound e) {\n LOG.error(\"Field Not Found\", e);\n }\n return msg;\n }", "private String[] fillDetails() throws InterruptedException {\n System.out.print(Notifications.getMessage(\"PROMPT_FIRST_NAME\"));\n String firstName = insertName();\n\n System.out.print(Notifications.getMessage(\"PROMPT_LAST_NAME\"));\n String lastName = insertName();\n\n System.out.print(Notifications.getMessage(\"PROMPT_USERNAME\"));\n String username = getScanner().nextLine();\n\n System.out.print(Notifications.getMessage(\"PROMPT_PASSWORD\"));\n String password = getScanner().nextLine();\n\n System.out.print(Notifications.getMessage(\"PROMPT_BIRTH_DATE\"));\n String birthDate = insertDate();\n\n System.out.printf(\"%s%n%s%n%s%n\", Notifications.getMessage(\"SEPARATOR\"), Notifications.getMessage(\"PROMPT_SIGN_UP_CONFIRMATION\"), Notifications.getMessage(\"SEPARATOR\"));\n\n if(insertString(YN_REGEX).equalsIgnoreCase(NO))\n throw new InterruptedException();\n\n return new String[]{firstName, lastName, username, password, birthDate};\n }", "public String getString(String pPrompt) {\r\n\t\tSystem.out.println(pPrompt + \"\");\r\n\t\treturn input.nextLine();\r\n\t}", "public Scene deliverPrompt()\n {\n System.out.println(prompt);\n deliverOptions();\n return takeResponse();\n }", "protected void outputResultData (FinalReport report)\n {\n trc.show (\"outputResultData\", \"output simulation results\");\n\n\tmodelReport = report;\n\tnew HandleReportDialog (this);\n\n }", "static String promptForString() {\n String line = \"\";\n\n while (line.compareTo(\"\") == 0) {\n System.out.print(\">\");\n if (Menus.reader.hasNext()) {\n line = Menus.reader.nextLine().strip();\n }\n }\n return line;\n }", "public Prompt getPrompt() {\n return prompt;\n }", "public String getLastReport()\n {\n return null;\n }", "private void printReport() {\n\t\tSystem.out.println(getReport());\n\t}", "String getUserInput(String prompt) {\r\n System.out.print(prompt);\r\n try {\r\n return rdr.readLine();\r\n }\r\n catch (IOException ex) {\r\n return null;\r\n }\r\n }", "public String getPrompt() {\n return prompt;\n }", "public String getPrompt() {\n\t\treturn prompt;\n\t}", "String askForData();", "public java.lang.String getReportText(){\n return localReportText;\n }", "public void verifyreport()\t\n{\n\tif(ReadPropertyFile.get(\"Application\").equalsIgnoreCase(\"Phonakpro\"))\n\t{\n\t\t// handling the windows tab using below code\n\t\t \n\t\tArrayList<String> newTab = new ArrayList<String>(DriverManager.getDriver().getWindowHandles());\n\t \n\t //if you traverse forward the next tab from the existing tab\n\t DriverManager.getDriver().switchTo().window(newTab.get(2));\n\t}\n\telse if(ReadPropertyFile.get(\"Application\").equalsIgnoreCase(\"Unitron\"))\n\t{\n\t\t// handling the windows tab using below code\n\t\t \n\t\tArrayList<String> newTab = new ArrayList<String>(DriverManager.getDriver().getWindowHandles());\n\t \n\t //if you traverse forward the next tab from the existing tab\n\t DriverManager.getDriver().switchTo().window(newTab.get(0));\n\t}\n\t\n\t//SELECT REPORT MENU ITEM\n\tjScriptClick(settingsMenuItem.get(1));\n\t//SELECT THE REPORT DROP DOWN\n\tjScriptClick(reportDropDownbutton.get(0));\n\t\n\t// ENTER THE SCREENER NAME\n\tsendkeys(reportDropDownInputText.get(1),\"automatescreener\");\n\t//SELECT THE FIRST SCREENER IF THE SCREENER HAS THE SAME NAME\n\tjScriptClick(reportDropDownScreenersListOptions.get(0));\n\tjScriptClick(dateReportDropDownbutton.get(1));\n\tjScriptClick(reportDropDownbutton.get(1));\n\tjScriptClick(dateReportDropDownoptionToday);\n\tjScriptClick(dateOptionOkButton);\n}", "public void Prompt(){\n System.out.println(\"Enter information about the topping: \\n\\n\");\n super.Prompt();\n System.out.println(\"Enter any topping: \");\n this.Topping = new String(this.read.next());\n this.read.nextLine();\n System.out.println(\"Density:\\n 1. Heavy\\n 2. Standard\\n 3. Light\\n(Enter corresponding number): \");\n this.Density = this.read.nextInt();\n System.out.println(\"Is it vegetarian? (true or false): \");\n this.Vegetarian = this.read.nextBoolean();\n System.out.println(\"\\n\");\n }", "private void prompt() {\n System.out.print(Strings.MAIN_PROMPT);\n System.out.flush();\n }", "private static String[] collectInput() {\n\t\tString command = sc.next();\n\t\tString i = sc.next();\n\t\tString destination = sc.next();\n\t\treturn new String[] { command, destination };\n\t\t\n\t}", "@Postprocess\n public void getReport() {\n try {\n BufferedWriter bufferWriter = new BufferedWriter(new FileWriter(logfile, false));\n if (!results.isEmpty()) {\n bufferWriter.write(\"===========================================================\\n\");\n bufferWriter.write(\"sys_milli,\\t\\tdb_micro,\\t\\ttime_diff\\n\");\n Collections.sort(results);\n for (MysqlheartbeatBean mhb : results) {\n bufferWriter.write(String.valueOf(mhb.getSysMilli()) + \",\\t\\t\"\n + String.valueOf(mhb.getDbMicro()) + \",\\t\\t\"\n + String.valueOf(mhb.getDbMicro() - mhb.getSysMilli()) + \"\\n\");\n }\n bufferWriter.flush();\n }\n bufferWriter.close();\n } catch (IOException ex) {\n logger.log(Level.SEVERE, \"{0}: {1}\", new Object[]{toolName, ex.getMessage()});\n }\n }", "public static String getString(String prompt)\n {\n System.out.print(prompt + \" \");\n return in.nextLine();\n }", "public ShowReportCommand(Tool inputReceiver) {\n receiver = inputReceiver;\n }", "private String promptForAnswer(AnswerChecker answerChecker) {\n String answer;\n while (true) {\n regularPresenter.newAnswerPrompter();\n answer = scanner.nextLine();\n if (answerChecker.isValidAnswerForm(answer)) break;\n else regularPresenter.illegalAnswerReporter();\n }\n return answer;\n }", "static String readEntry(String prompt) {\n try {\n StringBuffer buffer = new StringBuffer();\n System.out.print(prompt);\n System.out.flush();\n int c = System.in.read();\n while(c != '\\n' && c != -1) {\n buffer.append((char)c);\n c = System.in.read();\n }\n return buffer.toString().trim();\n } catch (IOException e) {\n return \"\";\n }\n }", "static void gatherInfo() {\n Scanner keyboard = new Scanner(System.in);\n System.out.print(\"Enter the type of measurement (inches, feet, etc.). >> \");\n measurementType = keyboard.nextLine();\n System.out.print(\"Enter the rectangle width. >> \");\n height = keyboard.nextDouble();\n System.out.print(\"Enter the rectangle height. >> \");\n width = keyboard.nextDouble();\n }", "protected abstract void fillPromptText();", "void printReport();", "public void input_details_log()\r\n {\r\n System.out.print(\"\\n Enter your email id: \");\r\n Email=sc.nextLine();\r\n\r\n System.out.print(\" Enter your password: \");\r\n check_passwrd=sc.nextLine();\r\n }", "private String finalReport()\n\t{\n\t\tString str = \"FINAL REPORT:\\n\\n\"; \n\t\tstr += playerOne.getFinalReport() + \"\\n\";\n\t\tstr += playerTwo.getFinalReport();\n\t\treturn str;\n\t}", "public void startInfo() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Enter your name:\");\n\t\tString name = this.getInputString();\n\t\tSystem.out.println(\"Enter your mobile number:\");\n\t\tint number = this.getInputInteger();\n\t\tSystem.out.println(\"Enter your email:\");\n\t\tString email = this.getInputString();\n\t}", "public String getReport(){\r\n String temp = report.toString();\r\n report = null;\r\n return temp;\r\n }", "private static ArrayList<Double> manualInput() {\n\t\tArrayList<Double> lineData = new ArrayList<Double>();\n\t\t// Cumulative data\n\t\tArrayList<Double> cumData = new ArrayList<Double>();\n\t\tSystem.out.println(MANUAL_MSG);\n\t\tin = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tString line = in.nextLine();\n\t\t\ttry {\n\t\t\t\tlineData = strToArrList(line);\n\t\t\t\tcumData.addAll(lineData);\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\treturn cumData;\n\t\t\t}\n\t\t}\n\t}", "private static void generalDetails()\r\n\t{\r\n\t\tSystem.out.println(\"Enter the name of waiter:\");\r\n\t\tname = scan.nextLine();\r\n\t\tSystem.out.println(\"Enter table number:\");\r\n\t\tboolean check = false;\r\n\t\t//while check is false, keep trying to get a valid table number\r\n\t\twhile(check==false)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\ttableNo = Integer.parseInt(scan.nextLine());\r\n\t\t\t\tcheck = true;\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Please enter a valid table number!\");\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "private String getInput(String prompt) throws IOException {\n System.out.print(prompt);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(System.in));\n return in.readLine();\n }", "public void generateReport() throws InvalidEmailException, SQLException {\n\t\tSystem.out.println(\"=====GENERATE REPORT=====\");\n\t\tSystem.out.println(\"1.Fetch patient details by email:\");\n\t\tSystem.out.println(\"2.Fetch patient details by phone:\");\n\t\tSystem.out.println(\"Enter your choice:\");\n\t\tint choice = Integer.parseInt(sc.nextLine());\n\t\t// DatabaseConn viewDetails = new DatabaseConn();\n\t\tArrayList<String> list=new ArrayList<String>();\n\t\tdo {\n\t\t\tswitch (choice) {\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println(\"Enter Email\");\n\t\t\t\tString email = sc.nextLine();\n\n\t\t\t\tSystem.out.println(\"Enter testDate:\");\n\t\t\t\tString testDate = sc.nextLine();\n\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\tSystem.out.println(\"Enter phone no:\");\n\t\t\t\tString phone = sc.nextLine();\n\t\t\t\tSystem.out.println(\"Enter testDate:\");\n\t\t\t\ttestDate = sc.nextLine();\n\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t} while (choice != 3);\n\n\t}", "public void displayReport()\n\t{\n\t\t//use arrays util to sort the array alphabetically \n\t\tArrays.sort(passengersAndSeats);\n\t\t\n\t\t//Learned about Jlist from this stack overflow: http://stackoverflow.com/questions/10869374/how-can-i-print-an-array-in-joptionpane\n\t\tJOptionPane.showMessageDialog(null, new JList<Object>(passengersAndSeats));\n\t\t\n\t\tpromptExit();\n\t\t\n\t}", "public void setPrompt(Prompt prmpt) {\n this.prompt = prmpt;\n }", "private static String[] prompt(String prompt) {\n\t\tSystem.out.print(prompt);\n\t\tString line = scnr.nextLine();\n\t\tString []words = line.trim().split(\" \", 2);\n\t\treturn words;\n\t}", "private void prompt() {\n System.out.print(\"> \");\n System.out.flush();\n }", "private void report() {\n\t\t\n\t}", "String promptString();", "public void startRetriveDataInfo() {\n\t\t\tif (isLog4jEnabled) {\n\t\t\t\n stringBuffer.append(TEXT_2);\n stringBuffer.append(label);\n stringBuffer.append(TEXT_3);\n \n\t\t\t}\n\t\t}", "public String getPrompt() {\r\n\t\treturn \"oui/non\";\r\n\t}", "public String getReport() {\n\n \n return report == null ? \"(report not saved)\" : report;\n\n }", "public void getInfo() {\n Scanner scanner = new Scanner(System.in);\n //get values from the user using scanner and sets class variables appropriately\n System.out.print(\"Enter the first name: \");\n setFirstName(scanner.nextLine());\n\n System.out.print(\"Enter the last name: \");\n setLastName(scanner.nextLine());\n\n System.out.print(\"Enter the ZIP code: \");\n setZipcode(scanner.nextLine());\n\n System.out.print(\"Enter the employee ID: \");\n setEmployeeID(scanner.next());\n }", "@Override\n public void onLoadReport(ConsoleProxyLoadReportCommand cmd) {\n }", "@Override\n\tvoid getData() {\n\t\tSystem.out.println(\"Enter Brand\");\n\t\tbrand=a.next();\n\t\tSystem.out.println(\"Enter model\");\n\t\tmodel=a.next();\n\t\tSystem.out.println(\"Enter CC\");\n\t\tcc=a.nextDouble();\n\t}", "public static String readEntry(String prompt) {\n\n try {\n StringBuffer buffer = new StringBuffer();\n System.out.print(prompt);\n System.out.flush();\n int c = System.in.read();\n while (c != '\\n' && c != -1) // while not newline or EOF\n {\n buffer.append((char) c);\n c = System.in.read();\n }\n return buffer.toString().trim();\n } catch (IOException e) {\n return \"\";\n }\n }", "public static String[] getInfo(){\n System.out.println(\"Select yout choice of account \\n1.Saving\\n2.Current\\n\");\n Scanner sc = new Scanner(System.in);\n String[] info = new String[3];\n info[0]=sc.next();\n System.out.println(\"\\nEnter Name\");\n info[1] = sc.next();\n System.out.println(\"\\nEnter address\");\n info[2] = sc.next();\n return info;\n }", "public void getCredentials(){\n System.out.println(\"Enter Your Credit Card Number\");\n setCreditCardNumber(Integer.parseInt(Menu.getScanner().nextLine()));\n System.out.println(\"Enter your billing address\");\n setBillingAddress(Menu.getScanner().nextLine());\n System.out.println(\"Enter your CVC\");\n setCvc(Integer.parseInt(Menu.getScanner().nextLine()));\n }", "public void input_entered() {\n\t\t_last_column = 0;\n\t\t_last_line = 0;\n\t\t_last_printed = '\\n';\n\t}", "private void commandPrompt(String command)\n { \n if(command.equals(\"list\"))\n {\n String city = \" \";\n String item = \" \";\n\n if(scanner.next().equals(\"city:\"))\n {\n city = scanner.next();\n } \n\n if(scanner.next().equals(\"item:\"))\n {\n item = scanner.next();\n } \n\n if(scanner.nextLine().equals(\"\"))\n {\n commandList(city, item);\n }\n }\n\n if(command.equals(\"findgoods\"))\n {\n String cityForGoods = scanner.nextLine(); \n\n if(scanner.nextLine().equals(\"\"))\n {\n commandFindGoods(cityForGoods);\n }\n }\n\n if(command.equals(\"findcities\"))\n {\n String goodsForCity = scanner.nextLine();\n if(scanner.nextLine().equals(\"\"))\n {\n commandFindCities(goodsForCity);\n }\n }\n\n if(command.equals(\"add\"))\n {\n String cityToAdd = scanner.nextLine();\n\n if(scanner.nextLine().equals(\"\"))\n {\n commandAddCity(cityToAdd);\n }\n }\n\n commandProgramBasic(command); \n }", "private static String getUserInput(String prompt){ \r\n Scanner in = new Scanner(System.in);\r\n System.out.print(prompt);\r\n return in.nextLine();\r\n }", "abstract void mainPrompt();", "public void printPrompt() {\r\n\t\tif (!promptVisible) {\r\n\t\t\tsetPromptVisible(true);\r\n\t\t}\r\n\t\tprompt(rPrompt);\r\n\t}", "public void getData()\n\t{\n\t\tif (jobEntry.getName() != null) wName.setText( jobEntry.getName() );\n\t\twName.selectAll();\n\t\tif (jobEntry.getZipFilename()!= null) wZipFilename.setText( jobEntry.getZipFilename() );\n\t\tif (jobEntry.getWildcardSource()!= null) wWildcardSource.setText( jobEntry.getWildcardSource() );\n\n\t\tif (jobEntry.getWildcard()!= null) wWildcard.setText( jobEntry.getWildcard() );\n\t\tif (jobEntry.getWildcardExclude()!= null) wWildcardExclude.setText( jobEntry.getWildcardExclude() );\n\t\tif (jobEntry.getSourceDirectory()!= null) wTargetDirectory.setText( jobEntry.getSourceDirectory() );\n\t\tif (jobEntry.getMoveToDirectory()!= null) wMovetoDirectory.setText( jobEntry.getMoveToDirectory() );\n\n\t\tif (jobEntry.afterunzip>=0)\n\t\t{\n\t\t\twAfterUnZip.select(jobEntry.afterunzip );\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\twAfterUnZip.select(0 ); // NOTHING\n\t\t}\n\t\t\n\t\twAddFileToResult.setSelection(jobEntry.isAddFileToResult());\n\t\twArgsPrevious.setSelection(jobEntry.getDatafromprevious());\n\t\twAddDate.setSelection(jobEntry.isDateInFilename());\n\t\twAddTime.setSelection(jobEntry.isTimeInFilename());\n\t\t\n\t\tif (jobEntry.getDateTimeFormat()!= null) wDateTimeFormat.setText( jobEntry.getDateTimeFormat() );\n\t\twSpecifyFormat.setSelection(jobEntry.isSpecifyFormat());\n\t\t\n\t\twRootZip.setSelection(jobEntry.isCreateRootFolder());\n\t\twCreateFolder.setSelection(jobEntry.isCreateFolder());\n\t\t\n \tif (jobEntry.getLimit()!= null) \n\t\t\twNrErrorsLessThan.setText( jobEntry.getLimit());\n\t\telse\n\t\t\twNrErrorsLessThan.setText(\"10\");\n \t\n\t\tif(jobEntry.getSuccessCondition()!=null)\n\t\t{\n\t\t\tif(jobEntry.getSuccessCondition().equals(jobEntry.SUCCESS_IF_AT_LEAST_X_FILES_UN_ZIPPED))\n\t\t\t\twSuccessCondition.select(1);\n\t\t\telse if(jobEntry.getSuccessCondition().equals(jobEntry.SUCCESS_IF_ERRORS_LESS))\n\t\t\t\twSuccessCondition.select(2);\n\t\t\telse\n\t\t\t\twSuccessCondition.select(0);\t\n\t\t}else wSuccessCondition.select(0);\n\t\t\n\t\twAddOriginalTimestamp.setSelection(jobEntry.isOriginalTimestamp());\n\t\twSetModificationDateToOriginal.setSelection(jobEntry.isOriginalModificationDate());\n\t\twIfFileExists.select(jobEntry.getIfFileExist());\n\t\twcreateMoveToDirectory.setSelection(jobEntry.isCreateMoveToDirectory());\n\t}", "public void printReport(){\n StdOut.println(name);\n double total = cash;\n for (int i=0; i<n; i++){\n int amount = shares[i];\n double price = StockQuote.priceOf(stocks[i]);\n total+= amount*price;\n StdOut.printf(\"%4d %5s \", amount, stocks[i]);\n StdOut.printf(\"%9.2f %11.2f\\n\", price, amount*price);\n }\n StdOut.printf(\"%21s %10.2f\\n\", \"Cash: \", cash);\n StdOut.printf(\"%21s %10.2f\\n\", \"Total: \", total);\n }", "private String getPromptStrings(int choice) {\n //negative numbers correspond with the very first screen (not really anymore)\n //then the positive numbers go based on the choice the user makes\n switch (choice) {\n case 0: return \"\";\n //this is for the introductory screen\n case -1: return \"There is an enemy Ship! Looks like an Inter Planetary Pirate ship.\";\n case -2: return \"What would you like to do? Looks like is has a similar layout to our ship.\";\n case -3: return \"this is a dummy line for the status bar... health for you: 20, shields 1, enemy health: 20, shields 1\";\n case -4: return \"Now What?\";\n case -5: return \"Well that didn't work...\";\n case -6: return \"You are out of missiles.\";\n case -7: return \"All systems operational, and shields are up.\";\n case -8: return \"They are out of missiles...\";\n case -9: return \"Your Laser gun system is damaged, you can't shoot!\";\n case -10: return \"Your Missile system is damaged, you can't shoot!\";\n case -11: return \"Their Laser gun system is damaged, they can't shoot!\";\n case -12: return \"Their Missile system is damaged, they can't shoot!\";\n //this is for what you choose to do\n case 1: return \"You want to shot your laser gun at the enemy ship.\";\n case 2: return \"You want to shot a missile at the enemy ship.\";\n case 3: return \"You decided to wait and let your shields recharge.\";\n\n case 4: return \"Where do you want to shoot?\";\n case 5: return \"Where do you want to shoot?\";\n case 6: return \"\";\n\n case 45: return \"You damaged their Engine system!\";\n case 46: return \"You damaged their Shield system!\";\n case 47: return \"You damaged their Missile system!\";\n case 48: return \"You damaged their Laser Gun system!\";\n case 49: return \"You damaged their Piloting system!\";\n case 51: return \"You shoot at their Piloting system!\";\n case 52: return \"You shoot at their Laser gun system!\";\n case 53: return \"You shoot at their Missile system!\";\n case 54: return \"You shoot at their Shield system!\";\n case 55: return \"You shoot at their Engine system!\";\n\n case -45: return \"They damaged your Engine system!\";\n case -46: return \"They damaged your Shield system!\";\n case -47: return \"They damaged your Missile system!\";\n case -48: return \"They damaged your Laser Gun system!\";\n case -49: return \"They damaged your Piloting system!\";\n case -51: return \"They shoot at your Piloting system!\";\n case -52: return \"They shoot at your Laser gun system!\";\n case -53: return \"They shoot at your Missile system!\";\n case -54: return \"They shoot at your Shield system!\";\n case -55: return \"They shoot at your Engine system!\";\n\n case 80: return \"You decide to wait...\";\n case 81: return \"Your shields recharge and your systems are fixed.\";\n case -80: return \"They decide to wait..\";\n case -81: return \"Their shields recharge, and systems get repaired.\";\n\n case 97: return \"Their shield is down!\";\n case 98: return \"Their shield is up, your laser can't penetrate!\";\n case -98: return \"Your shields are up, their lasers can't penetrate!\";\n case 99: return \"It hit!\";\n case -99: return \"They landed the shot!\";\n case 100: return \"It missed!\";\n case -100: return \"They missed!\";\n\n case -101: return \"The laser hit!\";\n case -102: return \"The missile hit!\";\n case -103: return \"The laser missed.\";\n case -104: return \"The missile missed.\";\n }\n //if the input given is not one of the above\n return \"Error\";\n }", "public static String readString(String prompt){ \n\t\tSystem.out.print(prompt+\": \");\n\t\tstringInput = readInput();\n\t\treturn stringInput; \n\t}", "public String getReportno() {\r\n return reportno;\r\n }", "public void printReport(){\n\t\tSystem.out.println(\"This is \" + name + \", UPENN \" + graduationYear);\n\t\tSystem.out.println(\"Their GPA is \" + GPA);\n\t\tString numCoursesString = \"\";\n\t\tif (numCoursesCompleted == 1){\n\t\t\tnumCoursesString=\"course\";\t//if the student has only taken one course, just print course\n\t\t}\n\t\telse{\n\t\t\tnumCoursesString=\"courses\"; //if the student has taken more than one course, print courses when called\n\t\t}\n\t\tSystem.out.println(\"They have taken \" + numCoursesCompleted + \" \" + numCoursesString); \n\t}", "public void getSafetyReportSummaryData() throws RemoteException {\n throw new RemoteException(\"Not yet implemented\");\n }", "public List getPrompts() {\n\t\tif (prompts == null) {\n\t\t\tprompts = new ArrayList();\n\t\t\tList nodes = doc.selectNodes(\"/metadataFieldInfo/field/prompts/prompt\");\n\t\t\tif (nodes != null) {\n\t\t\t\tfor (Iterator i = nodes.iterator(); i.hasNext();) {\n\t\t\t\t\tElement promptEl = (Element) i.next();\n\t\t\t\t\tprompts.add(promptEl.getTextTrim());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn prompts;\n\t}", "public static void main(String[] args) { \n processDataFile();\n realtorLogImpl.traverseDisplay();\n System.out.println();\n propertyLogImpl.traverseDisplay();\n System.out.println();\n generateReport();\n }", "static String promptForString(String prompt, String defaultOption) {\n String line;\n System.out.println(prompt + \" (default=\" + defaultOption + \")\");\n\n System.out.print(\">\");\n // if (Menus.reader.()) {\n line = Menus.reader.nextLine().strip();\n //}\n\n if (line.compareTo(\"\") == 0)\n return defaultOption;\n return line;\n }", "public GetReceivedReportResponse getReceivedReport(GetReceivedReport request) {\n\t\treturn null;\n\t}", "private void userReport() {\n reportText.appendText(\"Report of appointments per User\\n\\n\");\n for (User user: Data.getUsers()) {\n reportText.appendText(\"\\n\\nUser: \" + user.getUsername() + \"\\n\");\n for (Appointment appointment: Data.getAppointments()) {\n if (appointment.getUser() == user.getId()) {\n reportText.appendText(\"Appointment ID: \" + appointment.getId() +\n \" \\tTitle: \" + appointment.getTitle() +\n \"\\tType: \" + appointment.getType() +\n \"\\tDescription: \" + appointment.getDescription() +\n \"\\tStart: \" + appointment.getStart() +\n \"\\tEnd: \" + appointment.getEnd() +\n \"\\tCustomer: \" + appointment.getCustomer() + \"\\n\");\n }\n System.out.println(\"\\n\\n\");\n }\n }\n\n }", "@FXML\n private void generateReportData() {\n\n if (storage.getHistory().size() == 0) {\n Alert ErrorAlert = new Alert(Alert.AlertType.NONE);\n ErrorAlert.setAlertType(Alert.AlertType.ERROR);\n ErrorAlert.setContentText(\"You have not selected any data to be in your Flight History\");\n ErrorAlert.show();\n } else {\n updateTravelledAndVisited();\n setUpData();\n\n try {\n displayCarbonEmissionGoalField.setText(String.valueOf(Double.parseDouble(carbonEmissionGoalField.getText())));\n generalStatsCalculator.setCarbonEmissionsGoal(Double.parseDouble(carbonEmissionGoalField.getText()));\n\n displayTotalEmissionsField.setText(\n String.format(\"%.2f\", generalStatsCalculator.getTotalCarbonEmissions()));\n displayTotalDistanceTravelledField.setText(\n String.format(\"%.2f\", generalStatsCalculator.getTotalDistanceTravelled()));\n displayMostEmissionsRouteField.setText(MostEmissionsRouteString);\n displayLeastEmissionsRouteField.setText(LeastEmissionsRouteString);\n displayMostDistanceRouteField.setText(MostDistanceRouteString);\n displayLeastDistanceRouteField.setText(LeastDistanceRouteString);\n displayMostVisitedSourceAirportField.setText(MostVisitedSourceAirportString);\n displayLeastVisitedSourceAirportField.setText(LeastVisitedSourceAirportString);\n displayMostVisitedDestinationAirportField.setText(MostVisitedDestAirportString);\n displayLeastVisitedDestinationAirportField.setText(LeastVisitedDestAirportString);\n displayTreeOffsetField.setText(numOfTreesString);\n generalStatsCalculator.createCarbonEmissionsComment();\n displayStatusCommentField.setText(generalStatsCalculator.getCarbonEmissionsComment());\n } catch (NumberFormatException e) {\n carbonEmissionGoalField.setText(\"\");\n carbonEmissionGoalField.setPromptText(\n \"NO GOAL WAS ENTERED. PLEASE ENTER A GOAL AS A DOUBLE.\");\n }\n }\n }", "public static void prompt() {\n\t\tSystem.out.printf(\"\\n입력 > \");\n\t}", "public String getPromptText(){\n\t\tString textPrev = text.substring(0, pointerPos);\n\t\tString textAfter =\"\";\n\t\tif(pointerPos < text.length() -1)\n\t\t\ttextAfter = text.substring(pointerPos+1,text.length());\n\t\tString str = textPrev.concat(textAfter);\n\t\tstr = str.trim().replaceAll(\" +\", \" \");\n\t\treturn (str);\n\t}", "public void readQuestion()\n\t{\n\t\tnumLines = (int)numScan.nextDouble();\n\t\tquestion = stringScan.nextLine();\n\t}", "private void setDataSecondReport() {\r\n\t\tguiControl.sendToServer(new ClientMessage(ClientMessageType.INCOME_REPORT, reportDate));\r\n\t\tMap<Integer, VisitorReport> parkReportMap = (Map<Integer, VisitorReport>) guiControl.getServerMsg()\r\n\t\t\t\t.getMessage();\r\n\t\tlineCharSecond.getData().clear();\r\n\t\tXYChart.Series<String, Integer> price = new XYChart.Series<>();\r\n\t\tint total_price = 0;\r\n\t\tint i = 1;\r\n\t\tfor (VisitorReport vr : parkReportMap.values()) {\r\n\t\t\tprice.getData().add(new XYChart.Data<>(String.valueOf(i), new Integer(vr.getPrice())));\r\n\t\t\ti++;\r\n\t\t\ttotal_price = total_price + vr.getPrice();\r\n\t\t}\r\n\t\tlineCharSecond.getData().add(price);\r\n\t\tString totalP = String.valueOf(total_price);\r\n\t\ttotalSecond.setText(totalP + \" \" + \"NIS\");\r\n\t}", "private void getReport() {\n\t\tdialog = ProgressDialog.show(this, \"\", \" Please wait...\", true);\n dialog.setCancelable(true);\n\t\tSharedPreferences pref = this.getSharedPreferences(\"User\", Activity.MODE_PRIVATE);\n\t\tString accessToken = pref.getString(\"access_token\", null);\n\t\tNetworkEngine.getInstance().getSeatReport(accessToken, bus_id, agent_id, new Callback<List<SeatReport>>() {\n\t\t\t\n\t\t\tpublic void success(List<SeatReport> arg0, Response arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tseatReports = new ArrayList<SeatReport>();\n\t\t\t\tseatReports = arg0;\n\t\t\t\tlvSeatDetails.setAdapter(new SeatDetailsbyAgentAdapter(SeatDetailsbyAgentActivity.this, seatReports));\n\t\t\t\tdialog.cancel();\n\t\t\t}\n\t\t\t\n\t\t\tpublic void failure(RetrofitError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tdialog.cancel();\n\t\t\t\tLog.i(\"\",\"Hello Error Response Code: \"+arg0.getResponse().getStatus());\n\t\t\t}\n\t\t});\n\t}", "private static void driver() {\n Scanner scnr = new Scanner(System.in);\n String promptCommandLine = \"\\nENTER COMMAND: \";\n\n System.out.print(MENU);\n System.out.print(promptCommandLine);\n String line = scnr.nextLine().trim();\n char c = line.charAt(0);\n\n while (Character.toUpperCase(c) != 'Q') {\n processUserCommandLine(line);\n System.out.println(promptCommandLine);\n line = scnr.nextLine().trim();\n c = line.charAt(0);\n }\n scnr.close();\n }", "public void clearPrompt()\n\t{\n\t\tpromptTarget = \"\";\n\t\tpromptType = \"\";\n\t\ttempPrompt = \"\";\n\t\tshowPrompt = true;\n\t}", "@BeforeTest\n\tpublic void startReport() {\n\t\textent = new ExtentReports(System.getProperty(\"user.dir\")+\"//extent-reports//myreport.html\",true);\n\t\textent.addSystemInfo(\"Host Name\", \"LocalHost\");\n\t\textent.addSystemInfo(\"Environment\", \"QA\");\n\t\textent.addSystemInfo(\"User Name\", \"Prasanta\");\n\t\textent.loadConfig(new File(System.getProperty(\"user.dir\")+\"//ReportsConfig.xml\"));\n\t}", "private void reportData() {\n getSender().tell(new GameRoomDataMessage(gameRoomName, capacity, players), this.getSelf());\n }", "private void AskForTempData()\n {\n //Creates connection\n String[] connectionData = new String[2];\n connectionData[0] = getResources().getString(R.string.server_get_temp_status);\n connectionData[1] = \"?DeviceCode=\"+deviceCode;\n new GetTempStatus(this).execute(connectionData);\n }", "public void makeReport() throws IOException{\n File report = new File(\"Report.txt\");\n BufferedWriter reportWriter = new BufferedWriter(new FileWriter(report));\n BufferedReader bookReader = new BufferedReader(new FileReader(\"E-Books.txt\"));\n String current;\n while((current = bookReader.readLine()) != null ){\n String[] tokens = current.split(\",\");\n reportWriter.write(tokens[0].trim()+\" for \"+tokens[1].trim()+\" with redemption Code \"+tokens[2].trim()+\n \" is assigned to \"+tokens[4].trim()+\" who is in \"+tokens[5].trim()+\" grade.\");\n reportWriter.write(System.lineSeparator());\n reportWriter.flush();\n }\n reportWriter.close();\n bookReader.close();\n new reportWindow();\n }", "public static void generateReport() {\n PrintImpl printer = new PrintImpl(realtorLogImpl, propertyLogImpl);\n printer.generateReport(REQUESTS_FILE);\n }", "private static void displayPrompt() {\n System.out.println(\"This program converts a temperature in degrees Celsius into\");\n System.out.println(\"a temperature in degrees Fahrenheit. Enter a temperature in\");\n System.out.print(\"degrees Celsius: \");\n }", "private void generateIncomingReport() {\r\n\r\n\t\tStringBuilder stringBuilder = new StringBuilder();\r\n\t\tstringBuilder.append(\"\\n----------------------------------------\\n\")\r\n\t\t\t\t.append(\" Incoming Daily Amount \\n\")\r\n\t\t\t\t.append(\"----------------------------------------\\n\")\r\n\t\t\t\t.append(\" Date | Trade Amount \\n\")\r\n\t\t\t\t.append(\"-----------------+----------------------\\n\");\r\n\t\tallIncomings.entrySet().forEach(\r\n\t\t\t\tkey -> stringBuilder.append(key.getKey() + \" | \" + key.getValue().get() + \"\\n\"));\r\n\t\tdataWriter.write(stringBuilder.toString());\r\n\t}", "public static void Report() {\n\t\tfor (int i = 0; i < array.size(); i++) {\r\n\t\t\tSystem.out.println(array.get(i).getDetails());\t\t\t//Steps through the array and prints the details\r\n\t\t}\r\n\t\tAdmin.menuChoice();\r\n\t}", "private void askUser()\n { \n System.out.println(\"What is your command?\");\n\n String command = scanner.nextLine();\n commandPrompt(command);\n }", "public abstract void parseReport();", "public Report getReport();", "public void generateReport()\r\n {\r\n ProfilerGUI reportGUI = new ProfilerGUI(map,mapCountTracker);\r\n //reportGUI.\r\n }", "public void getGamerInput() {\n\t\ttry {\n\t\t\tsCurrentCharInput = String.format(\"%s\", (consoleInput.readLine())).toUpperCase(Locale.getDefault());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/* ************************************* */\n\t\tconsoleLog.println(\" \");\n\t\t// System.out.println(\" Quit readline \");\n\t\t/* ************************************* */\n\t\t// if (sCurrentCharInput.length() == 0)\n\t\t// continue;\n\n\t\t// if (sCurrentCharInput.contains(sAskedWord))\n\t\t// continue;\n\n\t}", "String getCurrentLine();", "public String getUserDecision(){\n return input.nextLine();\n }", "@Override\n public void input() {\n super.input();\n Scanner sc = new Scanner(System.in);\n System.out.printf(\"Nhập số trang sách giáo khoa: \");\n amountPage = Integer.valueOf(sc.nextLine());\n System.out.printf(\"Nhập tình trạng sách giáo khoa: \");\n status = sc.nextLine();\n System.out.printf(\"Nhập số lượng mượn: \");\n amountBorrow= Integer.valueOf(sc.nextLine());\n }", "void createReport() {\n\n // report about purple flowers\n println(\"\\nPurple flower distribution: \");\n for (int i = 0; i < 6; i++) {\n println(i + (i==5?\"+\":\"\") + \": \" + numPurpleFlowers[i]);\n }\n // report about missing treasures\n println(\"Missing treasure count: \" + missingTreasureCount);\n\n println(\"\\nGenerated \" + caveGenCount + \" sublevels.\");\n println(\"Total run time: \" + (System.currentTimeMillis()-startTime)/1000.0 + \"s\");\n\n out.close();\n }", "public void readuserData() {\n\t\t\tSystem.out.println(\"Welcome to the BMI calculator, enter 1 for imperial or 2 for Metric \");\n\t\t\t\n\t\t}" ]
[ "0.5734685", "0.5610548", "0.5489809", "0.5479607", "0.54561573", "0.5449762", "0.54442966", "0.5432543", "0.54245484", "0.5402774", "0.5400435", "0.5371573", "0.5370488", "0.53481203", "0.5314762", "0.5308261", "0.5301015", "0.5298417", "0.5259024", "0.5248406", "0.523994", "0.52079016", "0.51897323", "0.51860684", "0.51724607", "0.5152232", "0.51463515", "0.51342416", "0.5132181", "0.51283485", "0.51263875", "0.5121823", "0.5114278", "0.51115865", "0.51010966", "0.5095874", "0.5090254", "0.5078559", "0.5035563", "0.5031353", "0.5016679", "0.5003233", "0.49732372", "0.49454", "0.49357954", "0.49335957", "0.49245107", "0.49022433", "0.48966458", "0.4896496", "0.48917466", "0.4867866", "0.48664698", "0.48562863", "0.4854134", "0.4854057", "0.485334", "0.48339817", "0.4832241", "0.482931", "0.48185962", "0.48167694", "0.48124263", "0.4806394", "0.48020267", "0.480122", "0.47993547", "0.47992325", "0.4794259", "0.479329", "0.47862586", "0.4777741", "0.47773042", "0.47694662", "0.47519326", "0.47498843", "0.4748219", "0.4745765", "0.47428995", "0.4739612", "0.47395763", "0.47336686", "0.47298893", "0.47276706", "0.47255886", "0.47197193", "0.47195867", "0.4718856", "0.47146505", "0.47093722", "0.47052768", "0.4701596", "0.46931416", "0.46911198", "0.46871498", "0.46865728", "0.46818534", "0.4681507", "0.46774656", "0.4672584" ]
0.4958811
43
submits final table to next prompt
@FXML public void submitTable(ActionEvent event) { if(!conclusion1.equals("")) { newReport2.addConclusion(conclusion1); } if(!conclusion2.equals("")) { newReport2.addConclusion(conclusion2); } try { FXMLLoader loader = new FXMLLoader(getClass().getResource("/application/ReportMaker.fxml")); Parent root = (Parent) loader.load(); GenerateReportController finalReport = loader.getController(); finalReport.getReport(newReport2); Stage stage = (Stage)((Node)event.getSource()).getScene().getWindow(); stage.setScene(new Scene(root)); stage.show(); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void finishUp() {\r\n // pushOutput(table, 0);\r\n viewDone(\"Done\");\r\n }", "public ComplaintSubmitted() {\n initComponents();\n dtm = (DefaultTableModel) cTable.getModel();\n this.showContent(\"Waiting For Approval\");\n this.setLocationRelativeTo(null);\n }", "public void finalDisplay2()\n\t{\n\t\tString s1=null;\n\t\tint sum=0;\n\t\tint j;\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tj=rowLabel[i];\t\t\t\n\t\t\tsum+=temp[i][j];\t\n\t\t}\n\t\ts1=\"There are multiple solutions with the cost of \"+sum;\n\t\tJTable t = new JTable();\n testTableMultiple(t,(2*noOfPeople)+2);\n JScrollPane scrollPane = new JScrollPane(t); \n JOptionPane.showMessageDialog(null,scrollPane, s1, JOptionPane.INFORMATION_MESSAGE);\n\t}", "public static void Tables() {\n Scanner scanner = new Scanner(System.in);\n String userResponse;\n do {\n System.out.print(\"Enter an integer here:\");\n int userInteger = scanner.nextInt();\n System.out.println(\"Here is your table!\\n\" +\n \"number | squared | cubed\\n\" +\n \"------ | ------- | -----\");\n for (int i = 1; i <= userInteger; i++) {\n System.out.printf(\"%-6d | %-7d | %-5d%n\", i, i * i, i * i * i);\n }\n System.out.println(\"\\n\\nWould you like to continue (y/n): \");\n userResponse = scanner.next();\n } while (userResponse.equals(\"y\"));\n }", "public void finalDisplay()\n\t{\n\t\tString s1=null;\n\t\tif(!yes)\n\t\t{\n\t\t\tint sum=0;\n\t\t\tint j;\n\t\t\tSystem.out.println(\"Final Display algo1\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tj=rowLabel[i];\t\t\t\n\t\t\t\tSystem.out.println(j);\n\t\t\t\tsum+=temp[i][j];\t\n\t\t\t}\n\t\t\ts1=\"Total Cost is: \"+sum;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint sum=0;\n\t\t\tSystem.out.println(\"Final Display algo2\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(matrix[i][j]==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum+=temp[i][j];\n\t\t\t\t\t\trowLabel[i]=j;\n\t\t\t\t\t\tSystem.out.println(rowLabel[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ts1=\"Total Cost is: \"+sum;\n\t\t}\n\t\t\n\t\tJTable t = new JTable();\n testTable(t,noOfPeople+1);\n JScrollPane scrollPane = new JScrollPane(t); \n JOptionPane.showMessageDialog(null,scrollPane, s1, JOptionPane.INFORMATION_MESSAGE);\n\t}", "public void displayTable() {\n do { // this do-while loop gives the user the ability to view multiple potential earnings tables\r\n for (int i = 0; i < salesNumber.size(); i++) { //this loop shows the names of each salesman and displays with a numerical value\r\n System.out.println(salesName.get(i) + \" \" + (i + 1));\r\n }\r\n Scanner keyboard = new Scanner(System.in); //sets a keyboard scanner to wait for user input\r\n System.out.println(\"Please enter the number coresponding to the \" //prompts the user for a selection from the salesperson name table above\r\n + \"salesperson you would like to view potential commission for \");\r\n salesPersonSelection = (keyboard.nextInt() - 1); //sets the selection variable from user input\r\n tableMax = (salesNumber.get((int) salesPersonSelection) * tableMaxPercentage); // sets the table maximum value\r\n tableStep = salesNumber.get((int) salesPersonSelection); //establishes the incriments the table will use\r\n System.out.println(\"Potential compensation chart for: \" //shows the name of the selected salesperson\r\n + salesName.get((int) salesPersonSelection));\r\n System.out.println(); //blank line for user comfort\r\n System.out.print(\"Total sales \"); // table column header\r\n System.out.println(\"\\t\" + \"Total compensation\"); //table column header\r\n System.out.println(); //blank line for user comfort\r\n System.out.print(newFormat.format(salesNumber.get((int) salesPersonSelection))); //sets the first row based on current sales\r\n System.out.println(\"\\t\" + newFormat.format(salesCommission.get((int) salesPersonSelection))); //sets the first row based on current commission\r\n\r\n do { //fills the table\r\n tableStep = tableStep + tableIncrease; //establishes the incriments the table will use\r\n System.out.print(newFormat.format(tableStep)); //shows the next line of sales values\r\n if (tableStep < salesMinimum) { //this block looks for values that do \r\n potentialCompensation = baseSalary; //not meet minimum sales for commission\r\n }\r\n if (tableStep >= salesMinimum && tableStep < salesTarget) { //this block looks for values that \r\n potentialCompensation = baseSalary + (tableStep * commissionPercentage); //fall between the minimum and target sales values\r\n }\r\n if (tableStep >= salesTarget) { //this block looks for values that do\r\n potentialCompensation = baseSalary + (tableStep * acceleratedPercentage); //eceed the sales target value\r\n }\r\n System.out.println(\"\\t\" + newFormat.format(potentialCompensation)); //fills in the compensation side of the table\r\n } while (tableStep < tableMax); //ensures the table stops at the given max value\r\n System.out.println(\"Would you like to see another potential commission chart? y/n\"); //prompts the user to view additrional tables\r\n anotherChart = keyboard.next();\r\n } while (anotherChart.equals(\"y\")); //loops to the table beginning based on user input\r\n System.out.println(\"Thank you for using the commission calculator, good luck next year!\"); //program end, send off message\r\n }", "public void updateTable() {\n tabelModel.setRowCount(0);\n Link current = result.first;\n for (int i = 0; current != null; i++) {\n Object[] row = {current.getMasjid(), current.getAlamat()};\n tabelModel.addRow(row);\n current = current.next;\n }\n }", "public void done() \r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tif (ok) {\r\n\t\t\t\t\t//resultsTabbedPanel.setEntryPointsData(entryPointsTable);\r\n\t\t\t\t\t// Actualizo la tabla de estadisticas globales\r\n\t\t\t\t\tcreateGlobalStatsTable(0); // XXX TODO\r\n\r\n\t\t\t\t\tregenStatsTree();\r\n\r\n\t\t\t\t\tvalidateTree();\r\n\r\n\r\n\t\t\t\t\ttimeRange.enable();\r\n\r\n\t\t\t\t\tif (!isCached) {\r\n\t\t\t\t\t\ttimeRange.setLimits(minTs, maxTs);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (Throwable e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tCommonForms.showError(parent, \"Error showing data\", e);\r\n\t\t\t} finally {\r\n\t\t\t\tdialog.dispose();\r\n\t\t\t\tparent.setEnabled(true);\r\n\t\t\t\tmainPanel.remove(1); \r\n\t\t\t\tJScrollPane treePanelScroll = new JScrollPane();\r\n\t\t\t\tmainPanel.add(treePanelScroll);\r\n\t\t\t\tMainFrame.this.toFront();\r\n\t\t\t}\r\n\t\t}", "private void printTable() {\n System.out.println(\"COMPLETED SLR PARSE TABLE\");\n System.out.println(\"_________________________\");\n System.out.print(\"\\t|\");\n // print header\n for(int i = 0; i < pHeader.size(); i++) {\n pHeader.get(i);\n System.out.print(\"\\t\" + i + \"\\t|\");\n }\n System.out.println();\n // print body\n for(int i = 0; i < parseTable.size(); i++) {\n System.out.print(i + \"\\t|\");\n for(int j = 0; j < parseTable.get(i).size(); j++) {\n System.out.print(\"\\t\" + parseTable.get(i).get(j) + \"\\t|\");\n }\n System.out.println();\n }\n System.out.println();\n System.out.println(\"END OF SLR PARSE TABLE\");\n System.out.println();\n }", "private void prompt() {\n System.out.print(\"> \");\n System.out.flush();\n }", "public void finalDisplay1()\n\t{\n\t\tString s1=null;\n\t\tif(!yes)\n\t\t{\n\t\t\tint sum=0;\n\t\t\tint j;\n\t\t\tSystem.out.println(\"Final Display1 algo1\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tj=rowLabel[i];\t\t\t\n\t\t\t\tsum+=temp[i][j];\t\n\t\t\t\tSystem.out.println(j);\n\t\t\t}\n\t\t\ts1=\"Total Cost is: \"+sum;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint sum=0;\n\t\t\tSystem.out.println(\"Final Display algo2\");\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(matrix[i][j]==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum+=temp[i][j];\n\t\t\t\t\t\trowLabel[i]=j;\n\t\t\t\t\t\tSystem.out.println(rowLabel[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ts1=\"Total Cost is: \"+sum;\n\t\t}\n\t\t\n\t\tJTable t = new JTable();\n testTable(t,noOfPeople+1);\n JScrollPane scrollPane = new JScrollPane(t); \n JOptionPane.showMessageDialog(null,scrollPane, s1, JOptionPane.INFORMATION_MESSAGE);\n\t}", "public void result() {\n JLabel header = new JLabel(\"Finish!!\");\n header.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 28));\n gui.getConstraints().gridx = 0;\n gui.getConstraints().gridy = 0;\n gui.getConstraints().insets = new Insets(10,10,50,10);\n gui.getPanel().add(header, gui.getConstraints());\n\n String outcomeText = String.format(\"You answer correctly %d / %d.\",\n totalCorrect, VocabularyQuizList.MAX_NUMBER_QUIZ);\n JTextArea outcome = new JTextArea(outcomeText);\n outcome.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 20));\n outcome.setEditable(false);\n gui.getConstraints().gridy = 1;\n gui.getConstraints().insets = new Insets(10,10,30,10);\n gui.getPanel().add(outcome, gui.getConstraints());\n\n JButton b = new JButton(\"home\");\n gui.getGuiAssist().homeListener(b);\n gui.getConstraints().gridy = 2;\n gui.getConstraints().insets = new Insets(10,200,10,200);\n gui.getPanel().add(b, gui.getConstraints());\n\n b = new JButton(\"start again\");\n startQuestionListener(b);\n gui.getConstraints().gridy = 3;\n gui.getPanel().add(b, gui.getConstraints());\n }", "public static void main(String[] args) {\n Scanner scnr = new Scanner(System.in);\n String yourChoice = \"\";\n do\n {\n \t \n System.out.println(\"Enter a Number :\");\n int userResponse = scnr.nextInt() ;\n \n System.out.println(\"Table Of Powers:\");\n \n System.out.printf(\"%10s | %12s | %14s\\n\", \"Number\", \"Squared\",\"Cubed\");\n System.out.printf(\"%10s | %12s | %14s\\n\", \"------\", \"-------\",\"-----\");\n \n for(int i=1;i<=userResponse;i++)\n { \n \t System.out.printf(\"%10s | %12s | %14s\\n\", i , i*i , i*i*i);\n \t //System.out.println();\n }\n \n System.out.println(\"\\n\" + \"Multiplication Tables:\");\n System.out.printf(\"%5s\", \"\");\n for(int i=1;i<=userResponse;i++)\n { \n \t \n \t System.out.printf(\"%5s\", i);\n \t }\n System.out.println();\n System.out.printf(\"%5s\", \"\");\n for(int i=1;i<=userResponse;i++)\n { \n \t \n \t System.out.printf(\"%5s\", \"--\");\n \t }\n \n \n System.out.println();\n\n \n for(int i=1;i<=userResponse;i++)\n { \n \t System.out.printf(\"%5s\",i);\n \t for(int j=1;j<=userResponse;j++) {\n \t\t System.out.printf(\"%5s\",i*j);\n \t }\n \t System.out.println();\n \t //System.out.println();\n }\n \n System.out.println(\"Would you like to continue(y/n) :\");\n yourChoice = scnr.next();\n }while(yourChoice.equals(\"y\"));\n\t System.out.println(\"GoodBye!\");\n\t}", "public void endTable() throws IOException;", "public void promptDBCreds()\n\t{\n\t\ttse.startDatabase();\n\t\t\n\t}", "public ConfirmStationsFrame(String args[]) {\n\n getParms(args);\n\n // Main container //\n Container con = new Container();\n\n // create table for fix number & profile number\n DynamicTable mainTab = new DynamicTable(0);\n mainTab.setFrame(ITableFrame.VOLD);\n mainTab.setRules(ITableRules.NONE);\n mainTab.setBorder(0);\n mainTab.setCenter();\n\n DynamicTable headTab = new DynamicTable(0);\n headTab.setFrame(ITableFrame.VOLD);\n headTab.setRules(ITableRules.NONE);\n headTab.setBorder(0);\n headTab.setCenter();\n\n DynamicTable tab = new DynamicTable(0);\n tab.setFrame(ITableFrame.VOLD);\n tab.setRules(ITableRules.NONE);\n tab.setBorder(0);\n tab.setCenter();\n\n TableRow row = new TableRow();\n\n\n // Create sub table //\n DynamicTable subTab = new DynamicTable(2);\n subTab.setFrame(ITableFrame.VOLD);\n subTab.setRules(ITableRules.NONE);\n subTab.setBorder(0);\n subTab.setCenter();\n\n headTab.addRow(ec.crSpanColsRow(\"Add / Maintain Stations\",\n 2,true, \"blue\", IHAlign.CENTER, \"+2\"));\n headTab.addRow(ec.crSpanColsRow(\"&nbsp;\",2));\n\n\n if (dbg) System.out.println(\"<br> st action : \" + action);\n if (action.equals(\"Insert\")) {\n\n checkClient();\n\n if (dbg) System.out.println(\"<br>**Ins** clientCode : \" + clientCode);\n\n/*\n success = new WetStation(\n stationID ,\n latitude ,\n longitude ,\n name ,\n clientCode ,\n ).put();\n*/\n WetStation station = new WetStation(); // ub01\n station.setStationId (stationID); // ub01\n station.setLatitude (latitude); // ub01\n station.setLongitude (longitude); // ub01\n station.setName (name); // ub01\n station.setClientCode (clientCode); // ub01\n if (!\"\".equals(surveyID.trim())) // ub02\n station.setSurveyId(surveyID); // ub02\n success = station.put(); // ub01\n\n if (dbg) System.out.println(\"<br>sql = \" + station.getInsStr());\n if (dbg) System.out.println(\"<br>numRecs = \" + station.getNumRecords());\n if (dbg) System.out.println(\"<br>messages = \" + station.getMessages());\n\n //row = new TableRow();\n //row\n // .addCell(new TableHeaderCell(\"Station \" + name + \" has been succesfully inserted \"))\n // ;\n //mainTab.addRow(row);\n\n //row = new TableRow();\n //row\n // .addCell(new TableDataCell(new SimpleItem(\" \")))\n // ;\n //mainTab.addRow(row);\n if (station.getNumRecords() == 1) {\n tab.addRow(ec.crSpanColsRow(\n \"Station \"+name+\" has been succesfully inserted.\",2,true,\n \"green\",IHAlign.CENTER,\"+1\" ));\n } else {\n tab.addRow(ec.crSpanColsRow(\n \"Station \"+name+\" has NOT been succesfully inserted.\",2,true,\n \"red\",IHAlign.CENTER,\"+1\" ));\n tab.addRow(ec.crSpanColsRow(\n \"SQL error message: \" + station.getMessages(),2,true,\n \"red\",IHAlign.CENTER,\"+1\" ));\n } // if (station.getNumRecords() == 1)\n tab.addRow(ec.crSpanColsRow(\"&nbsp;\",2));\n\n\n } //if (action.equals(\"Insert\"))\n else if (action.equals(\"Update\")) {\n\n checkClient();\n\n if (dbg) System.out.println(\"<br>**Upd** clientCode : \" + clientCode);\n\n WetStation updStation = new WetStation(); // ub01\n updStation.setLatitude (latitude); // ub01\n updStation.setLongitude (longitude); // ub01\n updStation.setName (name); // ub01\n updStation.setClientCode (clientCode); // ub01\n if (!\"\".equals(surveyID.trim())) // ub02\n updStation.setSurveyId(surveyID); // ub02\n/*\n WetStation updStation = new WetStation(\n Tables.CHARNULL ,\n latitude ,\n longitude ,\n name ,\n clientCode\n );\n*/\n WetStation station = new WetStation(stationID);\n success = station.upd(updStation);\n\n if (dbg) System.out.println (\"<br>updated WetStation : success = \" + success);\n\n if (station.getNumRecords() == 1) {\n tab.addRow(ec.crSpanColsRow(\n \"Station \"+name+\" has been succesfully updated.\",2,true,\n \"green\",IHAlign.CENTER,\"+1\" ));\n } else {\n tab.addRow(ec.crSpanColsRow(\n \"Station \"+name+\" has NOT been succesfully updated.\",2,true,\n \"red\",IHAlign.CENTER,\"+1\" ));\n tab.addRow(ec.crSpanColsRow(\n \"SQL error message: \" + station.getMessages(),2,true,\n \"red\",IHAlign.CENTER,\"+1\" ));\n } // if (station.getNumRecords() == 1)\n tab.addRow(ec.crSpanColsRow(\"&nbsp;\",2));\n\n\n } //else if (action.equals(\"Update\"))\n\n row = new TableRow();\n row\n .addCell(new TableHeaderCell(\"Station Id : \").setHAlign(IHAlign.RIGHT))\n .addCell(new TableDataCell(new SimpleItem(stationID)))\n ;\n subTab.addRow(row);\n\n row = new TableRow();\n row\n .addCell(new TableHeaderCell(\"Latitude : \").setHAlign(IHAlign.RIGHT))\n .addCell(new TableDataCell(new SimpleItem(latitude)))\n ;\n subTab.addRow(row);\n\n row = new TableRow();\n row\n .addCell(new TableHeaderCell(\"Longitude : \").setHAlign(IHAlign.RIGHT))\n .addCell(new TableDataCell(new SimpleItem(longitude)))\n ;\n subTab.addRow(row);\n\n row = new TableRow();\n row\n .addCell(new TableHeaderCell(\"Name : \").setHAlign(IHAlign.RIGHT))\n .addCell(new TableDataCell(new SimpleItem(name)))\n ;\n subTab.addRow(row);\n\n row = new TableRow();\n row\n .addCell(new TableHeaderCell(\"Client Code : \").setHAlign(IHAlign.RIGHT))\n .addCell(new TableDataCell(new SimpleItem(clientCode)))\n ;\n subTab.addRow(row);\n\n row = new TableRow();\n row\n .addCell(new TableHeaderCell(\"SADCO Survey ID : \").setHAlign(IHAlign.RIGHT))// ub02\n .addCell(new TableDataCell(new SimpleItem(surveyID))) // ub02\n ;\n subTab.addRow(row);\n\n con\n .addItem(headTab)\n .addItem(mainTab)\n .addItem(subTab)\n .addItem(tab)\n ;\n addItem(con);\n\n }", "private void setTable() {\n try {\n DefaultTableModel dtm = (DefaultTableModel) table.getModel();\n dtm.setRowCount(0);\n ArrayList<Item> itemList = ItemController.getAllItem();\n if (itemList != null) {\n for (Item item : itemList) {\n String qoh = BatchController.getQOH(item.getCode());\n if (qoh != null) {\n if (item.getRol() >= Integer.valueOf(qoh)) {\n Object row[] = {item.getCode(), item.getDesciption(), item.getRol(), qoh};\n dtm.addRow(row);\n }\n }\n\n }\n }\n if (dtm.getRowCount() == 0) {\n JOptionPane.showMessageDialog(this, \"Stock level is above ROL\");\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ROL.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(ROL.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "static void actionPrompt() {\n prompt:\n while (true) {\n String line = \"\";\n System.out.println(\"\\nWhat do you want to do: (S)ave, (F)ill, (L)ine, (V)isible, (Q)uit: \");\n while (line.length() < 1)\n line = scan.nextLine().toUpperCase();\n char action = line.charAt(0);\n switch (action) {\n case 'Q':\n break prompt;\n case 'V':\n visible(); break;\n case 'L':\n line(); break;\n case 'F':\n fill(); break;\n case 'S':\n save(); break;\n default:\n System.out.println(\"Not a valid command.\");\n }\n }\n }", "private void initialize(String id, Table[] table) {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(500,250, 931, 552);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJButton btnOrderRunning = new JButton(\"Order Running\");\r\n\t\tbtnOrderRunning.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\tbtnOrderRunning.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tArrayList list2 = new ArrayList();\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor(int i = 0; i < 10; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(table[i].stateOrder() == false && table[i].getDelivered() == -1)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tString tmp = \"\" + table[i].number();\r\n\t\t\t\t\t\t\tlist2.add(tmp);\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\tObject[] objectList = list2.toArray();\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] choices = Arrays.copyOf(objectList, objectList.length, String[].class);\r\n\t\t\t\t\t\r\n\t\t\t\t String input = null;\r\n\r\n\t\t\t\t \r\n\t\t\t\t input = (String) JOptionPane.showInputDialog(frame, \"Choose Table to See The Order :\",null, JOptionPane.QUESTION_MESSAGE, null,choices, null);\r\n\t\t\t\t \r\n\t\t\t\t if(input != null)\r\n\t\t\t\t {\r\n\t\t\t\t \t\r\n\t\t\t\t \t if(input != null)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t \t\r\n\t\t\t\t \t\t String order = \"\\n\\t Order Table N° \" + input + \"\\n\\n ----------------------------------------------------------------\\n\\n\";\r\n\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t \ttry\r\n\t\t\t\t\t\t \t{\r\n\t\t\t\t\t\t \t\t\r\n\t\t\t\t\t\t \t\tConnection connexion = (Connection) DriverManager.getConnection(\"jdbc:mysql://localhost:3306/restaurant\",\"root\",\"root\");\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tResultSet resultat = connexion.createStatement().executeQuery(\"SELECT margherita, veggie, meat, best, chicken, cheese, tiramisu, ice_cream, apple_pie, coca, fanta, ice_tea FROM commande_tmp WHERE nb_order = \" + table[Integer.parseInt(input) - 1].order() + \" AND day_date = (select date(now()))\");\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tString[] menu = {\"Margherita\", \"Veggie\", \"Meat\", \"Best\", \"Chicken\", \"Cheese\", \"Tiramisu\", \"Ice_Cream\", \"Apple_Pie\", \"Coca\", \"Fanta\", \"Ice_Tea\"};\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tresultat.next();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tfor(int i = 0; i < 12; i++)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif(resultat.getInt(menu[i]) != 0) \r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\torder += \" \" + menu[i] + \"\\tX \" + resultat.getInt(menu[i]) + \"\\n\";\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t \t}\r\n\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t \tcatch(Exception o)\r\n\t\t\t\t\t\t \t{}\r\n\t\t\t\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t\t\tJTextArea textArea = new JTextArea(6, 25);\r\n\t\t\t\t\t\t\t textArea.setText(order);\r\n\t\t\t\t\t\t\t textArea.setEditable(false);\r\n\t\t\t\t\t\t\t JScrollPane scrollPane = new JScrollPane(textArea);\r\n\t\t\t\t\t\t\t scrollPane.setPreferredSize(new Dimension(300,300));\r\n\t\t\t\t\t\t\t JOptionPane.showMessageDialog(frame, scrollPane);\r\n\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t \t\r\n\t\t\t\t\t\t }\r\n\t\t\t\t \t \t\t\t\t\t\t\t\t \t\r\n\t\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcatch(Exception n)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnOrderRunning.setBounds(35, 256, 837, 79);\r\n\t\tframe.getContentPane().add(btnOrderRunning);\r\n\t\t\r\n\t\tJButton btnFinishAnOrder = new JButton(\"Finish an Order\");\r\n\t\tbtnFinishAnOrder.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\tbtnFinishAnOrder.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tArrayList list2 = new ArrayList();\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < 10; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(table[i].stateOrder() == false && table[i].getDelivered() == -1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString tmp = \"\" + table[i].number();\r\n\t\t\t\t\t\tlist2.add(tmp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tObject[] objectList = list2.toArray();\r\n\t\t\t\t\r\n\t\t\t\tString[] choices = Arrays.copyOf(objectList, objectList.length, String[].class);\r\n\t\t\t\t\r\n\t\t\t String input = null;\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t input = (String) JOptionPane.showInputDialog(frame, \"Choose Table To Finish Order :\",null, JOptionPane.QUESTION_MESSAGE, null,choices, null);\r\n\t\t\t \r\n\t\t\t if(input != null)\r\n\t\t\t {\r\n\t\t\t \ttable[Integer.parseInt(input) - 1].changeStateOrder();\r\n\t\t\t \ttable[Integer.parseInt(input) - 1].changeStateDelivered();\r\n\t\t\t \t\r\n\t\t\t\t JOptionPane.showMessageDialog(frame, \"Order Table n° \" + table[Integer.parseInt(input) - 1].number() + \" Finished !\");\r\n\t\t\t\t \r\n\t\t\t\t\tConnection connexion;\r\n\t\t\t\t\ttry \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tconnexion = (Connection) DriverManager.getConnection(\"jdbc:mysql://localhost:3306/restaurant\",\"root\",\"root\");\r\n\t\t\t\t\t\tconnexion.createStatement().executeUpdate(\"UPDATE commande_tmp SET margherita = 0, veggie = 0, meat = 0, best = 0, chicken = 0, cheese = 0, tiramisu = 0, ice_cream = 0, apple_pie = 0, coca = 0, fanta = 0, ice_tea = 0 WHERE nb_order = \" + table[Integer.parseInt(input) - 1].order() + \" AND day_date = (select date(now()))\");\r\n\r\n\t\t\t\t\t} \r\n\t\t\t\t\t\r\n\t\t\t\t\tcatch (Exception e1) {}\r\n\t\t\t\t \r\n\r\n\t\t\t\t\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnFinishAnOrder.setBounds(35, 130, 837, 79);\r\n\t\tframe.getContentPane().add(btnFinishAnOrder);\r\n\t\t\r\n\t\tJLabel lblKitchen = new JLabel(\"Kitchen\");\r\n\t\tlblKitchen.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\tlblKitchen.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblKitchen.setBounds(347, 19, 216, 59);\r\n\t\tframe.getContentPane().add(lblKitchen);\r\n\t\t\r\n\t\tJSeparator separator = new JSeparator();\r\n\t\tseparator.setBounds(35, 375, 837, 2);\r\n\t\tframe.getContentPane().add(separator);\r\n\t\t\r\n\t\tJSeparator separator_1 = new JSeparator();\r\n\t\tseparator_1.setBounds(35, 89, 837, 2);\r\n\t\tframe.getContentPane().add(separator_1);\r\n\t\t\r\n\t\tJButton btnLogOut = new JButton(\"Log Out\");\r\n\t\tbtnLogOut.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\tbtnLogOut.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tLoginSystem logSys = new LoginSystem(table);\r\n\t\t\t\tframe.setVisible(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnLogOut.setBounds(664, 396, 208, 79);\r\n\t\tframe.getContentPane().add(btnLogOut);\r\n\t}", "private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) {\n Tables tables = new Tables();\n try{\n int id = Integer.parseInt(lblID.getText().trim());\n String tableNumber = txtUpdateTable.getText().trim();\n \n int asAvailable = 1 ;\n \n tables.setTableId(id);\n tables.setTableNumber(tableNumber);\n tables.setAsAvailable(asAvailable);\n \n tableService.updateTableNumber(tables);\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, \"Please Fill TextField\");\n }\n \n vectorTablesNumber = commonService.getVectorTables();\n\n TablesTableModel tableTableModel = new TablesTableModel(vectorTablesNumber);\n tblTablesNumber.setModel(tableTableModel);\n \n \n txtUpdateTable.setText(\"\");\n \n }", "private void prompt() {\n System.out.print(Strings.MAIN_PROMPT);\n System.out.flush();\n }", "public void sendToStagingArea() {\n if (queryExpired) {\n String[] options = {\"Resubmit\", \"New Query\"};\n int rtn = JOptionPane.showOptionDialog(this,\n \"Query has Expired;\\nNew Query Required\", null,\n JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,\n null, options, options[0]);\n\n if (rtn == JOptionPane.YES_OPTION) {\n // Resubmit the existing query\n InfoPanel.searchButton.doClick();\n\n return;\n\n } else {\n // Reset the panel to the search panel\n tabbedPane.setSelectedIndex(0);\n\n // Clear the summary model\n msbQTM.clear();\n\n // Clear the project model\n ((ProjectTableModel) projectTable.getModel()).clear();\n initProjectTable();\n\n return;\n }\n }\n\n if (table.getSelectedRow() != -1) {\n performSendToStagingArea();\n om.updateDeferredList();\n\n } else {\n JOptionPane.showMessageDialog(this,\n \"Must select a project summary first!\");\n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tnumb = 1;\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs = null;\r\n\t\t\t\t\tconn = DriverManager.getConnection(URL, USERNAME, PASSWORD);\r\n\t\t\t\t\tstmt = conn.createStatement();\r\n\t\t\t\t\tString sql = \"select sqlTableName from sqlTable\";\r\n\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\tstr_show += rs.getString(\"sqlTableName\").trim() + \" \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tshowFileName.setText(str_show);\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t\tupJFrame();\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "protected void done() {\n logoPanel.stop();\n qtf.setCursor(normalCursor);\n searchButton.setEnabled(true);\n\n boolean isStatusOK = false;\n try {\n isStatusOK = get();\n } catch (Exception e) {\n }\n\n if (isStatusOK) {\n Thread tableFill = new Thread(msb_qtm);\n tableFill.start();\n\n try {\n tableFill.join();\n } catch (InterruptedException iex) {\n logger.warn(\"Problem joining tablefill thread\");\n }\n\n synchronized (this) {\n Thread projectFill = new Thread(\n qtf.getProjectModel());\n projectFill.start();\n try {\n projectFill.join();\n } catch (InterruptedException iex) {\n logger.warn(\"Problem joining projectfill thread\");\n }\n\n qtf.initProjectTable();\n }\n\n msb_qtm.setProjectId(\"All\");\n qtf.setColumnSizes();\n qtf.resetScrollBars();\n logoPanel.stop();\n qtf.setCursor(normalCursor);\n\n if (queryTask != null) {\n queryTask.cancel();\n }\n\n qtf.setQueryExpired(false);\n String queryTimeout = System.getProperty(\n \"queryTimeout\");\n System.out.println(\"Query expiration: \"\n + queryTimeout);\n Integer timeout = new Integer(queryTimeout);\n if (timeout != 0) {\n // Conversion from minutes of milliseconds\n int delay = timeout * 60 * 1000;\n queryTask = OMPTimer.getOMPTimer().setTimer(\n delay, infoPanel, false);\n }\n }\n }", "@Override\n protected void done() {\n model.displayErrorMsg(view);\n\n var tableauItems = new ArrayList<TableData>();\n\n try {\n programs = get();\n\n LocalDateTime ldt = LocalDateTime.now();\n String status = \"\";\n\n for (Program p : programs) {\n\n var id = p.getId();\n var title = p.getTitle();\n var startTime = p.getStartTime();\n var formatTime1 = timeFormatter(startTime);\n var endTime = p.getEndTime();\n var formatTime2 = timeFormatter(endTime);\n\n if (startTime.isBefore(ldt) && endTime.isAfter(ldt)) {\n\n status = \"Running\";\n }\n if (endTime.isBefore(ldt)) {\n\n status = \"Finished\";\n }\n if (startTime.isAfter(ldt)) {\n\n status = \"Upcoming\";\n }\n\n tableauItems.add(new TableData(id, title, formatTime1,\n formatTime2, status));\n\n }\n view.updateTable(tableauItems);\n view.setChannelImage(model.getChannelImg());\n\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n\n lastUpdate(LocalDateTime.now());\n view.setLastUpdated(lastUpdated);\n isUpdating.set(false);\n\n }", "public void actionPerformed(ActionEvent event) {\n String name = signOutField.getText();\r\n try {\r\n int periodNum = Integer.parseInt(signOutNumField.getText());\r\n boolean periodExists = false;\r\n for (int x = 0; x < teachers.get(teacherUser).getPeriodNumbers().size(); x++) {\r\n if (periodNum == teachers.get(teacherUser).getPeriodNumbers().get(x)) {\r\n periodExists = true;\r\n }\r\n } \r\n if (periodExists) { \r\n int index = generalInventoryTable.getSelectedRow();\r\n int teacherIndex = teacherList.getSelectedIndex();\r\n String selectedID = (String)generalInventoryTable.getValueAt(index, 0);\r\n //Setting values for the book\r\n bookInv.getBook(selectedBookset, selectedID).setInStockStatus(false);\r\n bookInv.getBook(selectedBookset, selectedID).setStudentName(name);\r\n bookInv.getBook(selectedBookset, selectedID).setTeacherName(teachers.get(teacherIndex).getName());\r\n bookInv.getBook(selectedBookset, selectedID).setPeriodNum(periodNum);\r\n //Updating the general table\r\n generalInventoryTable.getModel().setValueAt(\"Checked Out\", index, 1);\r\n generalInventoryTable.getModel().setValueAt(name, index, 2);\r\n generalInventoryTable.getModel().setValueAt(teachers.get(teacherIndex).getName(), index, 3);\r\n //Updating the period table\r\n int periodIndex = teachers.get(teacherIndex).getPeriodNumbers().indexOf(periodNum);\r\n DefaultTableModel model = (DefaultTableModel)periodInfoTables[periodIndex].getModel();\r\n model.addRow(new String[]{selectedBookset, selectedID, name});\r\n //Saving inventory\r\n try{\r\n bookInv.saveInv();\r\n }catch(IOException e){}\r\n //Resetting the text fields\r\n signOutField.setText(\"\");\r\n signOutNumField.setText(\"\");\r\n //Resetting the bookset label values\r\n BookSet tempBookSet = bookInv.getBookSet(selectedBookset);\r\n numberOfBooks.setText(\"Number of Books: \" + tempBookSet.getSize());\r\n inStock.setText(\"In Stock: \" + tempBookSet.getNumInStock());\r\n numBooksCheckedOut.setText(\"# of Books Checked Out: \" + (tempBookSet.getSize() - tempBookSet.getNumInStock()));\r\n signOutFrame.setVisible(false); //Removing the frame\r\n } else {\r\n JLabel signOutWarning1 = new JLabel(\"Please enter a valid period!\");\r\n signOutWarning1.setFont(new Font(\"Arial\", Font.PLAIN, 16));\r\n JOptionPane.showMessageDialog(new JFrame(), signOutWarning1, \"Sign Out Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n } catch (Exception E) {\r\n JLabel signOutWarning2 = new JLabel(\"Please enter a valid period!\");\r\n signOutWarning2.setFont(new Font(\"Arial\", Font.PLAIN, 16));\r\n JOptionPane.showMessageDialog(new JFrame(), signOutWarning2, \"Sign Out Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == sub) {\n\t\t\tString url = txt1.getText().toString();\n\t\t\tString sql = txt2.getText().toString();\n\t\t\tif (url != null && sql != null) {\n\t\t\t\ttry {\n\t\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\t\tConnection conn = DriverManager.getConnection(url, \"root\", \"\");\n\t\t\t\t\tStatement sttm = conn.createStatement();\n\t\t\t\t\tResultSet rs = sttm.executeQuery(sql);\n\t\t\t\t\tResultSetMetaData rsmd = rs.getMetaData();\n\t\t\t\t\tint numCol = rsmd.getColumnCount();\n\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\tVector<Object> vec = new Vector<Object>();\n\t\t\t\t\t\tvec.add(rs.getObject(1));\n\t\t\t\t\t\tvec.add(rs.getObject(2));\n\t\t\t\t\t\tvec.add(rs.getObject(3));\n\t\t\t\t\t\tvec.add(rs.getObject(4));\n\t\t\t\t\t\tdtm.addRow(vec);\n\t\t\t\t\t}\n\t\t\t\t\trs.close();\n\t\t\t\t\tsttm.close();\n\t\t\t\t} catch (Exception err) {\n\t\t\t\t\tSystem.out.println(\"Error: \" + err);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (e.getSource() == res) {\n\t\t\ttxt1.setText(\"\");\n\t\t\ttxt2.setText(\"\");\n\t\t\twhile (dtm.getRowCount() != 0)\n\t\t\t\tfor (int i = 0; i < dtm.getRowCount(); i++)\n\t\t\t\t\tdtm.removeRow(i);\n\t\t}\n\t\tif (e.getSource() == ex)\n\t\t\tSystem.exit(0);\n\t}", "private ConfigurationHTMLPrinter endTable() {\n return decrementIndent().println(\"</table>\");\n }", "private void intiPlanTable(){\n //gets all plans that are linked with the current profile\n List<Plan> planList = profile.getPlans().getPlans();\n //now add all plans to the table\n DefaultTableModel model = (DefaultTableModel) this.jTable1.getModel();\n model.setRowCount(0);\n planList.forEach((p) -> {\n model.addRow(new Object[]{p.getPlanName(),p});\n });\n }", "public void promptSubmitReview() {\n ZenDialog.builder().withBodyText(C0880R.string.prompt_submit_review).withDualButton(C0880R.string.cancel, 0, C0880R.string.submit, DIALOG_REQ_SUBMIT).create().show(getFragmentManager(), (String) null);\n }", "public void populateTable()\n {\n DefaultTableModel model = (DefaultTableModel)workRequestJTable.getModel();\n \n model.setRowCount(0);\n for(WorkRequest request : weatherOrganisation.getWorkQueue().getWorkRequestList())\n {\n Object[] row = new Object[5];\n row[0] = request;\n \n row[1] = request.getStatus();\n row[2] = request.getRequestDate();\n row[3] = request.getResolveDate();\n row[4] = request.getDriverAcknowledgement();\n \n model.addRow(row);\n \n }\n \n }", "public void cliquerSauverContinuer() {\r\n\t\t\t\r\n\t\t\t//Identification du bouton et clic\r\n\t\t\tWebElement boutonSaveContinue = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(\"//table[@id='\"+prefix()+\"y5-box']/tbody/tr[2]/td[2]\")));\r\n\t\t\tboutonSaveContinue.click();\r\n\t\t}", "private void updateTable()\n\t{\n\t\ttable = new StringBuilder(String.format(\"%-7s %-30s %-30s %-5s\\n\", \"Song#\", \"Title\", \"Artist\", \"Time\"));\n\t\tdouble time = 0.0;\n\t\tfor(int i = 0; i < numOfSongs; i++)\n\t\t{\n\t\t\ttime = (double)song[i].getMinLength() + (song[i].getSecLength()/100.0); \n\t\t\ttable.append(String.format(\"%-7d %-30s %-30s %-5s\", (i+1), song[i].getTitle(), song[i].getArtist(), time));\n\t\t\tif(i < (numOfSongs-1))\n\t\t\t\ttable.append(\"\\n\");\n\t\t}\n\t}", "public static void prompt() {\n\t\tSystem.out.printf(\"\\n입력 > \");\n\t}", "private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n cmdExit = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setMaximumSize(new java.awt.Dimension(1280, 720));\n setMinimumSize(new java.awt.Dimension(1280, 720));\n addWindowFocusListener(new java.awt.event.WindowFocusListener() {\n public void windowGainedFocus(java.awt.event.WindowEvent evt) {\n formWindowGainedFocus(evt);\n }\n public void windowLostFocus(java.awt.event.WindowEvent evt) {\n }\n });\n getContentPane().setLayout(null);\n\n cmdExit.setFont(new java.awt.Font(\"Agency FB\", 0, 18)); // NOI18N\n cmdExit.setText(\"EXIT\");\n cmdExit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cmdExitActionPerformed(evt);\n }\n });\n getContentPane().add(cmdExit);\n cmdExit.setBounds(580, 620, 100, 31);\n\n jTable1.setFont(new java.awt.Font(\"Agency FB\", 0, 30)); // NOI18N\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Employee ID No.\", \"Name\", \"Address\", \"Phone No.\", \"Gender\"\n }\n ));\n jTable1.setIntercellSpacing(new java.awt.Dimension(3, 3));\n jTable1.setRowHeight(40);\n jScrollPane1.setViewportView(jTable1);\n\n getContentPane().add(jScrollPane1);\n jScrollPane1.setBounds(10, 90, 1240, 516);\n\n jLabel1.setFont(new java.awt.Font(\"Agency FB\", 0, 24)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"Displaying The Records Of The Table \\\"Employee\\\"\");\n getContentPane().add(jLabel1);\n jLabel1.setBounds(180, 40, 920, 29);\n\n pack();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if(isTableValid() && isTextFieldValid()) {\n window.changeToOutputPanel();\n }\n }", "private static void generalDetails()\r\n\t{\r\n\t\tSystem.out.println(\"Enter the name of waiter:\");\r\n\t\tname = scan.nextLine();\r\n\t\tSystem.out.println(\"Enter table number:\");\r\n\t\tboolean check = false;\r\n\t\t//while check is false, keep trying to get a valid table number\r\n\t\twhile(check==false)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\ttableNo = Integer.parseInt(scan.nextLine());\r\n\t\t\t\tcheck = true;\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Please enter a valid table number!\");\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tString genre = paramField1.getText();\n\t\t\t\tint size = Integer.parseInt(paramField2.getText());\n\t\t\t\t\n\t\t\t\tString[][] dataMatrix = RetrieveData( genre, size );\n\n\t\t\t\tString[] columnNames = dataMatrix[dataMatrix.length - 1];\n\t\t\t\tdataMatrix[dataMatrix.length - 1] = null;\n\t\t\t\t\n\t\t\t\tresultTable = new DefaultTableModel(columnNames, 0);\n\t\t\t\tresultTable.setRowCount(0);\n\n\t\t\t\tfor (String[] row : dataMatrix) {\n\t\t\t\t\tresultTable.addRow(row);\n\t\t\t\t}\n\n\t\t\t\tdataMatrix = null;\t\t\t\t\t\t\n\t\t\t\tformTable.setModel(resultTable);\n\n\n\t\t\t}", "public void fillResultsBox(){\n\n //reset the text box and add the header\n resultList.setText(\"\");\n resultList.append(\"Item \\t Win \\t Loss \\t Tie \\n\");\n\n //generate a list of ranked results for the current user\n generateResultsList();\n\n //for each item in the unranked item list, print the highest ranked item and remove it from the ranked item list\n for (TestItem testItem: testItems){\n printAndDeleteHighestItem();\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n //perform a new query\n try{\n tableModel.setQuery(queryArea.getText());\n }catch (SQLException sqlException){ //catch SQLException when performing a new query\n JOptionPane.showMessageDialog(null, sqlException.getMessage(), \"Database error\", JOptionPane.ERROR_MESSAGE);\n //try to recover from invalid user query by executing default query\n try{\n tableModel.setQuery(DEFAULT_QUERY);\n queryArea.setText(DEFAULT_QUERY);\n }catch (SQLException sqlException2){ //catch SQLException when performing default query\n JOptionPane.showMessageDialog(null, sqlException2.getMessage(), \"Database error\", JOptionPane.ERROR_MESSAGE);\n //ensure database connection is closed\n tableModel.disconnectFromDatabase();\n System.exit(1);\n }//end inner catch\n }//end outer catch\n }", "private static void askForContinue() {\n\t\t\t\n\t\t}", "private static boolean chooseTable(Scanner scan) throws SQLException {\r\n\t\t\r\n\t\tboolean running = true;\r\n\t\t\r\n\t\tSystem.out.println(\"Choose a table to work with:\\n1. \"\r\n\t\t\t\t+ \"Students\\n2. Subject\\n3. Teachers\\n4. Close the program\\n\");\r\n\t\t\r\n\t\tint userChoice = scan.nextInt();\r\n\t\tscan.nextLine();\r\n\t\tif(userChoice == 4)\r\n\t\t{\r\n\t\t\trunning = false;\r\n\t\t}\r\n\t\telse if(userChoice > 4)\r\n\t\t{ \r\n\t\t\tSystem.out.println(\"Invalid table choice. Try Again.\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttManager = new JdbcTableManager(userChoice, scan);\r\n\t\t\ttManager.crudandSearchMenuForTable();\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t\treturn running;\r\n\t\t\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n tableModel.addRow(new Object[] { idf.getText(), lnamef.getText(), fnamef.getText(), vtypef.getText(),\n vdatef.getText(), vlocationf.getText() });\n idf.setText(\"\");\n lnamef.setText(\"\");\n fnamef.setText(\"\");\n vtypef.setText(\"\");\n vdatef.setText(\"\");\n vlocationf.setText(\"\");\n\n p.remove(layout.getLayoutComponent(BorderLayout.CENTER));\n p.add(sp, BorderLayout.CENTER);\n p.repaint();\n p.revalidate();\n }", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "public static void main_printList(){\n\n table.printApplicantTable();\n\n }", "public void preencherTabelaResultado() {\n\t\tArrayList<Cliente> lista = Fachada.getInstance().pesquisarCliente(txtNome.getText());\n\t\tDefaultTableModel modelo = (DefaultTableModel) tabelaResultado.getModel();\n\t\tObject[] linha = new Object[4];\n\t\tmodelo.setRowCount(0);\n\n\t\tfor (Cliente c : lista) {\n\t\t\tlinha[0] = c.getIdCliente();\n\t\t\tlinha[1] = c.getNome();\n\t\t\tlinha[2] = c.getTelefone().toString();\n\t\t\tif (c.isAptoAEmprestimos())\n\t\t\t\tlinha[3] = \"Apto\";\n\t\t\telse\n\t\t\t\tlinha[3] = \"A devolver\";\n\t\t\tmodelo.addRow(linha);\n\n\t\t}\n\n\t}", "private void commitTab(){\n if(mConnection != null){\n mConnection.commitText(\"\\t\", 0);\n }\n }", "private void printTable(String type){\n\t\tSystem.out.println(\"\\n\\t\\t\\t\\t \" + type + \" Probing Analysis (Table size = \" + tableSize + \")\");\n\t\tSystem.out.println(\"\\t\\t ----- Inserts ------ ----------- Probes ---------- --------- Clusters ---------\");\n\t\tSystem.out.printf(\"%5s %10s %10s %10s %10s %10s %10s %10s %10s %10s\\n\", \n\t\t\t\t\"N\", \"lambda\", \"success\", \"failed\", \"total\", \"avg\", \"max\", \"number\", \"avg\", \"max\");\n\t}", "public static int askTableID() {\n\t\tSystem.out.println(\"Please enter the table ID:\");\n\t\tint tableID = ExceptionHandler.scanIntRange(1, TOTALTABLES);\n\t\treturn (tableID);\n\t}", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\r\n\t\t\t\t\ttable.print();\r\n\t\t\t\t} catch (java.awt.print.PrinterException e) {\r\n\t\t\t\t\tSystem.err.format(\"No printer found\", e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t\tMySQLConnect dal = new MySQLConnect();\r\n\t\t\ttry {\r\n\t\t\t\tString name;\r\n\t\t\t\tString date;\r\n\t\t\t\tString desc;\r\n\t\t\t\tString course;\r\n\t\t\t\tString type;\r\n\t\t\t\tString prior;\r\n\t\t\t\tScanner scan = new Scanner(System.in);\r\n\t\t\t\tSystem.out.println(\"Name: \");\r\n\t\t\t\tname = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Due Date(YYYY-MM-DD): \");\r\n\t\t\t\tdate = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Description: \");\r\n\t\t\t\tdesc = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Course: \");\r\n\t\t\t\tcourse = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Type: \");\r\n\t\t\t\ttype = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Priority: \");\r\n\t\t\t\tprior = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"The following form was added to the database:\");\r\n\t\t\t\tString[] check = dal.addForm(name.toString(),\"admin\",date.toString(),desc.toString(),course.toString(),type.toString(),prior.toString());\r\n\t\t\t\tfor(int i=0; i<check.length; i++){\r\n\t\t\t\t\tSystem.out.print(check[i] + \" \");\r\n\t\t\t\t}\r\n\t\t\t\t//test confirmation that button works\r\n\t\t\t\ttextArea.append(\"Form Submitted!\\n\");\r\n\t\t\t} catch (SQLException ex) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "private void promptNewIndexFile()\n {\n JPanel message = new JPanel(new GridLayout(2, 1));\n JLabel messageLabel = new JLabel(\"Enter name for new index database\");\n JPanel defaultWrapper = new JPanel();\n JLabel defaultLabel = new JLabel(\"Make this the default index? \");\n JCheckBox makeDefault = new JCheckBox(); \n \n defaultWrapper.add(defaultLabel);\n defaultWrapper.add(makeDefault);\n message.add(defaultWrapper);\n message.add(messageLabel);\n \n String fileName = JOptionPane.showInputDialog(null, message, \"Create new index file\", JOptionPane.OK_CANCEL_OPTION);\n if(fileName != null && !fileName.equalsIgnoreCase(\"\"))\n {\n spider.setIndexer(Indexer.createIndexer(\"data/\" + fileName + \".db\"));\n searchEngine.setIndexer(spider.getIndexer());\n \n if(makeDefault.isSelected())\n {\n spider.getConfig().setDatabaseFile(\"data/\" + fileName + \".db\");\n spider.updateConfig();\n }\n }\n }", "private void displayAllTable() {\n\n nhacungcap = new NhaCungCap();\n nhacungcap.setVisible(true);\n jDestopTable.add(nhacungcap);\n\n thuoc = new SanPham();\n thuoc.setVisible(true);\n jDestopTable.add(thuoc);\n\n khachHang = new KhachHang();\n khachHang.setVisible(true);\n jDestopTable.add(khachHang);\n\n hoaDon = new HoaDon();\n hoaDon.setVisible(true);\n jDestopTable.add(hoaDon);\n\n }", "private void repopulateTableForDelete()\n {\n clearTable();\n populateTable(null);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(results.isEmpty())\n\t\t\t\t\treturn;\n\t\t\t\tString collectionName = \toutputTypes_dropDown.getSelectedItem().equals(\"PackageDataSet\")? \"packageDataSets\" : \n\t\t\t\t\t\t\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"PackageFamily\")? \"packageFamilies\" :\n\t\t\t\t\t\t\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"File\")? \"files\" :\n\t\t\t\t\t\t\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"Package\")? \"packages\" :\n\t\t\t\t\t\t\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"ParentFile\")? \"parentFiles\" :\n\t\t\t\t\t\t\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"Source\")? \"sources\" : \"\";\n\t\t\t\tnew Thread(new Printer(results, client, dbname_txtfield.getText(), output_txtarea, collectionName)).start();\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n suspectedTable = new javax.swing.JTable();\n buttonBack = new javax.swing.JButton();\n buttonFilter = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n workReqTable = new javax.swing.JTable();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n buttonReportToFDA = new javax.swing.JButton();\n\n setBackground(new java.awt.Color(255, 255, 255));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel1.setText(\"Order Verification\");\n\n suspectedTable.setAutoCreateRowSorter(true);\n suspectedTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null}\n },\n new String [] {\n \"Vaccine\", \"Package ID\", \"Carton ID\", \"Expiry Date\", \"Status\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(suspectedTable);\n\n buttonBack.setText(\"Process and go Back\");\n buttonBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonBackActionPerformed(evt);\n }\n });\n\n buttonFilter.setText(\"Filter and process to Inventory\");\n buttonFilter.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonFilterActionPerformed(evt);\n }\n });\n\n workReqTable.setAutoCreateRowSorter(true);\n workReqTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Vaccine\", \"Carton ID\", \"Size\", \"Status\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane2.setViewportView(workReqTable);\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel2.setText(\"Suspected Products\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 0, 51));\n jLabel3.setText(\"Note: Any carton with suspected products will automatically be moved to the organization's Suspected Product Container on filtering.\");\n\n buttonReportToFDA.setText(\"Report Suspect Packaging\");\n buttonReportToFDA.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonReportToFDAActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(buttonReportToFDA)\n .addGap(59, 59, 59)\n .addComponent(buttonFilter))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(272, 272, 272)\n .addComponent(jLabel1))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jLabel2)))\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1)\n .addGroup(layout.createSequentialGroup()\n .addComponent(buttonBack)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 761, Short.MAX_VALUE))))\n .addContainerGap())\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 761, Short.MAX_VALUE)\n .addContainerGap()))\n );\n\n layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonFilter, buttonReportToFDA});\n\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(136, 136, 136)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(buttonFilter)\n .addComponent(buttonReportToFDA))\n .addGap(8, 8, 8)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 33, Short.MAX_VALUE)\n .addGap(36, 36, 36)\n .addComponent(buttonBack)\n .addGap(49, 49, 49))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(56, 56, 56)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(319, Short.MAX_VALUE)))\n );\n\n layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {buttonFilter, buttonReportToFDA});\n\n }", "public void actionPerformed(ActionEvent event){\n tableModel.addRow(blank);\r\n }", "public void input_entered() {\n\t\t_last_column = 0;\n\t\t_last_line = 0;\n\t\t_last_printed = '\\n';\n\t}", "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 }", "public void addToTable() {\n\n\n if (this.highScoresTable.getRank(this.scoreBoard.getScoreCounter().getValue()) <= this.highScoresTable.size()) {\n DialogManager dialog = this.animationRunner.getGui().getDialogManager();\n String name = dialog.showQuestionDialog(\"Name\", \"What is your name?\", \"\");\n\n this.highScoresTable.add(new ScoreInfo(name, this.scoreBoard.getScoreCounter().getValue()));\n File highScoresFile = new File(\"highscores.txt\");\n try {\n this.highScoresTable.save(highScoresFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n\n }", "protected void fourthStep() {\r\n final FlexTable table = new FlexTable();\r\n final FlexTable.FlexCellFormatter formatter = table.getFlexCellFormatter();\r\n table.addStyleName(\"GrondFourthStepTable\");\r\n\r\n panel.add(h3(new InlineHTML(\"ACTIVITY LEVEL WHEN YOU FIRST STARTED SEEING THIS PRACTITIONER\")));\r\n final String[] activityLevels = {\r\n \"1\",\r\n \"<b>One</b> - Bed-ridden, up to bathroom only\",\r\n \"2\",\r\n \"<b>Two</b> - Out of bed 30 min-2 hrs/day\",\r\n \"3\",\r\n \"<b>Three</b> - Out of bed 2-4 hrs/day\",\r\n \"4\",\r\n \"<b>Four</b> - Out of bed 4-6 hrs/day\",\r\n \"5\",\r\n \"<b>Five</b> - Minimal bed time needed, can work sedentary part-time job\",\r\n \"6\",\r\n \"<b>Six</b> - May maintain 40 hr sedentary work week\"\r\n + \" with limited housework/social activities, daily naps needed\", \"7\",\r\n \"<b>Seven</b> - Able to work a sedentary job\" + \" plus light housekeeping &ndash; no naps needed\",\r\n \"8\", \"<b>Eight</b> - Able to manage full work (sedentary)\" + \" plus manage a household\", \"9\",\r\n \"<b>Nine</b> - May exercise at approximately\" + \" ½-2/3rds normal without excessive fatigue\", \"10\",\r\n \"<b>Ten</b> - Normal\" };\r\n panel.add(radioInput(\"actLevStart\", null, \"<br/>\", activityLevels));\r\n\r\n panel.add(h3(new InlineHTML(\"ACTIVITY LEVEL WHEN YOU LAST SAW THIS PRACTITIONER\")));\r\n panel.add(radioInput(\"actLevEnd\", null, \"<br/>\", activityLevels));\r\n\r\n table.setHTML(0, 1, \"Please rate your symptom level\"\r\n + \" the first time you saw your practitioner and the last time you saw her/him\");\r\n formatter.setColSpan(0, 1, 22);\r\n table.setHTML(1, 1, \"AT FIRST APPOINTMENT\");\r\n formatter.setColSpan(1, 1, 10);\r\n formatter.setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_CENTER);\r\n table.setHTML(1, 3, \"AT LAST APPOINTMENT\");\r\n formatter.setColSpan(1, 3, 11);\r\n formatter.setHorizontalAlignment(1, 3, HasHorizontalAlignment.ALIGN_CENTER);\r\n\r\n table.setHTML(3, 1, \"Worst\");\r\n formatter.setColSpan(3, 1, 5);\r\n table.setHTML(3, 2, \"Healthy\");\r\n formatter.setColSpan(3, 2, 5);\r\n formatter.setHorizontalAlignment(3, 2, HasHorizontalAlignment.ALIGN_RIGHT);\r\n\r\n formatter.setWidth(3, 3, \"4px\");\r\n\r\n table.setHTML(3, 4, \"Worst\");\r\n formatter.setColSpan(3, 4, 5);\r\n table.setHTML(3, 5, \"Healthy\");\r\n formatter.setColSpan(3, 5, 5);\r\n formatter.setHorizontalAlignment(3, 5, HasHorizontalAlignment.ALIGN_RIGHT);\r\n\r\n table.setHTML(2, 22, \"N/A\");\r\n formatter.setHorizontalAlignment(2, 2, HasHorizontalAlignment.ALIGN_CENTER);\r\n\r\n /*! Maps cell index to a button. */\r\n final HashMap<String, RadioButton> buttons = new HashMap<String, RadioButton>();\r\n final int cellWidth = 24; /*!< Radio button cells should have an equal width. */\r\n final String cellWidthS = cellWidth + \"px\";\r\n final ValueChangeHandler<Boolean> buttonChangeHandler = new ValueChangeHandler<Boolean>() {\r\n @Override public void onValueChange(ValueChangeEvent<Boolean> event) {\r\n final RadioButton button = (RadioButton) event.getSource();\r\n ratingUpdateString(button.getName(), button.getFormValue());\r\n }\r\n };\r\n for (int i = 1; i <= 10; ++i) {\r\n table.setHTML(2, i, Integer.toString(i));\r\n table.setHTML(2, 11 + i, Integer.toString(i));\r\n formatter.setHorizontalAlignment(2, i, HasHorizontalAlignment.ALIGN_CENTER);\r\n formatter.setHorizontalAlignment(2, 11 + i, HasHorizontalAlignment.ALIGN_CENTER);\r\n formatter.setWidth(2, i, cellWidthS);\r\n formatter.setWidth(2, 11 + i, cellWidthS);\r\n int row = 4;\r\n for (final String field : DoctorRating.levelPrefixes()) {\r\n if (i == 1) {\r\n table.setHTML(row, 0, DoctorRating.levelLabel(field));\r\n\r\n formatter.setWidth(2, 22, cellWidthS);\r\n\r\n final RadioButton naButton = new RadioButton(field + \"After\");\r\n naButton.setFormValue(\"-1\");\r\n naButton.setValue(naButton.getFormValue().equals(rating.getField(naButton.getName())));\r\n table.setWidget(row, 22, naButton);\r\n naButton.addValueChangeHandler(buttonChangeHandler);\r\n buttons.put(row + \",22\", naButton);\r\n formatter.addStyleName(row, 22, \"GrondRadioRow\");\r\n }\r\n if (!field.equals(\"sat\")) {\r\n final RadioButton button = new RadioButton(field + \"Before\");\r\n button.setFormValue(Integer.toString(i));\r\n button.setValue(button.getFormValue().equals(rating.getField(button.getName())));\r\n table.setWidget(row, i, button);\r\n button.addValueChangeHandler(buttonChangeHandler);\r\n buttons.put(row + \",\" + i, button);\r\n formatter.addStyleName(row, i, \"GrondRadioRow\");\r\n }\r\n final RadioButton button = new RadioButton(field + \"After\");\r\n button.setFormValue(Integer.toString(i));\r\n button.setValue(button.getFormValue().equals(rating.getField(button.getName())));\r\n table.setWidget(row, 11 + i, button);\r\n button.addValueChangeHandler(buttonChangeHandler);\r\n buttons.put(row + \",\" + (11 + i), button);\r\n formatter.addStyleName(row, 11 + i, \"GrondRadioRow\");\r\n\r\n ++row;\r\n }\r\n }\r\n // Handle cell clicks as radio button clicks.\r\n table.addClickHandler(new ClickHandler() {\r\n @Override public void onClick(final ClickEvent event) {\r\n final HTMLTable.Cell cell = table.getCellForEvent(event);\r\n if (cell != null) {\r\n final RadioButton button = buttons.get(cell.getRowIndex() + \",\" + cell.getCellIndex());\r\n if (button != null && !button.getValue()) button.setValue(true);\r\n }\r\n }\r\n });\r\n panel.add(table);\r\n\r\n panel.add(h2(new HTML(\"Comments\")));\r\n final TextArea comments = new TextArea();\r\n comments.setValue(rating.getField(\"patientComments\") != null ? (String) rating\r\n .getField(\"patientComments\") : \"\");\r\n comments.addValueChangeHandler(new ValueChangeHandler<String>() {\r\n @Override public void onValueChange(ValueChangeEvent<String> event) {\r\n ratingUpdateString(\"patientComments\", event.getValue());\r\n }\r\n });\r\n comments.addStyleName(\"GrondRatingTextarea\");\r\n panel.add(comments);\r\n\r\n panel.add(h2(new HTML(\"Name:\")));\r\n panel.add(textInput(\"patientName\"));\r\n panel.add(new HTML(\"You are not required to leave your name but we encourage you to do so.\"\r\n + \" If you do it will appear on your review.\" + \" Reviews from patients who leave their names\"\r\n + \" will receive a higher rating than anonymous reviews.\"));\r\n\r\n panel.add(h2(new HTML(\"E-mail Address:\")));\r\n final TextBox patientEmail = textInput(\"patientEmail\");\r\n if (patientEmail.getValue().length() == 0 && grond.currentUser != null && grond.currentUser.email != null\r\n && grond.currentUser.email.length() != 0) patientEmail.setValue(grond.currentUser.email, true);\r\n panel.add(patientEmail);\r\n panel.add(new HTML(\"If you wish to edit this review in the future\"\r\n + \" or to do further reviews please provide your e-mail address;\"\r\n + \" it will not be visible on the internet.\"));\r\n\r\n panel.add(new HTML(\"&nbsp;\"));\r\n panel.add(new HTML(\"Thanks for taking the time to fill out the form!\"));\r\n\r\n final Command verifier = new Command() {\r\n @Override public void execute() {\r\n if (rating.satAfter <= 0) {\r\n final HTML html = new HTML(\r\n \"<span style='color: red; font-size: larger'>Please provide the overall satisfaction!</span>\");\r\n panel.add(html);\r\n Document.get().setScrollTop(\r\n html.getAbsoluteTop() + html.getOffsetHeight() - Window.getClientHeight());\r\n throw new CommandCanceledException(this);\r\n }\r\n }\r\n };\r\n panel.add(wizardNavigation(verifier));\r\n }", "private static void adminLoop() \n {\n boolean exit = false;\n Scanner input = new Scanner(System.in);\n\n while (!exit) \n {\n displayAdmin();\n String table = \"\";\n\n String[] tokens = input.nextLine().split(\" \");\n char option = tokens[0].toLowerCase().charAt(0);\n\n if(tokens.length > 1)\n table = tokens[1];\n\n switch(option) {\n case 'v': displayTable(table);\n break;\n case 'c': clearDB();\n break;\n case 'l': loadDB();\n break;\n case 'r': removeDB();\n break;\n case 'b': exit = true;\n break;\n }\n }\n\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Welcome to the Squares and Cubes Table\");\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString choice = \"y\";\n\t\tString table = \"\";\n\t\twhile (choice.equalsIgnoreCase(\"y\")) {\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"Enter an integer: \");\n\t\t\tint numberCtrl = sc.nextInt();\n\n\t\t\tSystem.out.println(numberCtrl);\n\n\t\t\ttable = \"Number\tSquared\tCubed \\r\" \n\t\t\t\t\t+ \"======\t=======\t===== \\r\";\n\n\t\t\tfor (int i = 1; i < (numberCtrl + 1); i++) {\n\t\t\t\tString tableRow = i + \"\\t\" + i * i + \"\\t\" + i * i * i + \"\\n\";\n\n\t\t\t\ttable += tableRow;\n\t\t\t}\n\n\t\t\tSystem.out.println(table);\n\t\t\tSystem.out.print(\"Continue? (y/n): \");\n\t\t\tchoice = sc.next();\n\t\t}\n\t}", "public void submitOrder(){\t\n\t\tSharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);\n\t\tint tableNumber = Integer.parseInt(sharedPref.getString(\"table_num\", \"\"));\n\t\t\n\t\tif(menu != null){\n\t\t\tParseUser user = ParseUser.getCurrentUser();\n\t\t\tParseObject order = new ParseObject(\"Order\");\n\t\t\torder.put(\"user\", user);\n\t\t\torder.put(\"paid\", false);\n\t\t\torder.put(\"tableNumber\", tableNumber); // Fix this -- currently hard coding table number\n\t\t\t\n\t\t\tParseRelation<ParseObject> items = order.getRelation(\"items\");\n\t\t\t\n\t\t\tfor(ParseObject item : selectedItems) {\n\t\t\t\titems.add(item);\n\t\t\t}\n\t\t\t\n\t\t\torder.saveInBackground(new SaveCallback(){\n\n\t\t\t\t@Override\n\t\t\t\tpublic void done(ParseException e) {\n\t\t\t\t\tif(e == null){\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Order Submitted!\", 5).show();\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Submitting Order Failed!\", 5).show();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t}\n\t}", "private void submit() throws SQLException, IllegalArgumentException {\r\n\t\t\r\n\t\t//Get all the values\r\n\t\tString fname = \"\", lname = \"\";\r\n\t\tint age = 0, workExp = 0;\r\n\t\tint selfProd = 0, selfQoS = 0, selfExp = 0;\t\t//selfrating values\r\n\t\t\r\n\t\t//Mandatory fields\r\n\t\tfname = tfFirstname.getText();\r\n\t\tlname = tfLastname.getText();\r\n\t\t\r\n\t\tif (fname.equals(\"\") || lname.equals(\"\"))\r\n\t\t\tthrow new IllegalArgumentException(\"Firstname and Lastname are\"\r\n\t\t\t\t\t+ \" mandatory fields!\");\r\n\t\t\r\n\t\t//Non-mandatory fields\r\n\t\ttry {\r\n\t\t\tage = Integer.parseInt(tfAge.getText());\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tage = -1;\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tworkExp = Integer.parseInt(tfWorkExp.getText());\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tworkExp = -1;\r\n\t\t}\r\n\t\t\r\n\t\t//slider values are default value (3) if untouched\r\n\t\tselfProd = sliderProd.getValue();\r\n\t\tselfQoS = sliderQoS.getValue();\r\n\t\tselfExp = sliderExp.getValue();\r\n\t\t\r\n\t\t\r\n\t\t//Create insert query for the values which are definitely set\r\n\t\tString query = \"INSERT INTO surveyresults (candidate, lastname, firstname,\"\r\n\t\t\t\t+ \"productivity, quality_of_service, exceeding_expectations) \"\r\n\t\t\t\t+ \"VALUES (\" + this.candidateID + \", '\" + lname + \"', '\" + fname \r\n\t\t\t\t+ \"', \" + selfProd + \", \" + selfQoS + \", \" + selfExp + \");\";\r\n\t\tdbc.executeUpdate(query);\r\n\t\t\r\n\t\t\r\n\t\t//Check the other values: age, workExp\r\n\t\tif (age >= 0) {\r\n\t\t\tquery = \"UPDATE surveyresults SET age = \" + age + \" \"\r\n\t\t\t\t\t+ \"WHERE candidate = \" + this.candidateID + \";\";\r\n\t\t\tdbc.executeUpdate(query);\r\n\t\t}\r\n\t\t\r\n\t\tif (workExp >= 0) {\r\n\t\t\tquery = \"UPDATE surveyresults SET working_experience = \" + workExp\r\n\t\t\t\t\t+ \" WHERE candidate = \" + this.candidateID + \";\";\r\n\t\t\tdbc.executeUpdate(query);\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t\t//set invitation status to completed (link is invalid now)\r\n\t\tquery = \"UPDATE invitations SET status = 'Completed' WHERE \"\r\n\t\t\t\t+ \"candidate = \" + this.candidateID + \";\";\r\n\t\tdbc.executeUpdate(query);\r\n\t}", "private void main_flow() throws SQLException {\n start_operation_complete_monitoring(this);\r\n BuffDBWriterTrell.total_nr_recorded_entries = 0;\r\n //======================\r\n NEW_RECORDS_FOUND = false;\r\n String last_export_date = get_last_export_date(SqlQ.get_latest_export_date());\r\n last_export_date = HelpM.get_date_time_minus_some_time_in_ms(last_export_date, \"yyyy-MM-dd HH:mm:ss\", 600000);// 10 min\r\n //======================\r\n export_procedure_1(last_export_date);\r\n //======================\r\n\r\n if (NEW_RECORDS_FOUND) {\r\n wait_();\r\n String msg = \" (nr rec.= \" + (BufferedDBWriterSuper.total_nr_recorded_entries - 1) + \" )\";\r\n SimpleLoggerLight.logg(\"main_flow.log\", msg);\r\n// write_to_update_table(\"main_flow\", \"\", DBT_trell.INTERFACE_TRIGER_TABLE_NAME,\r\n// \"mc\",\r\n// \"trell\",\r\n// bWriterTrell);\r\n } else {\r\n SimpleLoggerLight.logg_no_append(\"last_check.log\", \"-> LAST CHECK\");\r\n// write_to_update_table(\r\n// \"main_flow\", \"last_check\", DBT_trell.INTERFACE_TRIGER_TABLE_NAME,\r\n// \"mc\",\r\n// \"trell\",\r\n// bWriterTrell);\r\n }\r\n }", "private void submitActionPerformed(java.awt.event.ActionEvent evt) {\n try {\n\n Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n Connection connection = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:orcl\", \"batman\", \"54928\");\n String query = \"insert into COMPANY_DETAILS(COMPANY_NAME,COMPANY_ID)VALUES(?,?)\";\n PreparedStatement pst;\n pst = connection.prepareStatement(query);\n pst.setString(1, compname.getText());\n pst.setString(2, compid.getText());\n \n \n pst.executeUpdate();\n JOptionPane.showMessageDialog(null, \"inserted successfully\");\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n\n } // TODO add your h\n showTableData();\n \n }", "public void submitText() {\r\n \t\tthis.dialog.clickOK();\r\n \t}", "public static void printTable() {\n System.out.println(\"\\nMenu:\");\n System.out.println(\"(LR) - List All Recipients\");\n System.out.println(\"(LO) - List All Donors\");\n System.out.println(\"(AO) - Add New Donor\");\n System.out.println(\"(AR) - Add New Recipient\");\n System.out.println(\"(RO) - Remove Donor\");\n System.out.println(\"(RR) - Remove Recipient\");\n System.out.println(\"(SR) - Sort Recipients\");\n System.out.println(\"(SO) - Sort Donors\");\n System.out.println(\"(Q) - Quit\");\n }", "public void displayTable() {\n System.out.print(\"\\nSpreadsheet Table Details :\\nRows : \" + rowHeaders + \"\\nColumns:\" + colHeaders);\n new SheetParser(tableData).displaySheet();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n\n JButton jb = (JButton) e.getSource();\n if(jb == next_button){\n\n layout.extractInformation(number_of_rows,number_of_cols,dataEntries);\n JOptionPane.showMessageDialog(this, \"Your input has been successfully acquired. Press OK to continue.\\n\");\n this.setVisible(false);\n AdminGUI startGui = new AdminGUI(dataEntries , layout);\n //TODO: Uncomment layout start\n layout.start();\n }\n\n\n }", "private void histBtnActionPerformed(java.awt.event.ActionEvent evt) {\n rentTable.setModel(new DefaultTableModel(null, new Object[]{\"Rental Number\",\n \"Date of Rent\", \"Return Date\", \"Total Price\"}));\n\n DefaultTableModel rentalTable = (DefaultTableModel) rentTable.getModel();\n\n Object row[];\n for (int x = 0; x < rentalsList.size(); x++) {\n row = new Object[4];\n row[0] = rentalsList.get(x).getRentalNumber();\n row[1] = rentalsList.get(x).getDateRental();\n row[2] = rentalsList.get(x).getDateReturned();\n row[3] = \"R\" + rentalsList.get(x).getTotalRental();\n\n rentalTable.addRow(row);\n }\n\n }", "public void getNextResultSet(ActionEvent e)\r\n\t{\r\n\t\t// Ensure that an Indexing is not taking place\r\n\t\tif (this.settingEjb.getBooleanSettingByName(Constants.SETTING_SEARCH_INDEXING_COMMENCED))\r\n\t\t{\r\n\t\t\tthis.errorMessages\r\n\t\t\t .addMessage(\"We're sorry. The Search Engine is re-indexing the database right now. Please try again in 1 - 2 minutes. Thank you!\");\r\n\t\t\tthis.errorMessages.renderMessages();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif ((this.pageBackingBean.getCurrentUser() != null && this.pageBackingBean.getCurrentUser().isActive())\r\n\t\t || this.settingEjb.getBooleanSettingByName(Constants.SETTING_SEARCH_ALLOW_NON_USERS))\r\n\t\t{\r\n\t\t\t// Clear the current set of results\r\n\t\t\tthis.setResultsList(this.indexEjb.getBrowseResults(((this.resultsPage - 1) * this.resultsPerPage), this.resultsPerPage));\r\n\t\t}\r\n\t}", "public void actionPerformed(ActionEvent e)\n {\n //sets correct or wrong notes to invisible\n response.setVisible(false); \n response2.setVisible(false); \n if(correct) //if answer inputed was correct - set in enter button\n {\n if(x <= 1) //keeps track of which problem user is on\n {\n x++;\n tf.setText(questions[x]); //next question\n }\n else\n {\n //if all problems are solved class segways to next part of game\n game.setVisible(true); \n end.setVisible(true); \n }\n }\n \n correct = false; \n }", "@Override\r\n\t\tpublic void run() {\n\t\t\t \r\n\t\t\t def_t = new DefaultTableModel();\r\n def_t.setColumnIdentifiers(t_tab_b);\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tString req = \"select NOM, NRC, NIF, ADRESSE , TEL, CODE_F from TRANS_FOURNISSEUR order by NOM\";\r\n\t\t\t\tResultSet\trst = FirstPg.con.createStatement().executeQuery(req); \r\n\t\t\t\t\r\n\t\t\t\twhile(rst.next()){\r\n \t if(!rst.getString(6).equals(\"Inconnu\"))def_t.addRow(new Object[]{rst.getString(1),rst.getString(2),rst.getString(3),rst.getString(4),rst.getString(5),rst.getString(6)});\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t tab_fact.setModel(def_t);\r\n\t\t\t\r\n for(int i = 0; i< tab_fact.getRowCount();i++){\r\n \t changeSizeh(25,tab_fact,i);\r\n }\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t \r\n\t\t\t\r\n\t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n String tableName = ((JButton) e.getSource()).getText();\n Order order = new Order(tableName);\n if (e.getSource().getClass().equals(button.getClass())) {\n frame.dispose();\n Tables table = new Tables(tableName, order);\n table.createTableGUI();\n }\n }", "public void switchNextTabulator() {\r\n\t\tCTabItem[] tabItems = this.displayTab.getItems();\r\n\t\tfor (int i = 0; i < tabItems.length; i++) {\r\n\t\t\tCTabItem tabItem = tabItems[i];\r\n\t\t\tif (tabItem.getControl().isVisible()) {\r\n\t\t\t\tif (i + 1 <= tabItems.length - 1)\r\n\t\t\t\t\ttabItem.getParent().setSelection(i + 1);\r\n\t\t\t\telse\r\n\t\t\t\t\ttabItem.getParent().setSelection(0);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void jButtonPesquisarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonPesquisarActionPerformed\n atualizaTabelaProfessor();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\r\n\t\t\t\t\tconnect = ConnectionManagerFactory.createConnection();\r\n\t\t\t\t\tPreparedStatement prepstat = connect.prepareStatement(SqlQueries.JOURNALAVAILABILITY);\r\n\t\t\t\t\tprepstat.setString(1, issn.getText());\r\n\t\t\t\t\tResultSet rset = prepstat.executeQuery();\r\n\t\t\t\t\tint number = 0;\r\n\t\t\t\t\twhile (rset.next()) {\r\n\t\t\t\t\t\tnumber = Integer.parseInt(rset.getString(1));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (number > 0) {\r\n\t\t\t\t\t\tSystem.out.println(issn.getText());\r\n\t\t\t\t\t\tnew JournalConfirmation(studentInfo,facultyInfo,issn.getText(), journal.getResourceId());\r\n\t\t\t\t\t\tJournalDetailModule.this.setVisible(false);\r\n\t\t\t\t\t\tJournalDetailModule.this.dispose();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t//check if he is in waitlist\r\n\t\t\t\t\t\tif(ConferenceDetailModule.CheckIfAlreadyInWaitList(journal.getResourceId(),studentInfo,facultyInfo))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\t\t\t\t\t\" You are already in the waitlist table\");\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tprepstat = connect.prepareStatement(SqlQueries.JOURNALWAIT);\r\n\t\t\t\t\t\tString journalId = Integer.toString(journal.getResourceId());\r\n\t\t\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd-MMM-yyyy hh:mm:ss a\");\r\n\t\t\t\t\t\tDate date = new Date();\r\n\t\t\t\t\t\tString currentTime = dateFormat.format(date);\r\n\t\t\t\t\t\tprepstat.setString(1, journalId);\r\n\t\t\t\t\t\tprepstat.setString(2, currentTime);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (studentInfo != null) {\r\n\t\t\t\t\t\t\tprepstat.setString(3, studentInfo.getStudentId());\r\n\t\t\t\t\t\t\tprepstat.setString(4, null);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tprepstat.setString(3, null);\r\n\t\t\t\t\t\t\tprepstat.setString(4, facultyInfo.getFacultyId());\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tdateFormat = new SimpleDateFormat(\"dd-MMM-yyyy hh:mm:ss a\");\r\n\r\n\t\t\t\t\t\tfinal long SECONDS = 1000;\r\n\t\t\t\t\t\tfinal long MINUTES = 60 * SECONDS;\r\n\t\t\t\t\t\tfinal long HOURS = 60 * MINUTES;\r\n\r\n\t\t\t\t\t\tdate.setTime(date.getTime() + 12 * HOURS);\r\n\t\t\t\t\t\tString returnTime = dateFormat.format(date);\r\n\r\n\t\t\t\t\t\tprepstat.setString(5, returnTime);\r\n\t\t\t\t\t\tprepstat.setString(6, \"Journal\");\r\n\t\t\t\t\t\tprepstat.setString(7, issn.getText());\r\n\r\n\t\t\t\t\t\trset = prepstat.executeQuery();\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\t\t\t\t\"This Journal is currently not available. You are currently added to the waitlist table\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\trset.close();\r\n\t\t\t\t\tprepstat.close();\r\n\t\t\t\t\tconnect.close();\r\n\t\t\t\t\tJournalDetailModule.this.setVisible(false);\r\n\t\t\t\t\tJournalDetailModule.this.dispose();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e);\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(results.isEmpty())\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\tif(viewNumber.getText().trim().isEmpty())\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\tint num = 0;\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tnum = Integer.parseInt(viewNumber.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException nfe){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid Number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(num <= 0){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid Number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(num > results.size()){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid Number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString collectionName = \toutputTypes_dropDown.getSelectedItem().equals(\"PackageDataSet\")? \"packageDataSets\" : \n\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"PackageFamily\")? \"packageFamilies\" :\n\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"File\")? \"files\" :\n\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"Package\")? \"packages\" :\n\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"ParentFile\")? \"parentFiles\" :\n\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"Source\")? \"sources\" : \"\";\n\t\t\t\t\n\t\t\t\tnew Thread(new Printer(results.get(num - 1), client, dbname_txtfield.getText(), output_txtarea, collectionName)).start();\n\t\t\t\t\n\t\t\t}", "public static void main(String[] args) \n\t{\n\t\tint newS = 0;\n\t\t\n\t\tTable table = new Table();\n\t\t\n\t\ttable.createTable();\n\t\t\n\t\ttable.printTable();\n\t\t\n\t\ttable.printFinal();\n\t\t\n\t\t\n\t}", "private void menuPrintActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuPrintActionPerformed\n MessageFormat header = new MessageFormat(\" Reminder List Data \");\n MessageFormat footer = new MessageFormat(\" MoneyMinder Inc. '2019' \");\n try {\n remindersTable.print(JTable.PrintMode.FIT_WIDTH, header, footer);\n } catch (PrinterException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void continueLastWorkout()\n {\n Workout last_workout = lift_db_helper.selectLastWorkout();\n if (last_workout != null)\n {\n AddLift.start(current_context, last_workout);\n }\n else\n {\n Snackbar no_previous_workouts = Snackbar.make(findViewById(R.id.continue_workout_button), R.string.no_workouts_to_continue, Snackbar.LENGTH_LONG);\n no_previous_workouts.setAction(R.string.start_new_workout, new View.OnClickListener()\n {\n @Override\n public void onClick(View v)\n {\n NewWorkoutDialog new_workout_dialog = new NewWorkoutDialog(v.getContext(), lift_db_helper);\n new_workout_dialog.show();\n }\n });\n no_previous_workouts.show();\n }\n }", "public void tableFinished(int position, Integer[] ranking) {\r\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttry{\n\t\t\t\t\t\n\t\t\t\t\tString create_query=\"CREATE TABLE '\" + username.getText() + \"' ('ID' TEXT PRIMARY KEY NOT NULL , 'DATE' TEXT, 'CODE' TEXT, 'NumOfPieces' INTEGER DEFAULT 0,'WEIGHT' DOUBLE DEFAULT 0.000,'PARTICULAR' TEXT, 'DEBIT' DOUBLE DEFAULT 0.00, 'CREDIT' DOUBLE DEFAULT 0.00)\";\n\t\t\t\t\tPreparedStatement pst2 = connection.prepareStatement(create_query);\n\t\t\t\t\tpst2.executeUpdate();\n\t\t\t\t\tString insert_query=\"INSERT INTO JAM_USER(user_name,user_pwd,user_cr,user_db,user_bal) VALUES(?,?,?,?,?)\";\n\t\t\t\t\tPreparedStatement pst3 = connection.prepareStatement(insert_query);\n\t\t\t\t\tpst3.setString(1,username.getText());\n\t\t\t\t\tpst3.setString(2,password.getText());\n\t\t\t\t\t//pst2.setString(3,);\n\t\t\t\t\t//pst2.setString(4,password.getText());\n\t\t\t\t\t//pst2.setString(5,username.getText());\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tpst3.executeUpdate();\n\t\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"User Created Successfully, Please Login!\",\"Jarvis Account Manager\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t//\tframe.dispose();\n\t\t\t\t//\tSecond_frame sf1= new Second_frame();\n\t\t\t\t//\tsf1.setVisible(true);\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tpst2.close();\n\t\t\t\t\tpst3.close();\n\t\t\t\t}catch(Exception se){\n\t\t\t\t\t//JOptionPane.showMessageDialog(null,se);\n\t\t\t\t\tJOptionPane.showMessageDialog(null,se.getMessage(),\"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t\n\t\t\t}", "private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {\n loadInTable();\r\n calculate();\r\n \r\n fetchSalaryDetailsFromDB(1, 202);\r\n }", "@Override\n\tpublic void handle(ActionEvent arg0) {\n\t\tCreateTables creator = new CreateTables(tlp);\n\t\tcreator.createLogTable();\n//\t\tcreator.createRacesTable();\n//\t\tcreator.createTravelHistoryTable();\n\t\tSystem.out.println(\"log exist: \"+creator.checkExistingTable(\"log\"));\n\t\tSystem.out.println(\"races exist: \"+creator.checkExistingTable(\"races\"));\n\t\tSystem.out.println(\"travelhistory exist: \"+creator.checkExistingTable(\"travelhistory\"));\n\t}", "public void entryActions() {\n\t\tclearMessage();\n\t\tmyTable.update();\n\t\tmainPanel.revalidate();\n\t\tmainPanel.repaint();\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jPanel1 = new javax.swing.JPanel();\n lblTable = new javax.swing.JLabel();\n txtTable = new javax.swing.JTextField();\n btnReset = new javax.swing.JToggleButton();\n btnSave = new javax.swing.JToggleButton();\n btnPrintTable = new javax.swing.JToggleButton();\n jLabel6 = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n txtUpdateTable = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n btnUpdate = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n lblID = new javax.swing.JLabel();\n jPanel3 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblTablesNumber = new javax.swing.JTable();\n jLabel3 = new javax.swing.JLabel();\n jSeparator1 = new javax.swing.JSeparator();\n jLabel5 = new javax.swing.JLabel();\n\n jPanel1.setBackground(new java.awt.Color(255, 217, 151));\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(\"\"));\n\n lblTable.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n lblTable.setText(\"Table Number\");\n\n txtTable.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n txtTableFocusLost(evt);\n }\n });\n txtTable.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtTableActionPerformed(evt);\n }\n });\n txtTable.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtTableKeyTyped(evt);\n }\n });\n\n btnReset.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n btnReset.setText(\"Reset\");\n btnReset.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnResetActionPerformed(evt);\n }\n });\n\n btnSave.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n btnSave.setText(\"Save\");\n btnSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSaveActionPerformed(evt);\n }\n });\n\n btnPrintTable.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n btnPrintTable.setText(\"Print Table\");\n btnPrintTable.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnPrintTableActionPerformed(evt);\n }\n });\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel6.setText(\"Add New Table\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblTable)\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(btnSave, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnReset, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnPrintTable, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(txtTable, javax.swing.GroupLayout.PREFERRED_SIZE, 317, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(189, 189, 189)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtTable, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblTable))\n .addGap(30, 30, 30)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnPrintTable, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnReset, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(82, Short.MAX_VALUE))\n );\n\n jPanel2.setBackground(new java.awt.Color(255, 217, 151));\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(\"\"));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setText(\"Update Table\");\n\n btnUpdate.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n btnUpdate.setText(\"Update\");\n btnUpdate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnUpdateActionPerformed(evt);\n }\n });\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel2.setText(\"New Table\");\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n jLabel4.setText(\"ID\");\n\n lblID.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel4))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblID)\n .addComponent(txtUpdateTable, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnUpdate)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(34, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(39, 39, 39)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(lblID))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtUpdateTable, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(34, 34, 34)\n .addComponent(btnUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(104, Short.MAX_VALUE))\n );\n\n jPanel3.setBackground(new java.awt.Color(255, 217, 151));\n jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(\"\"));\n\n tblTablesNumber.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n tblTablesNumber.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tblTablesNumberMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(tblTablesNumber);\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel3.setText(\"Available Tables\");\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 464, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(36, 36, 36))\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGap(186, 186, 186)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 13, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 248, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/Table_new1.png\"))); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jSeparator1))\n .addGroup(layout.createSequentialGroup()\n .addGap(61, 61, 61)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 498, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 80, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(46, 46, 46))\n .addGroup(layout.createSequentialGroup()\n .addGap(133, 133, 133)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 298, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(37, 37, 37)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(36, 36, 36)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(129, 129, 129))\n );\n\n pack();\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tint bookId1=Integer.parseInt(ft2.getText());\n\t\t\t\tString bookName1=ft3.getText();\n\t\t\t\tString authorName1=ft5.getText();\n\t\t\t\tint quantity1=Integer.parseInt(ft6.getText());\n\t\t\t\ttry {\n\t\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\t\tConnection con1=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/project\",\"root\",\"\");\n\t\t\t\t\tPreparedStatement pst1=con1.prepareStatement(\"select * from table1 where BOOKID=?\");\n\t\t\t\t\tpst1.setInt(1,bookId1);\n\t\t\t\t\t\n\t\t\t\t\tResultSet rst1=pst1.executeQuery();\n\t\t\t\t\tif(rst1.next()) {\n\t\t\t\t\t\tint quantity2=rst1.getInt(\"QUANTITY\");\n\t\t\t\t\t\tint total1=quantity2+quantity1;\n\t\t\t\t\t\tPreparedStatement pst3=con1.prepareStatement(\"update table1 set QUANTITY=? where BOOKID=?\");\n\t\t\t\t\t\tpst3.setInt(1, total1);\n\t\t\t\t\t\tpst3.setInt(2, bookId1);\n\t\t\t\t\t\tint ok2=JOptionPane.showConfirmDialog(f4, \"Conform to update stock of the book\",\"Are you sure..\",JOptionPane.YES_NO_OPTION);\n\t\t\t\t\t\tif(ok2==0) {\n\t\t\t\t\t\t\tpst3.executeUpdate();\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog( f4, \"Submitted Successfully\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tPreparedStatement pst2=con1.prepareStatement(\"insert into table1(BOOKID,BOOKNAME,DEPT,AUTHORNAME,QUANTITY) values(?,?,?,?,?)\");\n\t\t\t\t\t\tpst2.setInt(1,bookId1);\n\t\t\t\t\t\tpst2.setString(2,bookName1);\n\t\t\t\t\t\tpst2.setString(3,dept2);\n\t\t\t\t\t\tpst2.setString(4,authorName1);\n\t\t\t\t\t\tpst2.setInt(5,quantity1);\n\t\t\t\t\t\tint ok1=JOptionPane.showConfirmDialog(f4, \"Conform to add new type of book\",\"Are you sure..\",JOptionPane.YES_NO_OPTION);\n\t\t\t\t\t\tif(ok1==0) {\n\t\t\t\t\t\t\tpst2.execute();\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog( f4, \"Submitted Successfully\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcon1.close();\n\t\t\t\t}catch(Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\titem5 = tf[7].getText();\n\t\t\t\tif(!item5.equals(\"\")) {\n//\t\t\t\t\tsql = transaction.T5(item5);\n\t\t\t\t\n\t\t\t\t\tDMT_refresh(sql,0);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\titem1 = tf[0].getText();\n\t\t\t\t\titem2 = tf[1].getText();\n\t\t\t\t\titem3 = tf[2].getText();\n//\t\t\t\t\tsql = transaction.T9(inx0,item1,inx1,item2,inx2,item3);\n\t\t\t\t\t\n\t\t\t\t\tDMT_refresh(sql,0);\n\t\t\t\t}\n\t\t\t}", "public void populateDataToTable() throws SQLException {\n model = (DefaultTableModel) tblOutcome.getModel();\n List<Outcome> ouc = conn.loadOutcome();\n int i = 1;\n for (Outcome oc : ouc) {\n Object[] row = new Object[5];\n row[0] = i++;\n row[1] = oc.getCode_outcome();\n row[2] = oc.getTgl_outcome();\n row[3] = oc.getJml_outcome();\n row[4] = oc.getKet_outcome();\n model.addRow(row);\n }\n }", "private void populateTable() {\n Collections.sort(this.player.arr, new SortByLevel());\n achievementLabel.setText(player.toString() + \" at \" + new SimpleDateFormat(\"dd/MM/yy HH:mm:ss\").format(new Date()));\n for(int i = 0; i < this.player.arr.size(); i++) {\n Achievement temp = this.player.arr.get(i);\n resultsTable.addRow(new Object[] {temp.getDescription(), temp.getLevel(), temp.getOutOfPossible()});\n }\n }", "public void clickOnTableHeading() {\r\n\t\tsafeClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-table-column-has-actions.ant-table-column-has-sorters.ant-table-column-sort\"), SHORTWAIT);\r\n\t}", "private ConfigurationHTMLPrinter startTable() {\n return println(\"<table border='0' cellspacing='0' cellpadding='0'>\").incrementIndent();\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\r\n if (e.getActionCommand().equals(\"tableOpen\")) {\r\n TablePlotting tp = new TablePlotting();\r\n System.out.println(\"Table Panel is opened.\");\r\n }\r\n \r\n if (e.getActionCommand().equals(\"Bisection\")) {\r\n if (method3.isSelected()) {\r\n xValueUserText.setEditable(false);\r\n xLeftBisectionB.setEditable(true);\r\n xRightBisectionB.setEditable(true);\r\n } else {\r\n xValueUserText.setEditable(true);\r\n xLeftBisectionB.setEditable(false);\r\n xRightBisectionB.setEditable(false);\r\n }\r\n }\r\n\r\n if (e.getActionCommand().equals(\"Secant\")) {\r\n if (method2.isSelected()) {\r\n xValueUserText.setEditable(true);\r\n xLeftBisectionB.setEditable(false);\r\n xRightBisectionB.setEditable(false);\r\n }\r\n }\r\n \r\n if (e.getActionCommand().equals(\"Newton-Raphson\")) {\r\n if (method1.isSelected()) {\r\n xValueUserText.setEditable(true);\r\n xLeftBisectionB.setEditable(false);\r\n xRightBisectionB.setEditable(false);\r\n }\r\n }\r\n \r\n//<editor-fold defaultstate=\"collapsed\" desc=\"FirstFunction\">\r\n if (e.getActionCommand().equals(\"FirstFunction\")) {\r\n if (!method3.isSelected() && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a number of iterations. \");\r\n } else if (method3.isSelected() && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a number of iterations. \");\r\n } else {\r\n FunctionPlotting.First();\r\n if (method1.isSelected()) {\r\n if (xValueUserText.getText().equals(\"\") && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a value for X and number of iterations. \");\r\n } else if (xValueUserText.getText().equals(\"\") && !iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a value for X. \");\r\n } else if (!xValueUserText.getText().equals(\"\") && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a number of iterations. \");\r\n } else {\r\n NewtonRaphsonMethod.FirstF();\r\n }\r\n } else if (method2.isSelected()) {\r\n if (xValueUserText.getText().equals(\"\") && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a value for X and number of iterations. \");\r\n } else if (xValueUserText.getText().equals(\"\") && !iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a value for X. \");\r\n } else if (!xValueUserText.getText().equals(\"\") && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a number of iterations. \");\r\n } else {\r\n SecantMethod.FirstF();\r\n }\r\n } else if (method3.isSelected()) {\r\n if (iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a number of iterations. \");\r\n } else if (xLeftBisectionB.getText().equals(\"\") && xRightBisectionB.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter lower and upper bounds for Bisection method! \");\r\n } else if (xLeftBisectionB.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter lower bound for Bisection method! \");\r\n } else if (xRightBisectionB.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter upper bound for Bisection method! \");\r\n } else {\r\n BisectionMethod.FirstF();\r\n }\r\n }\r\n }\r\n }\r\n//</editor-fold>\r\n\r\n//<editor-fold defaultstate=\"collapsed\" desc=\"SecondFunction\">\r\n if (e.getActionCommand().equals(\"SecondFunction\")) {\r\n if (!method3.isSelected() && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a number of iterations. \");\r\n } else if (method3.isSelected() && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a number of iterations. \");\r\n } else {\r\n FunctionPlotting.Second();\r\n if (method1.isSelected()) {\r\n if (xValueUserText.getText().equals(\"\") && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a value for X and number of iterations. \");\r\n } else if (xValueUserText.getText().equals(\"\") && !iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a value for X. \");\r\n } else if (!xValueUserText.getText().equals(\"\") && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a number of iterations. \");\r\n } else {\r\n NewtonRaphsonMethod.SecondF(); \r\n }\r\n } else if (method2.isSelected()) {\r\n if (xValueUserText.getText().equals(\"\") && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a value for X and number of iterations. \");\r\n } else if (xValueUserText.getText().equals(\"\") && !iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a value for X. \");\r\n } else if (!xValueUserText.getText().equals(\"\") && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a number of iterations. \");\r\n } else {\r\n SecantMethod.SecondF();\r\n }\r\n } else if (method3.isSelected()) {\r\n if (iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a number of iterations. \");\r\n } else if (xLeftBisectionB.getText().equals(\"\") && xRightBisectionB.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter lower and upper bounds for Bisection method! \");\r\n } else if (xLeftBisectionB.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter lower bound for Bisection method! \");\r\n } else if (xRightBisectionB.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter upper bound for Bisection method! \");\r\n } else {\r\n BisectionMethod.SecondF();\r\n }\r\n }\r\n }\r\n }\r\n//</editor-fold>\r\n\r\n//<editor-fold defaultstate=\"collapsed\" desc=\"ThirdFunction\">\r\n if (e.getActionCommand().equals(\"ThirdFunction\")) {\r\n if (!method3.isSelected() && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a number of iterations. \");\r\n } else if (method3.isSelected() && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a number of iterations. \");\r\n } else {\r\n FunctionPlotting.Third();\r\n if (method1.isSelected()) {\r\n if (xValueUserText.getText().equals(\"\") && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a value for X and number of iterations. \");\r\n } else if (xValueUserText.getText().equals(\"\") && !iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a value for X. \");\r\n } else if (!xValueUserText.getText().equals(\"\") && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a number of iterations. \");\r\n } else {\r\n NewtonRaphsonMethod.ThirdF();\r\n }\r\n } else if (method2.isSelected()) {\r\n if (xValueUserText.getText().equals(\"\") && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a value for X and number of iterations. \");\r\n } else if (xValueUserText.getText().equals(\"\") && !iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a value for X. \");\r\n } else if (!xValueUserText.getText().equals(\"\") && iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a number of iterations. \");\r\n } else {\r\n SecantMethod.ThirdF();\r\n }\r\n } else if (method3.isSelected()) {\r\n if (iterations.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter a number of iterations. \");\r\n } else if (xLeftBisectionB.getText().equals(\"\") && xRightBisectionB.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter lower and upper bounds for Bisection method! \");\r\n } else if (xLeftBisectionB.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter lower bound for Bisection method! \");\r\n } else if (xRightBisectionB.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(this, \"Please enter upper bound for Bisection method! \");\r\n } else {\r\n BisectionMethod.ThirdF();\r\n }\r\n }\r\n }\r\n }\r\n//</editor-fold>\r\n }", "protected GuiTestObject nextsubmit() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"nextsubmit\"));\n\t}", "private void insertButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN\n // -\n // FIRST\n // :\n // event_insertButtonActionPerformed\n int rowIndex = headerTable.getSelectedRow();\n if (rowIndex > -1) {\n insertRow(rowIndex);\n } else {\n insertRow(_tableModel.getRowCount());\n }\n }", "private void Edit_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Edit_btnActionPerformed\n\n try {\n\n // pull current table model\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n if (remindersTable.getSelectedRow() == -1) {\n if (remindersTable.getRowCount() == 0) {\n dm.messageEmptyTable();\n } else {\n dm.messageSelectLine();\n }\n } else {\n int input = JOptionPane.showConfirmDialog(frame, \"Do you want to Edit!\");\n // 0 = yes, 1 = no, 2 = cancel\n if (input == 0) {\n // isIncome --> true if radio selected\n boolean isIncome = income_Rad.isSelected();\n\n // dueDate --> converted from: Date => String value\n Date dateDue = dueDate_date.getDate();\n String dueDate = DateFormat.getDateInstance().format(dateDue);\n\n // title --> String var\n String title = ToFrom_Txt.getText();\n\n // amount --> cast to Double; round to 2 places\n double amountRaw = Double.parseDouble(Amount_Txt.getText());\n String rounded = String.format(\"%.2f\", amountRaw);\n double amount = Double.parseDouble(rounded);\n\n // amount converted to negative value in isIncome is false\n if (!isIncome == true) {\n amount = (abs(amount) * (-1));\n } else {\n amount = abs(amount);\n }\n\n // category --> cast to String value of of box selected\n String category = (String) category_comb.getSelectedItem();\n\n // freuency --> cast to String value of of box selected\n String frequency = (String) frequency_comb.getSelectedItem();\n\n // dateEnd --> converted from: Date => String value\n Date dateEnd = endBy_date.getDate();\n String endBy = DateFormat.getDateInstance().format(dateEnd);\n\n // Update table with form data\n model.setValueAt(isIncome, remindersTable.getSelectedRow(), 0);\n model.setValueAt(dueDate, remindersTable.getSelectedRow(), 1);\n model.setValueAt(title, remindersTable.getSelectedRow(), 2);\n model.setValueAt(amount, remindersTable.getSelectedRow(), 3);\n model.setValueAt(category, remindersTable.getSelectedRow(), 4);\n model.setValueAt(frequency, remindersTable.getSelectedRow(), 5);\n model.setValueAt(endBy, remindersTable.getSelectedRow(), 6);\n\n dm.messageReminderEdited();// user message\n clearReminderForm();// clear the form\n saveDataToFile();// Save changes to file\n getSum(); // Update projected balance\n\n } else {\n // edit canceled\n }\n }\n } catch (NullPointerException e) {\n dm.messageFieldsIncomplete();\n\n } catch (NumberFormatException e) {\n dm.messageNumberFormat();\n }\n }" ]
[ "0.59784114", "0.5869425", "0.5756205", "0.5685427", "0.5651257", "0.5589649", "0.5494651", "0.5471956", "0.5460259", "0.5448142", "0.541615", "0.5408144", "0.5392444", "0.5387824", "0.53789735", "0.53541785", "0.53433895", "0.5333625", "0.5317262", "0.5297105", "0.52757573", "0.52756494", "0.5260576", "0.5257408", "0.52470803", "0.52333677", "0.52282566", "0.52259696", "0.5215363", "0.5185405", "0.51822484", "0.5171067", "0.5153659", "0.515354", "0.51419324", "0.5134266", "0.51332176", "0.5104464", "0.5102652", "0.51022005", "0.5099389", "0.50972205", "0.50838065", "0.5081105", "0.50759804", "0.5070079", "0.50654143", "0.5055936", "0.50553095", "0.5052252", "0.504921", "0.5044874", "0.50399846", "0.50297964", "0.50295866", "0.5029331", "0.5028334", "0.5025749", "0.5020491", "0.50181144", "0.50161123", "0.5011075", "0.50088835", "0.50073695", "0.50064635", "0.50042087", "0.5000763", "0.50002944", "0.49969664", "0.49923584", "0.49922806", "0.498664", "0.49824753", "0.49769506", "0.4974405", "0.49682367", "0.4964265", "0.4962638", "0.49591917", "0.49570552", "0.49552995", "0.49541193", "0.49503404", "0.49465933", "0.49451226", "0.4938642", "0.49182606", "0.4913641", "0.49124065", "0.4911996", "0.4905491", "0.4904089", "0.49004224", "0.48929483", "0.48927033", "0.48888716", "0.48872378", "0.48868126", "0.48858508", "0.48826918" ]
0.56678474
4
turns sorted sample numbers into final conclusions
public void addConclusions() { if(conclusionNumbers1.size()==0) { conclusion1=""; } else if(conclusionNumbers1.size()==1) { conclusion1 = "Bacteroides was detected from sample "+conclusionNumbers1.get(0)+"."; } else if(conclusionNumbers1.size()==2) { conclusion1 = "Bacteroides was detected from samples "+conclusionNumbers1.get(0) + " and "+ conclusionNumbers1.get(1) + "."; } else { conclusion1 = "Bacteroides was detected from samples "; for(int i=0;i<conclusionNumbers1.size()-2;i++) { conclusion1+=conclusionNumbers1.get(i) + ", "; } conclusion1+= conclusionNumbers1.get(conclusionNumbers1.size()-2) + " and "+ conclusionNumbers1.get(conclusionNumbers1.size()-1) + "."; } if(conclusionNumbers2.size()==0) { conclusion2=""; } else if(conclusionNumbers2.size()==1) { conclusion2 = "no Bacteroides was detected from sample "+conclusionNumbers2.get(0)+"."; } else if(conclusionNumbers2.size()==2) { conclusion2 = "no Bacteroides was detected from samples "+conclusionNumbers2.get(0) + " and "+ conclusionNumbers2.get(1) + "."; } else { conclusion2 = "no Bacteroides was detected from samples "; for(int i=0;i<conclusionNumbers2.size()-2;i++) { conclusion2+=conclusionNumbers2.get(i) + ", "; } conclusion2+= conclusionNumbers2.get(conclusionNumbers2.size()-2) + " and "+ conclusionNumbers2.get(conclusionNumbers2.size()-1) + "."; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void discretization(int[] nums) {\n\t\tint[] sorted = nums.clone();\n\t\tArrays.sort(sorted);\n\t\tfor (int i = 0; i < nums.length; i++) {\n\t\t\tnums[i] = Arrays.binarySearch(sorted, nums[i]);\n\t\t}\n\t}", "public void addConclusionNumber(Sample sample) {\n\t\tif(sample.getConclusionCase()==0) {\n\t\t\tconclusionNumbers1.addAll(sample.getSampleNumber());\n\t\t}\n\t\telse {\n\t\t\tconclusionNumbers2.addAll(sample.getSampleNumber());\n\t\t}\n\t}", "List<Integer> downSampleLevels();", "public static List<Integer> findDisappearedNumbers_sort(int[] nums) {\n List<Integer> ans = new ArrayList<>();\n Arrays.sort(nums);\n int len = nums.length;\n int p = 0;\n int q = 1;\n while (p < len) {\n while (nums[p] > q) {\n ans.add(q);\n q++;\n }\n\n if (nums[p] == q) {\n q++;\n }\n\n p++;\n }\n\n while (q <= len) {\n ans.add(q);\n q++;\n }\n\n return ans;\n }", "private void regularMin3Demo() {\n int[] copy = Arrays.copyOf(numbers, numbers.length);\n Arrays.sort(copy);\n for(int i = 0; i < 3; i++) {\n System.out.println(copy[i]);\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tArrayList<Integer> oneThruTen = new ArrayList<>();\n\t\tArrayList<Integer> sixThruFifteen = new ArrayList<>();\n\t\tArrayList<Integer> combinedNumbers = new ArrayList<>();\n\n\t\tfor (int i = 1; i < 11; i++) {\n\t\t\toneThruTen.add(i);\n\t\t\tsixThruFifteen.add(i + 5);\n\t\t}\n\n\t\tCollections.shuffle((List<?>) oneThruTen);\n\t\tCollections.shuffle((List<?>) sixThruFifteen);\n\n\t\tSystem.out.println(\"Collection 1:\");\n\t\tfor (Integer integer : oneThruTen) {\n\t\t\tSystem.out.println(integer);\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\tSystem.out.println(\"Collection 2:\");\n\t\tfor (Integer integer : sixThruFifteen) {\n\t\t\tSystem.out.println(integer);\n\t\t}\n\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Collection 1 Size: \" + oneThruTen.size());\n\t\tSystem.out.println(\"Collection 2 Size: \" + sixThruFifteen.size());\n\n\t\tcombinedNumbers.addAll(oneThruTen);\n\t\tcombinedNumbers.addAll(sixThruFifteen);\n\n\t\t// Converting to Set and then reverting to ArrayList to remove duplicate\n\t\tSet<Integer> tempset = new HashSet<>();\n\t\ttempset.addAll(combinedNumbers);\n\t\tcombinedNumbers.clear();\n\t\tcombinedNumbers.addAll(tempset);\n\t\t//sort in ascending order\n\t\tcombinedNumbers.sort(null);\n\t\t//remove middle value\n\t\tcombinedNumbers.remove((combinedNumbers.size() / 2)); // only works if ArrayList size is odd. Would need to check for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //if size is even or odd if size was unknown\n\t\tSystem.out.println(\"Third Collection in reverse order:\");\n\t\tfor (int i = (combinedNumbers.size() - 1); i > -1; i--) {\n\n\t\t\tSystem.out.println(combinedNumbers.get(i));\n\t\t}\n\t\n\t\tSystem.out.println(\"Third Collection size: \" + combinedNumbers.size());\n\n\t\t// HashMap was chosen because order did not matter and HashMap has the\n\t\t// best performance of the Set types in Collection framework\n\t\tHashMap<String, String> hmap = new HashMap<>();\n\t\thmap.putIfAbsent(\"Paul\", \"Pierce\");\n\t\thmap.putIfAbsent(\"Kevin\", \"Garnett\");\n\t\thmap.putIfAbsent(\"Ray\", \"Allen\");\n\t\thmap.putIfAbsent(\"Kendrick\", \"Perkins\");\n\t\thmap.putIfAbsent(\"Rajon\", \"Rondo\");\n\t\t\n\t\t//Adding duplicate and printing out key,value pair\n\t\tif (hmap.containsKey(\"Paul\")) {\n\t\t\tSystem.out.print(\"Duplicate Entry: \" + \"Paul \");\n\t\t}\n\t\tSystem.out.println(hmap.putIfAbsent(\"Paul\", \"Pierce\")); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tSystem.out.println(\"Key/Value Pairs \" + hmap);\n\t\tSystem.out.println(\"Key/Value Collection size: \" + hmap.size());\n\n\t}", "static int[] missingNumbers(int[] arr, int[] brr) {\n Map<Integer, Integer> map=new HashMap(); \n int size = brr.length;\n for(int i=0;i<size;i++) {\n if(map.containsKey(brr[i])) {\n map.put(brr[i],map.get(brr[i])+1);\n //System.out.println(brr[i] + \" \" + map.get(brr[i]));\n } else {\n map.put(brr[i],1);\n //System.out.println(brr[i] + \" \" + map.get(brr[i]));\n }\n }\n int arrSize = arr.length;\n for(int i=0;i<arrSize;i++) {\n map.put(arr[i],map.get(arr[i])-1);\n }\n\n Set<Integer> set = new HashSet<Integer>(); \n\n for(int i=0;i<size;i++) {\n //System.out.println(brr[i] + \" \" + map.get(brr[i]));\n if(map.get(brr[i])>0) {\n set.add(brr[i]);\n }\n }\n List<Integer> sortedList = new ArrayList<>(set);\n Collections.sort(sortedList);\n \n int[] sortedArr = new int[set.size()];\n for(int i=0;i<sortedList.size();i++) {\n sortedArr[i] = sortedList.get(i);\n }\n\n return sortedArr;\n }", "public static void specialSets() {\n\t\tSystem.out.printf(\"%12s%15s%15s%10s%10s%10s%10s%n\",\"Size\",\"Range\",\"Pre-Sort Type\",\"Insertion\",\"Selectuon\",\"Quick\",\"Merge\");\n\t\tint[] array;\n\t\t//200K\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"N/A\");\n\t\tarray = generateArray(200000, 1, 200000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//Sorted array\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"Sorted\");\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//Reverse Sorted\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"Reverse Sorted\");\n\t\tint[] temp = new int[array.length];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\ttemp[i] = array[array.length -1 -i];\n\t\t}\n\t\tfourSorts(temp);\n\t\tSystem.out.println();\n\t\t//Range 1-20\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-20\",\"N/A\");\n\t\tarray = generateArray(200000, 1, 20);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int noOfElements = sc.nextInt();\n int[] arr = new int[noOfElements];\n int[] arr1 = new int[noOfElements];\n int diff = Integer.MAX_VALUE;\n int sIndex = 0;\n int j = 0;\n for (int i = 0; i < noOfElements; i++) {\n arr[i] = sc.nextInt();\n }\n for (int j1 = 1; j1 < noOfElements; j1++) {\n int i = j1 - 1;\n int key = arr[j1];\n while (i >= 0 && key < arr[i]) { // 1 2 3\n arr[i + 1] = arr[i];\n i--;\n }\n arr[i + 1] = key;\n }\n //Arrays.sort(arr);\n for (int i = 0; i < noOfElements - 1; i++) {\n int temp = Math.abs(arr[i] - arr[i + 1]);\n if (temp <= diff) {\n diff=temp;\n }\n\n }\n\n for (int i = 0; i < noOfElements - 1; i++) {\n if (Math.abs(arr[i] - arr[i+1]) == diff) {\n System.out.print(arr[i] + \" \" + arr[i+1] + \" \");\n }\n }\n// for (int a = 0; a < j; a++) {\n//\n// System.out.print(arr[arr1[a]] + \" \" + arr[arr1[a]+1] + \" \");\n// }\n\n }", "public static void selectionSortDescendTrace(int [] numbers, int numElements) {\r\n int max;\r\n for(int j = 0; j < numElements; j++){ //finds first index of array at time\r\n max = j;\r\n for(int i = j; i < numElements; i++){\r\n if(numbers[max] < numbers[i]){\r\n max = i;\r\n }\r\n // System.out.print(max);\r\n }\r\n //System.out.println(max);\r\n if(j > 0){\r\n for (int num : numbers){\r\n System.out.print(num + \" \");\r\n }\r\n System.out.println();\r\n }\r\n\r\n int temp = numbers[max];\r\n numbers[max] = numbers[j];\r\n numbers[j] = temp;\r\n }\r\n }", "public static void main(String[] args) {\n\n\t\tint number = 32841;\n\t\tint temp = 32841;\n\t\t/*\n\t\t * int number = 32814; int temp = 32814;\n\t\t */\n\t\t// 14823\n\t\t// 12843\n\t\tArrayList<Integer> listOfNumbers = new ArrayList<Integer>();\n\t\tArrayList<Integer> newList = new ArrayList<Integer>();\n\n\t\twhile (temp > 0) {\n\t\t\tint digit = temp % 10;\n\t\t\ttemp = temp / 10;\n\t\t\tlistOfNumbers.add(digit);\n\t\t}\n\n\t\tint i = 0;\n\t\tint j = i + 1;\n\t\t// Checking the asecending order\n\t\tfor (i = 0; i < listOfNumbers.size() - 1; i++) {\n\n\t\t\tif (listOfNumbers.get(j) < listOfNumbers.get(i)) {\n\t\t\t\tSystem.out.println(listOfNumbers.get(i + 1));\n\t\t\t\tSystem.out.println(i + 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(j);\n\t\t\tj++;\n\t\t}\n\n\t\t// j = 0;\n\n\t\t// replacing the 2 and 4\n\t\tfor (int m = 0; m < listOfNumbers.size() - 1; m++) {\n\n\t\t\tif ((Integer) listOfNumbers.get(m) > (Integer) listOfNumbers.get(i + 1)) {\n\t\t\t\tSystem.out.println(\" i = \" + i);\n\t\t\t\tSystem.out.println(\"value at m is \" + listOfNumbers.get(m));\n\t\t\t\tSystem.out.println(\"value at i is \" + listOfNumbers.get(i + 1));\n\t\t\t\tint swap = listOfNumbers.get(m);\n\t\t\t\tlistOfNumbers.set(m, listOfNumbers.get(i + 1));\n\t\t\t\tlistOfNumbers.set(i + 1, swap);\n\t\t\t\tbreak;\n\n\t\t\t}\n\t\t}\n\t\t// getting the sub list and sorting them\n\t\tList<Integer> subList = listOfNumbers.subList(0, i + 1);\n\t\tCollections.sort(subList);\n\t\tCollections.reverse(subList);\n\n\t\t// creating a new list wit the next higher number\n\t\tfor (int k = listOfNumbers.size(); k > i + 1; k--) {\n\t\t\tnewList.add(listOfNumbers.get(k - 1));\n\t\t}\n\n\t\tfor (int k = 0; k < subList.size(); k++) {\n\t\t\tnewList.add(subList.get(k));\n\t\t}\n\n\t\tfor (int k = 0; k < newList.size(); k++) {\n\t\t\tSystem.out.print(newList.get(k));\n\t\t}\n\t}", "private static void selectionSort(double[] numbers) {\n for (int top = numbers.length-1; top > 0; top-- ) {\n int maxloc = 0;\n for (int i = 1; i <= top; i++) {\n if (numbers[i] > numbers[maxloc])\n maxloc = i;\n }\n double temp = numbers[top];\n numbers[top] = numbers[maxloc];\n numbers[maxloc] = temp;\n }\n }", "public static void main(String[] args) throws FileNotFoundException { \n \t\n In in = new In(args[0]);\n \n\t\t // Storing file input in an array\n int[] a = in.readAllInts();\n\n // b contains sorted integers from a (You can use Java Arrays.sort() method)\n int[] b = new int[a.length];\n for(int i = 0; i < a.length; i++) {\n \tb[i] = a[i];\n }\n Arrays.sort(b);\n // c contains all integers stored in reverse order \n int[] c = new int[b.length];\n for(int i = 0; i < b.length; i++) {\n \tc[i] = b[b.length - 1 - i];\n }\n // (you can have your own O(n) solution to get c from b\n \n // d contains almost sorted array \n int[] d = new int[b.length];\n\t\tfor(int i = 0 ; i < b.length; i++) {\n\t\t\td[i] = b[i];\n\t\t}\n\t\tfor(int i = 0; i < d.length * 0.1; i++) {\n\t\t\tint temp = d[i];\n\t\t\td[i] = d[d.length - 1 - i];\n\t\t\td[d.length - 1 - i] = temp;\n\t\t}\n //(You can copy b to a and then perform (0.1 * d.length) many swaps to acheive this. \n \n //TODO: \n // Read the second argument and based on input select the sorting algorithm\n // * 0 = Arrays.sort() (Java Default)\n // Perform sorting on a,b,c,d. Pring runtime for each case along with timestamp and record those. \n // For runtime and priting, you can use the same code from Lab 4 as follows:\n \n // * 1 = Bubble Sort\n // * 3 = Insertion Sort \n // * 4 = Mergesort\n // * 5 = Quicksort\n\t\t\n\t\t//performs the default java sort on each array\n if(args[1].equals(\"0\")) {\n \t\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n //TODO: Replace with your own netid\n String netID = \"amusaa\";\n //TODO: Replace with the algorithm used \n String algorithmUsed = \"Java default (Arrays.sort())\";\n //starts the clock \n Stopwatch timer = new Stopwatch();\n //sorts the array\n Arrays.sort(a);\n //gets the time when done sorting\n double time = timer.elapsedTimeMillis();\n String arrayUsed = \"a\";\n //prints to the terminal all the relevant information\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out1);\n //prints the now sorted array to a text file\n \tfor(int i = 0; i < a.length; i++) {\n \t\tSystem.out.print(a[i] + \" \");\n }\n \n // Write the resultant array to a file (Each time you run a program 4 output files should be generated. (one for each a,b,c, and d)\n Stopwatch timer2 = new Stopwatch(); \n Arrays.sort(b);\n time = timer2.elapsedTimeMillis();\n arrayUsed = \"b\";\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out2);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \n Stopwatch timer3 = new Stopwatch();\n Arrays.sort(c);\n time = timer3.elapsedTimeMillis();\n arrayUsed = \"c\";\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < c.length; i++) {\n \t\tSystem.out.print(c[i] + \" \");\n }\n \n Stopwatch timer4 = new Stopwatch();\n Arrays.sort(d);\n time = timer4.elapsedTimeMillis();\n arrayUsed = \"d\";\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out4 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out4);\n \tfor(int i = 0; i < d.length; i++) {\n \t\tSystem.out.print(d[i] + \" \");\n }\n }\n if(args[1].equals(\"1\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n //TODO: Replace with your own netid\n String netID = \"amusaa\";\n \n String algorithmUsed = \"Bubble sort\";\n Stopwatch timer1 = new Stopwatch();\n for(int i = 0; i < a.length; i++) {\n \tfor(int j = a.length-1; j > i; j--) {\n \t\tif(a[j] < a[j-1]) {\n \t\t\tint temp = a[j];\n \t\t\ta[j] = a[j-1];\n \t\t\ta[j-1] = temp;\n \t\t}\n \t}\n }\n double time = timer1.elapsedTimeMillis();\n String arrayUsed = \"a\";\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n\n arrayUsed = \"b\";\n Stopwatch timer2 = new Stopwatch();\n for(int i = 0; i < b.length; i++) {\n \tfor(int j = b.length - 1; j > 1; j--) {\n \t\tif(b[j] < b[j-1]) {\n \t\t\tint temp = b[j];\n \t\t\tb[j] = b[j-1];\n \t\t\tb[j-1] = temp;\n \t\t}\n \t}\n }\n time = timer2.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n \n arrayUsed = \"c\";\n Stopwatch timer3 = new Stopwatch();\n \tfor(int i = 0; i < c.length; i++) {\n \t\tfor(int j = c.length -1; j > 0; j--) {\n \t\t\tif(c[j] < c[j-1]) {\n \t\t\t\tint temp = c[j];\n \t\t\t\t\tc[j] = c[j-1];\n \t\t\t\t\t\tc[i] = temp;\n \t\t}\n \t}\n }\n time = timer3.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n \n arrayUsed = \"d\";\n Stopwatch timer4 = new Stopwatch();\n \tfor(int i = 0; i < d.length; i++) {\n \t\tfor(int j = d.length -1; j > 1; j--) {\n \t\t\tif(d[j] < d[j-1]) {\n \t\t\t\tint temp = d[j];\n \t\t\t\t\td[j] = d[j-1];\n \t\t\t\t\t\td[j-1] = temp;\n \t\t}\n \t}\n }\n time = timer4.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n }\n if(args[1].equals(\"2\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n String netID = \"amusaa\";\n String algorithmUsed = \"Selection sort\";\n \n String arrayUsed = \"a\";\n Stopwatch timer5 = new Stopwatch();\n \tfor(int i = 0; i < a.length; i ++) {\n \t\tint minIndex = i;\n \t\t\tfor(int j = a.length - 1; j > i; j--) {\n \t\t\t\tif(a[minIndex] > a[j])\n \t\t\t\t\tminIndex = j;\n \t}\n \tint temp = a[minIndex];\n \ta[minIndex] = a[i];\n \ta[i] = temp;\n }\n double time = timer5.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out);\n for(int i = 0; i < a.length; i++) {\n \tSystem.out.print(a[i] + \" \");\n }\n arrayUsed = \"b\";\n Stopwatch timer6 = new Stopwatch();\n \tfor(int i = 0; i < b.length; i ++) {\n \t\tint minIndex = i;\n \t\t\tfor(int j = b.length - 1; j > i; j--) {\n \t\t\t\tif(a[minIndex] > b[j])\n \t\t\tminIndex = j;\n \t}\n \tint temp = b[minIndex];\n \tb[minIndex] = b[i];\n \tb[i] = temp;\n }\n time = timer6.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out1);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \t\n arrayUsed = \"c\";\n Stopwatch timer7 = new Stopwatch();\n \tfor(int i = 0; i < c.length; i ++) {\n \t\tint minIndex = i;\n \t\t\tfor(int j = c.length - 1; j > i; j--) {\n \t\t\t\tif(c[minIndex] > c[j])\n \t\t\t\t\tminIndex = j;\n \t}\n \tint temp = c[minIndex];\n \tc[minIndex] = c[i];\n \tc[i] = temp;\n }\n time = timer7.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out2);\n for(int i = 0; i < c.length; i++) {\n \tSystem.out.print(c[i] + \" \");\n }\n arrayUsed = \"d\";\n Stopwatch timer8 = new Stopwatch();\n \tfor(int i = 0; i < d.length; i ++) {\n \t\tint minIndex = i;\n \t\t\tfor(int j = d.length - 1; j > i; j--) {\n \t\t\t\tif(d[minIndex] > d[j])\n \t\t\t\t\tminIndex = j;\n \t}\n \tint temp = d[minIndex];\n \t\td[minIndex] = d[i];\n \t\td[i] = temp;\n }\n time = timer8.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < d.length; i++) {\n \t\tSystem.out.print(d[i] + \" \");\n }\n }\n if(args[1].equals(\"3\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n //TODO: Replace with your own netid\n String netID = \"amusaa\";\n \n String algorithmUsed = \"Insertion sort\";\n \n String arrayUsed = \"a\";\n Stopwatch timer9 = new Stopwatch();\n \tfor(int i = 0; i < a.length; i++) {\n \t\tfor(int j = i; (j > 0) && (a[j] < a[j-1]); j--) {\n \t\t\tint temp = a[j];\n \t\t\t\ta[j] = a[j-1];\n \t\t\t\t\ta[j-1] = temp;\n \t}\n }\n double time = timer9.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out1);\n \tfor(int i = 0; i < a.length; i++) {\n \t\tSystem.out.print(a[i] + \" \");\n }\n \n arrayUsed = \"b\";\n Stopwatch timer10 = new Stopwatch();\n \tfor(int i = 0; i < b.length; i++) {\n \t\tfor(int j = i; (j>0) && (b[j] < b[j-1]); j--) {\n \t\t\tint temp = b[j];\n \t\t\tb[j] = b[j-1];\n \t\t\t\tb[j-1] = temp;\n \t}\n }\n time = timer10.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out2);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \n arrayUsed = \"c\";\n Stopwatch timer11 = new Stopwatch();\n \tfor(int i = 0; i < c.length; i++) {\n \t\tfor(int j = i; (j>0) && (c[j] < c[j-1]); j--) {\n \t\t\tint temp = c[j];\n \t\t\tc[j] = c[j-1];\n \t\t\t\tc[j-1] = temp;\n \t}\n }\n time = timer11.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < c.length; i++) {\n \t\tSystem.out.print(c[i] + \" \");\n }\n \n arrayUsed = \"d\";\n Stopwatch timer12 = new Stopwatch();\n \tfor(int i = 0; i < d.length; i++) {\n \t\tfor(int j = i; (j > 0) && (d[j] < d[j-1]); j--) {\n \t\t\tint temp = d[j];\n \t\t\t\td[j] = d[j-1];\n \t\t\t\t\td[j-1] = temp;\n \t}\n }\n time = timer12.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out4 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out4);\n \tfor(int i = 0; i < d.length; i++) {\n \t\tSystem.out.print(d[i] + \" \");\n }\n }\n if(args[1].equals(\"4\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n String netID = \"amusaa\";\n String algorithmUsed = \"Merge sort\";\n \n String arrayUsed = \"a\";\n int[] temp1 = new int[a.length];\n Stopwatch timer13 = new Stopwatch();\n mergeSort(a, temp1, 0, a.length-1);\n double time = timer13.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out1);\n \tfor(int i = 0 ; i < a.length; i++) {\n \t\tSystem.out.print(a[i] + \" \");\n }\n \n arrayUsed = \"b\";\n int[] temp2 = new int[b.length];\n Stopwatch timer14 = new Stopwatch();\n mergeSort(b, temp2, 0, b.length -1);\n time = timer14.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out2);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \n arrayUsed = \"c\";\n int[] temp3 = new int[c.length];\n Stopwatch timer15 = new Stopwatch();\n mergeSort(c, temp3, 0, c.length-1);\n time = timer15.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < c.length; i++) {\n \t\tSystem.out.print(c[i] + \" \");\n }\n \n arrayUsed = \"d\";\n int[] temp4 = new int[d.length];\n Stopwatch timer16 = new Stopwatch();\n mergeSort(d, temp4, 0, d.length -1);\n time = timer16.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out4 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out4);\n \tfor(int i = 0; i < d.length; i++) {\n \t\tSystem.out.print(d[i] + \" \");\n }\n }\n if(args[1].equals(\"5\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n String netID = \"amusaa\";\n String algorithmUsed = \"Quick sort\";\n \n String arrayUsed = \"a\";\n Stopwatch timer17 = new Stopwatch();\n quickSort(a, 0, a.length-1);\n double time = timer17.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out1);\n \tfor(int i = 0; i < a.length; i++) {\n \t\tSystem.out.print(a[i] + \" \");\n }\n \n arrayUsed = \"b\";\n Stopwatch timer18 = new Stopwatch();\n quickSort(b, 0, b.length-1);\n time = timer18.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out2);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \n arrayUsed = \"c\";\n Stopwatch timer19 = new Stopwatch();\n quickSort(c, 0, c.length-1);\n time = timer19.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < c.length; i++)\n \t\tSystem.out.print(c[i] + \" \");\n \n arrayUsed = \"d\";\n Stopwatch timer20 = new Stopwatch();\n quickSort(d, 0, d.length -1);\n time = timer20.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out4 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out4);\n \tfor(int i = 0; i < d.length; i++)\n \t\tSystem.out.print(d[i] + \" \");\n }\n \n }", "public static void main(String[] args) {\n int size = 100;\n int mult = 100;\n\n ArrayList<Integer> numbers = new ArrayList<>();\n\n //generate random array to sort\n for (int i = 0; i < size; i++) {\n numbers.add((int) (Math.random() * mult));\n }\n\n System.out.println(numbers.toString());\n\n numbers = quickSortSubset(numbers,0);\n\n System.out.println(numbers.toString());\n\n }", "public static void main(String[] args) throws IOException {\n\t\tbr = new BufferedReader(new FileReader(new File(\"input.txt\")));\r\n\t\tSystem.setOut(new PrintStream(new File(\"output.txt\")));\r\n\t\tint T = readInt();\r\n\t\t\r\n\t\tfor (int ind = 1; ind<=T; ind++) {\r\n\t\t\tSystem.out.print(\"Case #\" + ind + \": \");\r\n\t\t\t\r\n\t\t\tint N = readInt();\r\n\t\t\tint[] ar = readIntArr();\r\n\t\t\tfor (int i = 0; i < N; i++)ar[i]--;\r\n\t\t\tboolean used[] = new boolean[N];\r\n\t\t\tint ans = 0;\r\n\t\t\tint pairMax = 0;\r\n\t\t\tint cycleMax = 0;\r\n\t\t\tint cyclePair = 0;\r\n\t\t\tint pair = 0;\r\n\t\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\t\tif (!used[i]) {\r\n\t\t\t\t\tList<Integer> list = new LinkedList<Integer>();\r\n\t\t\t\t\tlist.add(i);\r\n\t\t\t\t\tused[i] = true;\r\n\t\t\t\t\tint j = ar[i];\r\n\t\t\t\t\twhile(!list.contains(j) && !used[j]) {\r\n\t\t\t\t\t\tlist.add(j);\r\n\t\t\t\t\t\tused[j] = true;\r\n\t\t\t\t\t\tj = ar[j];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!list.contains(j))continue;\r\n\t\t\t\t\tif (list.size() == 2)pair++;\r\n\t\t\t\t\tboolean removed = false;\r\n\t\t\t\t\twhile(list.get(0) != j){list.remove(0);removed = true;}\r\n\t\t\t\t\tif (list.size() > 2 && list.size() > cycleMax) cycleMax = list.size();\r\n\t\t\t\t\tif (list.size() == 2) {\r\n\t\t\t\t\t\tint a = list.remove(0);\r\n\t\t\t\t\t\tint b = list.remove(0);\r\n\t\t\t\t\t\tint tmp = 2;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tboolean us[] = new boolean[N];\r\n\t\t\t\t\t\t\tus[a] = true;\r\n\t\t\t\t\t\t\tus[b] = true;\r\n\t\t\t\t\t\t\t//System.out.println(\" test \" + a + b);\r\n\t\t\t\t\t\t\tSet<Integer> set = new HashSet<Integer>();\r\n\t\t\t\t\t\t\tset.add(a);\r\n\t\t\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\t\t\tboolean found = false;\r\n\t\t\t\t\t\t\t\tSet<Integer> tSet = new HashSet<Integer>();\r\n\t\t\t\t\t\t\t\tfor (int ii = 0; ii < N; ii++) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif (!us[ii] && set.contains(ar[ii])) {\r\n\t\t\t\t\t\t\t\t\t\tus[ii] = true;\r\n\t\t\t\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\t\t\t\ttSet.add(ii);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (found)tmp++;\r\n\t\t\t\t\t\t\t\tif (!found)break;\r\n\t\t\t\t\t\t\t\tset.addAll(tSet);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tset = new HashSet<Integer>();\r\n\t\t\t\t\t\t\tset.add(b);\r\n\t\t\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\t\t\tboolean found = false;\r\n\t\t\t\t\t\t\t\tSet<Integer> tSet = new HashSet<Integer>();\r\n\t\t\t\t\t\t\t\tfor (int ii = 0; ii < N; ii++) {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif (!us[ii] && set.contains(ar[ii])) {\r\n\t\t\t\t\t\t\t\t\t\tus[ii] = true;\r\n\t\t\t\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\t\t\t\ttSet.add(ii);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(found)tmp++;\r\n\t\t\t\t\t\t\t\tif (!found)break;\r\n\t\t\t\t\t\t\t\tset.addAll(tSet);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//if (removed) {\r\n\t\t\t\t\t\t//\tif (tmp > cyclePair)cyclePair = tmp;\r\n\t\t\t\t\t\t//} else {\r\n\t\t\t\t\t\t pairMax += tmp;\r\n\t\t\t\t\t\t//}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//cyclePair += 2 * pair;\r\n\t\t\t//if (pair > 1) pairMax += 2 * (pair - 1);\r\n\t\t\tans = Math.max(cyclePair, pairMax);\r\n\t\t\tans = Math.max(cycleMax, ans);\r\n\t\t\tSystem.out.println(ans);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "static String ShakerSort(int[] numbers){\r\n\t\tint index = 0, swap = 0, compare = 0;\r\n\t\tString result = \"\";\r\n\t\tboolean swapped = true;\r\n\t\t\r\n\t\twhile (swapped == true){\r\n\t\t\tswapped = false;\r\n\t\t\tprintln(\"*\" + printArray(numbers) + \"*\");\r\n\t\t\twhile (index < numbers.length -1){\r\n\t\t\t\tif (numbers[index] > numbers[index + 1]){\r\n\t\t\t\t\tswap(numbers, index, index + 1);\r\n\t\t\t\t\tswapped = true;\r\n\t\t\t\t\tswap++;\r\n\t\t\t\t\tcompare++;\r\n\t\t\t\t\tindex++;\r\n\t\t\t\t\tprintArray(numbers);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tcompare++;\r\n\t\t\t\t\tindex++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twhile (index > 0){\r\n\t\t\t\tif (numbers[index] < numbers[index - 1]){\r\n\t\t\t\t\tswap(numbers, index, index - 1);\r\n\t\t\t\t\tswapped = true;\r\n\t\t\t\t\tswap++;\r\n\t\t\t\t\tcompare++;\r\n\t\t\t\t\tindex--;\r\n\t\t\t\t\tprintArray(numbers);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tcompare++;\r\n\t\t\t\t\tindex--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn result + swap + \", \" + compare;\r\n\t}", "public void wiggleSortSubOptimal(int[] nums) {\n Arrays.sort(nums);\n \n for (int i = 1; i < nums.length - 1; i += 2)\n swap(nums, i, i + 1);\n }", "public void sortByQnNum() {\r\n\t\tfor (int j = 0; j < displayingList.size() - 1; j++) {\r\n\t\t\tfor (int i = 0; i < displayingList.size() - j - 1; i++) {\r\n\t\t\t\tif (displayingList.get(i).getQnNum() > displayingList.get(i + 1).getQnNum()) {\r\n\t\t\t\t\tswapPosition(displayingList, i, i + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void sort() {\r\n int k = start;\r\n for (int i = 0; i < size - 1; i++) {\r\n int p = (k + 1) % cir.length;\r\n for (int j = i + 1; j < size; j++) {\r\n if ((int) cir[p] < (int) cir[k % cir.length]) {\r\n Object temp = cir[k];\r\n cir[k] = cir[p];\r\n cir[p] = temp;\r\n }\r\n p = (p + 1) % cir.length;\r\n }\r\n k = (k + 1) % cir.length;\r\n }\r\n }", "private boolean numbersCorrect( int[] num ) {\n ArrayList<Integer> sourceNumList = new ArrayList<Integer>();\r\n for (int sourceNumber : sourceNumbers) {\r\n sourceNumList.add(sourceNumber);\r\n }\r\n for (int aNum : num) {\r\n boolean removed = sourceNumList.remove(new Integer(aNum));\r\n if (!removed)\r\n return false;\r\n }\r\n return true;\r\n }", "private void filterNumbers(List<Concept> concepts) {\n\t\t// make sure there are no overlaps in numbers\n\t\tConcept num = null;\n\n\t\t// find a general number\n\t\tfor (Concept c : concepts) {\n\t\t\tif (c.getConceptClass() != null && NUMERIC.equals(c.getConceptClass().getName())) {\n\t\t\t\tnum = c;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// if there is a number\n\t\tif (num != null) {\n\t\t\t// get number offsets\n\t\t\tint num_st = num.getOffset();\n\t\t\tint num_en = num_st + num.getText().length();\n\n\t\t\t// search all concepts for specific numbers\n\t\t\tList<Concept> torem = new ArrayList<Concept>();\n\t\t\tfor (Concept c : concepts) {\n\t\t\t\tIClass cls = c.getConceptClass();\n\t\t\t\t// if found a specific number, then\n\t\t\t\tif (cls != null && cls != num.getConceptClass() && isNumber(cls) && c.getText() != null) {\n\t\t\t\t\tint st = c.getOffset();\n\t\t\t\t\tint en = st + c.getText().length();\n\n\t\t\t\t\t// if this number is within bounds of general number, then\n\t\t\t\t\t// it is a repeat\n\t\t\t\t\tif (num_st <= st && en <= num_en) {\n\t\t\t\t\t\ttorem.add(c);\n\t\t\t\t\t\t// else if the other number is within bounds of previous\n\t\t\t\t\t\t// number, then discard that\n\t\t\t\t\t} else if (st <= num_st && num_en <= en) {\n\t\t\t\t\t\ttorem.add(num);\n\t\t\t\t\t\tnum = c;\n\t\t\t\t\t\tnum_st = st;\n\t\t\t\t\t\tnum_en = en;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if concept text is \"number\", it is too general to use\n\t\t\t\tif (NUMERIC.toLowerCase().equals(c.getText()))\n\t\t\t\t\ttorem.add(c);\n\t\t\t}\n\n\t\t\t// remove whatever\n\t\t\tfor (Concept r : torem) {\n\t\t\t\tfor (ListIterator<Concept> it = concepts.listIterator(); it.hasNext();) {\n\t\t\t\t\tConcept c = it.next();\n\t\t\t\t\tif (c.getText() != null && c.equals(r) && c.getText().equals(r.getText())) {\n\t\t\t\t\t\tit.remove();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}", "private static void sort(int[] arr) {\n\t\tint lesserIndex=-1;\n\t\tint arrLen = arr.length ; \n\t\tfor(int i=0; i<arrLen; i++){\n\t\t\tif(arr[i]<0){\n\t\t\t\tlesserIndex++; \n\t\t\t\tint tmp = arr[lesserIndex]; \n\t\t\t\tarr[lesserIndex] = arr[i];\n\t\t\t\tarr[i] = tmp; \n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tint negBound = lesserIndex+1;\n\t\tint posIndex = negBound;\n\t\t\n\t\tfor(int negIngex = 0;negIngex<negBound && posIndex<arr.length; negIngex+=2, posIndex+=1){\n\t\t\tint tmp = arr[posIndex]; \n\t\t\tarr[posIndex] = arr[negIngex] ; \n\t\t\tarr[negIngex] = tmp ;\n\t\t\tnegBound++;\n\t\t}\n\t\t\n\t\t\n\t\tfor(int a : arr) {\n\t\t\tSystem.out.print(a);\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new FileReader(\"art2.in\"));\n PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(\"art2.out\")));\n int len=Integer.parseInt(br.readLine());\n int[] list=new int[len];\n for(int i=0;i<len;i++)\n list[i]=Integer.parseInt(br.readLine());\n\n //finds the troll test case\n boolean symmetric=true;\n for(int i=0;i<len;i++)\n if(list[i]!=list[len-i-1]) {\n symmetric = false;\n break;\n }\n if(symmetric){\n pw.println(len/2);\n pw.close();\n return;\n }\n\n DisjointSet disjointSet=new DisjointSet(len,list);\n HashMap<Integer,Range> ranges=new HashMap<>(len/10);\n int totalColors=0;\n for(int i=0;i<len;i++){\n if(list[i]==0)\n continue;\n if(!ranges.containsKey(list[i])) {\n ranges.put(list[i],new Range(i, i));\n totalColors++;\n }\n else\n ranges.get(list[i]).end=i;\n }\n\n// System.out.println(Arrays.toString(ranges));\n int iter=0;\n int colorsUsed=0;\n// System.out.println(Arrays.toString(disjointSet.parent));\n while(true){\n int foundThisIter=0;\n HashSet<Integer> connectionSpots=new HashSet<>();\n ArrayDeque<Integer> toRemove=new ArrayDeque<>(ranges.size());\n for(int e:ranges.keySet()){\n Range cur=ranges.get(e);\n if(disjointSet.find(cur.start)==disjointSet.find(cur.end)){\n connectionSpots.add(cur.start);\n connectionSpots.add(cur.end);\n toRemove.add(e);\n colorsUsed++;\n foundThisIter++;\n }\n\n }\n\n if(foundThisIter==0)\n break;\n if(colorsUsed==totalColors)\n break;\n for(int e:toRemove){\n ranges.remove(e);\n }\n for(int e:connectionSpots){\n// System.out.println(e);\n if(e-1>=0&&list[e-1]!=0)\n disjointSet.union(e,e-1);\n if(e+1<list.length&&list[e+1]!=0)\n disjointSet.union(e,e+1);\n }\n\n\n iter++;\n }\n// System.out.println(iter+1);\n if(colorsUsed!=totalColors)\n pw.println(-1);\n else\n pw.println(iter+1);\n pw.close();\n }", "private static List<Integer> reorganize(List<Integer> result){\n List<Integer> outcome=new ArrayList<>();\n result.sort(Comparator.comparingInt(o -> o));\n if(!result.isEmpty()){\n outcome.add(result.get(0));\n for(int i=1;i<result.size();i++){\n if(!result.get(i).equals(result.get(i-1)))\n outcome.add(result.get(i));\n }\n }\n return outcome;\n }", "@Override\n\tpublic int[] sort(int[] numbers) {\n\t\treturn null;\n\t}", "private void sortByAmount(){\n int stopPos = 0;\n while(colours.size()-stopPos > 0){\n int inARow = 1;\n for(int i = colours.size() - 1; i > stopPos; i--){\n if(colours.get(i-1).getAmount() < colours.get(i).getAmount()){\n rgb temp = new rgb(colours.get(i-1));\n colours.set(i-1, colours.get(i));\n colours.set(i, temp);\n }else{\n inARow++;\n }\n }\n stopPos++;\n if(inARow == colours.size()){\n break;\n }\n }\n }", "private void DeleteBurnInsOnPreviousSamples() {\n\t\tif (gibbs_sample_num <= num_gibbs_burn_in + 1 && gibbs_sample_num >= 2){\n\t\t\tgibbs_samples_of_bart_trees[gibbs_sample_num - 2] = null;\n\t\t}\n\t}", "private int[] removeDuplicatesWithParallelStream() {\n\t return Arrays.stream(randomIntegers).parallel().distinct().toArray();\n\t}", "public static void getSample(String input, String output, int size, int max, int min) throws IOException{\n\t\tBufferedReader myInput = null;\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(output));\n\t\tStringBuilder bufferTrain = new StringBuilder();\n\t\tStringBuilder bufferTest = new StringBuilder();\n\t\tSet<Integer> rng = rndSet(size, min, max);\n\t\tSet<Integer> train = new TreeSet<Integer>();\n\t\tSet<Integer> test = new TreeSet<Integer>();\n\t\tint splitL = (int) (rng.size() * splitR); // the line where 70% of training data is up to\n\t\tfor(int e : rng){\n\t\t\tif(splitL > 0){\n\t\t\t\ttrain.add(e);\n\t\t\t}else{\n\t\t\t\ttest.add(e);\n\t\t\t}\n\t\t\tsplitL--;\n\t\t}\n\t\tSystem.out.println(\"Train: \" + train.toString());\n\t\tSystem.out.println(\"Test: \"+ test.toString());\n\t\tString thisLine;\n\t\ttry{\n\t\t\tmyInput = new BufferedReader(new InputStreamReader(new FileInputStream(new File(input))));\n\t\t // for each line (transaction) until the end of file\n\t\t\tint i = 0;\n\t\t while ((thisLine = myInput.readLine()) != null) {\n\t\t \t// if the line is empty\n\t\t \tif (thisLine.isEmpty() == true) {\n\t\t \t\tcontinue;\n\t\t \t}\n\t\t \t\n\t\t \tif(train.contains(i)){\n\t\t \t\tbufferTrain.append(thisLine+\"\\n\");\n\t\t \t}else if(test.contains(i)){\n\t\t \t\tbufferTest.append(thisLine+\"\\n\");\n\t\t \t}\n\t\t \ti++;\n\t\t }\n\t\t writer.write(bufferTrain.toString());\n\t\t writer.newLine();\n\t\t writer.write(bufferTest.toString());\n\t\t}catch (Exception e) {\n \t// catches exception if error while reading the input file\n \te.printStackTrace();\n }finally {\n \tif(myInput != null){\n \t\tmyInput.close();\n \t}\n }\n\t\t\n \tif(writer != null){\n \t\twriter.close();\n \t}\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint[] arr = new int[]{10,9,3,7,4,1,0};\r\n\t\tList g = Arrays.asList(arr);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t/*List arrayList = new ArrayList();\r\n\t\t//arrayList.\r\n\t\t\r\n\t\tArrays.sort(arr);*/\r\n\r\n // use add() method to add elements in the list\r\n\t\tArrayList<Integer> arrlist = new ArrayList<Integer>(8);\r\n arrlist.add(0);\r\n arrlist.add(25);\r\n arrlist.add(10);\r\n arrlist.add(15);\r\n \r\n \r\n //Logic for Least missing number\r\n for(int l=0;l<arrlist.size();l++){\r\n\t\t\tif(arrlist.contains(l)){\r\n\t\t\t\tcontinue;\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"value not present==\"+l);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n \r\n //Logic for Max missing number\r\n Collections.sort(arrlist,Collections.reverseOrder());\r\n System.out.println(arrlist);\r\n\r\n \r\n for(int b=arrlist.get(0);;b--){\r\n \t if(arrlist.contains(b)){\r\n \t\t continue;\r\n \t }else {\r\n\t\t\t\tSystem.out.println(\"value not present==\"+b);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n \t \r\n }\r\n \r\n //USING java 8 features\r\n //Remove empty strings \r\n List<String> strings = Arrays.asList(\"abc\", \"\", \"bc\", \"efg\", \"abcd\",\"\", \"jkl\");\r\n List<String> filtered = strings.stream().filter(string -> !string.isEmpty()).collect(Collectors.toList());\r\n System.out.println(\"String filtered list\"+filtered);\r\n \r\n //get list of unique squares\r\n List<Integer> numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);\r\n \r\n List<Integer> squaresList = numbers.stream().map( i -> i*i).distinct().collect(Collectors.toList());\r\n System.out.println(\"Uniue squreslist\"+squaresList);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public SortedArrayInfo sortArray(List<Integer> randomNumbers);", "@Override\r\n\tpublic void sort(int[] demo) {\n\t\tint temp;\r\n\t\tfor(int gap = 5;gap > 0;gap /= 2){\r\n\t\t\tfor(int i = gap;i < demo.length;i++){\r\n\t\t\t\tfor(int j = i - gap;j >= 0;j -= gap){\r\n\t\t\t\t\tif (demo[j] > demo[j + gap]) {\r\n\t\t\t\t\t\ttemp =demo[j];\r\n\t\t\t\t\t\tdemo[j] =demo[j + gap];\r\n\t\t\t\t\t\tdemo[j + gap] = temp;\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\tSystem.out.println(Arrays.toString(demo));\r\n\t}", "private static List<Integer> notInList(List<String> inputs, int num) {\n List<Integer> set = new ArrayList<Integer>();\n for(int i = 1; i <= num; i++) {\n set.add(Integer.valueOf(i));\n }\n for(String string: inputs) {\n Integer n = Integer.valueOf(string);\n set.remove(n);\n }\n Collections.sort(set);\n return set;\n }", "public static void testSort() {\n\t\tint[] test = {-1,-2,-3,4,1,3,0,3,-2,1,-2,2,-1,1,-5,4,-3};\n\t\tArrays.sort(test);\n\t\tfor (int e : test) {\n\t\t\tSystem.out.print(e + \", \");\n\t\t}\n\t}", "public static ArrayList<Member> sortByNumber(ArrayList<Member> s) {\r\n\t\tArrayList<Member> output = new ArrayList<Member>();\r\n\t\twhile(s.size()>0) {\r\n\t\t\tint minNo=0;\r\n\t\t\tString min=s.get(0).getNumber();\r\n\t\t\tfor(int i=0;i<s.size();i++) {\r\n\t\t\t\tif(Member.numberSmaller(s.get(i).getNumber(),min)) {\r\n\t\t\t\t\tmin=s.get(i).getNumber();\r\n\t\t\t\t\tminNo=i;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t\toutput.add(s.get(minNo));\r\n\t\t\ts.remove(s.get(minNo));\r\n\t\t}\r\n\t\treturn output;\r\n\t}", "public static int[] sta(int[] arr){//Sort The Array\n for (int a = 0; a < arr.length; a++){\n for(int b = 0; b < arr.length; b++){\n int holder = 0;\n //it will grab 1 number and checks the list if that number is bigger than any other number. then it repeats with the next number of the list.\n if(arr[a] > arr[b]){//IF NUMBER[A] IS BIGGER THAN NUMBER[B]\n holder = arr[a];//HOLDER BECOMES NUMBER[A]\n arr[a] = arr[b];//NUMBER[A] BECOMES NUMBER[B]\n arr[b] = holder;//NUMBER[B] BECOMES NUMBER[A](HOLDER)\n }\n //[A] and [B] switch placements and will repeat till arr.length\n }\n }\n return arr; \n }", "private void bInsertionSort(int lowerIndex, int higherIndex) {\n \t\tArrayList tmpsorted = new ArrayList();\n \t\tint tmp, lowerbound, upperbound;\n \t\t\n \t\tfor(int i = lowerIndex; i <= higherIndex; i++) {\n \t\t\ttmp = (int) unsorted.get(i);\n \t\t\tif(tmpsorted.isEmpty()) {\n \t\t\t\ttmpsorted.add(tmp);\n \t\t\t} else {\n \t\t\t\t\n \t\t\t\t//Every new number we want to insert needs\n \t\t\t\t//to reset the bounds according to the sorted list.\n \t\t\t\tupperbound = tmpsorted.size() - 1;\n \t\t\t\tlowerbound = 0;\n \t\t\t\t\n \t\t\t\twhile (unsorted.size() != 0){\n \t\t\t\t//Note that each \"break;\" throws us out of the while loop.\n \t\t\t\t//Causing our boundaries to be reset for the new number\n \t\t\t\t\t\n \t\t\t\t\tint j = (upperbound + lowerbound) / 2;\t//j points to the middle of the boundaries\n \t\t\t\t\tif (tmp <= (int)tmpsorted.get(j)){\t//is tmp less or equal to the number in j?\n \t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\tif (j == 0){\t\t\t\t\t\t//Are we at the bottom of the list?\n \t\t\t\t\t\t\ttmpsorted.add(0, tmp);\t\t//Add it to the bottom of the list.\n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t}\n \t\t\t\t\t\t\n \t\t\t\t\t\telse if ((int)tmpsorted.get(j-1) > tmp){ \n \t\t\t\t\t\t//Else if the number behind j is bigger than tmp...\n \t\t\t\t\t\t//...we can move the upper bound behind j and repeat the split.\n \t\t\t\t\t\t//NOTE: We do NOT \"break;\" to get thrown out of the while loop.\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\tupperbound = j - 1;\n \t\t\t\t\t\t}\n \t\t\t\t\t\t\n \t\t\t\t\t\telse{ //Else we just add the number to j\n \t\t\t\t\t\t\ttmpsorted.add(j, tmp);\n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\telse{ //If tmp is HIGHER than j\n \t\t\t\t\t\tif (j == tmpsorted.size() - 1){\n \t\t\t\t\t\t//Are we at the end of the list?\n \t\t\t\t\t\t//Just add tmp at the end of the list.\t\n \t\t\t\t\t\t\ttmpsorted.add(j+1, tmp);\n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t}\n \t\t\t\t\t\t\n \t\t\t\t\t\telse if((int)tmpsorted.get(j+1) < tmp){\n \t\t\t\t\t\t//if the next number to j is still less than tmp...\n \t\t\t\t\t\t//we raise the lowerbound past j and repeat the split\n \t\t\t\t\t\t//NOTE: We do NOT \"break;\" to get thrown out of the while loop.\n \t\t\t\t\t\t\tlowerbound = j + 1;\n \t\t\t\t\t\t}\n \t\t\t\t\t\t\n \t\t\t\t\t\telse{ \n \t\t\t\t\t\t//Else we can just add tmp after j since it's higher than j\n \t\t\t\t\t\t\ttmpsorted.add(j+1, tmp);\n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t\t\n \t\t\t}\n \t\t}\n \t\t// Replace the unsorted values with tmpsorted.\n \t\tint j = 0;\n \t\tfor(int i = lowerIndex; i <= higherIndex; i++) {\n \t\t\tunsorted.set(i, tmpsorted.get(j));\n \t\t\tj++;\n \t\t}\n\n \t}", "static void doubleSelectionSort (int [] array) {\n\t for (int i = 0, j = array.length - 1; (i < array.length && j >= 0); i++, j--)\n {\n int minIndex = i;\n int maxIndex = j;\n\n for (int a = i + 1; a < array.length; a++)\n if (array[a] < array[minIndex])\n minIndex = a;\n\n for (int b = j - 1; b >= 0; b--)\n if (array[b] > array[maxIndex])\n maxIndex = b;\n\n if (isSorted(array)) return;\n\n swap(array, minIndex, i);\n System.out.println(Arrays.toString(array));\n swap(array, maxIndex, j);\n System.out.println(Arrays.toString(array));\n }\n\t}", "public static void main(String[] args) {\n ArrayList<Integer> myNumbers = new ArrayList<Integer>();\n // adding items in the list\n myNumbers.add(5);\n myNumbers.add(2);\n myNumbers.add(4);\n myNumbers.set(0, 7);\n // myNumbers.remove(0);\n // Before sorting accessing numbers\n System.out.print(\"Before sorting :\");\n for (int i = 0; i < myNumbers.size(); i++) {\n System.out.print(myNumbers.get(i) + \" \");\n }\n // sorting the list\n Collections.sort(myNumbers);\n System.out.print(\"\\nAfter sorting :\");\n for (Integer keep : myNumbers) {\n System.out.print(keep + \" \");\n }\n }", "public void shuttlesort(int from[], int to[], int low, int high) {\n if (high - low < 2) {\n return;\n }\n int middle = (low + high) / 2;\n shuttlesort(to, from, low, middle);\n shuttlesort(to, from, middle, high);\n int p = low;\n int q = middle;\n if (high - low >= 4 && compare(from[middle - 1], from[middle]) <= 0) {\n for (int i = low; i < high; i++) {\n to[i] = from[i];\n }\n return;\n }\n for (int i = low; i < high; i++) {\n if (q >= high || (p < middle && compare(from[p], from[q]) <= 0)) {\n to[i] = from[p++];\n } else {\n to[i] = from[q++];\n }\n }\n }", "public static void sort(int[] v) {\n\t\tint biggest_value=v[0];\n\t\tint lowest_value =v[0];\n\t\t\n\t\tfor(int i=0;i<v.length;i++) {\n\t\t\tif(v[i]>biggest_value) {\n\t\t\t\tbiggest_value = v[i];\n\t\t\t}\n\t\t\tif(v[i]<lowest_value) {\n\t\t\t\tlowest_value = v[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Define a amplitude dos valores existentes no vetor\n\t\tint range = biggest_value - lowest_value;\n\t\t\n\t\t//Cria o vetor de frequência com o tamanho da amplitude+1, para que contenha todos os\n\t\t//valores existentes no vetor\n\t\tint[] frequency = new int[range+1];\n\t\t\n\t\t//Cria um normalizador, que será responsável por normalizar o posicionamento dos valores\n\t\t//no vetor de frequência\n\t\tint normalizer = lowest_value*(-1);\n\t\t\n\t\t//Faz a contagem de elementos existentes no vetor de entrada, salvando suas ocorrências\n\t\t//no vetor de frequência\n\t\tfor(int i=0;i<v.length;i++) {\n\t\t\tfrequency[normalizer+v[i]] += 1;\n\t\t}\n\t\t\n\t\t//Torna o vetor de frequência em cumulativo\n\t\tfor(int i=1;i<frequency.length;i++) {\n\t\t\tfrequency[i]+=frequency[i-1];\n\t\t}\n\t\t\n\t\t//Cria o vetor que será o ordenado\n\t\tint[] ordered_array = new int[v.length];\n\t\t\n\t\t//Distribui valores de frequência no array ordenado\n\t\tfor(int i=v.length-1;i>-1;i--) {\n\t\t\tordered_array[frequency[v[i]+normalizer]-1] = v[i];\n\t\t\tfrequency[v[i]+normalizer]-=1;\n\t\t}\n\t\t\n\t\t//Redefine v pelo vetor ordenado\n\t\tfor(int i=0;i<v.length;i++) {\n\t\t\tv[i]=ordered_array[i];\n\t\t}\n\t}", "private int[] removeDuplicatesWithStream() {\n\t return Arrays.stream(randomIntegers).distinct().toArray();\n\t}", "private int getRandomWithExclusion(int bound, List<Integer> exclude) {\n int random = Constants.RAND.nextInt(bound - exclude.size());\n for (int ex : exclude) {\n if (random < ex) break;\n random++;\n }\n return random;\n \n }", "public static void selectionSort(int input[]) {\n\t\tfor(int i = 0;i<input.length-1;i++) {\n\t\t\tint min = input[i];\n\t\t\tint minindex = i;\n\t\t\tfor(int j = i+1 ;j<input.length;j++) {\n\t\t\t\tif(min > input[j] ) {\n\t\t\t\t\tmin = input[j];\n\t\t\t\t\tminindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(minindex!=i) {\n\t\t\tinput[minindex] = input[i];\n\t\t\t input[i]= min;\n\t\t\t}\n\t\t}\n\t}", "static void selection(int arr[]){\n for (int i =0; i < arr.length -1 ; i++){\n for (int j = i +1; j < arr.length; j++){\n if (arr[j] < arr[i]){\n int temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }\n }\n }\n }", "@Test\r\n public void lowerHigherDoNotContains() throws Exception {\r\n TreeSet<Integer> check = new TreeSet<>();\r\n check.addAll(sInt);\r\n check.remove(3);\r\n assertEquals(2, (int) check.lower(3));\r\n assertEquals(4, (int) check.higher(3));\r\n assertEquals(4, (int) check.ceiling(3));\r\n assertEquals(2, (int) check.floor(3));\r\n }", "public static void main(String[] args) {\n\n\n List<Integer> a = range(3, 19).mapToObj(Integer::valueOf).collect(toList());\n a.sort((x, y) -> (x - y));\n// System.out.println(a);\n\n List<List<String>> QUICK_THREE_OPTIONS = new ArrayList<>();\n //空 0\n QUICK_THREE_OPTIONS.add(new ArrayList<>());\n //和值 1\n final List<String> sumOptions = range(3, 19).mapToObj(String::valueOf).collect(toList());\n QUICK_THREE_OPTIONS.add(sumOptions);\n //三同号 2\n final List<String> threeSameOptions = range(1, 7).mapToObj(i -> nTimes(i, 3)).collect(toList());\n threeSameOptions.add(\"3A\");\n QUICK_THREE_OPTIONS.add(threeSameOptions);\n //二同号 3\n final List<String> twoSameOptions = range(1, 7).mapToObj(i -> nTimes(i, 2)).collect(toList());\n twoSameOptions.addAll(range(1, 7).mapToObj(String::valueOf).collect(toList()));\n twoSameOptions.addAll(range(1, 7).mapToObj(i -> nTimes(i, 2) + \"*\").collect(toList()));\n QUICK_THREE_OPTIONS.add(twoSameOptions);\n //三不同 4\n final List<String> threeDifferent = range(1, 7).mapToObj(String::valueOf).collect(toList());\n threeDifferent.add(\"3B\");\n QUICK_THREE_OPTIONS.add(threeDifferent);\n //二不同 5\n final List<String> twoDifferent = range(1, 7).mapToObj(String::valueOf).collect(toList());\n QUICK_THREE_OPTIONS.add(twoDifferent);\n\n// System.out.println(QUICK_THREE_OPTIONS);\n\n List<List<String>> ELEVEN_C_FIVE_OPTIONS = new ArrayList<>();\n\n //组合选项\n ELEVEN_C_FIVE_OPTIONS.add(IntStream.range(1, 12).mapToObj(i -> String.format(\"%02d\", i)).collect(toList()));\n //前二直选\n final List<String> frontTwoDirect = new ArrayList<>();\n frontTwoDirect.addAll(IntStream.range(1, 12).mapToObj(i -> \"a\" + String.format(\"%02d\", i)).collect(toList()));\n frontTwoDirect.addAll(IntStream.range(1, 12).mapToObj(i -> \"b\" + String.format(\"%02d\", i)).collect(toList()));\n ELEVEN_C_FIVE_OPTIONS.add(frontTwoDirect);\n //前三直选\n final List<String> frontThreeDirect = new ArrayList<>();\n frontThreeDirect.addAll(IntStream.range(1, 12).mapToObj(i -> \"a\" + String.format(\"%02d\", i)).collect(toList()));\n frontThreeDirect.addAll(IntStream.range(1, 12).mapToObj(i -> \"b\" + String.format(\"%02d\", i)).collect(toList()));\n frontThreeDirect.addAll(IntStream.range(1, 12).mapToObj(i -> \"c\" + String.format(\"%02d\", i)).collect(toList()));\n ELEVEN_C_FIVE_OPTIONS.add(frontThreeDirect);\n\n final int TWENTY_C_FIVE_SAN_GUO_SHI_LI = 1;\n final int TWENTY_C_FIVE_SAN_GUO_FIVE = 2;\n final int TWENTY_C_FIVE_SAN_GUO_EIGHT = 3;\n final int TWENTY_C_FIVE_SAN_GUO_FRONT_THREE_DIRECT = 4;\n final List<List<String>> TWENTY_C_FIVE_SAN_GUO_OPTIONS = new ArrayList<>();\n\n //势力选择\n TWENTY_C_FIVE_SAN_GUO_OPTIONS.add(IntStream.range(1, 4).mapToObj(i -> String.format(\"%02d\", i)).collect(toList()));\n //组合选项\n final List<String> group = new ArrayList<>();\n group.addAll(IntStream.range(1, 21).mapToObj(i -> \"a\" + String.format(\"%02d\", i)).collect(toList()));\n group.addAll(IntStream.range(1, 4).mapToObj(i -> \"b\" + String.format(\"%02d\", i)).collect(toList()));\n TWENTY_C_FIVE_SAN_GUO_OPTIONS.add(group);\n //前三直选\n final List<String> frontThreeDirect1 = new ArrayList<>();\n frontThreeDirect1.addAll(IntStream.range(1, 21).mapToObj(i -> \"a\" + String.format(\"%02d\", i)).collect(toList()));\n frontThreeDirect1.addAll(IntStream.range(1, 21).mapToObj(i -> \"b\" + String.format(\"%02d\", i)).collect(toList()));\n frontThreeDirect1.addAll(IntStream.range(1, 21).mapToObj(i -> \"c\" + String.format(\"%02d\", i)).collect(toList()));\n frontThreeDirect1.addAll(IntStream.range(1, 4).mapToObj(i -> \"d\" + String.format(\"%02d\", i)).collect(toList()));\n TWENTY_C_FIVE_SAN_GUO_OPTIONS.add(frontThreeDirect1);\n\n// System.out.println(ELEVEN_C_FIVE_OPTIONS);\n\n List<String> s = new ArrayList<>();\n s.add(\"3\");\n s.add(\"5\");\n s.add(\"6\");\n s.add(\"7\");\n s.add(\"9\");\n// s.add(\"11\");\n// System.out.println(c);\n List<List<String>> s1 = new ArrayList<>();\n s1.add(s);\n List<String> targetNumbers = s1.stream().map(l -> join(l, \",\")).collect(toList());\n\n// System.out.println(getPermutationXSrcLists(s, 2, true));\n\n long tl = computeElevenCFiveGroup(targetNumbers.get(0));\n// System.out.println(tl);\n System.out.println(TWENTY_C_FIVE_SAN_GUO_OPTIONS);\n\n }", "public ArrayList<Person> builtinSortDeduplication(){\n\t//copy data from list to array arr\n\tPerson[] arr = new Person[this.lst.size()];\n\tfor(int i=0; i< lst.size();i++){\n\t arr[i] = this.lst.get(i);\n\t}\n\t// use java's built-in sort\n\tArrays.sort(arr);\n\t//create list to store singular data\n\tArrayList<Person> unduplicated3 = new ArrayList<>();\n\t//compare successive elements of array to find duplicates\n\tint limit =0;\n\tif (arr.length ==0 || arr.length==1) limit =arr.length;\n\tint j=0;\n\t//store only singular data in the beginning of the array\n\tfor (int i = 0; i < arr.length-1; i++) \n if (arr[i].compareTo( arr[i+1]) != 0) \n arr[j++] = arr[i]; \n\t// add last element to array\n\tarr[j++] = arr[arr.length-1];\n\t//record last index of singular element\n\tlimit =j;\n\t//copy elements up to the singularity index to the list\n\tfor(int k=0; k< limit; k++){\n\t unduplicated3.add(arr[k]);\n\t}\n\treturn unduplicated3;\n }", "public static void selectionSort(int[] data){\n\n\tfor(int i = 0; i < data.length; i++){\n\t int min = data[i];\n\t int indexToReplace = i;\n\n\t for(int k = i; k < data.length; k++){\n\t\tif(data[k] < min){\n\t\t indexToReplace = k;\n\t\t min = data[k];\n\t\t}\n\t }\n\n\t int old = data[i];\n\t data[i] = min;\n\t data[indexToReplace] = old;\n\t}\n }", "private int rob(int[] num, int lo, int hi) {\r\n int include = 0, exclude = 0;\r\n for (int j = lo; j <= hi; j++) {\r\n int i = include, e = exclude;\r\n include = e + num[j];\r\n exclude = Math.max(e, i);\r\n }\r\n return Math.max(include, exclude);\r\n}", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\r\n\t\t//System.out.println(Integer.toBinaryString(31));\r\n\t\tint n = in.nextInt();\r\n\t\tint[] arr = new int[n];\r\n\t\tfor(int i = 0 ;i < n; i++) {\r\n\t\t\tarr[i] = in.nextInt();\r\n\t\t}\r\n\t\tArrays.sort(arr);\r\n\t\tint[] arr1 = new int[n];\r\n\t\tint co = 0;\r\n\t\tfor(int i = n- 1; i >= 0; i--) {\r\n\t\t\tarr1[co++] = arr[i];\r\n\t\t}\r\n\t\tString[] str = new String[n];\r\n\t\tfor(int i = 0; i < n; i++) {\r\n\t\t\tstr[i] = Integer.toBinaryString(arr1[i]);\r\n\t\t}\r\n\t\tint[] countArr = new int[n];\r\n\t\tint[] countArr1 = new int[n];\r\n\t\tTreeSet<Integer> set = new TreeSet<Integer>(); \r\n\t\tfor(int i = 0; i < n; i++) {\r\n\t\t\tcountArr[i] = 0;\r\n\t\t\tfor(int j = 0; j < str[i].length(); j++) {\r\n\t\t\t\tif(String.valueOf(str[i].charAt(j)).equals(\"1\")) {\r\n\t\t\t\t\tcountArr[i]++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tset.add(countArr[i]);\r\n\t\t}\r\n\t\tint[] arrCpy = new int[set.size()];\r\n\t\tint ct = set.size() - 1;\r\n\t\tIterator<Integer> it = set.iterator();\r\n\t\twhile(it.hasNext()) {\r\n\t\t\tarrCpy[ct--] = it.next();\r\n\t\t}\r\n\t\tfor(int i = 0; i < arrCpy.length; i++) {\r\n\t\t\tfor(int j = 0; j < n; j++) {\r\n\t\t\t\tif(arrCpy[i] == countArr[j]) {\r\n\t\t\t\t\tSystem.out.println(arr1[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void example12() {\n\t\t\n\t\t// an example of passing data to algorithms in reverse order\n\t\t\n\t\t// make some data\n\t\t\n\t\tIndexedDataSource<SignedInt32Member> nums =\n\t\t\t\tnom.bdezonia.zorbage.storage.Storage.allocate(G.INT32.construct(), \n\t\t\t\tnew int[] {-1, 345, 1, -3044, 0, 0, 1066, -12});\n\t\t\n\t\t// sort it\n\t\t\n\t\tSort.compute(G.INT32, nums);\n\t\t\n\t\t// this is how the results look\n\t\t// nums = [-3044, -12, -1, 0, 0, 1, 345, 1066]\n\t\t\n\t\t// now wrap a reverse filter around the data\n\t\t\n\t\tIndexedDataSource<SignedInt32Member> revNums = new ReversedDataSource<>(nums);\n\n\t\t// sort using the filter\n\t\t\n\t\tSort.compute(G.INT32, revNums);\n\t\t\n\t\t// this is how the results look\n\t\t// revNums = [-3044, -12, -1, 0, 0, 1, 345, 1066]\n\t\t// nums = [1066, 345, 1, 0, 0, -1, -12, -3044]\n\t\t\n\t\t// now here is a some code showing some another way to use the filter\n\t\t\n\t\tSignedInt32Member value = G.INT32.construct();\n\t\t\n\t\tGetV.second(revNums, value);\n\t\t\n\t\t// gets the second value in the reverse list. so it gets the second to last\n\t\t// value in the original list.\n\t\t// value = -12\n\t}", "public static void getLeastNumbers_2(int[] input, int[] output) {\n int start = 0;\n int end = input.length - 1;\n int k = output.length;\n int index = partition(input, start, end);\n while(index != k - 1) {\n if(index > k - 1) {\n end = index - 1;\n index = partition(input, start, end);\n }\n else {\n start = index + 1;\n index = partition(input, start, end);\n }\n }\n \n for(int i = 0; i < k; ++i)\n output[i] = input[i];\n }", "public void sortElements(){\n\t\tgetInput();\n\t\tPeople[] all = countAndSort(people, 0, people.length-1);\n\t\t//PrintArray(all);\n\t\tSystem.out.println(InversionCount);\n\t}", "public void removeDuplicates()\n\t{\n\t\tComparator<Point> comp = new Comparator<Point>() \n\t\t{\n @Override\n public int compare(Point p, Point q) \n {\n \t return p.compareTo(q);\n }\n };\n\t\tquicksorter.quickSort(comp);\n\t\tquicksorter.getSortedPoints(points);\n\t\t\n\t\tArrayList<Point> pts = new ArrayList<Point>();\n\t\tfor(int a = 0; a < points.length; a++) //copy points into temp array\n\t\t{\n\t\t\tif(!pts.contains(points[a]))\n\t\t\t{\n\t\t\t\tpts.add(points[a]);\n\t\t\t}\n\t\t}\n\t\tpointsNoDuplicate = new Point[pts.size()]; //insert into pointsNoDuplicate\n\t\tfor(int i = 0; i < pts.size(); i++)\n\t\t{\n\t\t\tpointsNoDuplicate[i] = pts.get(i);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tint a1[] = new int[] {4,9,5};\n\t\tint a2[] = new int[] {9,4,9,8,4 }; \n//\t\tArrays.sort(a1);\n//\t\tArrays.sort(a2);\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int i=0;i<a1.length;i++){\n\t\t\tfor(int j=i;j<a2.length;j++){\n\t\t\t\tif(a1[i]!=a2[j]){\n\t\t\t\t\tcontinue;\n\t\t\t\t}else{\n\t\t\t\t\tlist.add(a1[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tfor(Integer l:list){\n\t\t\tSystem.out.print(l+\" \");\n\t\t}\n\n\t}", "public void sortAlternate(int[] nums){\n Arrays.sort(nums);\n }", "public static void main(String[] args) {\n\n Random generator = new Random ();\n int[] List = new int[10];\n int swap ;\n\n //fill up Array\n for (int i = 0 ; i < 10 ; i++) {\n List[i]= generator.nextInt(1000) ;\n System.out.print(List[i] + \" \");\n }\n System.out.println();\n\n //Compare each number with remaining numbers\n int pointer = 0 ;\n while(pointer < 9) {\n for (pointer = 0 ; pointer < 9 ; pointer ++) {\n if ((List[pointer]) > (List[(pointer+1)])) {\n swap = List[pointer];\n List[pointer] = List[pointer + 1];\n List[pointer + 1] = swap;\n for (int i = 0 ; i < 10 ; i++) {\n System.out.print(List[i] + \" \");\n }\n System.out.println();\n break;\n }\n }\n }\n }", "public void sort()\n\t{\n\t\tfor(int i=0;i<bowlers.size()-1;i++)\n\t\t{\n\t\t\tfor(int j=i+1;j<bowlers.size();j++)\n\t\t\t{\n\t\t\t\tif(bowlers.get(i).getBall()<bowlers.get(j).getBall())\n\t\t\t\t{\n\t\t\t\t\tBowler bowler=bowlers.get(i);\n\t\t\t\t\tbowlers.set(i,bowlers.get(j));\n\t\t\t\t\tbowlers.set(j,bowler);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<bowlers.size();i++)\n\t\t{\n\t\tSystem.out.println(bowlers.get(i).getBall());\n\t\t}\n\t}", "private void sortDice() {\r\n for (int index = 0; index < dice.size(); index++) {\r\n for (int subIndex = index; subIndex < dice.size(); subIndex++) {\r\n if (dice.get(subIndex).compareTo((dice.get(index))) > 0) {\r\n final Integer temp = dice.get(index);\r\n dice.set(index, dice.get(subIndex));\r\n dice.set(subIndex, temp);\r\n }\r\n }\r\n }\r\n }", "int[] MinSubUnion(int x, ArrayList<Integer> vn, ArrayList<Integer> vnComp){\n\tint[] ret = new int[x];\n\t\n\t/*\n\t * Build the set for legitimate users\n\t */\n\t//ArrayList<String> L = new ArrayList<String>();\n\tArrayList<String> LComp = new ArrayList<String>();\n\t//for (int v : vn)\n\t//\tL.addAll(this.LiSet[v]);\n\tfor (int v : vnComp){\n\t\tLComp.removeAll(this.LiSet[v]);\n\t\tLComp.addAll(this.LiSet[v]);\n\t}\n\t\n\tfor(int i = 0; i < x; i ++){\n\t\tint gain = 1000000000;\n\t\tint v_min = -1;\n\t\t\n\t\tfor(int v : vn){\n\t\t\tArrayList<String> temp = this.LiSet[v];\n\t\t\ttemp.removeAll(LComp);\n\t\t\tif(gain > temp.size()){\n\t\t\t\tgain = temp.size();\n\t\t\t\tv_min = v;\n\t\t\t}\n\t\t}\n\t\tif(v_min == -1)\n\t\t\tcontinue;\n\n\t\t//L.removeAll(this.LiSet[v_max]);\n\t\tLComp.removeAll(this.LiSet[v_min]);\n\t\tLComp.addAll(this.LiSet[v_min]);\n\t\tvn.remove(vn.indexOf(v_min));\n\t\tvnComp.add(v_min);\n\t\tret[i] = v_min;\n\t}\n\treturn ret;\n}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tInteger[] numbers = new Integer[] {1, 73, 12, - 5, 73, 8, - 5, 1, 12};\n\t\n\t\tSet<Integer> equalNumbers = new HashSet<Integer>();\n\t\tSet<Integer> uniqueNumbers = new HashSet<Integer>();\n\t\tString uniqueNumber = \"\";\n\t\t\n\t\tfor (int i = 0; i < numbers.length; i++) {\n\t\t\tfor (int j = i + 1; j < numbers.length; j++) {\n\t\t\tif (numbers[i] == numbers[j]) {\n\t\t\t\tif (!equalNumbers.contains(numbers[j])) {\n\t\t\t\t\tequalNumbers.add(numbers[j]);\t// 1, -5, 73, 12,\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!uniqueNumbers.contains(numbers[j]))\n\t\t\t\tuniqueNumbers.add(numbers[j]);\t // 1, -5, 8, 73, 12, \t\t\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\tfor (Integer number : equalNumbers) {\n\t\t\tSystem.out.print(number.toString() + \", \"); // 1, -5, 73, 12,\n\t\t}\t\n\t\tSystem.out.println();\t\t\n\t\tfor (Integer number : uniqueNumbers) {\n\t\t\tSystem.out.print(number.toString() + \", \"); // 1, -5, 8, 73, 12, \n\t\t} \n\t\t\n\t\tfor (Integer number : uniqueNumbers) {\n\t\t\tif (!equalNumbers.contains(number)) {\n\t\t\t\tuniqueNumber += number;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\t\n System.out.println(\"The uniqie number is : \" + uniqueNumber);\n\t}", "ArrayList <Integer> nearlySorted(int arr[], int num, int k)\n {\n PriorityQueue<Integer> pq = new PriorityQueue<>();\n ArrayList<Integer> res = new ArrayList<>();\n for(int i=0;i<k+1;i++){\n pq.add(arr[i]);\n }\n \n for(int i=k+1;i<num;i++){\n res.add(pq.remove());\n pq.add(arr[i]);\n }\n \n while(pq.size()>0){\n res.add(pq.remove());\n }\n \n return res;\n }", "private static void sample2(ScoredDocIDs collection, int collectionSize, int[] sample, long[] times) \n throws IOException {\n if (returnTimings) {\n times[0] = System.currentTimeMillis();\n }\n int sampleSize = sample.length;\n IntPriorityQueue pq = new IntPriorityQueue(sampleSize);\n /*\n * Convert every value in the collection to a hashed \"weight\" value, and insert\n * into a bounded PQ (retains only sampleSize highest weights).\n */\n ScoredDocIDsIterator it = collection.iterator();\n while (it.next()) {\n pq.insertWithReuse((int)(it.getDocID() * PHI_32) & 0x7FFFFFFF);\n }\n if (returnTimings) {\n times[1] = System.currentTimeMillis();\n }\n /*\n * Extract heap, convert weights back to original values, and return as integers.\n */\n Object[] heap = pq.getHeap();\n for (int si = 0; si < sampleSize; si++) {\n sample[si] = (int)(((IntPriorityQueue.MI)(heap[si+1])).value * PHI_32I) & 0x7FFFFFFF;\n }\n if (returnTimings) {\n times[2] = System.currentTimeMillis();\n }\n }", "private static void selectionSort(String[] numbers) {\n for (int top = numbers.length-1; top > 0; top-- ) {\n int maxloc = 0;\n for (int i = 1; i <= top; i++) {\n if (numbers[i].compareTo(numbers[maxloc]) > 0)\n maxloc = i;\n }\n String temp = numbers[top];\n numbers[top] = numbers[maxloc];\n numbers[maxloc] = temp;\n }\n }", "private static Set<EnumTrend> checkTrendpatterns(List<Integer> numbers) {\r\n\r\n\t\tSet<EnumTrend> trends = new HashSet<EnumTrend>();\r\n\t\tIterator<Integer> numIterator = numbers.iterator();\r\n\r\n\t\tInteger value = 0;\r\n\r\n\t\twhile (numIterator.hasNext()) {\r\n\t\t\tInteger nextValue = (Integer) numIterator.next();\r\n\r\n\t\t\t// dont run in first iteration\r\n\t\t\tif (nextValue == numbers.get(0)) {\r\n\t\t\t\tvalue = nextValue;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (value < nextValue) {\r\n\t\t\t\ttrends.add(EnumTrend.ASC);\r\n\t\t\t} else if (value > nextValue) {\r\n\t\t\t\ttrends.add(EnumTrend.DESC);\r\n\t\t\t} else if (value == nextValue) {\r\n\t\t\t\ttrends.add(EnumTrend.CONSTANT);\r\n\t\t\t}\r\n\t\t\tvalue = nextValue;\r\n\t\t}\r\n\r\n\t\treturn trends;\r\n\t}", "public void wiggleSortInitial(int[] nums) {\n int[] freq = new int[nums.length];\n \n for (int i = 0; i < nums.length; i++) \n freq[i] = nums[i];\n \n Arrays.sort(freq);\n \n int p1 = 0, p2 = nums.length - 1, i = 0;\n \n while (i < nums.length) {\n nums[i++] = freq[p1++];\n if (i < nums.length) nums[i++] = freq[p2--];\n }\n }", "public void selectionSort(int[] x)\n {\n for (int i = 0; i < x.length-1; i++) {\n int minIndex = i;\n for (int j = i+1; j < x.length; j++) {\n if (x[minIndex] > x[j]) {\n minIndex = j;\n }\n }\n int temp = x[i];\n x[i] = x[minIndex];\n x[minIndex] = temp;\n }\n \n public void replaceFirst(int oldVal, int newVal)\n {\n \n }\n}", "static void minimumBribes(int[] q) {\r\n int bribes = 0;\r\n boolean valid = true;\r\n int index = 1;\r\n \r\n // We get the length of the input array\r\n int size = q.length; \r\n \r\n // We cycle through the input array\r\n for (int i = 0; i < size; i++) {\r\n int actual = q[i];\r\n \r\n // We check if the current person has surely swapped position more than two times since it appears before they are supposed to\r\n if (actual > index) {\r\n int difference = actual - index;\r\n if (difference > 2) {\r\n valid = false;\r\n break;\r\n }\r\n }\r\n \r\n // We check the number of bribes by counting how many persons with bigger IDs have already swapped place with the current one\r\n // NOTE: We can safely begin to check from position (actual-2) since higher numbers of swaps would have been caught by the previous if condition\r\n for (int j = actual-2; j < index; j++) {\r\n if (j < 0) {\r\n continue;\r\n }\r\n if (actual < q[j]) {\r\n bribes += 1;\r\n }\r\n }\r\n \r\n index += 1;\r\n }\r\n \r\n // Checks if the result is valid, and if so, it prints it\r\n if (valid == false) {\r\n System.out.println(\"Too chaotic\");\r\n }\r\n else {\r\n System.out.println(bribes);\r\n }\r\n}", "private List<Bid> getProperBid(double lower, double upper) {\r\n\r\n\t\tList<Bid> bids = new ArrayList<Bid>();\r\n\t\tBidIterator myBidIterator = new BidIterator(US.getDomain());\r\n\t\t\r\n\t\twhile (myBidIterator.hasNext()) {\r\n\t\t\tBid b = myBidIterator.next();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tdouble util = US.getUtility(b);\r\n\t\t\t\tif (util >= lower && util <= upper) {\r\n\t\t\t\t\tbids.add(b);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn bids;\r\n\t}", "private void sort(int start, int stop) {\n\t\taddComparison();\n\t\tif (start > stop) {\n\t\t\treturn;\n\t\t}\n\t\taddComparison();\n\t\tif (stop - start < b) {\n\t\t\tbubbleSort(start, stop);\n\t\t} else {\n\t\t\tint pivotIndex = start + (int) ((stop - start) * Math.random());\n\t\t\tfloat pivot = sequence[pivotIndex];\n\t\t\tint left = start;\n\t\t\tint right = stop;\n\t\t\twhile (left <= right) {\n\t\t\t\taddComparison();\n\t\t\t\twhile (sequence[left] < pivot) {\n\t\t\t\t\tleft++;\n\t\t\t\t\taddComparison();\n\t\t\t\t}\n\t\t\t\taddComparison();\n\t\t\t\twhile (sequence[right] > pivot) {\n\t\t\t\t\tright--;\n\t\t\t\t\taddComparison();\n\t\t\t\t}\n\t\t\t\taddComparison();\n\t\t\t\tif (left <= right) {\n\t\t\t\t\tswapAt(left, right);\n\t\t\t\t\tleft++;\n\t\t\t\t\tright--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsort(start, right);\n\t\t\tsort(left, stop);\n\t\t}\n\t}", "private static ArrayList<double[]> createSamples(double p, int n) {\n\t\tArrayList<double[]> result = new ArrayList<double[]>();\n\t\tint cutoff = (int) Math.round(n * p);\n\t\tfor (int i = 0; i < cutoff; i++) result.add(new double[] {1});\n\t\tfor (int i = cutoff; i < n; i++) result.add(new double[] {0});\n\t\treturn result;\n\t}", "private void rearrangeSolution() {\r\n List<Integer> trinity = new ArrayList<Integer>();\r\n trinity.add(0); trinity.add(1); trinity.add(2);\r\n permutateDigits();\r\n for (int i = 0; i<9; i+=3) {\r\n Collections.shuffle(trinity);\r\n swapRow(trinity.get(0)+i, trinity.get(1)+i);\r\n }\r\n for (int i = 0; i<9; i+=3) {\r\n Collections.shuffle(trinity);\r\n swapCol(trinity.get(0)+i, trinity.get(1)+i);\r\n }\r\n }", "private void shuffleOrder() {\n\t\t// Simple shuffle: swap each piece with some other one\n\t\tfor (int i = 0; i < order.size(); i++) {\n\t\t\tint j = (int) (Math.random() * order.size());\n\t\t\tInteger pi = order.get(i);\n\t\t\torder.set(i, order.get(j));\n\t\t\torder.set(j, pi);\n\t\t}\n\t}", "public static void selectionSort(double [] list1)\r\n\t{\r\n\t\tdouble temp= 0.0;\r\n\t\tint smallest=0;\r\n\t\r\n\t\tfor(int outside=0; outside<list1.length; outside++)\r\n\t\t{\r\n\t\t\t//System.out.println(\"Outside: \" + outside);\r\n\t\t\tsmallest=outside;\r\n\t\t\tfor(int inside=1+outside; inside<list1.length; inside++)\r\n\t\t\t{\r\n\t\t\t\tif(list1[inside]<list1[smallest])\r\n\t\t\t\t{\r\n\t\t\t\t\tsmallest = inside;\t\t\r\n\t\t\t\t\t//System.out.println(smallest);\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttemp=list1[smallest];\r\n\t\t\tlist1[smallest]=list1[outside];\r\n\t\t\tlist1[outside]=temp;\r\n\t\t}\r\n\t}", "void selectionSort(int[] array) {\r\n\r\n\t\tint size = array.length;\r\n\r\n\t\tfor (int step = 0; step < size; step++) {\r\n\t\t\tint minIndex = step;\r\n\t\t\tfor (int i = step + 1; i < size; i++) {\r\n\r\n\t\t\t\tif (array[i] < array[minIndex]) {\r\n\t\t\t\t\tminIndex = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tint temp = array[step];\r\n\t\t\tarray[step] = array[minIndex];\r\n\t\t\tarray[minIndex] = temp;\r\n\t\t\tSystem.out.println(\"Round - \" + (step + 1) + \" - \" + Arrays.toString(array));\r\n\t\t}\r\n\r\n\t}", "public void selectionSort()\r\n {\r\n for(int x = 0; x < numItems; x++)\r\n {\r\n int smallestLoc = x;\r\n for(int y = x+1; y<numItems; y++)\r\n {\r\n if(mArray[y]< mArray[smallestLoc])\r\n {\r\n smallestLoc = y;\r\n }\r\n }\r\n int temp = mArray[x];\r\n mArray[x] = mArray[smallestLoc];\r\n mArray[smallestLoc] = temp;\r\n }\r\n }", "public static void main(String[] args) {\n List<Integer> li = new ArrayList<>();\n li.add(4);\n li.add(4);\n li.add(2);\n li.add(2);\n li.add(2);\n li.add(2);\n li.add(3);\n li.add(3);\n li.add(1);\n li.add(1);\n li.add(6);\n li.add(7);\n li.add(5);\n li.add(5);\n li.add(3);\n li.add(1);\n li.add(2);\n li.add(2);\n li.add(4);\n\n List<Integer> li1 = new ArrayList<>();\n li1.add(5);\n li1.add(1);\n li1.add(2);\n li1.add(3);\n li1.add(4);\n li1.add(1);\n System.out.println(li1);\n int[] array = { 4, 4, 2, 2, 2, 2, 3, 3, 1, 1, 6, 7, 5 };\n\n customSort(li1);\n//\n// missingWords(\"I am using hackerrank to improve programming\",\"am hackerrank to improve\");\n//\n// System.out.println(fourthBit(32));\n////nums\n// System.out.println(kSub(3,li1));\n\n Float f = 0.1F;\n\n System.out.println(f);;\n\n System.out.println(new BigDecimal(f.toString()));\n\n System.out.println(twoSum(new int[]{2,7,1,4}, 9));\n }", "private static void sort(Object[] a, Object[] tmp,\n int from, int to, Fun isLess) {\n int split = (from + to) / 2;\n if (split - from > 1)\n sort(tmp, a, from, split, isLess);\n if (to - split > 1)\n sort(tmp, a, split, to, isLess);\n int i = from, j = split;\n while (i < split && j < to) {\n if (isLess.apply(tmp[i], tmp[j]) == Boolean.TRUE)\n a[from] = tmp[i++];\n else\n a[from] = tmp[j++];\n ++from;\n }\n if (i < split)\n System.arraycopy(tmp, i, a, from, split - i);\n else if (j < to)\n System.arraycopy(tmp, j, a, from, to - j);\n }", "static void minimumBribes(int[] q) {\n \t\n \tfor(int i=0;i<q.length;i++){\n if((q[i] - (i+1)) > 2){\n System.out.println(\"Too chaotic\");\n return; \n }\n }\n \n int swaps=0;\n for(int i=0;i< q.length;i++){\n for(int j=i+1;j<q.length;j++){\n if(q[i] > q[j]){ \n int tmp=q[j];\n q[j]=q[i];\n q[i]=tmp;\n swaps++;\n }\n }\n }\n \n System.out.println(swaps);\n \n }", "@Test\r\n public void repeatedValuesTest() {\r\n int[] unsorted = new int[]{1,33,1,0,33,-23,1,-23,1,0,-23};\r\n int[] expResult = new int[]{-23,-23,-23,0,0,1,1,1,1,33,33};\r\n int[] result = arraySorter.sort(unsorted);\r\n assertArrayEquals(expResult, result);\r\n }", "public static void getBubbleSortwithoutOutput(int range) {\n\n Integer[] number = GetRandomArray.getIntegerArray(range);\n\n //pivot to indicate current cursor\n int pivot = 0;\n\n //get initial value of array to start\n int init = number[pivot];\n\n //first and last element of array\n int last = 0, first = 0;\n\n //length of array\n int array_lenght = number.length - 1;\n\n for (int i = 0; i < number.length; i++) {\n\n //get last number of modified array\n last = number[number.length - 1];\n\n //get first number of modified array\n first = number[0];\n\n //increase pivot by 1\n pivot = pivot + 1;\n\n //if current number is is greater than next right to it\n if (init > number[pivot]) {\n\n //swap number\n number[i] = number[pivot];\n number[pivot] = init;\n\n //set pivot to 0,init to first number,i to less than 0, if its length is equal to array size\n if (pivot == array_lenght) {\n init = first;\n pivot = 0;\n i = -1;\n }\n }\n\n //if current number is is less than next right to it\n if (init < number[pivot]) {\n //do nothing and set current number as pivot\n init = number[pivot];\n }\n\n //if init number is equal last number of array\n if (init == last) {\n\n //set pivot to 0,init to first number,i to less than 0, if its length is equal to array size\n init = first;\n pivot = 0;\n i = -1;\n }\n System.out.println(Arrays.toString(number));\n }\n }", "private static void sortAccording(int A1[], int A2[], int m, int n)\n {\n // The temp array is used to store a copy \n // of A1[] and visited[] is used to mark the \n // visited elements in temp[].\n int temp[] = new int[m], visited[] = new int[m];\n for (int i = 0; i < m; i++)\n {\n temp[i] = A1[i];\n visited[i] = 0;\n }\n \n // Sort elements in temp\n Arrays.sort(temp);\n \n // for index of output which is sorted A1[]\n int ind = 0; \n \n // Consider all elements of A2[], find them\n // in temp[] and copy to A1[] in order.\n for (int i = 0; i < n; i++){\n\n // Find index of the first occurrence\n // of A2[i] in temp\n int f = first(temp, 0, m-1, A2[i], m);\n \n // If not present, no need to proceed\n if (f == -1) \n continue;\n \n // Copy all occurrences of A2[i] to A1[]\n for (int j = f; (j < m && temp[j] == A2[i]); j++){\n \n A1[ind++] = temp[j];\n visited[j] = 1;\n }\n }\n \n // Now copy all items of temp[] which are \n // not present in A2[]\n for (int i = 0; i < m; i++)\n if (visited[i] == 0)\n A1[ind++] = temp[i];\n }", "public static void main(String[] args) {\n\n\t\tint[] sample = { 55, 3, 7, 3303, 443, -12, 53, 77, 123, 4, 543, 0, 213, 299, 48 };\n\t\tint res[] = ISort(sample); \n\t\tSystem.out.println(\"-12, 0, 3, 4, 7, 48, 53, 55, 77, 123, 213, 299, 443, 543, 3303 <- the result should look like\");\n\t\tfor (int i = 0; i < res.length; i++) {\n\t\t\tSystem.out.printf(\"%d, \", res[i]);\n\t\t}\n\t}", "public void selectionSort() {\n int nextMin;\n\n for (int i = 0; i < IntList.length - 1; i++) {\n nextMin = i;\n for (int j = i + 1; j < IntList.length; j++) {\n if (IntList[j] < IntList[nextMin])\n nextMin = j;\n }\n if (nextMin != i)\n swapSelection(IntList, i, nextMin);\n }\n }", "public static void s1DescendingTest() {\n int key = 903836722;\n SortingLab<Integer> sli = new SortingLab<Integer>(key);\n int M = 600000;\n int N = 1000;\n double start;\n double elapsedTime;\n System.out.print(\"Sort 1 Descending\\n\");\n for (; N < M; N *= 2) {\n Integer[] ai = getRandomArray(N, Integer.MAX_VALUE);\n Arrays.sort(ai);\n Integer[] bi = new Integer[ai.length];\n int count = 0;\n for (int i = ai.length - 1; i >= 0; i--) {\n bi[count] = ai[i];\n count++;\n }\n start = System.nanoTime();\n sli.sort1(bi);\n elapsedTime = (System.nanoTime() - start) / 1_000_000_000d;\n System.out.print(N + \"\\t\");\n System.out.printf(\"%4.3f\\n\", elapsedTime);\n }\n }", "public static void intQSort(int v[], int l, int r) {\n\n int tmp; //tmp variable for swapping\n\n if (INSERTIONENABLED) {\n\n //Use insertion sort for arrays smaller than CUTOFF\n if (r < CUTOFF) {\n\n for(int i = l; i < r; i++) {\n for(int j = i; j > 0 && v[j - 1] > v[j]; j--) {\n // swap(j, j -1) {\n tmp=v[j - 1];\n v[j - 1]=v[j];\n v[j]=tmp;\n // }\n }\n }\n\n return;\n }\n }\n\n int pivot;\n int m = l + (int) (Math.random() * ((r - l) + 1)); // random number between first and last, Peto's remark\n\n //median(v[l], v[m], v[r]) {\n if (v[l] <= v[m]) {\n if (v[m] <= v[r])\n pivot = v[m];\n else {\n if (v[l] <= v[r])\n pivot = v[r];\n else\n pivot = v[l];\n }\n } else {\n if (v[m] <= v[r]) {\n if (v[l] <= v[r])\n pivot = v[l];\n else\n pivot = v[r];\n } \n else\n pivot = v[m];\n }\n // }\n\n int i=l,j=r;\n\n //Partioning\n while(i<=j) {\n\n while(v[i]<pivot) i++;\n while(v[j]>pivot) j--;\n\n if(i<=j) {\n //swap(i, j) {\n tmp=v[i];\n v[i]=v[j];\n v[j]=tmp;\n // }\n\n i++;\n j--;\n }\n }\n\n if(l<j) \n intQSort(v,l,j);\n\n if(i<r) \n intQSort(v,i,r);\n }", "public static void main(String[] args) {\n\t\t// \tConstants declaration\n\t\tfinal int ELEMENTS_ARRAY = 10;\n\t\t// Variable declaration\n\t\tint temp = 0;\n\t\t\n\t\t// Array declaration\n\t\tint[] disorderedArray = new int[ELEMENTS_ARRAY];\n\t\tint[] orderedArray = new int[ELEMENTS_ARRAY];\n\t\t\n\t\t// Object construction\n\t\tRandom randomNumbers = new Random(System.nanoTime());\n\t\t\n\t\t// Create and display disordered array\n\t\tfor(int i = 0; i < ELEMENTS_ARRAY; i++) {\n\t\t\tdisorderedArray[i] = randomNumbers.nextInt(101);\n\t\t\tSystem.out.print(disorderedArray[i]+ \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\t// B U B B L E\t\tS O R T\t\tM E T H O D\n\t\t// \t\tA S C E N D I N G\n\t\tfor(int i = 0; i < ELEMENTS_ARRAY-1; i++) {\n\t\t\tfor(int j = 0; j < ELEMENTS_ARRAY-1; j++) {\n\t\t\t\tif(disorderedArray[j] > disorderedArray[j+1]) {\n\t\t\t\t\ttemp = disorderedArray[j+1];\n\t\t\t\t\tdisorderedArray[j+1] = disorderedArray[j];\n\t\t\t\t\torderedArray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Ordered Array\");\n\t\tfor(int i = 0; i < ELEMENTS_ARRAY; i++) {\n\t\t\tSystem.out.print(orderedArray[i]+ \" \");\n\t\t}\n\t\t\n\t\t// \t\tD E S C E N D I N G\n\t\tfor(int i = 0; i < ELEMENTS_ARRAY-1; i++) {\n\t\t\tfor(int j = 0; j < ELEMENTS_ARRAY-1; j++) {\n\t\t\t\tif(disorderedArray[j] disorderedArray[j+1]) {\n\t\t\t\t\ttemp = disorderedArray[j+1];\n\t\t\t\t\tdisorderedArray[j+1] = disorderedArray[j];\n\t\t\t\t\torderedArray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Ordered Array\");\n\t\tfor(int i = 0; i < ELEMENTS_ARRAY; i++) {\n\t\t\tSystem.out.print(orderedArray[i]+ \" \");\n\t\t}\n\t\t\n\n\t}", "public static void main(String[] args) {\n\n System.out.println(\"How many sets of numbers do you want?: \"); // Prompt displayed for user.\n Scanner input = new Scanner(System.in); // User input as to how many sets the user desires.\n\n\n // assigns the user input number to integer variable number\n int number = input.nextInt();\n\n // Input validation w/ while loop to ask user for number until they give number greater than 0\n if(number<1 ) {\n\n number = 0;\n while(number<1) {\n System.out.print(\"That was not a valid number please give a number greater than zero: \");\n Scanner input2 = new Scanner(System.in);\n number = input2.nextInt();\n }\n }\n\n\n // Java Library will create the a list of Integers.\n ArrayList<Integer> list = new ArrayList<Integer>();\n\n // Uses the Random class\n Random rand = new Random();\n // A variable that helps us get a random int between 1-49\n final int RANGE = 49;\n // j indicates the user input of sets desired\n for(int j = 0; j<number; j++) {\n\n // for loop used to place 6 randomly generated numbers in sets defined by user.\n for(int i = 0; i<6; i++) {\n int num = (int) ( RANGE * Math.random() ) + 1;\n //while loop ensures no repeated numbers\n //using the contains method from the ArrayList class\n while(list.contains(num)) {\n\n num = rand.nextInt(50);\n }\n\n // adds number to list using add method from ArrayList Class\n list.add(num);\n\n }\n\n // Calling the sort method through the Collections class to sort the list from low to high\n Collections.sort(list);\n\n //Prints out the list once all integers are added\n System.out.println(list);\n\n //clears the list in order to populate it if more sets are asked for\n list.clear();\n\n }\n\n }", "public static void main(String[] args) {\nint n = 6;\nint[] list = randomNumber(n);\nfor(int i = 0;i<list.length;i++){\n\tSystem.out.print(list[i]+\" \");\n}\nsort(list);\n\nSystem.out.println();\nfor(int i = 0;i<list.length;i++){\n\tSystem.out.print(list[i]+\" \");\n}\n\n\n\n\n\t}", "public static int[] minUnsortedArray(int []sample){\n\t\tint s=0;\n\t\t//O(n)\n\t\twhile(s<sample.length-1 && sample[s]<=sample[s+1]){\n\t\t\ts++;\n\t\t}\n\t\tif(s==sample.length-1){\n\t\t\treturn null;\n\t\t}\n\t\tint e=sample.length-1;\n\t\t//O(n)\n\t\twhile(e>=1 && sample[e]>=sample[e-1]){\n\t\t\te--;\n\t\t}\n\t\t\n\t\tint min=sample[s];\n\t\tint max=sample[s];\n\t\t\n\t\t//O(n)\n\t\tfor(int i=s+1;i<=e;i++){\n\t\t\tif(min>sample[i]){\n\t\t\t\tmin=sample[i];\n\t\t\t}\n\t\t\tif(max<sample[i]){\n\t\t\t\tmax=sample[i];\n\t\t\t}\n\t\t}\n\t\t//O(n)\n\t\tfor(int i=0;i<s;i++){\n\t\t\tif(sample[i]>min){\n\t\t\t\ts=i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//O(n)\n\t\tfor(int i=sample.length-1;i>e;i--){\n\t\t\tif(sample[i]<max){\n\t\t\t\te=i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tint []result={s,e};\n\t\treturn result;\n\t\n\t}", "public static <T extends Comparable <? super T>> void mysterySort3(List <T> list){\r\n\t\twhile (!isSorted(list)){ // O(n)\r\n\t\t\tCollections.shuffle(list); //O(n)\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n int l1=1000, l2=1000;\n int[] a1=new int[l1];\n int[] a2=new int[l2];\n int[] combine = new int[l1+l2];\n\n Random r = new Random();\n for (int i=0; i<a1.length; ++i){\n a1[i]=r.nextInt(a1.length*3);\n combine[i]=a1[i];\n }\n\n for (int i=0; i<a2.length; ++i){\n a2[i]=r.nextInt(a2.length*3);\n combine[l1+i]=a2[i];\n }\n\n Arrays.sort(a1);\n Arrays.sort(a2);\n Arrays.sort(combine);\n\n cnt=0;\n int m = findByRank(a1, 0, a1.length, a2, 0, a2.length, (a1.length+a2.length)/2);\n int m2 = combine[combine.length/2-1];\n\n System.out.printf(\"m=%d, m2=%d, cnt=%d\", m, m2, cnt);\n\n\n\n }", "public static void selectionSort(int[] data){ \n for (int i = 0; i < data.length; i++) {\n\t int placeholder = 0;\n\t for( int j = i; j < data.length; j++) {\n\t if (data[j] < data[i]) {\n\t\t placeholder = data[i];\n\t\t data [i] = data[j];\n\t\t data[j] = placeholder;\n\t }\n\t }\n }\n }", "public static void main(String[] args) {\n\n\t\tArrayList<Integer> unsort =new ArrayList<Integer>();\n\t\tunsort.add(21);\n\t\tunsort.add(24);\n\t\tunsort.add(42);\n\t\tunsort.add(29);\n\t\tunsort.add(23);\n\t\tunsort.add(13);\n\t\tunsort.add(8);\n\t\tunsort.add(39);\n\t\tunsort.add(38);\n\t\t\n\t\tArrayList<Card> cards = new ArrayList<Card>();\n\t\tcards.add(new Card(\"Heart\",13));\n\t\tcards.add(new Card(\"Heart\",2));\n\t\tcards.add(new Card(\"Heart\",4));\n\t\t\n\t\tArrayList<Card> sort = Sort.insertSort(cards,false);\n\t\t\n\t\tfor(Card i: sort) \n\t\t{\n\t\t\tSystem.out.println(i.getNumber());\n\t\t}\n\t\t\n\t}", "static int[] sortArray(int[] array) {\n if (array.length == 0) {\n return array;\n }\n\n //transform the array in a list which, in the end will hold sorted odds\n List<Integer> myList = new ArrayList<>(array.length);\n for (int i : array) {\n myList.add(i);\n }\n\n //i need a hash map for the evens so i can store them and their indexes\n Map<Integer, Integer> evensIndexes = new HashMap<>();\n //i need a new array to hold the result\n int[] result = new int[array.length];\n\n //put evens and their indexes in the hash map\n for (int i = 0; i < array.length; i++) {\n for (Integer x : myList) {\n if (x % 2 == 0 && x.equals(array[i])) {\n evensIndexes.put(i, x);\n }\n }\n }\n\n System.out.println(\"evensIndexes \" + evensIndexes);\n\n //sort the list and remove evens\n myList.sort(Integer::compareTo);\n\n for (Integer i : evensIndexes.values()) {\n myList.remove(i);\n }\n\n //put evens from the hash map into the result array\n for (int i = 0; i < result.length; i++) {\n for (Map.Entry<Integer, Integer> set : evensIndexes.entrySet()) {\n if (i == set.getKey()) {\n result[i] = set.getValue();\n break;\n }\n }\n }\n\n System.out.println(\"result after evens added \" + Arrays.toString(result));\n\n //use an iterator to get odd values from the list and add them in the result array\n Iterator<Integer> odd = myList.iterator();\n\n for (int i = 0; i < result.length; i++) {\n if (result[i] == 0 && array[i] != 0) {\n while (odd.hasNext()) {\n result[i] = odd.next();\n odd.remove();\n break;\n }\n }\n }\n\n return result;\n\n }", "public static void dimension_sort() { // sort the dimensions according to their effect to GCP\n\t\tfor (int i = 0;i < dims-1;i++) {\n\t\t\tdimension[i] = (byte) i;\n\t\t}\n\t\tboolean swapped = true;\n\t\tint i=0;\n\t\tbyte temp;\n\t\twhile (swapped) {\n\t\t\tswapped = false;\n\t\t\ti++;\n\t\t\tfor (int j = 0; j < dimension.length-i;j++) { // smaller range, put it the front\n\t\t\t\tif (cardinalities[dimension[j]] > cardinalities[dimension[j+1]]) {\n\t\t\t\t\ttemp = dimension[j];\n\t\t\t\t\tdimension[j] = dimension[j+1];\n\t\t\t\t\tdimension[j+1] = temp;\n\t\t\t\t\tswapped = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "ReservoirSamplerWithoutReplacement(int numSamples, long seed) {\n\t\tPreconditions.checkArgument(numSamples >= 0, \"numSamples should be non-negative.\");\n\t\tthis.numSamples = numSamples;\n\t\tthis.random = new XORShiftRandom(seed);\n\t\tthis.queue = new PriorityQueue<>(numSamples);\n\t}", "public static void OddSort(int arr[], int start, int end)\n {\n for (int i = start; i < end - 1; i++)\n {\n int index = i;\n for (int j = i + 1; j < end; j++){\n if (arr[j] >= arr[index]){\n index = j;\n }\n }\n int smallerNumber = arr[index];\n arr[index] = arr[i];\n arr[i] = smallerNumber;\n }\n }", "public static void main(String[] args) {\n System.out.print(unique(new int[]{100, 11, 34, 11, 52, 61, 1, 34}));\n // should print: `[1, 11, 34, 52, 61]`\n\n\n }" ]
[ "0.571184", "0.5580446", "0.545255", "0.53344", "0.52974945", "0.529005", "0.52742165", "0.526515", "0.52294064", "0.5139428", "0.5112697", "0.508485", "0.507673", "0.50744426", "0.5062702", "0.5049593", "0.504117", "0.50173783", "0.5013033", "0.49808553", "0.49635872", "0.49595693", "0.49506065", "0.4942757", "0.49382904", "0.49215618", "0.49063155", "0.48957595", "0.48517278", "0.48469752", "0.48443466", "0.4841162", "0.48372298", "0.48353064", "0.483404", "0.4833587", "0.48294348", "0.48202837", "0.48124528", "0.48120102", "0.480901", "0.48042396", "0.48022607", "0.4785927", "0.47753054", "0.4774497", "0.477377", "0.4769202", "0.47680306", "0.47645846", "0.4759244", "0.47566527", "0.47539896", "0.47537223", "0.47512168", "0.47493833", "0.47479016", "0.47438455", "0.47354716", "0.47347984", "0.47269154", "0.47217664", "0.47066233", "0.470536", "0.4703325", "0.46958938", "0.469144", "0.46907565", "0.4689059", "0.46868944", "0.46860647", "0.46855623", "0.46794772", "0.46761933", "0.4665454", "0.46597922", "0.46576664", "0.46559522", "0.46554548", "0.46549663", "0.46532294", "0.46522516", "0.465105", "0.4648094", "0.4646567", "0.46462086", "0.46453544", "0.46401095", "0.46396604", "0.4639439", "0.46379966", "0.4637102", "0.46324492", "0.46313956", "0.46279064", "0.46257272", "0.46250573", "0.4624783", "0.46205074", "0.4619227" ]
0.5251409
8
adds a sample number to the appropriate list
public void addConclusionNumber(Sample sample) { if(sample.getConclusionCase()==0) { conclusionNumbers1.addAll(sample.getSampleNumber()); } else { conclusionNumbers2.addAll(sample.getSampleNumber()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addSampleData() {\r\n }", "public void addSample(double value){\n num_samples += 1;\n signal = signal*damping + value;\n }", "org.hl7.fhir.SampledData addNewValueSampledData();", "public void setSamples(List<Sample> samples)\n {\n this.samples = samples;\n }", "void update_sample(int new_sample) {\n\t sample_choice = new_sample;\n\t combine_message_and_sample();\n\t update_content();\n }", "public void addSample(Point punto) {\n\t\tthis.punti.add(punto); //non gestisco il ritorno booleano di add volutamente,\n\t\t//semplicemente non sono accettati valori duplicati poichè da quelli \n\t\t//non si otterrebbe una funzione\n\t}", "public void addSample(int note, String fileName) {\n\t\taddSample(note, fileName, -1, -1, 1.0);\n\t}", "public synchronized void addSample( TimedVariable tv )\n\t{\n\t\tint sz = vars.size();\n\t\tint idx = 0;\n\t\tif (sz > 0)\n\t\t{\n\t\t\tidx = Collections.binarySearch(vars, tv, tvComparator);\n\n\t\t\t// If same time stamp, replace old value.\n\t\t\tif (idx >= 0)\n\t\t\t{\n\t\t\t\tvars.set(idx, tv);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tidx = (-idx) - 1;\n\t\t}\n\t\tvars.add(idx, tv);\n\t}", "public void addSample(int note, String fileName, double gain) {\n\t\taddSample(note, fileName, -1, -1, gain);\n\t}", "public void addSample(int note, String fileName, double startMs, double endMs, double gain) {\n\t\tif (type != InstrumentType.SAMPLE_BANK) {\n\t\t\tthrow new RuntimeException(\"Can't add samples to \" + type + \" instrument\");\n\t\t}\n\t\tsampleMap.put(note, new SampleInfo(note, fileName, startMs, endMs, gain));\n\t}", "@Test\r\n\tpublic void testAddAllInt() {\r\n\t\tDoubleList sample = new DoubleList(new Munitions(2, 4, \"ferrum\"));\r\n\t\tsample.add(new Munitions(10, 5, \"ferrum\"));\r\n\t\tsample.addAll(1, list);\r\n\t\tAssert.assertEquals(17, sample.size());\r\n\t\tAssert.assertTrue(sample.get(0).equals(new Munitions(2, 4, \"ferrum\")));\r\n\t\tAssert.assertTrue(sample.get(1).equals(list.get(0)));\r\n\t\tAssert.assertTrue(sample.get(16).equals(new Munitions(10, 5, \"ferrum\")));\r\n\t}", "public void updateSamples();", "private void sampleAndUpdate(int[] profileToSample, GameObserver gameObs) {\n double[] samplePayoffs = gameObs.getSample(profileToSample);\n eGame.addSample(profileToSample, samplePayoffs);\n deviationTestOrder.update(profileToSample, samplePayoffs);\n }", "public void insertNextSample( byte[] buffer, int byteOffset );", "public synchronized void add(DataTypeDoubleArray sample) {\n samples.add(sample);\n }", "public void addSample( final double value ) {\n\t\tfinal double weight = getWeight( ++_population );\n\t\t_mean = weight * value + ( 1 - weight ) * _mean;\n\t\t_meanSquare = weight * value * value + ( 1 - weight ) * _meanSquare;\n\t}", "public void addSample(int note, String fileName, double startMs, double endMs) {\n\t\taddSample(note, fileName, startMs, endMs, 1.0);\n\t}", "public void AddKSamples(int max_num) {\n\t\t\n\t\tfor(int i=0; i<space.k_neighbour.size(); i++) {\n\t\t\tKDNodeDim dim = space.k_neighbour.get(i);\n\t\t\t\n\t\t\tfor(int j=0; j<space.sample_buff.size(); j++) {\n\t\t\t\tSample s = space.sample_buff.get(j);\n\t\t\t\tdim.kdnode.AddSample(s, max_num, dim.dim);\n\t\t\t}\n\t\t}\n\t}", "public void setSamples(int samples){ \n this.samples = samples; \n }", "public void addNumber(String number){\n\t\tnumberList.add(number);\n\t}", "public void insertNextSamples( byte[] buffer, int byteOffset, int nSamples )\n throws IndexOutOfBoundsException;", "public void add(int data)\n\t{\n\t\tNodeRandom n;\n\t\tn= new NodeRandom(data);\n\t\tif (start==null)\n\t\t{\n\t\t\tSystem.out.println(\"The list is empty\");\n\t\t\t//n.next=null;\n\t\t start= n;\n\t\t curr=n;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//System.out.println(\"The list is not empty\");\n\t\t\t//System.out.println(\"nodelink.curr value is \"+Nodelink.curr.data);\n\t\t curr.next= n;\n\t\t\tcurr=curr.next;\n\t\t\tn.next=null;\n\t\t\t\n\t\t}\n\t}", "public void setConstantSamples(String sourceEntry);", "public void AddSample(Sample s, int max_num, int dim) {\n\t\t\n\t\tif(sample_map.contains(s) == true) {\n\t\t\t// sample already exists\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tLinkSample ptr = k_closest;\n\t\tLinkSample prev_ptr = null;\n\t\t\n\t\twhile(ptr != null) {\n\t\t\tif(ptr.dim_weight > s.class_weight[dim]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tprev_ptr = ptr;\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tif(prev_ptr == null) {\n\t\t\tif(sample_map.size() >= max_num) {\n\t\t\t\t// no room left\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tprev_ptr = k_closest;\n\t\t\tk_closest = new LinkSample();\n\t\t\tk_closest.dim_weight = s.class_weight[dim];\n\t\t\tk_closest.s = s;\n\t\t\tk_closest.next_ptr = prev_ptr;\n\t\t\tsample_map.add(s);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tLinkSample next_ptr = prev_ptr.next_ptr;\n\t\tprev_ptr.next_ptr = new LinkSample();\n\t\tprev_ptr.next_ptr.s = s;\n\t\tprev_ptr.next_ptr.dim_weight = s.class_weight[dim];\n\t\tprev_ptr.next_ptr.next_ptr = next_ptr;\n\t\tsample_map.add(s);\n\t\t\n\t\tif(sample_map.size() >= max_num) {\n\t\t\t// no room left - remove the lowest\n\t\t\tsample_map.remove(k_closest.s);\n\t\t\tk_closest = k_closest.next_ptr;\n\t\t}\n\t}", "public void addValue(List<Integer> list, int number) {\n list.add(number);\n System.out.println(list);\n }", "public synchronized void addData(Object[] data) throws IOException {\n\t\tif (! stopped){\n\t\t\tsampleCount.add(incr);\n\t\t\tString sampleCountString = sampleCount.toString();\n\t\t\trealWriter.write(sampleCountString + \";\" + ((Integer)data[0]).toString() + \"\\n\");\n\n//\t\t\tdos.writeChars(sampleCountString);\n//\t\t\tdos.writeChar(';' );\n//\t\t\tdos.writeChars((((Integer)data[0]).toString()));\n//\t\t\tdos.writeChar('\\n' );\n\t\t}\n\t}", "public void add(int number) {\n for(int num : list) set.add(num + number);\n list.add(number);\n }", "public <T> void createArray(T sample){\n ArrayList<T> list = new ArrayList<T>();\n list.add(sample);\n }", "private static void sample2(ScoredDocIDs collection, int collectionSize, int[] sample, long[] times) \n throws IOException {\n if (returnTimings) {\n times[0] = System.currentTimeMillis();\n }\n int sampleSize = sample.length;\n IntPriorityQueue pq = new IntPriorityQueue(sampleSize);\n /*\n * Convert every value in the collection to a hashed \"weight\" value, and insert\n * into a bounded PQ (retains only sampleSize highest weights).\n */\n ScoredDocIDsIterator it = collection.iterator();\n while (it.next()) {\n pq.insertWithReuse((int)(it.getDocID() * PHI_32) & 0x7FFFFFFF);\n }\n if (returnTimings) {\n times[1] = System.currentTimeMillis();\n }\n /*\n * Extract heap, convert weights back to original values, and return as integers.\n */\n Object[] heap = pq.getHeap();\n for (int si = 0; si < sampleSize; si++) {\n sample[si] = (int)(((IntPriorityQueue.MI)(heap[si+1])).value * PHI_32I) & 0x7FFFFFFF;\n }\n if (returnTimings) {\n times[2] = System.currentTimeMillis();\n }\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 add(int number) {\n arrayList.add(number);\n isSorted = false;\n }", "public void placeRandomNumbers() {\n\t\t\n\t\tArrayList<HexLocation> locations = getShuffledLocations();\n\t\tint[] possibleNumbers = new int[] {2, 3, 3, 4, 4, 5, 5, 6, 6, 8, 8, 9, 9, 10, 10, 11, 11, 12};\n\t\t\n\t\tfor (int i = 0; i < possibleNumbers.length; i++)\n\t\t\tnumbers.get(possibleNumbers[i]).add(locations.get(i));\n\t}", "protected void setSampleCountImpl(int newSampleCount) {\n\t\tif (sampleCount != newSampleCount) {\n\t\t\tsampleCount = newSampleCount;\n\t\t}\n\t}", "@Override\n\tpublic void addToSamples(short[] data) throws SoundOverflowException {\n\t\tfor (int i = 0; i < data.length; ++i) {\n\t\t\tdouble scale = 1.0;\n\t\t\tif (i < RAMPUP_SAMPLES) {\n\t\t\t\tscale = (double) i / (double) RAMPUP_SAMPLES;\n\t\t\t}\n\t\t\telse if (i > data.length - RAMPUP_SAMPLES) {\n\t\t\t\tscale = (double) (data.length - i) / (double) RAMPUP_SAMPLES;\n\t\t\t}\n\n\t\t\tdouble v = compute(i) * scale * amplitude;\n\t\t\t\n\t\t\tif (Short.MAX_VALUE - v < data[i]) { \n\t\t\t\tthrow new SoundOverflowException();\n\t\t\t}\n\t\t\t\n\t\t\tif (Short.MIN_VALUE + v > data[i]) {\n\t\t\t\tthrow new SoundOverflowException();\n\t\t\t}\n\t\t\tdata[i] += Math.round(v);\n\t\t}\n\t}", "protected void SampleMusWrapper(int sample_num, int t) {\n\t\tbartMachineTreeNode previous_tree = gibbs_samples_of_bart_trees[sample_num - 1][t];\n\t\t//subtract out previous tree's yhats\n\t\tsum_resids_vec = Tools.subtract_arrays(sum_resids_vec, previous_tree.yhats);\n\t\tbartMachineTreeNode tree = gibbs_samples_of_bart_trees[sample_num][t];\n\n\t\tdouble current_sigsq = gibbs_samples_of_sigsq[sample_num - 1];\n\t\tassignLeafValsBySamplingFromPosteriorMeanAndSigsqAndUpdateYhats(tree, current_sigsq);\n\t\t\n\t\t//after mus are sampled, we need to update the sum_resids_vec\n\t\t//add in current tree's yhats\t\t\n\t\tsum_resids_vec = Tools.add_arrays(sum_resids_vec, tree.yhats);\n\t}", "private List<Tuple2<Integer, Integer>> initSampleDataset() {\n List<Tuple2<Integer, Integer>> rawChapterData = new ArrayList<>();\n rawChapterData.add(new Tuple2<>(96, 1));\n rawChapterData.add(new Tuple2<>(97, 1));\n rawChapterData.add(new Tuple2<>(98, 1));\n rawChapterData.add(new Tuple2<>(99, 2));\n rawChapterData.add(new Tuple2<>(100, 3));\n rawChapterData.add(new Tuple2<>(101, 3));\n rawChapterData.add(new Tuple2<>(102, 3));\n rawChapterData.add(new Tuple2<>(103, 3));\n rawChapterData.add(new Tuple2<>(104, 3));\n rawChapterData.add(new Tuple2<>(105, 3));\n rawChapterData.add(new Tuple2<>(106, 3));\n rawChapterData.add(new Tuple2<>(107, 3));\n rawChapterData.add(new Tuple2<>(108, 3));\n rawChapterData.add(new Tuple2<>(109, 3));\n\n return rawChapterData;\n }", "public void add(DataSample ds) {\n \tfloat dsAverage = 1.0f;\n \tDataSample s;\n \tfor (int i = 0; i < samples.size(); ++i) {\n \t\ts = samples.get(i);\n \t\tfloat v = averages.get(i);\n \t\tfloat t = compare(s, ds);\n \t\t\n \t\tv += t;\n \t\tdsAverage += t;\n \t\t\n \t\taverages.set(i, v);\n \t}\n \t\n \taverages.add(dsAverage);\n \tsamples.add(ds);\n }", "public void addSample(RankingSubject subject, RankingObject a, RankingObject b) {\n\t\tRealVector merged = subject.getFeatures().append(a.getFeatures()).append(b.getFeatures());\n\t\tthis.set.add(merged, +1.0);\n\t\tmerged = subject.getFeatures().append(b.getFeatures()).append(a.getFeatures());\n\t\tthis.set.add(merged, -1.0);\n\t}", "public void accumulate(IntValuePixel p) {\r\n\t\tsize++;\r\n\r\n\t\tfor (final ComponentFeature f : features) {\r\n\t\t\tf.addSample(p);\r\n\t\t}\r\n\t}", "public DataResourceBuilder _sample_(Resource _sample_) {\n this.dataResourceImpl.getSample().add(_sample_);\n return this;\n }", "private static void add(List<Point> points, int param, double value, boolean measured) {\r\n points.add(new Point(param, value, measured));\r\n }", "public void addNumber(int number) {\n totalNumber += number;\n availableNumber += number;\n }", "public void add(int number) {\n if (mapping.containsKey(number)) {\r\n mapping.put(number, 2);\r\n } else {\r\n mapping.put(number, 1);\r\n }\r\n insert(elements, number);\r\n return;\r\n }", "private List<Tuple> randomSampleFromList(List<Tuple> list, int sampleSize, boolean withReplacement,\n\t\t\tRandom randomGenerator) {\n\t\tList<Tuple> sample = new LinkedList<Tuple>();\n\n\t\tif (list.size() <= sampleSize) {\n\t\t\tsample.addAll(list);\n\t\t} else {\n\t\t\tSet<Integer> usedIndexes = new HashSet<Integer>();\n\t\t\tint resultsCounter = 0;\n\t\t\twhile (resultsCounter < sampleSize && usedIndexes.size() < list.size()) {\n\t\t\t\tint randomIndex = randomGenerator.nextInt(list.size());\n\t\t\t\tif (withReplacement || !usedIndexes.contains(randomIndex)) {\n\t\t\t\t\tsample.add(list.get(randomIndex));\n\t\t\t\t\tresultsCounter++;\n\t\t\t\t\tusedIndexes.add(randomIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn sample;\n\t}", "private List<Pair<Tuple, String>> randomSampleFromList(List<Pair<Tuple, String>> list, int sampleSize, boolean withReplacement,\n\t\t\tRandom randomGenerator) {\n\t\tList<Pair<Tuple, String>> sample = new ArrayList<Pair<Tuple, String>>();\n\n\t\tif (list.size() <= sampleSize) {\n\t\t\tsample.addAll(list);\n\t\t} else {\n\t\t\tSet<Integer> usedIndexes = new HashSet<Integer>();\n\t\t\tint resultsCounter = 0;\n\t\t\twhile (resultsCounter < sampleSize) {\n\t\t\t\tint randomIndex = randomGenerator.nextInt(list.size());\n\t\t\t\tif (withReplacement || !usedIndexes.contains(randomIndex)) {\n\t\t\t\t\tsample.add(list.get(randomIndex));\n\t\t\t\t\tresultsCounter++;\n\t\t\t\t\tusedIndexes.add(randomIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn sample;\n\t}", "public DataResourceBuilder _sample_(List<Resource> _sample_) {\n this.dataResourceImpl.setSample(_sample_);\n return this;\n }", "public void addSongInThePlayList(int index1, int index2){\n index1 = index1-1;\n index2 = index2-1;\n thePlayLists[index1].addSongatOne(poolSong[index2]);\n }", "public int SampleNum() {\n\t\treturn sample_map.size();\n\t}", "public List<Vec> sample(int count, Random rand);", "@Override\n public void onAudioSamples(IAudioSamplesEvent event) {\n\n /*\n * -----------------------------------------------------------------------------------\n * !!! LAB EXERCISE !!!\n * -----------------------------------------------------------------------------------\n * 1. Create a 'ShortBuffer' and point it to the incoming audio samples.\n * Hint: Use 'event.getAudioSamples().getByteBuffer().asShortBuffer()'\n *\n * 2. Loop over the buffer values from 0 to 'buffer.limit()' and access each buffer\n * value using 'buffer.get'\n * Hint: 'buffer.get' gets the sample values as a 'short'\n *\n * 3. Multiply each buffer value by the 'multiplier' (which is a double) then place the\n * resultant value back into the buffer using 'buffer.put'\n * Hint: You may need to cast the data to a 'short' value\n */\n\n // ===================================================================================\n // *** YOUR CODE HERE ***\n ShortBuffer buffer = event.getAudioSamples().getByteBuffer().asShortBuffer();\n\n for (int i = 0; i < buffer.limit(); ++i)\n {\n buffer.put((short)(buffer.get(i) * this.multiplier));\n }\n // ===================================================================================\n\n // Finally, pass the adjusted event to the next tool\n super.onAudioSamples(event);\n }", "private void btn1Event(){\n int cnt = Integer.parseInt(tfNum1.getText());\n int i = 0;\n for (i=0; i<cnt; i++){\n list.add(new NumGenA());\n taResults.appendText(String.valueOf(i) + \n \" = \" + String.valueOf(list.get(i).getValue() + \"\\n\"));\n \n lab2.setText(String.valueOf(NumGenA.getCount()));\n }\n }", "private static ArrayList<double[]> createSamples(double p, int n) {\n\t\tArrayList<double[]> result = new ArrayList<double[]>();\n\t\tint cutoff = (int) Math.round(n * p);\n\t\tfor (int i = 0; i < cutoff; i++) result.add(new double[] {1});\n\t\tfor (int i = cutoff; i < n; i++) result.add(new double[] {0});\n\t\treturn result;\n\t}", "public void add(double n){\n list [index] = n;\n index ++;\n if (index==length){\n if(!hasFilled){\n hasFilled = true;\n }\n index=0;\n }\n }", "public void addPartNumber(String partNumber){partNumbers.add(partNumber);}", "public void addNumSort(int num) {\n\t\tlist.add((double)num);\n\t}", "public void add(int index, double value) {\n\t\t\n\t}", "private static void add(List<Point> points, int param, double value) {\r\n add(points, param, value, false);\r\n }", "@Test\n public void testAdd() {\n list1.add(0, 11.25);\n list1.add(1, 12.25);\n list1.add(2, 13.25);\n list1.add(3, 14.25);\n list1.add(4, 15.25);\n list1.add(5, 17.25);\n list1.add(6, 18.25);\n list1.add(7, 19.25);\n list1.add(3, 16.25);\n assertEquals(16.25 , list1.get(3), 0);\n assertEquals(14.25 , list1.get(4), 0);\n assertEquals(15.25, list1.get(5), 0);\n assertEquals(9, list1.size());\n }", "public void add(int number) {\n if(map.containsKey(number)) map.put(number, map.get(number) + 1);\n else {\n map.put(number, 1);\n list.add(number);\n }\n }", "public void addRandomItem(RandomItem item);", "public void addElement(Integer e){\n list.add(e);\n }", "@Override\r\n\tpublic void AddItem(int n) {\n\t\tSystem.out.println(\"ADDED:\" + n);\r\n\r\n\t}", "public void addVertices(int num){ \n this.nrVertices += num;\n }", "@Test\r\n\tpublic void testAddAll() {\r\n\t\tDoubleList sample = new DoubleList(new Munitions(2, 4, \"ferrum\"));\r\n\t\tsample.addAll(list);\r\n\t\tAssert.assertEquals(16, sample.size());\r\n\t\tAssert.assertTrue(sample.get(0).equals(new Munitions(2, 4, \"ferrum\")));\r\n\t\tAssert.assertTrue(sample.get(1).equals(list.get(0)));\r\n\t\tAssert.assertTrue(sample.get(15).equals(list.get(14)));\r\n\t}", "private void addStudy(Study study) {\n\t\t\r\n\t}", "public void addSpec(int s) {\n totalSpec += s;\n }", "public void add(int number) {\n // Write your code here\n if(map.containsKey(number)){\n map.put(number, map.get(number) + 1);\n }else{\n list.add(number);\n map.put(number, 1);\n }\n }", "public int getSamples(){ \n return this.samples; \n }", "public void writeSamples( float[] samples, int offset, int numSamples );", "public void add(int element);", "public void setSampleId(java.lang.String value) {\n this.sampleId = value;\n }", "protected static ArrayList<String> GenNumber() {\n\n ArrayList<String> initialList = new ArrayList<>();\n\n initialList.add(\"1\"); //Add element\n initialList.add(\"2\");\n initialList.add(\"3\");\n initialList.add(\"4\");\n initialList.add(\"5\");\n initialList.add(\"6\");\n initialList.add(\"7\");\n initialList.add(\"8\");\n initialList.add(\"9\");\n\n Collections.shuffle(initialList); //Random the position\n\n return initialList;\n }", "int nextSample(final double mean);", "public void add(int kn) {\n\t\tif(this.size > this.N-1) {\n\t\t\tsetNDouble(N);\n\t\t}\n//\t\tSystem.out.println(this.n + \" \" + this.size);\n\t\tarray[this.size] = kn;\n\t\tthis.size++;\n\t}", "void add(int index, int value) {\n int[] newItems = new int[size++];\n\n System.arraycopy(items, 0, newItems, 0, index);\n\n newItems[index] = value;\n\n System.arraycopy(items, index, newItems, index + 1, items.length - index);\n\n items = newItems;\n }", "private static void addItem( String name, Integer number ) {\n\t\tItem item = container.addItem( itemId );\n\t\tsetValues( name, number, item );\n\t}", "@Override\n public void add(Note note) {\n if (this.music.containsKey(note.getStartBeat())) {\n // if the given note already has the same note in the music, replace it\n if (this.music.get(note.getStartBeat()).contains(note)) {\n int indexOfNote = this.music.get(note.getStartBeat()).indexOf(note);\n this.music.get(note.getStartBeat()).set(indexOfNote, note);\n } else {\n // add the note to the arrayList\n this.music.get(note.getStartBeat()).add(note);\n }\n\n // update the pitch value for the music\n if (note.getPitchValue() > this.getHighestPitchValue()) {\n this.highestPitchValue = note.getPitchValue();\n }\n // this.updatePitchValues();\n\n if (note.getPitchValue() < this.getLowestPitchValue()) {\n this.lowestPitchValue = note.getPitchValue();\n }\n }\n // if the arrayList does not exist in map, construct one and put it in the map\n else {\n ArrayList<Note> listOfNote = new ArrayList<>();\n listOfNote.add(note);\n this.music.put(note.getStartBeat(), listOfNote);\n\n // update the pitch value for the music\n if (note.getPitchValue() > this.getHighestPitchValue()) {\n this.highestPitchValue = note.getPitchValue();\n }\n if (note.getPitchValue() < this.getLowestPitchValue()) {\n this.lowestPitchValue = note.getPitchValue();\n }\n }\n\n\n }", "protected void addNumberOfSamplesPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Cell_numberOfSamples_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Cell_numberOfSamples_feature\", \"_UI_Cell_type\"),\n\t\t\t\t LDEExperimentsPackage.Literals.CELL__NUMBER_OF_SAMPLES,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}", "private static void sample1(ScoredDocIDs collection, int collectionSize, int[] sample, long[] times) \n throws IOException {\n ScoredDocIDsIterator it = collection.iterator();\n if (returnTimings) {\n times[0] = System.currentTimeMillis();\n }\n int sampleSize = sample.length;\n int prime = findGoodStepSize(collectionSize, sampleSize);\n int mod = prime % collectionSize;\n if (returnTimings) {\n times[1] = System.currentTimeMillis();\n }\n int sampleCount = 0;\n int index = 0;\n for (; sampleCount < sampleSize;) {\n if (index + mod < collectionSize) {\n for (int i = 0; i < mod; i++, index++) {\n it.next();\n }\n } else {\n index = index + mod - collectionSize;\n it = collection.iterator();\n for (int i = 0; i < index; i++) {\n it.next();\n }\n }\n sample[sampleCount++] = it.getDocID();\n }\n if (returnTimings) {\n times[2] = System.currentTimeMillis();\n }\n }", "void addRepeat(int beatNum, RepeatType repeatType);", "public void writeSamples( short[] samples, int offset, int numSamples );", "public void addElts(Meters meter){\r\n MetersList.add(meter);\r\n }", "public static void drawSample(ArrayList<DataItem> claimsData, ArrayList<DataItem> sampleClaims, ArrayList<Stratum> majorStrata, \r\n\t\t\tint nZeroDollarSamples, int nTopNSamples, int nMajorSamples, int nTotalSamples, int nMajorStrata) {\r\n\t\twhile (sampleClaims.size()>0) {\r\n\t\t\tsampleClaims.remove(1);\r\n\t\t}\r\n\t\t\r\n\t\t/* Draw the stratum samples */\r\n\t\tfor (int i=0; i<=nMajorStrata; i++) { //for each stratum (except the TopN)...\r\n\t\t\tint nToDraw = majorStrata.get(i).getStratumSampleSize();\r\n\t\t\tint nStratumClaims = majorStrata.get(i).getStratumNumClaims();\r\n\t\t\t\r\n\t\t\t/* Create and load stratumClaims arraylist */\r\n\t\t\tint curClaimsDataPos = majorStrata.get(i).getFirstClaimPos();\r\n\t\t\tArrayList<Integer> stratumClaims = new ArrayList<>(); //holds the claimsData array position numbers for the claims in this stratum\r\n\t\t\tfor (int j = 0; j<nStratumClaims; j++) {\r\n\t\t\t\tstratumClaims.add(curClaimsDataPos);\r\n\t\t\t\tcurClaimsDataPos++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Draw the stratum sample */\r\n\t\t\twhile (nToDraw > 0) {\r\n\t\t\t\tint samplePos = (int) (Math.random()*nStratumClaims); //random select the claim in the stratum\r\n\t\t\t\tDataItem newSampleClaim = new DataItem(claimsData.get(stratumClaims.get(samplePos))); //clone the sample DataItem\r\n\t\t\t\tsampleClaims.add(newSampleClaim); //add it to the sample ArrayList\r\n\t\t\t\tstratumClaims.remove(samplePos); //remove it from the sample pool\r\n\t\t\t\tnStratumClaims--;\r\n\t\t\t\tnToDraw--;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* Add the TopN stratum */\r\n\t\tint curClaimsPos = claimsData.size() - nTopNSamples;\r\n\t\twhile (curClaimsPos < claimsData.size()) {\r\n\t\t\tDataItem newSampleClaim = new DataItem(claimsData.get(curClaimsPos)); //clone the sample DataItem\r\n\t\t\tsampleClaims.add(newSampleClaim); //add it to the sample ArrayList\r\n\t\t\tcurClaimsPos++;\r\n\t\t}\r\n\t\t\r\n\t\t/* ADD PRINT SAMPLE CODE HERE */\r\n\t\tSystem.out.println(\"\\n\\nHere is the claims sample, broken up by major strata:\");\r\n\t\tint curSamplePos = 0;\r\n\t\tint sampleCount = 0;\r\n\t\tdouble totalAmount = 0.0;\r\n\t\tfor (int i=0; i<nMajorStrata+2; i++) {\r\n\t\t\tSystem.out.printf(\"Strata Number:%4d, Lower: %,10.2f, Upper: %,10.2f, Size:%,6d, Amount:%,12.2f, Sample Size:%4d, First Claim Pos:%,8d, Last Claim Pos:%,8d%n\", \r\n\t\t\t\t\t+ i, majorStrata.get(i).getLowerBound(), majorStrata.get(i).getUpperBound(), majorStrata.get(i).getStratumNumClaims(), \r\n\t\t\t\t\t+ majorStrata.get(i).getStratumTotalAmount(), majorStrata.get(i).getStratumSampleSize(), majorStrata.get(i).getFirstClaimPos(), \r\n\t\t\t\t\t+ majorStrata.get(i).getLastClaimPos());\r\n//\t\t\tSystem.out.println(\"Strata Number: \"+i+\" Lower: \"+Math.round(majorStrata.get(i).getLowerBound()*1000)/1000.0+\" Upper: \"\r\n//\t\t\t\t\t\t+Math.round(majorStrata.get(i).getUpperBound()*1000)/1000.0+\" Size: \"+Math.round(majorStrata.get(i).getStratumNumClaims()*1000)/1000.0\r\n//\t\t\t\t\t\t+\" Amount: \"+Math.round(majorStrata.get(i).getStratumTotalAmount()*1000)/1000.0+\" Sample Size: \"\r\n//\t\t\t\t\t\t+ majorStrata.get(i).getStratumSampleSize()+\" First Claim Pos: \"+majorStrata.get(i).getFirstClaimPos()\r\n//\t\t\t\t\t\t+ \" Last Claim Pos: \" + majorStrata.get(i).getLastClaimPos());\r\n\t\t\twhile ((curSamplePos < sampleClaims.size()) && (sampleClaims.get(curSamplePos).getStratumNum() == i)) {\r\n\t\t\t\ttotalAmount += sampleClaims.get(curSamplePos).getAmount();\r\n\t\t\t\tsampleCount++;\r\n//\t\t\t\tSystem.out.printf(\"Stratum: %4d, ObsNum: %6d, Amount: %,8.2f%n\",sampleClaims.get(curSamplePos).getStratumNum(),\r\n//\t\t\t\t\t\tsampleClaims.get(curSamplePos).getObsNum(),sampleClaims.get(curSamplePos).getAmount());\r\n\t\t\t\tcurSamplePos++;\r\n\t\t\t}\r\n\t\t}\t\r\n\t\tSystem.out.format(\"Total audit sample paid claims amount = %,12.2f, Total number of samples: %d\",totalAmount, sampleCount);\r\n\t\tSystem.out.println(\"\");\r\n\t\tdouble tmptotal = 0.0;\r\n\t\tfor (int i=0; i<majorStrata.size(); i++) {\r\n\t\t\ttmptotal = tmptotal + majorStrata.get(i).getStratumSampleSize();\r\n\t\t}\r\n\t\tSystem.out.println(\"Sum of all the strata sample sizes = \"+tmptotal);\t\t\r\n\t}", "public void addStock(Product p, int n) {\nif (p.id < 0) return;\nif (n < 1) return;\n\nfor (int i = 0; i < productCatalog.size(); i++) {\nProductStockPair pair = productCatalog.get(i);\nif (pair.product.id == p.id) {\nproductCatalog.set(i, new ProductStockPair(p, pair.stock + n));\nreturn;\n}\n}\nproductCatalog.add(new ProductStockPair(p, n));\n}", "com.bagnet.nettracer.ws.core.pojo.xsd.WSScanPoints insertNewScans(int i);", "public void set_sampleCnt(long value) {\n setUIntBEElement(offsetBits_sampleCnt(), 32, value);\n }", "public void UpdateSampleWeights(ArrayList<double []> train_buff,\n\t\t\tArrayList<Integer> output_buff) {\n\t\t\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tfor(int i=Math.max(train_buff.size()-3, 0); i<train_buff.size(); i++) {\n\t\t\t\tptr.s.UpdateSampleWeight(train_buff.get(i), output_buff.get(i));\n\t\t\t}\n\t\t\t\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t}", "public void setSampleSize(int value) {\n this.sampleSize = value;\n }", "public void add(int x)\n {\n int arrayLength = list.length; // get size of array\n if (length == arrayLength)\n {\n list = Arrays.copyOf(list, 100 + list.length);\n list[length] = x;\n length++;\n\n } else\n {\n list[length] = x;\n length++;\n }\n }", "public void add(Object x, int index) {\n\tint counter = 0;\n\twhile (counter < _size) {\n\t if (get(counter) == x) {\n\t\thelpAdd( x, index);\n\t }\n\t counter +=1;\n\t}\n\tadd(x);\n\t\n }", "void addSampledControls() { \r\n try { \r\n FloatControl gainControl = (FloatControl) clip \r\n .getControl(FloatControl.Type.MASTER_GAIN); \r\n if (gainControl != null) \r\n this.add(createSlider(gainControl)); \r\n } catch (IllegalArgumentException e) { \r\n // If MASTER_GAIN volume control is unsupported, just skip it \r\n } \r\n \r\n try { \r\n // FloatControl.Type.BALANCE is probably the correct control to \r\n // use here, but it doesn't work for me, so I use PAN instead. \r\n FloatControl panControl = (FloatControl) clip \r\n .getControl(FloatControl.Type.PAN); \r\n if (panControl != null) \r\n this.add(createSlider(panControl)); \r\n } catch (IllegalArgumentException e) { \r\n } \r\n }", "public void addBlockList(int n) {\n BlockList.add(n);\r\n }", "public void add(int number) {\n\t if (hash.containsKey(number)) hash.put(number, 2); // two is enough\n\t else {\n\t \thash.put(number, 1);\n\t \tlist.add(number);\n\t }\n\t}", "void addMeasure(double currentMeasure) {\n\t\t// If there is no more failed allowed, do nothing\n\t\tif(isTraining()) {\n\t\t\t/* Repeat 4x times from the second time\n\t\t\t * What we do is add:\n\t\t\t * (measure 3 - measure 2) + (measure 4 - measure 3) + ... */\n\t\t\tif(1 <= remainingLearnExample && remainingLearnExample <= 4)\n\t\t\t\tappendMeasureToSlope(currentMeasure);\n\t\t\t/* We need to keep the current measure for the next time\n\t\t\t * the method is called */\n\t\t\tlastMeasure = currentMeasure;\n\n\t\t\tremainingLearnExample--;\n\t\t\tif(remainingLearnExample == 0) {\n\t\t\t\t// If the random freq gave better results, keep it\n\t\t\t\tupdateBestFrequency();\n\t\t\t\trandomExploFreq = random.nextDouble(0.01, 1);\n\t\t\t\treset();\n\t\t\t}\n\t\t}\n\t}", "void add(String name, int value);", "com.bagnet.nettracer.ws.core.pojo.xsd.WSScanPoints addNewScans();", "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 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 }", "public void addElement(Integer elem){\n\t\tlist.add(elem);\n\t}", "private void saveSamples(boolean charging, long diffTime) {\n int sampleIndex = store.getInt(charging ? chargingSampleId : disChargingSampleId, -1);\n\n //starts with id 1 in database\n if (sampleIndex == -1)\n sampleIndex = 1;\n //only maximum of 10 samples required.\n if (sampleIndex > 10)\n sampleIndex = 1;\n\n if (!charging) {\n dischargingSampleViewModel.insert(new DischargingSampleModel(sampleIndex, diffTime));\n } else {\n chargingSampleViewModel.insert(new ChargingSampleModel(sampleIndex, diffTime));\n }\n logStatic(\"New sample found for \" +\n (charging ? \"charging\" : \"discharging\") + \" at level \" +\n store.getInt(bat_level) + \" id \" + sampleIndex);\n\n //increment the sample id\n store.setInt(charging ? chargingSampleId : disChargingSampleId, 1 + 1);\n }" ]
[ "0.66681296", "0.6362106", "0.6252824", "0.6028874", "0.6014661", "0.5946595", "0.5931122", "0.5890988", "0.5883358", "0.58740014", "0.5871549", "0.58522344", "0.5849391", "0.57452536", "0.57292235", "0.5724987", "0.5690117", "0.5675448", "0.565572", "0.5599125", "0.55905735", "0.5560889", "0.55578494", "0.548725", "0.5479252", "0.54623544", "0.54557455", "0.5425899", "0.5420882", "0.53950405", "0.53675795", "0.5351034", "0.53016454", "0.5300651", "0.5281378", "0.52751666", "0.5204434", "0.5199435", "0.51949656", "0.51935995", "0.51912355", "0.51813346", "0.5170934", "0.5170441", "0.5164175", "0.5157298", "0.51562274", "0.51501", "0.51484114", "0.51466465", "0.51369226", "0.5126794", "0.5124277", "0.5119695", "0.5110291", "0.51075554", "0.5104534", "0.5101575", "0.50912535", "0.5083046", "0.50824374", "0.5068188", "0.5061234", "0.50404406", "0.5039533", "0.5038356", "0.50370795", "0.50348455", "0.50248736", "0.5024101", "0.502172", "0.5020964", "0.5020088", "0.5016888", "0.50130695", "0.5009923", "0.5001567", "0.49894798", "0.49878603", "0.4982849", "0.49812", "0.4976729", "0.49757552", "0.4962518", "0.49555928", "0.49510324", "0.4949692", "0.4948175", "0.49367616", "0.49345198", "0.4929093", "0.49235252", "0.49209478", "0.49184385", "0.49078393", "0.4907526", "0.49033976", "0.4902653", "0.4902523", "0.4901543" ]
0.58282113
13
String path = "C:\\Users\\Administrator\\Desktop\\img";
@RequestMapping("/add") @ResponseBody public String handleFileUpload(@RequestParam("file") MultipartFile file) { String path = "C:\\Users\\Administrator\\Desktop\\lostfound\\static\\img"; String fileName = file.getOriginalFilename(); Calendar currTime = Calendar.getInstance(); String time = String.valueOf(currTime.get(Calendar.YEAR))+String.valueOf((currTime.get(Calendar.MONTH)+1)); String suffix = fileName.substring(file.getOriginalFilename().lastIndexOf(".")); suffix = suffix.toLowerCase(); if(suffix.equals(".jpg") || suffix.equals(".jpeg") || suffix.equals(".png")){ fileName = UUID.randomUUID().toString()+suffix; File targetFile = new File(path, fileName); if(!targetFile.getParentFile().exists()){ targetFile.getParentFile().mkdirs(); } long size = 0; try { file.transferTo(targetFile); size = file.getSize(); } catch (Exception e) { e.printStackTrace(); return"上传失败"; } String fileUrl="/static"; fileUrl = fileUrl + "/img/" + fileName; return fileUrl; }else{ return "上传失败"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getImageResoucesPath() {\n\t\t//return \"d:\\\\PBC\\\\GitHub\\\\Theia\\\\portal\\\\WebContent\\\\images\";\n\t\treturn \"/Users/anaswhb/Documents/Eclipse/Workspace/portal/WebContent/images\";\n\t\t\n\t}", "public void getImagePath(String imagePath);", "String getFilepath();", "public static String getPath() {\n\t\t// Lấy đường dẫn link\n\t\tAuthentication auth1 = SecurityContextHolder.getContext().getAuthentication();\n\t\tAgentconnection cus = (Agentconnection) auth1.getPrincipal();\n\t\t \n\t\t//String PATH_STRING_REAL = fileStorageProperties.getUploadDir()+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t String PATH_STRING_REAL = \"E:/ezcloud/upload/\"+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t return PATH_STRING_REAL;\n\t}", "String getImagePath();", "String getImagePath();", "private String image_path(String path, String name, String ext) {\n return path + \"/\" + name + \".\" + ext;\n }", "void path(String path);", "void path(String path);", "java.lang.String getImagePath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "public static Image loadImage(String path) {\n File file = new File(path);\n String imagePath = file.getAbsolutePath();\n //Modify based on OS\n if (File.separatorChar == '\\\\') {\n // From Windows to Linux/Mac\n imagePath=imagePath.replace('/', File.separatorChar);\n imagePath = imagePath.replace(\"\\\\\", \"\\\\\\\\\");\n } else {\n // From Linux/Mac to Windows\n imagePath=imagePath.replace('\\\\', File.separatorChar);\n\n }\n \n //Add file: to work with JavaFX\n imagePath=\"file:\"+imagePath;\n\n return new Image(imagePath);\n }", "public String getImgpath() {\r\n return imgpath;\r\n }", "void selectImage(String path);", "public String getPath()\n\t{\n\t\treturn letter + \":/\";\n\t}", "static String localPath(String name) {\n\t\tchar c = File.separatorChar;\n\t\treturn name.replace((char) (c ^ '/' ^ '\\\\'), c);\n\t}", "String displayableFileName(String path) {\n String result = \"\";\n StringTokenizer tok = new StringTokenizer(path, \"\\\\/\");\n while (tok.hasMoreTokens()) {\n result = tok.nextToken();\n }\n return result;\n }", "private String getEclipsePathFromWindowsPath(String path) {\n StringBuilder sbPath = new StringBuilder();\n char [] chars = path.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n char c = chars[i];\n if (c == '\\\\') {\n sbPath.append('/');\n } else {\n sbPath.append(c);\n }\n }\n path = sbPath.toString();\n return path;\n }", "String getRealPath(String path);", "private static void findPath()\r\n {\r\n String temp_path = System.getProperty(\"user.dir\");\r\n char last = temp_path.charAt(temp_path.length() - 1);\r\n if(last == 'g')\r\n {\r\n path = \".\";\r\n }\r\n else\r\n {\r\n path = \"./bag\";\r\n }\r\n \r\n }", "public String getImgPath() {\n\t\treturn this.imgPath;\n\t}", "void setImagePath(String path);", "Path getPath();", "public String getPath () throws java.io.IOException, com.linar.jintegra.AutomationException;", "String getExternalPath(String path);", "public static String convertToWindowsPath(String path) {\n\t\treturn \"E:\" + path;\n\t}", "public String getImgPath() {\n return imgPath;\n }", "public String getImage() {\n\t\tString ans=\"Data/NF.png\";\n\t\tif(image!=null)\n\t\t\tans=\"Data/Users/Pics/\"+image;\n\t\treturn ans;\n\t}", "String getImage();", "public static String getPath() {\n\t\t\n\t\tJFileChooser chooser = new JFileChooser();\n\t \tFileNameExtensionFilter filtroImagen =new FileNameExtensionFilter(\"*.TXT\", \"txt\");\n\t \tchooser.setFileFilter(filtroImagen);\n\t \tFile f = null;\n\t \t\n\t\ttry {\n\t\t\tf = new File(new File(\".\").getCanonicalPath());\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tString path = \"\";\n\t\t\n\t\ttry {\n\t\t\tchooser.setCurrentDirectory(f);\n\t\t\tchooser.setCurrentDirectory(null);\n\t\t\tchooser.showOpenDialog(null);\n\t \n\t\t\tpath = chooser.getSelectedFile().toString();\n\t\t}catch(Exception e) {\n\t\t\t\n\t\t}\n\t return path;\n\t}", "Path createPath();", "public String getPath();", "public String getPath();", "public String getPath();", "private String createScreenshotFilePath() {\n String fileName = new SimpleDateFormat(FILE_NAME_FORMAT).format(new Date());\n String filePath = MainMenu.PUBLIC_EXTERNAL_PICTURES_ORION_PATH + fileName;\n return filePath;\n }", "public static String path(final String fileName) {\n final int sep = fileName.lastIndexOf(File.separatorChar);\n return fileName.substring(0, sep);\n }", "void savePicturePath(String userName, String picturePath) throws DatabaseException;", "private String getNameImage(String imagePath) {\n\t\treturn imagePath != null ? imagePath.replace(pathFileBase, \"\") : \"\";\n\t}", "public String pathToSave() {\n String path;\n File folder;\n do {\n System.out.print(\"Introduce la ruta en la que quieres guardar el fichero(separando directorios por guiones: directorio1-directorio2-directorio3): \");\n path = Utils.getString();\n path = String.valueOf(System.getProperty(\"user.dir\")).substring(0, 2) + \"\\\\\" + path.replace('-', '\\\\');\n folder = new File(path);\n if (!folder.exists()) {\n System.out.println(\"El directorio introducido no existe intentalo de nuevo...\");\n } else {\n if (!folder.isDirectory()) {\n System.out.println(\"Eso no es un directorio intentalo de nuevo...\");\n }\n }\n } while (!folder.exists() && !folder.isDirectory());\n return path;\n }", "private File imageFile() throws IOException {\n File directory = Environment.getExternalStorageDirectory();\n\n // FileOperations.checkDirectory(directory, false);\n Photopath = directory.getAbsolutePath();\n return new File(directory,\"displaypic.jpg\");\n\n }", "public static String toImageString(String path) throws FileNotFoundException, IOException {\n \n String imageString = \"\";\n try {\n File f = new File(path);\n try (FileInputStream fis = new FileInputStream(f)) {\n byte byteArray[] = new byte[(int) f.length()];\n fis.read(byteArray);\n imageString = Base64.encodeBase64String(byteArray);\n fis.close();\n }\n } catch (IOException iOException) {\n \n return \"\";\n }\n \n \n return imageString;\n }", "public String getImageResource() {\n \t\t// if (isWindows)\n \t\t// return \"/\" + new File(imageResource).getPath();\n \t\t// else\n \t\treturn imageResource;\n \t}", "String getPathName();", "String getPathName();", "public static String getJPGfromAny(String path) {\r\n\r\n\t\tFile oldfile = new File(path);\r\n\t\tString filename = oldfile.getName();\r\n\t\tString newfile = \"\";\r\n\t\t\r\n\t\tfor (int i = 0; i < filename.length(); i++) {\r\n\t\t\tnewfile += filename.charAt(i);\r\n\t\t\tif (filename.charAt(i) == '.') {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tnewfile += \"JPG\";\r\n\t\tFile file2 = new File( \"./images/\"+ newfile);\r\n\t\tboolean success = oldfile.renameTo(file2);\r\n\t\tif (!success) {\r\n\t\t\tMessages.failedPhase1_3(oldfile);\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tMessages.succeedPhase1_3(oldfile, newfile);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn newfile;\r\n\r\n\t}", "public void setImgpath(String imgpath) {\r\n this.imgpath = imgpath == null ? null : imgpath.trim();\r\n }", "public static void main(String[] args) {\n\t\tString str = \"http://192.168.1.188/stw/images/20160814/33db29ec33d5.jpg\";\n\t\tSystem.out.println(str.substring(str.lastIndexOf(\"images\")+7,str.length()));\n\t\t\n\t}", "public static String getImagePropertiesFullPath(String imgPropertyPath) throws IOException {\n try {\n if (FlexibleLocation.isUrlLocation(imgPropertyPath)) {\n return FlexibleLocation.resolveFileUrlAsPath(imgPropertyPath);\n } else {\n return System.getProperty(\"ofbiz.home\") + imgPropertyPath;\n }\n } catch(IOException e) {\n throw e;\n } catch(Exception e) {\n throw new IOException(e);\n }\n }", "public void setImagePath(String n) {\n\t\tmPath = n;\n\t}", "public static void main(String[] args){\n\n String fileName = \"abc.jpeg\";\n String[] parts = fileName.split(\"\\\\.\");\n\n System.out.println(parts[1]);\n\n\n\n }", "protected String getFileNamePath()\n {\n String sep = System.getProperty(\"file.separator\", \"/\");\n// String path = System.getProperty(\"user.dir\", \".\");\n\n String filename = getPath() + sep + \"sec.dat\";\n\n return filename;\n }", "private String normalizePath(String path)\n {\n return path.replaceAll(\"\\\\\\\\{1,}\", \"/\");\n }", "public String getImagePath() {\n\t\treturn mPath;\n\t}", "String folderPath();", "public abstract String getPath();", "public abstract String getPath();", "public abstract String getFotoPath();", "public static String getPath(String file_path)\n {\n String file_separator = System.getProperty(\"file.separator\"); //Bug Id 81741\n if (file_path == null)\n return null;\n else if (file_path.substring(file_path.length() - 1).equals(file_separator))//Bug Id 81741, substitute file_separator to System.getProperty(\"file.separator\")\n return file_path;\n else\n {\n \t //Bug Id 81741, Start \n\t if (\"/\".equals(file_separator) && (file_path.indexOf(file_separator) == -1))\n\t {\n\t file_path = file_path.replaceAll(\"\\\\\\\\\", \"/\");\n\t return ((new File(file_path)).getParent()).replaceAll(\"/\",\"\\\\\\\\\");\n\t }\n\t //Bug Id 81741, End\n\t else\n return (new File(file_path)).getParent();\n }\n }", "public static Image getImage(String path) {\n\t\tString nomFichier = \"src/main/resources/images/\" + path;\n\t\tImage image = null;\n\t\ttry {\n\t\t\timage = new Image(new FileInputStream(nomFichier));\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn image;\n\t}", "int img(String path) {\n //TODO: is this correct?\n return this.renderEngine.b(path);\n }", "public static String getBMPfromAny(String path) {\r\n\r\n\t\tFile oldfile = new File(path);\r\n\t\tString filename = oldfile.getName();\r\n\t\tString newfile = \"\";\r\n\t\t\r\n\t\tfor (int i = 0; i < filename.length(); i++) {\r\n\t\t\tnewfile += filename.charAt(i);\r\n\t\t\tif (filename.charAt(i) == '.') {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tnewfile += \"bmp\";\r\n\t\tFile file2 = new File(\"./images/\"+ newfile);\r\n\t\tboolean success = oldfile.renameTo(file2);\r\n\t\tif (!success) {\r\n\t\t\tMessages.failedPhase1_3(oldfile);\r\n\t\t}else{\r\n\t\t\tMessages.succeedPhase1_3(oldfile, newfile);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn newfile;\r\n\r\n\t}", "java.lang.String getImage();", "private static void displayImagesDir(){\n System.out.println(IMAGES_DIR);\n }", "public String getPathName()\n {\n return getString(\"PathName\");\n }", "public String path(String path1, String path2);", "@Override\n\tpublic String getPath() {\n\t\treturn \"./gfx/weapon.png\";\n\t}", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nSystem.out.println(\"Enter the String:\");\r\nString str=sc.nextLine();\r\nString r=getImage(str);\r\n\r\n}", "String getFilePath();", "private Uri getImageUri(String path) {\n return Uri.fromFile(new File(path));\n }", "@Override\n public String getImagePath() {\n return IMAGE_PATH;\n }", "private String setFileDestinationPath(){\n String filePathEnvironment = Environment.getExternalStorageDirectory().getAbsolutePath();\n Log.d(TAG, \"Full path edited \" + filePathEnvironment + \"/earwormfix/\" + generatedFilename + EXTENSION_JPG);\n return filePathEnvironment+ \"/earwormfix/\" + generatedFilename + EXTENSION_JPG;\n }", "public static String getPath(String fn) {\n\t\tif (fn == null) {\n\t\t\treturn null;\n\t\t}\n\t\tint i = fn.lastIndexOf(File.separator);\n\t\treturn (i > -1) ? fn.substring(0, i) : fn;\n\t}", "private Image makeAnImage(String s) throws IOException {\n //String imageName = s.substring(s.indexOf(\"\\\\(\") + 1, s.indexOf(\"\\\\)\"));\n String[] parts = s.split(\"\\\\(\");\n String imageName = parts[1].substring(0, parts[1].length() - 1);\n // load the image data into an java.awt.Image object.\n Image img = null;\n InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream(imageName);\n try {\n img = ImageIO.read(is);\n } catch (IOException e) {\n System.out.println(\"Error: failed to load image\");\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (IOException e) {\n System.out.println(\"Failing closing the image\");\n }\n }\n }\n return img;\n }", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "private Image loadImage (String path) {\n\t\tImageIcon imageicon = new ImageIcon (path);\r\n\t\tImage newImage = imageicon.getImage();\r\n\t\treturn newImage;\r\n\t}", "public static BufferedImage iconMaker(String s){\n BufferedImage buttonIcon;\n try{\n buttonIcon = ImageIO.read(new File(FILE_PATH + s));\n }catch(IOException e){\n buttonIcon = null;\n System.out.println(\"BooHOO\");\n }\n return buttonIcon;\n }", "public static String chooseFileLocation(){\n String fileLoc = new String();\n\n JFileChooser fc = new JFileChooser(\".\");\n fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n fc.showOpenDialog(null);\n fileLoc = fc.getSelectedFile().getAbsolutePath() + \"\\\\\";\n\n return fileLoc;\n }", "Path getPath(String name) throws IOException;", "public void setImgPath(String imgPath) {\n this.imgPath = imgPath == null ? null : imgPath.trim();\n }", "public void creaRutaImgPerfil(){\n servletContext=(ServletContext) contexto.getExternalContext().getContext();\n String ruta=\"\";\n //Ruta real hasta la carpeta de uploads\n ruta=servletContext.getRealPath(\"/upload/\");\n \n //Concatenamiento de directorios internos\n ruta+=File.separatorChar+\"img\"+File.separatorChar+\"users\"+File.separatorChar;\n \n //Asignacion de la ruta creada\n this.rutaImgPerfil=ruta;\n }", "public java.lang.String getImagePath() {\n java.lang.Object ref = imagePath_;\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 imagePath_ = s;\n }\n return s;\n }\n }", "private String extractImageNameFromIdentifier(String image) {\n String[] tokens = image.split(\"/\");\n\n String imageName = tokens[tokens.length-1];\n if(imageName.contains(\":\")) {\n return imageName.split(\":\")[0];\n } else {\n return imageName;\n }\n }", "public static String getUserFromImage(String imagePath) {\n return ImageFactory.getUserFromImage(imagePath);\n }", "Path getFilePath();", "public static String convertPath(String path) {\n String clean = path.replaceAll(\"[^a-zA-Z0-9.-\\\\/]\", \"_\");\n String convert = clean.replace(\"\\\\\", \"/\");\n return convert;\n }", "@Test\r\n public void testGetImagePath() {\r\n System.out.println(\"getImagePath\");\r\n \r\n String expResult = \"\";\r\n String result = instance.getImagePath();\r\n assertEquals(expResult, result);\r\n \r\n \r\n }", "public static String normalizePath(String path)\r\n {\r\n StringBuilder result = new StringBuilder();\r\n char nextChar;\r\n for(int i = 0; i < path.length(); i++)\r\n {\r\n nextChar = path.charAt(i);\r\n if((nextChar == '\\\\'))\r\n {\r\n // Convert the Windows style path separator to the standard path separator\r\n result.append('/');\r\n }\r\n else\r\n {\r\n result.append(nextChar);\r\n }\r\n }\r\n \r\n return result.toString();\r\n }", "private static String createDir(String s) {\r\n \tint len = s.length() - 1;\r\n \tString tempBuff;\r\n \tString result;\r\n \tif (s.charAt(len) != '/') {\r\n \t\ttempBuff = String.format(\"%s/\", s);\r\n \t}\r\n \telse {\r\n \t\ttempBuff = s;\r\n \t}\r\n \tresult = tempBuff;\r\n \treturn result;\r\n }", "public Path getPath(String path,String nombreArchivo);", "public static String unixPath(String path) {\n String convert = path.replace(\"\\\\\", \"/\");\n return convert;\n }", "public String getPath()\r\n/* 26: */ {\r\n/* 27:57 */ return this.path;\r\n/* 28: */ }", "public String getResourcePath();", "public String getPicpath() {\n return picpath;\n }", "public void setStaticPicture(String path);", "public String path() {\n\treturn path;\n }", "abstract public String getImageResourcesDir();", "public String getImageNameSrc(String srcStringXpath) {\r\n\r\n\t\tString srcString = webAppDriver.findElementByXpath(srcStringXpath).getAttribute(\"src\");\r\n\t\tString temp[] = srcString.split(\"/\");\r\n\t\tint len = temp.length;\r\n\t\tString imageName = temp[len - 1];\r\n\t\t// System.out.println(\"^^^name from method \"+imageName);\r\n\t\timageName = imageName.substring(0, imageName.length());\r\n\t\t// System.out.println(\"Image name from method \"+imageName);\r\n\t\treturn imageName;\r\n\t}" ]
[ "0.67717177", "0.63874036", "0.6351978", "0.63333976", "0.63308907", "0.63308907", "0.62062436", "0.6093766", "0.6093766", "0.60808885", "0.60789186", "0.60789186", "0.60789186", "0.60789186", "0.60789186", "0.6033901", "0.5946807", "0.5937405", "0.5915262", "0.59003294", "0.576709", "0.57519", "0.57409704", "0.57155925", "0.56932735", "0.56853354", "0.56791973", "0.5676078", "0.5668861", "0.5657602", "0.56441015", "0.5613209", "0.56114215", "0.56094825", "0.56066144", "0.5600571", "0.5600571", "0.5600571", "0.55957234", "0.55900866", "0.55427426", "0.55289394", "0.5497436", "0.54736847", "0.54732853", "0.5469601", "0.5467098", "0.5467098", "0.5462858", "0.5461111", "0.54498976", "0.5448013", "0.543475", "0.54266965", "0.54158103", "0.54111123", "0.5407077", "0.54000205", "0.53891045", "0.53891045", "0.5369437", "0.5366239", "0.53369874", "0.53321743", "0.53319174", "0.5331417", "0.53263694", "0.5325777", "0.5323905", "0.5318896", "0.5310111", "0.5292884", "0.52702487", "0.5256812", "0.525306", "0.52457386", "0.5244383", "0.52410257", "0.52326393", "0.5231454", "0.52232844", "0.5216171", "0.5213936", "0.5212626", "0.5211514", "0.52082866", "0.5200091", "0.51987815", "0.51966155", "0.5188042", "0.5179094", "0.5172507", "0.51712483", "0.51711196", "0.5167526", "0.5163703", "0.51620424", "0.51616055", "0.515681", "0.5148764", "0.51481384" ]
0.0
-1
Created by developer on 2017/3/15.
public interface UserRegisterService { public Boolean isHave(String username); void insertUser(UserRegister user); PagedResult<UserRegister> queryPage(String username,Integer pageNo,Integer pageSize); void deleteUser(int userId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\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 void init() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {}", "@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 init() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "public void mo38117a() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public int describeContents() { return 0; }", "private void poetries() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void initialize() { \n }", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void m50366E() {\n }", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@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}", "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 debite() {\n\t\t\n\t}", "@Override\n public void initialize() {\n \n }", "protected void onFirstUse() {}", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "private void kk12() {\n\n\t}", "private void init() {\n\n\n\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private Singletion3() {}", "private void getStatus() {\n\t\t\n\t}", "Consumable() {\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}" ]
[ "0.6121167", "0.6062492", "0.5844807", "0.58284354", "0.5702321", "0.56990707", "0.5698605", "0.56966966", "0.5695662", "0.5695662", "0.5637372", "0.563734", "0.563734", "0.563734", "0.563734", "0.563734", "0.563734", "0.5634449", "0.56025827", "0.5595501", "0.55945843", "0.55826783", "0.5568614", "0.5568614", "0.5558068", "0.554633", "0.5540477", "0.55123895", "0.54988635", "0.54981506", "0.5481122", "0.54809576", "0.5476189", "0.5472737", "0.5472737", "0.5472737", "0.5472737", "0.5472737", "0.547233", "0.54702395", "0.54702395", "0.5460369", "0.5457777", "0.54537404", "0.5452984", "0.5450852", "0.5450009", "0.54420525", "0.5439342", "0.5439342", "0.54355913", "0.54322594", "0.5422542", "0.541952", "0.54177964", "0.5415509", "0.54147065", "0.53957266", "0.53957266", "0.53957266", "0.53943074", "0.53943074", "0.53943074", "0.53926057", "0.539159", "0.53890806", "0.5384185", "0.5384185", "0.5384185", "0.538042", "0.5369659", "0.5365658", "0.5365658", "0.5365658", "0.5350907", "0.5344796", "0.5323368", "0.5323368", "0.5323368", "0.5323368", "0.5323368", "0.5323368", "0.5323368", "0.53230083", "0.5322334", "0.53219247", "0.5318674", "0.5317779", "0.5306707", "0.53010017", "0.5299787", "0.5290227", "0.529022", "0.5282555", "0.527828", "0.527828", "0.5276723", "0.52751803", "0.52744293", "0.5272372", "0.5271299" ]
0.0
-1
Get the module id from the specified file
public static String getModuleId(File f) { FileReader fr = null; try { fr = new FileReader(f); final XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance(); final XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(fr); while (xmlStreamReader.hasNext()) { if (xmlStreamReader.next() == XMLStreamReader.START_ELEMENT && "module".equals(xmlStreamReader.getLocalName())) { for (int i = 0; i < xmlStreamReader.getAttributeCount(); i++) { String name = xmlStreamReader.getAttributeLocalName(i); if ("name".equals(name)) { return xmlStreamReader.getAttributeValue(i); } } } } } catch (Exception e) { // Nothing to do } finally { if (null != fr) { try { fr.close(); } catch (IOException ioe) { // Ignore } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ModuleIdentifier getId();", "String getModuleId();", "String getModID();", "String getModID();", "public String getAssetModuleId();", "public static int getFileID() {\n\t\treturn StringArray.fileID;\n\t}", "public int getId() {\n // some code goes here\n int id = f.getAbsoluteFile().hashCode();\n //System.out.println(id);\n return id;\n }", "public int getModuleID ()\n\n {\n\n // Returns moduleID when called.\n return moduleID;\n\n }", "public static int Id(String key) {\n try {\n File file = FileHandler.loadFile(key + \".id\");\n InputStream input = new FileInputStream(Objects.requireNonNull(file));\n Scanner scanner = new Scanner(input);\n int id = scanner.nextInt();\n scanner.close();\n input.close();\n return id;\n } catch (FileNotFoundException fileNotFoundException) {\n fileNotFoundException.printStackTrace();\n logger.fatal(key + \"id file doesnt exist.\");\n } catch (IOException e) {\n e.printStackTrace();\n logger.error(\"couldn't read from \" + key + \" id file.\");\n }\n return 0;\n }", "public int getId() {\n // some code goes here\n \treturn m_f.getAbsoluteFile().hashCode();\n }", "Module getModuleByFile(@NotNull VirtualFile file);", "public int getId() {\n // some code goes here\n return f.getAbsoluteFile().hashCode();\n //throw new UnsupportedOperationException(\"implement this\");\n }", "public static int readID(String path) {\n int id = 0;\n\n try {\n File file = new File(sourcePath + path);\n BufferedReader br = new BufferedReader(new FileReader(file));\n\n String line = br.readLine();\n\n if (line != null)\n id = Integer.parseInt(line.trim());\n else\n System.out.println(\"Unable to convert to integer!\");\n\n br.close();\n } catch (IOException e) {\n System.out.println(\"File not found!\");\n e.printStackTrace();\n }\n\n return id;\n }", "public int getModuleId();", "public static int getIdentifier(String resource) {\n String fileName = new File(resource).getName();\n String tokens[] = fileName.split(\"\\\\.(?=[^\\\\.]+$)\");\n int identifier;\n if (tokens.length == 2 && tokens[0].matches(\"\\\\d+\")) {\n identifier = Integer.valueOf(tokens[0]);\n } else {\n int hashCode = Math.abs(fileName.hashCode());\n int minValue = Integer.MAX_VALUE / 2;\n identifier = minValue + hashCode / 2;\n }\n return identifier;\n }", "private String getPid(String filename) \r\n {\r\n\tString xml_file = filename;\r\n\tString pid = \"00000\";\r\n\t\r\n\t/* make a formal XML file name , taking \"DATA\" out of xml filename \r\n\t Johnson_arizona_0009D_10063_DATA.xml ==> 10063\r\n\t*/\r\n\tint loc = xml_file.lastIndexOf(\"_DATA.xml\"); \r\n\txml_file = xml_file.substring (0, loc); // \t\r\n\tSystem.out.println (\"xml_file +\" + xml_file);\r\n \r\n\tint loc_begin = xml_file.lastIndexOf(\"_\") + 1 ;\t\r\n\r\n\tif(loc_begin < 0)\r\n\t {\r\n\t\tSystem.out.println(\"Error (copyFile): File \" + xml_file + \" must be of form LastName_arizona_\\\\d\");\r\n\t\treturn pid;\r\n\t }\r\n\telse{\r\n\t pid = xml_file.substring (loc_begin); // get pid = something like \"10063\" \r\n\t //System.out.println(\"***** pid = \" + pid);\r\n\r\n\t if(pid == null || pid.length() < 1)\r\n\t\t{\r\n\t\t System.out.println(\"Error (copyFile): Unable to parse out persistent identifier (pid) from name \" + xml_file);\r\n\t\t return null;\r\n\t\t}\r\n\t return pid;\r\n\t}\r\n }", "public int getID()\n {\n return MODULE_ID;\n }", "public static String findPdbId(File file) throws IOException,\n\t\t\tFileNotFoundException {\n\n\t\tString line;\n\t\tString returnMe = \"\";\n\t\tBufferedReader in;\n\t\tString extension = PdbHelper.getFileExtension(file);\n\n\t\tif (extension.equals(\"gz\")) { // PDB files that are gzipped can be used\n\t\t\tin = new BufferedReader(new InputStreamReader(new GZIPInputStream(\n\t\t\t\t\tnew FileInputStream(file))));\n\t\t} else {\n\t\t\tin = new BufferedReader(new FileReader(file));\n\t\t}\n\n\t\twhile ((line = in.readLine()) != null) {\n\t\t\tif (line.startsWith(\"HEADER\")) {\n\t\t\t\t// PDB identifier is mentioned between the 63rd and 66th\n\t\t\t\t// characters\n\t\t\t\treturnMe = line.substring(63 - 1, 67 - 1).trim();\n\t\t\t}\n\t\t}\n\t\tin.close();\n\t\treturn returnMe.toUpperCase();\n\t}", "public String getIssueID(String filename, String extensionSymbol) {\n\t\tif (filename == null) {\n\n\t\t\treturn null;\n\n\t\t}\n\t\treturn filename.split(extensionSymbol)[1];\n\t}", "public static String getModuleId(ComponentModule module) {\n\t\tif(module instanceof NSFComponentModule) {\n\t\t\treturn ((NSFComponentModule)module).getDatabasePath();\n\t\t} else {\n\t\t\treturn Integer.toHexString(System.identityHashCode(module));\n\t\t}\n\t}", "@Override\n protected String getStationId(String filename) {\n Matcher matcher = stationIdPattern.matcher(filename);\n if (matcher.matches()) {\n return matcher.group(1);\n }\n return null;\n }", "public int getModuleId() {\n return moduleId_;\n }", "public int getModuleId() {\n return moduleId_;\n }", "public int getId() {\n return m_module.getConfiguration().getId();\n }", "public final int getFileId() {\n\t\treturn m_fileId;\n\t}", "public static int getFileNum(File f)\r\n\t{\r\n\t\tString fileStr = f.toString().substring(2);\r\n\t\t\r\n\t\tint num = Integer.parseInt(fileStr.substring(13, fileStr.length()-5));\r\n\t\treturn num;\r\n\t}", "private Integer getTripId(Path filePath) {\n\t\tString tripFileName = filePath.getName(); // get file name\n\t\tint filenameEnding = tripFileName.indexOf(\".\"); // remove ending\n\t\tString strTripId = tripFileName.substring(0, filenameEnding);\n\t\treturn Integer.parseInt(strTripId);\n\t}", "public static String extractAndroidIdFromCsvFilename(String filename) {\n int indexOfFirstUnderscore = filename.indexOf(\"_\");\n String androidId = filename.substring(0, indexOfFirstUnderscore);\n return androidId;\n }", "public ModuleRevisionId getId() {\n return descriptor.getResolvedModuleRevisionId();\n }", "String getProgramId();", "protected String getModuleId() {\n\n return moduleId;\n }", "long getPackageid();", "long getPackageid();", "public short getFileID() \r\n\t //@ requires [?f]valid_id(this);\r\n\t //@ ensures [f]valid_id(this);\r\n\t{\r\n\t\t////@ open [f]valid_id(this); // auto\r\n\t\treturn fileID;\r\n\t\t//@ close [f]valid_id(this);\r\n\t}", "public short getFileID() \r\n\t //@ requires [?f]valid_id(this);\r\n\t //@ ensures [f]valid_id(this);\r\n\t{\r\n\t\t////@ open [f]valid_id(this); // auto\r\n\t\treturn fileID;\r\n\t\t//@ close [f]valid_id(this);\r\n\t}", "public Integer getFileid() {\n return fileid;\n }", "public long getModuleId() {\r\n throw new UnsupportedOperationException(\"please override this method in sub-class.\");\r\n }", "int getSrcId();", "int getSrcId();", "public int idNum(String fullFilePath){\n\n int lines = 0;\n\n try {\n BufferedReader reader = new BufferedReader(new FileReader(fullFilePath));\n while (reader.readLine() != null) {\n lines++;\n }\n reader.close();\n }\n catch(IOException ioe) {\n ioe.printStackTrace();\n }\n return lines;\n }", "public long getFileId(String file_name) {\n\n\t\tif (m_db == null)\n\t\t\treturn -1;\n\n\t\tCursor cursor = m_db.query(FILE_TABLE_NAME,\n\t\t\t\tnew String[] { FILE_FIELD_ID }, FILE_FIELD_PATH + \"=?\",\n\t\t\t\tnew String[] { file_name }, null, null, null);\n\n\t\t//\n\t\t// get first entry of result set\n\t\t//\n\t\tString result = getFirstEntryOfResultSet(cursor);\n\n\t\t//\n\t\t// close cursor\n\t\t//\n\t\tcursor.close();\n\n\t\tif (result == null)\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn Long.parseLong(result);\n\t}", "private String getPlaymeidFromConfig(){\n\t\tString playmeid = \"\";\n\t\ttry {\n\t\t\tString filePath = \"/system/etc/manufactory.conf\";\n\t\t\tFile file = new File(filePath);\n\t\t\tif (!file.isFile()) {\n\t\t\t\treturn playmeid;\n\t\t\t}\n\t\t\tFileInputStream fin = new FileInputStream(filePath);\n\t\t\tint length = fin.available();\n\t\t\tif(length == 32){\n\t\t\t\tbyte[] buffer = new byte[length];\n\t\t\t\tfin.read(buffer);\n//\t\t\t\tplaymeid = EncodingUtils.getString(buffer, \"UTF-8\");\n\t\t\t\tfin.close();\n\t\t\t\treturn new String(buffer);\n\t\t\t}\n\t\t\tfin.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn playmeid;\n\t}", "public String getModuleID() { return \"\"; }", "public final static int get(String fileName) {\n\t\t\tString strValue = PROPERTIES.getProperty(fileName);\n\t\t\t//log.info(\"GET dataset id : \"+fileName);\n\t\t\ttry {\treturn strValue!=null? Integer.valueOf(strValue): -1;\t}catch(Exception e) {\treturn -1;\t}\n\t\t}", "private String fileName(ModuleReference mref) {\n URI uri = mref.location().orElse(null);\n if (uri != null) {\n if (uri.getScheme().equalsIgnoreCase(\"file\")) {\n Path file = Path.of(uri);\n return file.getFileName().toString();\n } else {\n return uri.toString();\n }\n } else {\n return \"<unknown>\";\n }\n }", "public static String getProcessId(Path path) throws IOException {\n if (path == null) {\n throw new IOException(\"Trying to access process id from a null path\");\n }\n LOG.debug(\"Accessing pid from pid file {}\", path);\n String processId = null;\n BufferedReader bufReader = null;\n\n try {\n File file = new File(path.toString());\n if (file.exists()) {\n FileInputStream fis = new FileInputStream(file);\n bufReader = new BufferedReader(new InputStreamReader(fis, \"UTF-8\"));\n\n while (true) {\n String line = bufReader.readLine();\n if (line == null) {\n break;\n }\n String temp = line.trim(); \n if (!temp.isEmpty()) {\n if (Shell.WINDOWS) {\n // On Windows, pid is expected to be a container ID, so find first\n // line that parses successfully as a container ID.\n try {\n ContainerId.fromString(temp);\n processId = temp;\n break;\n } catch (Exception e) {\n // do nothing\n }\n }\n else {\n // Otherwise, find first line containing a numeric pid.\n try {\n long pid = Long.parseLong(temp);\n if (pid > 0) {\n processId = temp;\n break;\n }\n } catch (Exception e) {\n // do nothing\n }\n }\n }\n }\n }\n } finally {\n if (bufReader != null) {\n bufReader.close();\n }\n }\n LOG.debug(\"Got pid {} from path {}\",\n (processId != null ? processId : \"null\"), path);\n return processId;\n }", "public Long getModuleId() {\n return moduleId;\n }", "public static String retrieveProjectId(String filepath) {\n TmsMeta meta = retrieveMeta(filepath);\n String projectId = meta.getProjectId();\n if (StringUtils.isEmpty(projectId)) {\n System.err.println(\"Project id not detected inside project TMS meta file\");\n System.exit(-1);\n }\n return meta.getProjectId();\n }", "@Nullable\n public ObjectId findFile(String fileName) throws IOException {\n if (revision == null) {\n return null;\n }\n\n try (TreeWalk tw = TreeWalk.forPath(reader, fileName, revision.getTree())) {\n if (tw != null) {\n return tw.getObjectId(0);\n }\n }\n return null;\n }", "String getResourceID();", "public static Long translateFileHandleId(String fileId) {\r\n\t\tif(fileId == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn Long.parseLong(fileId);\r\n\t}", "public String getIdURLFromFile(String filePath, int key) {\n\t\tHashMap<Integer, String> map = new HashMap<Integer, String>();\n\t\ttry {\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\tmap.put(id, file1URIs.get(i));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error in getting File ID and URL Value\" + e.getMessage());\n\t\t}\n\t\treturn map.get(key);\n\t}", "public Long getFileId() {\n/* 35:35 */ return this.fileId;\n/* 36: */ }", "private String getAgentIDFromFile() throws CatascopiaException {\n \tProperties prop = new Properties();\n \tString id;\n \ttry {\n\t\t\tString agentfile = JCATASCOPIA_AGENT_HOME + File.separator + AGENT_PRIVATE_FILE;\n\t\t\tif((new File(agentfile).isFile())) {\n\t\t\t\t//load agent_private properties file\n\t\t\t\tFileInputStream fis = new FileInputStream(agentfile);\n\t\t\t\tprop.load(fis);\n\t\t\t\tif (fis != null)\n\t\t \t\tfis.close();\n\t\t\t\tid = prop.getProperty(\"agentID\",UUID.randomUUID().toString().replace(\"-\", \"\"));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//first time agent started. Store assigned id to file\n\t\t\t\tid = UUID.randomUUID().toString().replace(\"-\", \"\");\n\t\t\t\tprop.setProperty(\"agentID\", id);\n\t\t\t\tprop.store(new FileOutputStream(agentfile), null);\n\t\t\t}\n \t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\tthrow new CatascopiaException(\"agent_private file not found\", CatascopiaException.ExceptionType.FILE_ERROR);\n\t\t} \n\t\tcatch (IOException e) {\n\t\t\tthrow new CatascopiaException(\"agent_file parsing error\", CatascopiaException.ExceptionType.FILE_ERROR);\n\t\t}\t\n \treturn id;\n\t}", "private static String getSenseIdFromCachedFileName(String fileName) {\n \tString senseId = Common.STR_DEFAULT_SENSE_ID;\n \t\n \tif(TextUtils.isEmpty(fileName))\n \t\treturn senseId;\n \t\n \ttry {\n\t\t\tint idx = fileName.indexOf(Common.STR_SENSE_ID_PREFIX);\n\t\t\t// Has sense version in file name\n\t\t if(idx > -1 && idx + 8 <= fileName.length())\n\t\t \tsenseId = fileName.substring(idx, idx+8);\n\t\t // No sense version in file name, it should be old format file. Don't set senseId.\n\t\t else\n\t\t \tsenseId = \"\";\n\t\t} catch (Exception e) {\n\t\t\tLog.e(TAG, \"Exception in getSenseIdFromCachedFileName\", e);\n\t\t}\n \t\n \treturn senseId;\n }", "public int getFileFromID(int id) {\n for(int i = 0 ; i < files.size(); i++) {\n if(files.get(i).getFileID() == id)\n return i;\n }\n return -1;\n }", "public final int getFileId() {\n\t\treturn m_FID;\n\t}", "public Integer getFileId() {\n\t\treturn fileId;\n\t}", "public int getFileId() {\n return fileId;\n }", "private Map<String, String> internalGetResIdsForFile(IProject project, String xmlFileWsPath) {\n\n TreeMap<String, String> ids = new TreeMap<String, String>();\n\n // Access the project that contains the resource that contains the compilation unit\n IResource resource = project.getFile(xmlFileWsPath);\n\n if (resource != null && resource.exists() && resource.getType() == IResource.FILE) {\n IStructuredModel smodel = null;\n\n try {\n IFile file = (IFile) resource;\n IModelManager modelMan = StructuredModelManager.getModelManager();\n smodel = modelMan.getExistingModelForRead(file);\n if (smodel == null) {\n smodel = modelMan.getModelForRead(file);\n }\n\n if (smodel instanceof IDOMModel) {\n IDOMDocument doc = ((IDOMModel) smodel).getDocument();\n\n // We want all the IDs in an XML structure like this:\n // <resources>\n // <string name=\"ID\">something</string>\n // </resources>\n\n Node root = findChild(doc, null, SdkConstants.TAG_RESOURCES);\n if (root != null) {\n for (Node strNode = findChild(root, null,\n SdkConstants.TAG_STRING);\n strNode != null;\n strNode = findChild(null, strNode,\n SdkConstants.TAG_STRING)) {\n NamedNodeMap attrs = strNode.getAttributes();\n Node nameAttr = attrs.getNamedItem(SdkConstants.ATTR_NAME);\n if (nameAttr != null) {\n String id = nameAttr.getNodeValue();\n\n // Find the TEXT node right after the element.\n // Whitespace matters so we don't try to normalize it.\n String text = \"\"; //$NON-NLS-1$\n for (Node txtNode = strNode.getFirstChild();\n txtNode != null && txtNode.getNodeType() == Node.TEXT_NODE;\n txtNode = txtNode.getNextSibling()) {\n text += txtNode.getNodeValue();\n }\n\n ids.put(id, text);\n }\n }\n }\n }\n\n } catch (Throwable e) {\n AdtPlugin.log(e, \"GetResIds failed in %1$s\", xmlFileWsPath); //$NON-NLS-1$\n } finally {\n if (smodel != null) {\n smodel.releaseFromRead();\n }\n }\n }\n\n return ids;\n }", "public String getNewModuleId() {\n String lastModuleId = null;\n String newModuleId = null;\n\n try {\n\n Connection con = DBConnection.getConnection();\n String query = \"SELECT moduleId FROM module\\n\"\n + \"order by moduleId desc limit 1;\";\n PreparedStatement preparedStmt = (PreparedStatement) con.prepareStatement(query);\n\n // execute the preparedstatement\n ResultSet rs = preparedStmt.executeQuery();\n if (rs.next()) {\n lastModuleId = rs.getString(\"moduleId\");\n }\n String last3 = lastModuleId.substring(lastModuleId.length() - 3);\n newModuleId = lastModuleId.substring(0, 4) + String.valueOf(Integer.parseInt(last3) + 1);\n\n con.close();\n\n } catch (SQLException | HeadlessException e) {\n JOptionPane.showMessageDialog(null, e);\n }\n return newModuleId;\n }", "public String getModuleId() throws BaseTechnicalError, RemoteException {\n\t return JazzQAConstants.MODULE_PEDVALIDACAO;\n\t}", "String getIdNumber();", "public Long getFileId() {\n return this.fileId;\n }", "public static String retrieveSuiteId(String filepath, String subplan) {\n TmsMeta meta = retrieveMeta(filepath);\n TestFile testFile = null;\n String relativePath = getRelativePath(filepath);\n for(TestFile file : meta.getFiles()){\n if (StringUtils.equals(file.getPath(), relativePath)){\n if (StringUtils.isNotEmpty(subplan) && StringUtils.equals(file.getSubStep(), subplan)){\n testFile = file;\n break;\n }\n testFile = file;\n break;\n }\n }\n if (testFile == null){\n System.out.println(\"There is no suite associated with the file: \" + filepath);\n System.exit(-1);\n }\n return testFile.getSuiteId();\n }", "public static String getProcessDefPackageId(String processDefId) {\n String result = null;\n if (processDefId != null) {\n StringTokenizer st = new StringTokenizer(processDefId, \"#\");\n if (st.countTokens() > 2) {\n result = st.nextToken();\n }\n }\n return result;\n }", "public String getScriptID(String scriptName) throws MDSException {\r\n\r\n\t\tString scriptID = null;\r\n\t\tString key = scriptName.toUpperCase();\r\n\t\tscriptID = (String) scriptMap.get(key);\r\n\t\tif (scriptID == null || scriptID == \"\") {\r\n\t\t\tscriptID = \"\";\r\n\t\t\t//logger.warn(\"script : \" + scriptName + \" is not loaded !\");\r\n\t\t}\r\n\t\treturn scriptID;\r\n\t}", "String getModuleVersionNumber();", "private String getProjectNumber(ZipFile zipFile) throws ZipException\n {\n Pattern pattern = Pattern.compile( \"^P-[\\\\dA-F]{4}\", Pattern.CASE_INSENSITIVE);\n for (FileHeader fileHeader : zipFile.getFileHeaders ( ) ) {\n Matcher matcher = pattern.matcher(fileHeader.getFileName());\n if (matcher.find()) {\n return matcher.group();\n }\n }\n \n throw new PlcRuntimeException(\"Error determining project number.\");\n }", "public String getID() {\n\t\treturn this.region.getFileName();\n\t}", "String getArtifactId();", "public String getSourceFileName() {\n\t\tStringIdMsType stringIdType =\n\t\t\tpdb.getTypeRecord(getSourceFileNameStringIdRecordNumber(), StringIdMsType.class);\n\t\tif (stringIdType == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn stringIdType.getString();\n\t}", "public synchronized FileIDInfo lookupFileIDInfo(String projectName, String viewName, int fileID) {\n return store.lookupFileIDInfo(projectName, viewName, fileID);\n }", "protected String getCurrentTestedModuleFile() {\n\t\treturn null;\n\t}", "public String getIdString() {\n return Server.getChunkIdString(this.parent.getSourceFile().getId(), this.chunkID);\n }", "public static Module getModuleForLibraryFile(Project project, VirtualFile file) {\n for (Module module : ModuleManager.getInstance(project).getModules()) {\n if (ModuleUtilCore.moduleContainsFile(module, file, true)) {\n return module;\n }\n }\n return null;\n }", "public static int findBuildNumberUsingPattern(final String fileContent) {\n\t\tif (StringUtils.trimToNull(fileContent) == null) {\n\t\t\treturn NO_BUILD_FOUND;\n\t\t}\n\t\tint buildNumberFromFile = NO_BUILD_FOUND;\n\t\tfinal Matcher matcher = BUILD_NUMBER_PATTERN.matcher(fileContent);\n\t\tif (matcher.find()) {\n\t\t\tfinal String extractedBuildNumber = matcher.group(1);\n\t\t\ttry {\n\t\t\t\tbuildNumberFromFile = Integer.valueOf(extractedBuildNumber);\n\t\t\t\treturn buildNumberFromFile;\n\t\t\t} catch (final Exception e) {\n\t\t\t\tLOGGER.log(Level.FINE, \"There was an issue extracting the build number from a file. Found: \\\"\" + \n\t\t\t\t\t\textractedBuildNumber + \"\\\" as a build number.\");\n\t\t\t}\n\t\t}\n\n\t\treturn NO_BUILD_FOUND;\n\t}", "public java.lang.String getModId() {\r\n return modId;\r\n }", "public short getFileID() \r\n\t //@ requires [?f]valid_id(this);\r\n\t //@ ensures [f]valid_id(this);\r\n\t{\r\n\t\t////@ open [f]valid_id(this); // auto\r\n\t\tFile thiz = this;\r\n\t\treturn fileID;\r\n\t\t//@ close [f]valid_id(this); // todo\r\n\t}", "public abstract String getModuleName( );", "public static int nextId(String key) {\n //Setting the id to number of users created + 1 and clearing id file\n try {\n File file = FileHandler.loadFile(key + \".id\");\n InputStream input = new FileInputStream(file);\n Scanner scanner = new Scanner(input);\n int id = scanner.nextInt() + 1;\n scanner.close();\n input.close();\n FileHandler.ClearFile(file);\n //updating id file with new numbers\n PrintStream printStream = new PrintStream(new FileOutputStream(file));\n printStream.println(id);\n printStream.close();\n return id;\n } catch (FileNotFoundException fileNotFoundException) {\n fileNotFoundException.printStackTrace();\n logger.fatal(key + \"id file doesnt exist.\");\n } catch (IOException e) {\n e.printStackTrace();\n logger.error(\"couldn't read from \" + key + \" id file.\");\n }\n return -1;\n }", "private String getPlaymeidFromAssets() {\n\t\tInputStream is =null;\n\t\tString playmeid =\"\";\n\t\ttry {\n\t\t\tis = mContext.getApplicationContext().getAssets().open(\"Playmeid.cfg\");\n\t\t\tint length = is.available();\n\t\t\tif(length==32){\n\t\t\t\tbyte[] buffer =new byte[length];\n\t\t\t\tis.read(buffer);\n\t\t\t\tplaymeid = new String(buffer);\n\t\t\t}\n\t\t\tis.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\n\t\treturn playmeid;\n\t}", "public int getId(String id){\n\t\tResources res = activity.getResources();\n\t\tint theid = res.getIdentifier(id, \"id\", activity.getPackageName());\n\t\treturn theid;\n\t}", "String artifactSourceId();", "String getContentGeneratorId();", "ManifestIdentifier getIdentifier();", "private static String extractVolumeIDFromFilePath(String path) {\n\t\tString prefix = \"loc\";\r\n\r\n\t\tString filename = \"ark+=13960=t9765kx0j.mets.xml\";\r\n\r\n\t\t// the full filename sans the extension is the cleaned headless ID\r\n\t\tString cleanedHeadlessID = filename.substring(0, filename.length()\r\n\t\t\t\t- \".mets.xml\".length());\r\n\r\n\t\t// must unclean this token using Pairtree\r\n\t\tPairtree pairtree = new Pairtree();\r\n\t\tString uncleanedHeadlessID = pairtree.uncleanId(cleanedHeadlessID);\r\n\r\n\t\tString str = prefix + \".\" + uncleanedHeadlessID;\r\n\r\n\t\treturn prefix + \".\" + uncleanedHeadlessID;\r\n\r\n\t}", "int getSymbolicId();", "String getSourceID();", "public static int readInt1(Context context, String fileName, String key) {\n if (context == null) return -1;\n SharedPreferences sharedPreferences = context.getSharedPreferences(fileName, Context.MODE_PRIVATE);\n return sharedPreferences.getInt(key, -1);\n }", "java.lang.String getArtifactId();", "public JkModuleId moduleId() {\n return moduleId;\n }", "public static TsFileIdentifier getFileIdentifierFromFilePath(String filepath) {\n String splitter = File.separator;\n if (\"\\\\\".equals(splitter)) {\n // String.split use a regex way to split the string into array\n // \"\\\" Should be escaped as \"\\\\\"\n splitter = \"\\\\\\\\\";\n }\n String[] splittedPath = filepath.split(splitter);\n int length = splittedPath.length;\n if (length < 5) {\n // if the path contains the required information\n // after splitting result should contain more than 5 objects\n throw new RuntimeException(\n String.format(\"Path %s cannot be parsed into file info\", filepath));\n }\n\n return new TsFileIdentifier(\n splittedPath[length - LOGICAL_SG_OFFSET_IN_PATH],\n splittedPath[length - DATA_REGION_OFFSET_IN_PATH],\n splittedPath[length - TIME_PARTITION_OFFSET_IN_PATH],\n splittedPath[length - SEQUENCE_OFFSET_IN_PATH].equals(IoTDBConstant.SEQUENCE_FLODER_NAME),\n splittedPath[length - FILE_NAME_OFFSET_IN_PATH]);\n }", "public String getProgramId() {\n return pathsProvider.getProgramId();\n }", "public String getFileId() {\n return fileId;\n }", "public String getFileId() {\n return fileId;\n }", "public String getFileId() {\n return fileId;\n }", "public int lookupReadFileExtension(String extension);", "Path getModBookFilePath();", "Module getById(Long identifier) throws DBException;" ]
[ "0.71806926", "0.6869336", "0.6696701", "0.6696701", "0.66123974", "0.6579282", "0.6521969", "0.6455922", "0.6397718", "0.6395202", "0.6376092", "0.636568", "0.63267213", "0.6295147", "0.61750567", "0.6146401", "0.6142233", "0.6124882", "0.6114602", "0.60899365", "0.60666895", "0.60651815", "0.6015144", "0.593625", "0.58240193", "0.5818261", "0.58045405", "0.5781756", "0.5780781", "0.57592577", "0.57272387", "0.56913847", "0.56913847", "0.56805056", "0.56805056", "0.5679322", "0.5673925", "0.56589454", "0.56589454", "0.5636007", "0.5625365", "0.5606098", "0.56000733", "0.5576557", "0.5566231", "0.55639005", "0.55536973", "0.55408233", "0.55391395", "0.5501761", "0.54996806", "0.54861695", "0.54764676", "0.5471116", "0.5469006", "0.5450586", "0.542539", "0.5425326", "0.54210037", "0.5403676", "0.53933656", "0.5393307", "0.5387951", "0.5379131", "0.5374879", "0.5372767", "0.53666204", "0.53587127", "0.5340416", "0.53371334", "0.5328208", "0.53196263", "0.5318832", "0.53049266", "0.52982944", "0.5294734", "0.5289007", "0.5286899", "0.52834946", "0.52813745", "0.5272369", "0.52639896", "0.52628297", "0.52576584", "0.5248695", "0.52401406", "0.5238066", "0.5231471", "0.52300566", "0.522724", "0.5210242", "0.52061707", "0.5200477", "0.519922", "0.51964873", "0.51964873", "0.51964873", "0.51919794", "0.51878333", "0.51850045" ]
0.8178311
0
Album common service methods
@Override public Album createAlbum(Album album) { return albservice.createAlbum(album); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface AlbumService {\n //添加\n public void addAlbum(Album album, MultipartFile coverImg, String realPath);\n //查所有\n public List<Album> queryAllAlbum();\n //查一个\n public Album queryOneAlbum(String id);\n public AlbumDto queryAllBySplit(Integer page, Integer rows);\n}", "public interface AlbumService {\r\n\r\n /**\r\n * Asynchronously returns detailed information about a given album, including its tracks.\r\n * \r\n * @param apikey\r\n * the API key\r\n * @param pretty\r\n * if <code>true</code> pretty prints the JSON\r\n * @param catalog\r\n * countries' catalog (two-letter country code, which is case-sensitive)\r\n * @param albumId\r\n * the ID of the album to load\r\n * @param callBack\r\n * callback to which the result is passed\r\n */\r\n @GET(\"/v1/albums/{albumId}\")\r\n void getAlbum( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n @Path(\"albumId\") String albumId, //\r\n Callback<AlbumData> callBack);\r\n\r\n /**\r\n * Returns a list of new releases, curated by Rhapsody. This list can be personalized for the user by passing the\r\n * <code>userId</code>. The personalization is made by Rhapsody based upon recent listening history.\r\n *\r\n * <p>\r\n * <i>Hint:</i> The <code>userId</code> is the {@link AccountData#id}.\r\n * </p>\r\n *\r\n * @param apikey\r\n * the API key\r\n * @param pretty\r\n * if <code>true</code> pretty prints the JSON\r\n * @param catalog\r\n * countries' catalog (two-letter country code, which is case-sensitive)\r\n * @param userId\r\n * the user ID to get personalized new releases, if <code>null</code>no personalization is made\r\n * @param limit\r\n * the number of releases which are loaded, if <code>null</code> the servers default value is used\r\n * @param callBack\r\n * callback to which the result is passed\r\n */\r\n @GET(\"/v1/albums/new\")\r\n void getNewReleases( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n @Query(\"guid\") String userId, //\r\n @Query(\"limit\") Integer limit, //\r\n Callback<Collection<AlbumData>> callBack);\r\n\r\n /**\r\n * Synchronously returns detailed information about a given album, including its tracks.\r\n * \r\n * @param apikey\r\n * the API key\r\n * @param pretty\r\n * if <code>true</code> pretty prints the JSON\r\n * @param catalog\r\n * countries' catalog (two-letter country code, which is case-sensitive)\r\n * @param albumId\r\n * the ID of the album to load\r\n * @return the {@link AlbumData}\r\n */\r\n @GET(\"/v1/albums/{albumId}\")\r\n AlbumData getAlbum( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n @Path(\"albumId\") String albumId);\r\n}", "public interface IAlbumImageService extends IService<AlbumImage> {\n\n List<AlbumImage> queryList(Map map);\n\n int queryTotal(Map map);\n\n /**\n * Delete photos in batch\n * @param ids\n * @return\n */\n int batchDelete(List<Integer> ids);\n\n /**\n * Check the album according to the album ID\n * @param albumId\n * @return\n */\n List<AlbumImage> selectByAlbum(Integer albumId);\n\n\n}", "public interface AlbumService extends BaseEntityCrudService<Album> {\n List<Album> findByUserId(Long userId);\n List<AlbumDTO> findAlbums(long userId);\n}", "public AlbumService() {\n super();\n }", "@Override\n public void onFailure(Call<List<Album>> call, Throwable t) {\n Log.e(TAG, \"Error from the service\");\n }", "void loadAlbums();", "public interface PhotoService {\n\n /**\n * Add saved photo to a given user.\n * @param user current user's model object\n * @param photo photo model object\n */\n void addPhoto(User user, Photo photo);\n\n /**\n * Remove saved photo from a given user.\n * @param user current user's model object.\n * @param photoId NASA's API photo identifier.\n */\n void removePhoto(User user, String photoId);\n}", "private void SaveAlbum() {\n }", "@Transactional\r\npublic interface IAlbumManager extends ISoundlinkManager<Album, Integer> {\r\n\r\n /**\r\n * Get all albums from artiste\r\n * \r\n * @param artisteId\r\n * @param userId\r\n * @return\r\n */\r\n List<Album> getAlbumFromArtiste(Integer artisteId, Integer userId);\r\n\r\n /**\r\n * Find an album by his name and the artiste name\r\n * \r\n * @param albumName\r\n * @param artisteName\r\n * @return\r\n */\r\n Album findAlbumByNameAndArtisteName(String albumName, String artisteName);\r\n\r\n /**\r\n * Get all albums from user\r\n * \r\n * @param user id\r\n * @return\r\n */\r\n List<Album> getAlbumsByUserId(Integer userId);\r\n\r\n}", "public interface IAlbumView {\n\n void addPictures(List<String> pictures);\n\n void selectImages(ArrayList<String> selectPictures);\n\n void cancel();\n}", "private String getAlbumName() {\n return \"fotos_credencial\";\n }", "@Test\n public void getAlbumsTest() {\n Integer id = null;\n Integer userId = null;\n List<Album> response = api.getAlbums(id, userId);\n\n // TODO: test validations\n }", "@GetMapping(\"images/album/{idOrTitle}\")\n\tprivate PhotosetEntity getAlbum(@PathVariable String idOrTitle) {\n\t\tList<PhotosetEntity> list = new ArrayList<PhotosetEntity>();\n\t\tPhotosetEntity photoset = null;\n\t\t\n\t\tlog.info(\"Request to retrieve photos from photoset...\");\n\t\t\n\t\t// Authorize edel-read or do not retrieve anything\n\t\tif (util.authEdelRead() != null) {\n\t\t\t\n\t\t\tphotoset = service.getPhotosetByIdOrTitle(idOrTitle);\n\t\t\t\n\t\t\t// If photoset is not null, set the list of PhotoEntity\n\t\t\tif (photoset != null) {\n\t\t\t\tphotoset.setPhotos(service.getPhotosFromPhotoset(photoset));\n\t\t\t\tlist.add(photoset);\n\t\t\t\tlog.info(\"Request completed with photoset.\");\n\t\t\t} else {\n\t\t\t\tlog.warn(\"Request completed with no photoset.\");\n\t\t\t}\n\t\t} else {\n\t\t\tlog.warn(\"Request completed with failed Authorization.\");\n\t\t}\n\t\t\n\t\treturn photoset;\n\t}", "public interface IAlbumPresenter {\n\n void loadAlbum();\n}", "public interface GenreService {\r\n\r\n /**\r\n * Returns a hierarchical map of all genres and subgenres.\r\n * \r\n * @param apikey\r\n * the API key\r\n * @param pretty\r\n * if <code>true</code> pretty prints the JSON\r\n * @param catalog\r\n * countries' catalog (two-letter country code, which is case-sensitive)\r\n * @param callBack\r\n * callback to which the result is passed\r\n */\r\n @GET(\"/v1/genres\")\r\n void getGenres( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n Callback<Collection<GenreData>> callBack);\r\n\r\n /**\r\n * Returns a list of all new releases by genre.\r\n * \r\n * @param apikey\r\n * the API key\r\n * @param pretty\r\n * if <code>true</code> pretty prints the JSON\r\n * @param catalog\r\n * countries' catalog (two-letter country code, which is case-sensitive)\r\n * @param genreId\r\n * the ID of the genre to load new releases\r\n * @param limit\r\n * the number of releases which are loaded, if <code>null</code> the servers default value is used\r\n * @param callBack\r\n * callback to which the result is passed\r\n */\r\n @GET(\"/v1/genres/{genreId}/albums/new\")\r\n void getNewReleases( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n @Path(\"genreId\") String genreId, //\r\n @Query(\"limit\") Integer limit, //\r\n Callback<Collection<AlbumData>> callBack);\r\n}", "public interface AlbumDetailContract {\n\n interface View extends BaseView{\n\n Context getContext();\n\n void showAlbumSongs(List<Song> songList);\n\n void showAlbumArt(Drawable albumArt);\n\n void showAlbumArt(Bitmap bitmap);\n }\n\n interface Presenter extends BasePresenter<View> {\n\n void subscribe(long albumID);\n\n void loadAlbumSongs(long albumID);\n\n void loadAlbumArt(long albumID);\n }\n}", "interface ApiService {\n\n @GET(\"users/{user}/repos\")\n Call<List<FlickR>> getFlickRItems(@Path(\"user\") String user);\n\n @GET(\"users/{user}\")\n Call<Owner> getFlickRMedia(@Path(\"user\") String user);\n\n }", "public void doCreateAlbum()\n/* */ {\n/* 52 */ AlbumDTO dto = new AlbumDTO();\n/* 53 */ dto.setName(\"Neues Album\");\n/* 54 */ dto = this.galleryManager.saveAlbum(dto);\n/* 55 */ this.albumList.add(dto);\n/* */ }", "@Override\n\tpublic List<AlbumResponse> getAlbums(String albumToGet) {\n\t\tlogger.info(\"inside getAlbums method in service\");\n\t\ttry {\n\t\t\tif (albumToGet != null) {\n\t\t\t\tlogger.info(\"album id provided: \" + albumToGet + \", fetching the unique entry\");\n\t\t\t\tLong albumToGetInLong = Long.parseLong(albumToGet);\n\t\t\t\tOptional<Album> album = albumRepository.findById(albumToGetInLong);\n\t\t\t\tif (album.isPresent()) {\n\t\t\t\t\tlogger.info(\"corresponding album found in database\");\n\t\t\t\t\tList<AlbumResponse> responses = AlbumService.convertAlbumEntityToResponseModel(album.get(),\n\t\t\t\t\t\t\tResponseMessageConstants.FETCH_SUCCESSFUL);\n\t\t\t\t\treturn responses;\n\t\t\t\t} else {\n\t\t\t\t\tlogger.error(\"corresponsding album not found in database\");\n\t\t\t\t\tList<AlbumResponse> responses = Arrays\n\t\t\t\t\t\t\t.asList(new AlbumResponse(albumToGet, \"\", null, ResponseMessageConstants.FETCH_UNSUCCESSFUL\n\t\t\t\t\t\t\t\t\t+ \", \" + ResponseMessageConstants.NON_EXISITNG_ID_ERROR));\n\t\t\t\t\treturn responses;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlogger.info(\"album id not provided, fetching all the entries\");\n\t\t\t\tList<Album> albumList = albumRepository.findAll();\n\t\t\t\talbumList.stream().forEach(e -> e.setComments(ResponseMessageConstants.FETCH_SUCCESSFUL));\n\t\t\t\tList<AlbumResponse> responses = AlbumService.convertAlbumEntityToResponseModel(albumList);\n\t\t\t\treturn responses;\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\tlogger.error(\"exception while converting albumId from string to long\");\n\t\t\tList<AlbumResponse> responses = Arrays\n\t\t\t\t\t.asList(new AlbumResponse(albumToGet, \"\", null, ResponseMessageConstants.FETCH_UNSUCCESSFUL + \", \"\n\t\t\t\t\t\t\t+ ResponseMessageConstants.INCORRECT_ID_FORMAT_ERROR));\n\t\t\treturn responses;\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\tList<AlbumResponse> responses = Arrays.asList(new AlbumResponse(albumToGet, \"\", null,\n\t\t\t\t\tResponseMessageConstants.FETCH_UNSUCCESSFUL + \", \" + ResponseMessageConstants.UNKNOWN_EXCEPTION));\n\t\t\treturn responses;\n\t\t}\n\t}", "public interface AlbumDao extends GenericDao<Album, Integer> {\n\n\tList<Album> list(AlbumQuery query);\n\n\tPage<Album> search(AlbumQuery query);\n}", "public interface AlbumView {\n\n void showAlbums(List<Album> albums);\n\n void showErrorMessage();\n\n\n}", "public interface ImageMetadataService {\n\n List<ArtistDTO> getArtistsByPrediction(String name, String name2, String surname);\n\n List<ImageTypeDTO> getImageTypesByPrediction(String name);\n\n UploadImageMetadataDTO saveMetadata(UploadImageMetadataDTO uploadImageMetadataDTO);\n\n List<ImageDTO> getTop10Images(String username, String title);\n\n List<ImageDTO> getAllUserImages(String username);\n\n List<ImageDTO> searchImagesByCriteria(SearchImageCriteriaDTO searchImageCriteriaDTO);\n\n ImageDTO updateImageMetadata(ImageDTO imageDTO);\n\n List<ImageDTO> getImagesTop50();\n\n void rateImage(RateImageDTO rateImageDTO);\n\n List<ImageDTO> getAllImages();\n}", "@Test\n public void getAllAlbumsTest() throws InvalidResourceRequestException {\n loginAndSetupNewUser(username);\n\n // Add a new album, with the same name and description as the default album.\n Response response = apiClient.addAlbum(albumName, description);\n assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());\n\n // Check server has record of both albums\n for(Album album : resolver.getAlbums(username)) {\n assertEquals(albumName, album.getAlbumName());\n assertEquals(description, album.getDescription());\n }\n }", "List<AlbumVO> searchAlbum(String searchText) throws Exception;", "public interface ApiService {\n\n @GET(\"classify\")\n Call<GalleryClassResult> getGalleryClassList();\n\n @GET(\"list\")\n Call<GalleryResult> getGalleryList(@Query(\"page\") int page, @Query(\"rows\") int rows, @Query(\"id\") int id);\n\n @GET(\"show\")\n Call<PictureResult> getPictureList(@Query(\"id\") long id);\n\n}", "public String getAlbum()\n {\n return album;\n }", "String getAlbumName()\n {\n return albumName;\n }", "fotos(){}", "List<AlbumDTO> findAll();", "public List<Album> getAlbums(Artist artist);", "public Album getSpotifyAlbumById(String albumId){\n SpotifyService spotifyService = getSpotifyService();\n Album spotifyAlbum = spotifyService.getAlbum(albumId);\n return spotifyAlbum;\n }", "public interface ArtistService {\n\n /**\n * Asynchronously returns a given artist's name, ID and primary genre.\n * \n * @param apikey\n * the API key\n * @param pretty\n * if <code>true</code> pretty prints the JSON\n * @param catalog\n * countries' catalog (two-letter country code, which is case-sensitive)\n * @param artistId\n * the ID of the artist to load\n * @param callBack\n * callback to which the result is passed\n */\n @GET(\"/v1/artists/{artistId}\")\n void getArtist( //\n @Query(\"apikey\") String apikey, //\n @Query(\"pretty\") boolean pretty, //\n @Query(\"catalog\") String catalog, //\n @Path(\"artistId\") String artistId, //\n Callback<ArtistData> callBack);\n\n /**\n * Synchronously returns a given artist's name, ID and primary genre.\n * \n * @param apikey\n * the API key\n * @param pretty\n * if <code>true</code> pretty prints the JSON\n * @param catalog\n * countries' catalog (two-letter country code, which is case-sensitive)\n * @param artistId\n * the ID of the artist to load\n * @return the {@link ArtistData}\n */\n @GET(\"/v1/artists/{artistId}\")\n ArtistData getArtist( //\n @Query(\"apikey\") String apikey, //\n @Query(\"pretty\") boolean pretty, //\n @Query(\"catalog\") String catalog, //\n @Path(\"artistId\") String artistId);\n\n /**\n * Returns biographical info for a given artist, including up to five short \"blurbs\" written by our editorial staff.\n * \n * @param apikey\n * the API key\n * @param pretty\n * if <code>true</code> pretty prints the JSON\n * @param catalog\n * countries' catalog (two-letter country code, which is case-sensitive)\n * @param artistId\n * the ID of the artist to load\n * @param callBack\n * callback to which the result is passed\n */\n @GET(\"/v1/artists/{artistId}/bio\")\n void getBio( //\n @Query(\"apikey\") String apikey, //\n @Query(\"pretty\") boolean pretty, //\n @Query(\"catalog\") String catalog, //\n @Path(\"artistId\") String artistId, //\n Callback<BioData> callBack);\n\n /**\n * Synchronously returns a list of an artist's new releases (if any), updated weekly.\n * \n * @param apikey\n * the API key\n * @param pretty\n * if <code>true</code> pretty prints the JSON\n * @param catalog\n * countries' catalog (two-letter country code, which is case-sensitive)\n * @param artistId\n * the ID of the artist to load\n * @param limit\n * the number of releases which are loaded, if <code>null</code> the servers default value is used\n * @return a list of an artist's new releases\n */\n @GET(\"/v1/artists/{artistId}/albums/new\")\n Collection<AlbumData> getNewReleases( //\n @Query(\"apikey\") String apikey, //\n @Query(\"pretty\") boolean pretty, //\n @Query(\"catalog\") String catalog, //\n @Path(\"artistId\") String artistId, //\n @Query(\"limit\") Integer limit);\n}", "public interface BannerService {\n// 分页查询\n Map selectAllByPage(int page, int rows);\n\n // 添加\n void insert(Banner record);\n\n // 修改\n void updateByPrimaryKey(int id, int status);\n// 批量删除\n void deleteByPrimaryKey(int[] ids);\n\n\n}", "@GetMapping(\"images/album/{idOrTitle}/photos\")\n\tprivate List<PhotoEntity> getImagesFromAlbum(@PathVariable String idOrTitle) {\n\t\tList<PhotoEntity> list = new ArrayList<PhotoEntity>();\n\t\tPhotosetEntity photoset = null;\n\t\t\n\t\tlog.info(\"Request to retrieve photos from photoset...\");\n\t\t\n\t\t// Authorize edel-read or do not retrieve anything\n\t\tif (util.authEdelRead() != null) {\n\t\t\t\n\t\t\tphotoset = service.getPhotosetByIdOrTitle(idOrTitle);\n\t\t\t\n\t\t\t// If photoset is not null, set the list of PhotoEntity\n\t\t\tif (photoset != null) {\n\t\t\t\tlist = service.getPhotosFromPhotoset(photoset);\n\t\t\t\tlog.info(\"Request completed with photoset.\");\n\t\t\t} else {\n\t\t\t\tlog.warn(\"Request completed with no photoset.\");\n\t\t\t}\n\t\t} else {\n\t\t\tlog.warn(\"Request completed with failed Authorization.\");\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "private void InicializarListaAlbums() {\n\n GestorAlbums gestorAlbums = new GestorAlbums(this.getActivity());\n albums = gestorAlbums.AsignarAlbum();\n }", "public void addAlbum(Album album)\r\n {\r\n\talbumCollection.add(album);\r\n }", "public List<Album> getAlbums()\r\n {\r\n\treturn albumCollection; // TODO breaks encapsulation\r\n }", "public void getImageFromAlbum() {\n\t\tIntent intent = new Intent();\n\t\tintent.addCategory(Intent.CATEGORY_OPENABLE);\n\t\tintent.setType(\"image/*\");\n\t\t// 根据版本号不同使用不同的Action\n\t\tif (Build.VERSION.SDK_INT < 19) {\n\t\t\tintent.setAction(Intent.ACTION_GET_CONTENT);\n\t\t} else {\n\t\t\tintent.setAction(Intent.ACTION_OPEN_DOCUMENT);\n\t\t}\n\t\tstartActivityForResult(intent, WriteOpinionActivity.RESULT_LOAD_IMAGE);\n\n\t}", "public interface ShowCaseImageService {\n List<ImageShowCaseModel> getImageListByCaseId(Integer showCaseId);\n List<ImageShowCaseModel> getLimitImageListByCaseId(Integer showCaseId);\n}", "public interface ArchiveService {\n// 返回所有的Archive对象\n public ArrayList<Archive> getAllArchive();\n}", "@Test\n public void getAllPhotosFromAlbumTest() {\n loginAndSetupNewUser(username);\n\n // Upload photo to default album twice\n Response response = apiClient.uploadPhoto(photoName, ext, description, albumId, contents);\n assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());\n response = apiClient.uploadPhoto(photoName, ext, description, albumId, contents);\n assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());\n\n // Create second album, in preparation to upload a photo to it.\n response = apiClient.addAlbum(albumName, description);\n assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());\n long albumId2 = gson.fromJson(response.readEntity(String.class), Receipt.class).getReferenceId();\n\n // Upload photo to second album\n response = apiClient.uploadPhoto(photoName, ext, description, albumId2, contents);\n assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());\n\n // Get all photos from album on server\n response = apiClient.getAllPhotos(albumId);\n assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());\n\n // Parse response, ensuring only the 2 original photos are present.\n String photosStr = response.readEntity(String.class);\n PhotoResult[] photoArray = gson.fromJson(photosStr, PhotoResult[].class);\n assertEquals(2, photoArray.length);\n\n // Check each photo's contents and who posted it\n for(PhotoResult result : photoArray) {\n Photo photo = result.getPhoto();\n assertEquals(photo.getAuthorName(), username);\n assertEquals(photo.getPhotoName(), photoName);\n assertEquals(photo.getDescription(), description);\n }\n }", "public interface PhotoService {\n\n @GET\n Observable<List<Photo>> fetchGallery(@Url String url);\n}", "@Override\r\n public List<Album> getAllAlbum()\r\n {\r\n List<Album> albumArrayList =new ArrayList<>();\r\n String query=\"select * from album\";\r\n try\r\n {\r\n Statement statement=connection.createStatement();\r\n ResultSet resultSet=statement.executeQuery(query);\r\n while(resultSet.next())\r\n {\r\n Album album =new Album(resultSet.getString(\"album_id\"),resultSet.getString(\"album_name\"),\r\n resultSet.getDate(\"relese_date\"));\r\n albumArrayList.add(album);\r\n }\r\n return albumArrayList;\r\n }\r\n catch(SQLException ex)\r\n {\r\n ex.printStackTrace();\r\n return null;\r\n }\r\n catch(Exception ex) {\r\n ex.printStackTrace();\r\n return null;\r\n }\r\n }", "public interface GalleryApiInterface {\n @GET(\"/gallery.json\")\n\n void getStreams(Callback<List<GalleryImage>>callback);\n}", "@GET\n @Path(\"{photoAlbumId: \\\\d+}\")\n public PhotoAlbumDetailDTO getPhotoAlbum(@PathParam(\"photoAlbumId\") Long photoAlbumId) {\n PhotoAlbumEntity entity = photoAlbumLogic.getPhotoAlbum(photoAlbumId);\n if (entity.getBicycle() != null && !bicyclesId.equals(entity.getBicycle().getId())) {\n throw new WebApplicationException(404);\n }\n return new PhotoAlbumDetailDTO(entity);\n }", "public interface MusicAlbumViewInterface {\n\n void onCompleted();\n\n void onError(String message);\n\n void onAlbums(List<Album> albums);\n\n Observable<List<Album>> getMusicAlbums();\n}", "public interface DokumentasiService {\n Dokumentasi findById(Long id);\n\n Long countAlls();\n\n Long countPublished();\n\n List<Dokumentasi> get(Long start, Long count);\n\n List<Dokumentasi> getPublished(Long start, Long rowPerPage);\n\n void saveTitlePicture(Long galleryId, java.io.InputStream is) throws IOException;\n\n// InputStream getTitlePictureStream(Long galleryId) throws IOException;\n\n Boolean hasTitlePicture(Long galleryId);\n\n void save(Dokumentasi gallery);\n\n void removeById(Long galleryId);\n\n void savePicture(DokumentasiPhoto picture, InputStream inputStream) throws IOException;\n\n void removePictureById(Long galleryPictureId);\n\n Long countByKeyword(String keyword);\n\n List<Dokumentasi> findAlls(Long start, Long count);\n\n List<Dokumentasi> findByKeyword(String keyword, Long start, Long count);\n\n void removeByIds(Long[] ids);\n\n void publishByIds(Long[] ids);\n\n void unpublishByIds(Long[] ids);\n\n void getResizedTitlePicture(Long id, Integer width, Integer height, OutputStream outputStream) throws IOException;\n}", "@GET(\"/v1/albums/{albumId}\")\r\n void getAlbum( //\r\n @Query(\"apikey\") String apikey, //\r\n @Query(\"pretty\") boolean pretty, //\r\n @Query(\"catalog\") String catalog, //\r\n @Path(\"albumId\") String albumId, //\r\n Callback<AlbumData> callBack);", "public interface BannerService {\n\n public List<Banner> getEntitys();\n public Banner get(int id);\n public int insert(Banner entity);\n public int update(Banner entity);\n public int delete(int id);\n public Banner formEntity(HttpServletRequest request, int id);\n\n}", "public interface AfterSaleService extends BaseService<AfterSale> {\r\n\r\n\r\n void uplaodPicture(Long orderid, MultipartFile[] myavatar) throws IOException;\r\n\r\n List<AfterSale> afterSales(Long orderid);\r\n\r\n}", "public interface IMoviesService{\n String getPath(int Vid);\n Movies getPic(int Vid);\n ArrayList<Movies> search(Map map);\n void views(int Vid);\n void upload(Map map);\n Review review(Map map);\n ArrayList<Movies> getInfo(Map map);\n}", "public interface BannerService {\r\n\r\n List<Banner> queryBanners(Banner record);\r\n\r\n List<String> queryKeywords();\r\n\r\n}", "public interface LastFMInterface {\n\n @GET(\"2.0/\")\n Call<LastFMArtistSearch> searchArtist(@Query(\"method\") String method, //artist.search!!!!\n @Query(\"artist\") String searchString, //search\n @Query(\"limit\") int limit,//5\n @Query(\"api_key\") String key,\n @Query(\"format\") String format);//json\n\n @GET(\"2.0/\")\n Call<LastFMSimilarArtist> similarArtist(@Query(\"method\") String method, //artist.getSimilar!!!!\n @Query(\"artist\") String searchString, //search\n @Query(\"limit\") int limit,\n @Query(\"api_key\") String key,\n @Query(\"format\") String format);//json\n\n @GET(\"2.0/\")\n Call<LastFMAlbumsSearch> topAlbums(@Query(\"method\") String method, //artist.getTopAlbums!!!!\n @Query(\"artist\") String searchString, //search\n @Query(\"limit\") int limit,\n @Query(\"api_key\") String key,\n @Query(\"format\") String format);//json\n\n// @GET(\"2.0/\")\n// Call<LastFMAlbumInfoSearch> albumsInfo(@Query(\"method\") String method, //album.getInfo!!!!\n// @Query(\"mbid\") String mbid, //search\n// @Query(\"api_key\") String key,\n// @Query(\"format\") String format);//json\n}", "public interface ApiService {\n @GET(\"MainQuize.json\")//list\n Call<MainQuizeDao> loadPhotoList();\n}", "public String getAlbumName()\n {\n return albumName;\n }", "@Override\n public void onFailure(Call<List<Album>> call, Throwable t) {\n }", "private void prepareAlbums() {\n int[] covers = new int[]{\n R.drawable.laser,\n R.drawable.shutterstock_sky,\n R.drawable.setalite,\n R.drawable.doctor,\n R.drawable.tower,\n R.drawable.machine,\n R.drawable.finger,\n R.drawable.polymers,\n R.drawable.liver,\n R.drawable.balls,\n R.drawable.phone};\n\n Invention a = new Invention(\"MOBILE LASER SCANNING AND INFRASTRUCTURE MONITORING SYSTEM\", \"Middle East and UAE in particular have experienced a tremendous boom in property and infrastructure development over the last decade. In other cities, the underlying infrastructure available to property developers is typically mapped and documented well before the developer begins his work.\",\n covers[0], \"Apps\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"HUB CONTEST DISTRIBUTED ALGORITHM\", \" We typically take for granted the amount of work needed for a simple phone call to occur between two mobile phones. Behind the scenes, hundreds, if not thousands of messages are communicated between a mobile handset, radio tower, and countless servers to enable your phone call to go smoothly. \",\n covers[1], \"Product Design\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"CLOCK SYNCHRONIZATION OVER COMMUNICATION \", \" In real life, the communication paths from master to slave and reverse are not perfectly symmetric mainly due to dissimilar forward and reverse physical link delays and queuing delays. asymmetry, creates an error in the estimate of the slave clock’s offset from the master\",\n covers[2], \"Table Top Games\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"PATIENT-SPECIFIC SEIZURE CLASSIFICATION\",\"The timely detection of an epileptic seizure to alert the patient is currently not available. The invention is a device that can classify specific seizures of patients. It is realized within a microchip (IC) and can be attached to the patient.\",\n covers[3], \"Software\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"ALTERNATIVE RENEWABLE ENERGY HARVESTING\", \"There has been increased demand to harvest energy from nontraditional alternative energy sources for self-powered sensors chipsets which are located in remote locations and that can operate at extremely low power levels.\",\n covers[4], \"Gadgets\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"TECHNIQUE FOR MOTOR CONTROL OVER PACKET NETWORKS\", \"Many industries rely on motor control systems to physically control automated machines in manufacturing, energy conservation, process control and other important functions. \",\n covers[5], \"Software\",getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"INDOOR WIRELESS FINGERPRINTING TECHNIQUE\",\" Location information has gained significant attention for a variety of outdoor applications thanks to the reliable and popular GPS system. \",\n covers[6], \"Apps\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"POLYMERS AND PLASTICS FROM SULFUR COMPOUND\", \"Plastics are some of the most heavily used materials in our world. From plastic bags, to computer components - they are the back-bone material of our daily lives.\",\n covers[7], \"Video Games\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"FIBER-IN-FIBER BIOARTIFICIAL LIVER DEVICE\", \"Liver is a site for proteins and amino acids production. Once the liver fails, its function is very difficult to replicate. Up to date, there is no approved therapy but human liver transplant - bio artificial liver devices and incubating liver cells are only a short term solution to bridge the time for the patients to the ultimate liver transplant.\",\n covers[8], \"Gadgets\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n a = new Invention(\"COMPACT SUFFIX TREE FOR BINARY PATTERN MATCHING\", \" While the “suffix tree” is an efficient structure to solve many string problems, especially in cloud storages, it requires a large memory space for building and storing the tree structure. \",\n covers[9], \"Apps\", getRandomNumber(1, 30), getRandomNumber(1, 100), getRandomNumber(1, 3000));\n inventionList.add(a);\n\n adapter.notifyDataSetChanged();\n }", "public interface GalleryApiInterface {\n\n @GET(\"/gallery.json\")\n public void getStreams(Callback<List<GalleryImage>> callback);\n}", "@Test\n public void addAlbumTest() throws InvalidResourceRequestException {\n loginAndSetupNewUser(username);\n\n // Add new album, and retrieve the returned id\n Response response = apiClient.addAlbum(albumName, description);\n assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());\n long albumId = gson.fromJson(response.readEntity(String.class), Receipt.class).getReferenceId();\n\n // Check server has record of album\n Album album = resolver.getAlbum(albumId);\n assertEquals(albumName, album.getAlbumName());\n assertEquals(description, album.getDescription());\n }", "public Album() {\n }", "public interface IRDubboProInvestImageService {\n /**\n * searchProInvestHotList\n * 品类网 特殊定制 合并调用 拼 pic 获取url\n @param hotStatus hot表状态\n * @param hot_siteId hot表站点id\n * @param orderType hot排序\n * @param webCategory 分类\n * @param num 显示条数\n * @param oldPicFormat old规格\n * @param newPicFormat new规格\n * @return\n * String\n * @author guoYang\n * @supply\n * @date 2013-8-8 下午3:44:53\n * @exception\n * @since 1.0\n */\n public String searchProInvestHotList(int hotStatus,int hot_siteId,String orderType,String webCategory,int num,\n String oldPicFormat,String newPicFormat);\n}", "public interface GoodsService {\n\n /**\n *获得商品列表 根据商品名查询\n *\n */\n List<Goods> getListGoods(String goodsName);\n\n /**\n * 根据销量排序\n */\n List<Goods> getListOrderBySales(String goodsName);\n\n /**\n * 实现分页显示\n * @param pageParam\n * @return 商品列表\n */\n List<Goods> getPageList(PageParam pageParam);\n\n /**\n * 获取相关商品总数\n * @param pageParam\n * @return\n */\n int getGoodsNum(PageParam pageParam);\n\n}", "public interface BrandService {\n String inquireBrandByShopid(Integer id);\n\n String insertOrUpdateBrand(Brand brand);\n\n String deleteBrandByBid(Integer id);\n\n String insertBrandByExcel(MultipartFile file, Integer id);\n\n String inquireBrandByBid(Integer bid);\n}", "public interface ApiService {\n\t@GET(\"photos\")\n\tCall<List<ApiModel>> getApiData();\n}", "List<Album> getAlbumFromArtiste(Integer artisteId, Integer userId);", "public Album(String albumName)\n {\n photo = new ArrayList<Photo>();\n\n this.albumName = albumName;\n this.totalPics = 0;\n\n }", "public interface BrandService {\n public Pagination getBrandListWithPage(WebParam map);\n\n public List<WebResultMap> getBrandList(WebParam map);\n\n public void addBrand(WebParam map);\n\n public int deleteBrandById(WebParam map);\n\n public int deleteBrandByIds(WebParam map);\n\n public int updateBrandByKey(WebParam map);\n\n public WebResultMap getBrandById(WebParam map);\n}", "Observable<Optional<AlbumInfo>> getAlbum(String albumId, String userId);", "private void removeAlbumFromCollection() {\n //\n }", "public interface BannerService {\n\n void addBanner(BannerDTO bannerDTO) throws Exception;\n\n List<BannerDTO> getBannerList();\n\n void delBanner(String bannerId) throws Exception;\n}", "public interface RestService {\n\n @GET\n Call<String> get(@Url String url, @QueryMap Map<String, Object> params, @HeaderMap Map<String, String> headers);\n\n @FormUrlEncoded\n @POST\n Call<String> post(@Url String url, @FieldMap Map<String, Object> params);\n\n// @Multipart\n// @PUT\n// Call<String> put(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @PUT\n Call<String> put(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @DELETE\n Call<String> delete(@Url String url, @HeaderMap Map<String, String> headers, @QueryMap Map<String, Object> params);\n\n @Streaming\n @GET\n Call<ResponseBody> download(@Url String url, @QueryMap Map<String, Object> params);\n\n @Multipart\n @POST\n Call<String> upload(@Url String url, @Part MultipartBody.Part file);\n\n// @GET\n// Call<SongSearchEntity> getSongSearchList(@Url String url, @QueryMap Map<String, Object> params, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<User> signIn(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @GET\n Call<User> profile(@Url String url, @HeaderMap Map<String, String> headers);\n\n// @Multipart\n// @PUT\n// Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @Part(\"id\") RequestBody id, @Part(\"key\") RequestBody key, @Part(\"value\") RequestBody value);\n//\n// @PUT\n// Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @Multipart\n @PUT\n Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @GET\n Call<SongListEntity> musicbillList(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<SongListDetailEntity> musicbill(@Url String url, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<String> createMusicbill(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @DELETE\n Call<String> deleteMusicbill(@Url String url, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<String> addMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @Multipart\n @PUT\n Call<String> updateMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @DELETE\n Call<String> deleteMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @GET\n Call<SongSearchEntity> getMusic(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<LyricEntity> getLyric(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<String> getSinger(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<ZhiliaoEntity> getVerify(@Url String url, @HeaderMap Map<String, String> headers);\n}", "public interface Gallery {\n\n /**\n * Add the specified art piece to the gallery, replacing an equivalent in the gallery if existing.\n *\n * @param art the art piece to add to the gallery\n */\n void addArt(Art art);\n\n /**\n * Remove the specified art piece from the gallery if found.\n *\n * @param art he art piece to remove from the gallery\n */\n void deleteArt(Art art);\n\n /**\n * Return the collection of art pieces in the gallery, is cannot be modified.\n *\n * @return all the art pieces in the gallery\n */\n Set<Art> getAllArt();\n\n /**\n * Return list of unique artists with art represented in the gallery, in alphabetical order.\n *\n * @return list of artists\n */\n List<String> getArtists();\n\n /**\n * Return all art for the specified artist\n *\n * @param artist the artist for which to retrieve all art pieces\n *\n * @return all the art pieces for the artist\n */\n Set<Art> getArtByArtist(String artist);\n\n /**\n * Return all art pieces created in the gallery within the past year\n *\n * @return all art pieces created in the gallery within the past year\n */\n Set<Art> getRecentArt();\n\n /**\n * Return all art pieces with an asking price in between the specified upper and lower bands.\n *\n * @param upper the upper price band\n * @param lower the lower price band\n *\n * @return all art pieces with an asking price in between the specified upper and lower bands.\n */\n Set<Art> getArtByPrice(Double upper, Double lower);\n}", "@Test\n public void albumsIdPhotosGetTest() {\n Integer id = null;\n List<Photo> response = api.albumsIdPhotosGet(id);\n\n // TODO: test validations\n }", "@Override\r\n\tpublic void createAlbum(Album album) {\n\t\talbumRepository.save(album);\r\n\t\t\r\n\t}", "public interface InstagramService {\n\n @GET(\"/tags/{tag-name}/media/recent\")\n void getRecentMedia(\n @Path(\"tag-name\") String tag,\n @Query(\"client_id\") String clientId,\n Callback<RecentMedia> callback\n );\n\n @GET(\"/tags/{tag-name}/media/recent\")\n void getRecentMedia(\n @Path(\"tag-name\") String tag,\n @Query(\"client_id\") String clientId,\n @Query(\"max_tag_id\") String maxTagId,\n Callback<RecentMedia> callback\n );\n}", "@Override\n\tpublic List<Album> findAllAlbums() {\n\t\treturn _albumDao.findAllAlbums();\n\t}", "public interface HomeImgService extends BaseService {\n\n /**\n * 查询前5个首页图片的数据\n * @return\n */\n List<HomeImg> listHomeImg();\n\n}", "int countByExample(UserAlbumExample example);", "public interface MyFavouriteCollectionsInterface\n{\n /**\n * Return a list of assets that the specified user has added to their favorites list.\n *\n * @param userId userId of user making request.\n * @param startFrom index of the list to start from (0 for start)\n * @param pageSize maximum number of elements to return.\n *\n * @return list of asset details\n *\n * @throws InvalidParameterException one of the parameters is invalid.\n * @throws PropertyServerException there is a problem retrieving information from the property server(s).\n * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.\n */\n List<AssetCollectionMember> getMyAssets(String userId,\n int startFrom,\n int pageSize) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;\n\n\n /**\n * Add an asset to the identified user's list of favorite assets.\n *\n * @param userId userId of user making request.\n * @param assetGUID unique identifier of the asset.\n *\n * @throws InvalidParameterException one of the parameters is invalid.\n * @throws PropertyServerException there is a problem updating information in the property server(s).\n * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.\n */\n void addToMyAssets(String userId,\n String assetGUID) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;\n\n\n /**\n * Remove an asset from identified user's list of favorite assets.\n *\n * @param userId userId of user making request.\n * @param assetGUID unique identifier of the asset.\n *\n * @throws InvalidParameterException one of the parameters is invalid.\n * @throws PropertyServerException there is a problem updating information in the property server(s).\n * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.\n */\n void removeFromMyAssets(String userId,\n String assetGUID) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;\n\n\n /**\n * Return a list of projects that the specified user has added to their favorites list.\n *\n * @param userId userId of user making request.\n * @param startFrom index of the list to start from (0 for start)\n * @param pageSize maximum number of elements to return.\n *\n * @return list of project details\n *\n * @throws InvalidParameterException one of the parameters is invalid.\n * @throws PropertyServerException there is a problem retrieving information from the property server(s).\n * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.\n */\n List<ProjectCollectionMember> getMyProjects(String userId,\n int startFrom,\n int pageSize) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;\n\n\n /**\n * Add a project to the identified user's list of favorite projects.\n *\n * @param userId userId of user making request.\n * @param projectGUID unique identifier of the project.\n *\n * @throws InvalidParameterException one of the parameters is invalid.\n * @throws PropertyServerException there is a problem updating information in the property server(s).\n * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.\n */\n void addToMyProjects(String userId,\n String projectGUID) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;\n\n\n /**\n * Remove a project from identified user's list of favorite projects.\n *\n * @param userId userId of user making request.\n * @param projectGUID unique identifier of the project.\n *\n * @throws InvalidParameterException one of the parameters is invalid.\n * @throws PropertyServerException there is a problem updating information in the property server(s).\n * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.\n */\n void removeFromMyProjects(String userId,\n String projectGUID) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;\n\n\n /**\n * Return a list of communities that the specified user has added to their favorites list.\n *\n * @param userId userId of user making request.\n * @param startFrom index of the list to start from (0 for start)\n * @param pageSize maximum number of elements to return.\n *\n * @return list of community details\n *\n * @throws InvalidParameterException one of the parameters is invalid.\n * @throws PropertyServerException there is a problem retrieving information from the property server(s).\n * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.\n */\n List<CommunityCollectionMember> getMyCommunities(String userId,\n int startFrom,\n int pageSize) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;\n\n\n /**\n * Add a community to the identified user's list of favorite communities.\n *\n * @param userId userId of user making request.\n * @param communityGUID unique identifier of the community.\n *\n * @throws InvalidParameterException one of the parameters is invalid.\n * @throws PropertyServerException there is a problem updating information in the property server(s).\n * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request.\n */\n void addToMyCommunities(String userId,\n String communityGUID) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;\n\n\n /**\n * Remove a community from identified user's list of favorite communities.\n *\n * @param userId userId of user making request.\n * @param communityGUID unique identifier of the community.\n *\n * @throws InvalidParameterException one of the parameters is invalid\n * @throws PropertyServerException there is a problem updating information in the property server(s)\n * @throws UserNotAuthorizedException the requesting user is not authorized to issue this request\n */\n void removeFromMyCommunities(String userId,\n String communityGUID) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;\n\n}", "public AssetsService() {\r\n }", "public interface WallpaperApi {\n @GET(\"api.php?latest\")\n Call<ImageList> getLastest();\n\n @GET(\"api.php?cat_list\")\n Call<CategoryList> getCategory();\n\n @GET(\"api.php\")\n Call<ImageList> getCategoryItem(@Query(\"cat_id\") String catId);\n}", "public interface ItemService {\n /**\n * 根据商品Id查询详情\n *\n * @param itemId 商品Id\n * @return 商品\n */\n Items queryItemById(String itemId);\n\n /**\n * 根据商品Id查询商品图片列表\n *\n * @param itemId 商品Id\n * @return 商品图片\n */\n List<ItemsImg> queryItemImageList(String itemId);\n\n /**\n * 根据商品Id查询商品规格\n *\n * @param itemId 商品Id\n * @return 商品规格\n */\n List<ItemsSpec> queryItemSpecList(String itemId);\n\n /**\n * 根据商品Id查询商品参数\n *\n * @param itemId 商品Id\n * @return 商品参数\n */\n ItemsParam queryItemParam(String itemId);\n\n /**\n * 根据商品Id查询商品评价\n *\n * @param itemId 商品Id\n * @return 商品评价\n */\n CommentLevelCountVO queryCommentCount(String itemId);\n\n /**\n * 根据商品Id查询商品的评价(分页)\n *\n * @param itemId 商品Id\n * @param level 等级\n * @return 商品评价\n */\n PagingGridVO queryPagingComment(String itemId, int level, Integer page, Integer pageSize);\n\n /**\n * 搜索商品列表\n *\n * @param keyword 关键字\n * @param sort 排序字段\n * @param page 当前页\n * @param pageSize 每页显示的记录数\n */\n PagingGridVO queryItem(String keyword, String sort, Integer page, Integer pageSize);\n\n\n /**\n * 搜索商品列表\n */\n PagingGridVO queryItem(Integer categoryId, String sort, Integer page, Integer pageSize);\n\n /**\n * 根据规格ids查询最新的购物车中的商品数据(用于刷新渲染购物车中的商品数据)\n */\n List<ShopCartVO> queryItemsBySpecIds(String specIds);\n\n /**\n * 根据商品规格Id,获取规格对象的具体信息\n *\n * @param specId 商品规格Id\n * @return 规格对象\n */\n ItemsSpec queryItemSpecById(String specId);\n\n /**\n * 根据商品Id,获得商品图片主图url\n *\n * @param itemId 商品Id\n * @return 商品图片主图url\n */\n ItemsImg queryItemMainImageById(String itemId);\n}", "public interface ImageUploadService {\n\n public ResponseInfo uploadFile(UploadFileVo uploadFileVo) ;\n}", "public interface SetlistService {\n String BASE_API_URL = \"http://api.setlist.fm/rest/0.1/\";\n String NOT_FOUND_MESSAGE = \"Not Found\";\n\n @GET(\"search/setlists\")\n Call<Setlists> searchSetlists(@Query(\"artistName\") String artist,\n @Query(\"cityName\") String city,\n @Query(\"venueName\") String venue,\n @Query(\"date\") String date,\n @Query(\"year\") String year,\n @Query(\"tour\") String tour,\n @Query(\"p\") int pageNo);\n\n @GET(\"search/artists\")\n Call<Artists> searchArtist(@Query(\"artistName\") String artist, @Query(\"p\") int pageNo);\n\n @GET\n Call<Setlists> getSetlistsByArtist(@Url String url, @Query(\"p\") int pageNo);\n}", "public interface MetaInformationService extends BasicEcomService{\n\n public String listMetaInformationTypesForPage(String page);\n public Integer getTotalPagesForMetaInformationTypes();\n public Integer getTotalPagesForSearchedMetaInformationTypes(String metaType);\n public String listSearchedMetaInformationTypesForPage(String metaType,String page);\n\n\n}", "public interface AuthorInfoService {\n\t\n\t/**\n\t * Retrieves an author's profile for the given authorId\n\t * @param authorId Id of an author\n\t * @return author's profile information \n\t */\n\tpublic Author getAuthorProfile(int authorId);\n\t\n\t/**\n\t * Retrieves a list of published papers by author for the given authorId\n\t * @param authorId Id of an author\n\t * @return list of published papers\n\t */\n\t\n\tpublic List<AuthorPaper> getAuthorPapers(int authorId) throws SQLException;\n\t\n\t/**\n\t * Retrieves a list of conferences attended by author for the given authorId\n\t * @param authorId Id of an author\n\t * @return list of conference papers\n\t */\n\tpublic List<Conference> getAuthorConferenceServed(int authorId) throws SQLException;\n\t\n}", "public interface UploadPhotosView extends MvpView {\n\n /**\n * 提交数据\n * 个人图片\n */\n void commitData();\n\n /**\n * 提交数据成功\n */\n void commitDataSuccess();\n void showLoading();\n //void showError();\n\n void uploadPhotos();\n\n /**\n * photoModel指向的图片上传成功\n */\n void onUploadSuccess();\n\n /**\n * photoModel指向的图片上传失败\n\n */\n void onUploadError();\n\n //照片不存在\n void noPicFound(String path);\n\n void updateProgress(long current, long total);\n}", "public String getAlbum() {\n\t\treturn album;\r\n\t}", "@GET @Path(\"/id/{id}\")\n public Album findById(@PathParam(\"id\") String id) {\n return null;\n }", "public ArrayList <ITunesItem> getAlbums(String searchText) throws IOException\n\t{\n\t\tsearchText = searchText.replace(\" \", \"+\");\n\t\tString query = \"term=\" + searchText + \"&entity=album&attribute=albumTerm\";\n\t\treturn searchQuery(query);\n\t}", "@Override\r\n\tpublic void listAlbums() {\n\t\tString AlbumNames=\"\";\r\n\t\tList<IAlbum> album1=model.getUser(userId).getAlbums();\r\n\t\tif(album1.size()==0){\r\n\t\t\tString error=\"No albums exist for user \"+userId+\"\";\r\n\t\t\tsetErrorMessage(error);\r\n\t\t\tshowError();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tIAlbum temp=album1.get(0);\r\n\t\t\r\n\t\tfor(int i=0; i<album1.size(); i++){\r\n\t\t\ttemp=album1.get(i);\r\n\t\t\t/*accessing the photo list now*/\r\n\t\t\tList<IPhoto> photoList=temp.getPhotoList();\r\n\t\t\tif(photoList.size()==0){\r\n\t\t\t\tAlbumNames=AlbumNames+\"\"+album1.get(i).getAlbumName()+\" number of photos: 0\\n\";\r\n\t\t\t}\r\n\t\t\t/*Let's compare*/\r\n\t\t\telse{Date lowest=photoList.get(0).getDate();\r\n\t\t\tDate highest=photoList.get(0).getDate();\r\n\t\t\tfor(int j=0;j<photoList.size();j++){\r\n\t\t\t\tif(photoList.get(j).getDate().before(lowest)){\r\n\t\t\t\t\tlowest=photoList.get(j).getDate();\r\n\t\t\t\t}\r\n\t\t\t\tif(photoList.get(j).getDate().after(highest)){\r\n\t\t\t\t\thighest=photoList.get(j).getDate();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/**/\r\n\t\t\tif(i==album1.size()-1){\r\n\t\t\t\t/*Do I even need this?*/\r\n\t\t\t\tAlbumNames=AlbumNames+\"\"+album1.get(i).getAlbumName()+\" number of photos: \"+album1.get(i).getAlbumSize()+\", \"+lowest+\" - \"+highest+\"\";\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\tAlbumNames=AlbumNames+\"\"+album1.get(i).getAlbumName()+\" number of photos: \"+album1.get(i).getAlbumSize()+\", \"+lowest+\" - \"+highest+\"\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t}\r\n\t\tsetErrorMessage(AlbumNames);\r\n\t\tshowError();\r\n\t\t\r\n\r\n\t}", "public List<AlbumDTO> getAlbumList()\n/* */ {\n/* 90 */ return this.albumList;\n/* */ }", "public interface MusicService {\n Music getMusicById(Integer id);\n}", "public interface SoundcloudService {\n\n static final String CLIENT_ID=\"87012262b10d7bbb14bc0f1251523f82\";\n\n @GET(\"/tracks?client_id=\"+CLIENT_ID)\n public void searchSongs(@Query(\"q\") String query, Callback<List<Track>> cb);\n\n @GET(\"/tracks?client_id=\"+CLIENT_ID)\n public void mostRecentSongs(@Query(\"created_at[from]\") String dateFrom, Callback<List<Track>> cb);\n}", "List<AlbumImage> selectByAlbum(Integer albumId);", "public interface PhotoService {\n Photo save(Photo photo);\n\n List<Photo> findAll();\n\n List<Photo> findByUser(User user);\n\n Photo findByPhotoId(Long photoId);\n\n}", "public interface LibraryService {\n\n /*\n\n 1.Search--Keyword\n 2.Get List\n A.Order by created time\n B.Refresh and load next page\n 3.Get specific one\n\n */\n\n @GET(\"classes/Library\")\n Observable<BaseResponse<Library>> getLibrary(@QueryMap Map<String, String> parametersMap);\n\n /*\n curl -X PUT \\\n -H \"X-LC-Id: OOhkF87ffBYBHmvph465ApmV-gzGzoHsz\" \\\n -H \"X-LC-Key: OkaU2qxpo1fbHPtc9o7yQVgM\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"upvotes\":{\"__op\":\"Increment\",\"amount\":1}}' \\\n https://api.leancloud.cn/1.1/classes/Post/558e20cbe4b060308e3eb36c\n */\n @PUT(\"classes/Library/{objId}\")\n Observable<ResponseBody> increaseCount(@Path(\"objId\") String objId, @Body CountIncrement countIncrement);\n\n \n}", "public interface TypiCodeServices {\n @GET(\"/photos\")\n Call<ArrayList<Model>> data();\n}", "public interface LastFmApi {\n\n /**\n * @param callingMethod - API method\n * @param chosenCountry - country selected by the user from dialog (hardcoded)\n * @param artistsPerPage - number of requested artists\n * @param pageNumber - number of page (for pagination)\n */\n @GET(\"2.0/\")\n Call<GeoArtistData> getTopArtists(\n @Query(\"method\") String callingMethod,\n @Query(\"country\") String chosenCountry,\n @Query(\"limit\") String artistsPerPage,\n @Query(\"page\") String pageNumber);\n\n /**\n * @param callingMethod - API method\n * @param artist - artist selected by the user from list\n * @param albumsPerPage - number of requested albums\n * @param pageNumber - number of page (for pagination)\n */\n @GET(\"2.0/\")\n Call<ArtistInfoData> getTopAlbums(\n @Query(\"method\") String callingMethod,\n @Query(\"artist\") String artist,\n @Query(\"limit\") String albumsPerPage,\n @Query(\"page\") String pageNumber);\n}" ]
[ "0.7655614", "0.7329775", "0.7316184", "0.69142354", "0.67680764", "0.65913546", "0.6581699", "0.6547514", "0.6525774", "0.6463506", "0.64251363", "0.6355181", "0.63094276", "0.62835443", "0.6267261", "0.6260835", "0.6212444", "0.6188283", "0.615743", "0.6128053", "0.6127096", "0.60683227", "0.6048226", "0.604714", "0.60394055", "0.60340667", "0.6023976", "0.5993819", "0.59894496", "0.5982796", "0.5979482", "0.5953557", "0.59325033", "0.59124416", "0.5885571", "0.5876384", "0.5871094", "0.5867701", "0.58619803", "0.58515054", "0.5848953", "0.5841359", "0.58287174", "0.5825675", "0.5809453", "0.57915163", "0.5779621", "0.57740074", "0.5763423", "0.5761797", "0.57615685", "0.57603943", "0.574538", "0.57319015", "0.57261187", "0.57189226", "0.57186013", "0.5717888", "0.5716857", "0.5715077", "0.5712299", "0.56990594", "0.56969106", "0.56967396", "0.5696621", "0.5686314", "0.56756026", "0.56714934", "0.5669919", "0.56674707", "0.5664815", "0.5664364", "0.56631273", "0.56610346", "0.5648229", "0.5636496", "0.56359696", "0.56353617", "0.5635321", "0.56230557", "0.5620426", "0.5614083", "0.5613556", "0.5611295", "0.5610749", "0.56072813", "0.56030905", "0.5598348", "0.5594546", "0.5590684", "0.5590467", "0.55872333", "0.5579909", "0.5578945", "0.5575264", "0.55727863", "0.55711377", "0.55588865", "0.5556276", "0.55454326" ]
0.6287096
13
MyImage common service methods
@Override public MyImage createMyImage(MyImage myimage) { return myimg.createMyImage(myimage); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ImageService extends Remote {\n\n public static final int IMG_SIZE_ORIGINAL = 0;\n public static final int IMG_SIZE_176_220_SMALL = 1;\n public static final int IMG_SIZE_330_220 = 2;\n public static final int IMG_SIZE_240_320_SMALL = 3;\n public static final int IMG_SIZE_120_67 = 4;\n\n public static final int IMG_SIZE_320_480_SMALL = 5;\n public static final int IMG_SIZE_170_121 = 6;\n public static final int IMG_SIZE_480_640_SMALL = 7;\n public static final int IMG_SIZE_800_600 = 8;\n\n public static final String SERVICE_NAME = \"ImageService\";\n\n public byte[] getBytes(long imageId, int imageSize) throws RemoteException;\n\n public byte[] getBytesQuiet(long imageId, int imageSize) throws RemoteException;\n\n public void removeImage(long imageId) throws RemoteException;\n\n public byte[] scale(byte[] data, int imageSize) throws RemoteException;\n\n public boolean addImage(long imageId, byte[] bytes) throws RemoteException;\n}", "public interface ImageStatusService {\n\n /**\n * 状态变化处理操作\n */\n void changeHandle(String id, Integer type);\n}", "public interface ImageSearchService {\n\n /**\n * Register an image into the search instance.\n *\n * @param imageData Image data in JPEG or PNG format.\n * @param imageType Image format.\n * @param uuid Unique identifier of the image.\n */\n void register(byte[] imageData, ObjectImageType imageType, String uuid);\n\n /**\n * Un-register an image from the search instance.\n *\n * @param uuid Unique identifier of the image.\n */\n void unregister(String uuid);\n\n /**\n * Find all images similar to the given one.\n *\n * @param imageData Image to match with registered ones in the search instance.\n * @param objectRegion object region to search.\n * @return Found images UUIDs and raw response.\n */\n ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);\n\n /**\n * Check the image search configuration is correct by making a fake search request.\n *\n * @param configuration Configuration to check.\n */\n void checkImageSearchConfiguration(Configuration configuration) throws InvalidConfigurationException;\n}", "public interface ImageService {\n public long insert(ImageEntity entity);\n\n public ImageEntity query(long id);\n\n public List<ImageEntity> findTiles(long id);\n\n public boolean update(ImageEntity entity);\n\n public boolean delete(long id);\n}", "public abstract Image getImage();", "public abstract Image getImage();", "public mService() {\n super(\"fetchImageService\");\n }", "public interface ImageMetadataService {\n\n List<ArtistDTO> getArtistsByPrediction(String name, String name2, String surname);\n\n List<ImageTypeDTO> getImageTypesByPrediction(String name);\n\n UploadImageMetadataDTO saveMetadata(UploadImageMetadataDTO uploadImageMetadataDTO);\n\n List<ImageDTO> getTop10Images(String username, String title);\n\n List<ImageDTO> getAllUserImages(String username);\n\n List<ImageDTO> searchImagesByCriteria(SearchImageCriteriaDTO searchImageCriteriaDTO);\n\n ImageDTO updateImageMetadata(ImageDTO imageDTO);\n\n List<ImageDTO> getImagesTop50();\n\n void rateImage(RateImageDTO rateImageDTO);\n\n List<ImageDTO> getAllImages();\n}", "public interface CaptureImgService {\n\n String captureImg(HttpServletRequest re, String url, String size) throws IOException;\n}", "public interface ShowCaseImageService {\n List<ImageShowCaseModel> getImageListByCaseId(Integer showCaseId);\n List<ImageShowCaseModel> getLimitImageListByCaseId(Integer showCaseId);\n}", "public interface Image {\n /**\n * @return the image ID\n */\n String getId();\n\n /**\n * @return the image ID, or null if not present\n */\n String getParentId();\n\n /**\n * @return Image create timestamp\n */\n long getCreated();\n\n /**\n * @return the image size\n */\n long getSize();\n\n /**\n * @return the image virtual size\n */\n long getVirtualSize();\n\n /**\n * @return the labels assigned to the image\n */\n Map<String, String> getLabels();\n\n /**\n * @return the names associated with the image (formatted as repository:tag)\n */\n List<String> getRepoTags();\n\n /**\n * @return the digests associated with the image (formatted as repository:tag@sha256:digest)\n */\n List<String> getRepoDigests();\n}", "private ImageUtils() {}", "public interface Images extends ClientBundle {\n\n\t\t@Source(\"gr/grnet/pithos/resources/mimetypes/document.png\")\n\t\tImageResource fileContextMenu();\n\n\t\t@Source(\"gr/grnet/pithos/resources/doc_versions.png\")\n\t\tImageResource versions();\n\n\t\t@Source(\"gr/grnet/pithos/resources/groups22.png\")\n\t\tImageResource sharing();\n\n\t\t@Source(\"gr/grnet/pithos/resources/border_remove.png\")\n\t\tImageResource unselectAll();\n\n\t\t@Source(\"gr/grnet/pithos/resources/demo.png\")\n\t\tImageResource viewImage();\n\n @Source(\"gr/grnet/pithos/resources/folder_new.png\")\n ImageResource folderNew();\n\n @Source(\"gr/grnet/pithos/resources/folder_outbox.png\")\n ImageResource fileUpdate();\n\n @Source(\"gr/grnet/pithos/resources/view_text.png\")\n ImageResource viewText();\n\n @Source(\"gr/grnet/pithos/resources/folder_inbox.png\")\n ImageResource download();\n\n @Source(\"gr/grnet/pithos/resources/trash.png\")\n ImageResource emptyTrash();\n\n @Source(\"gr/grnet/pithos/resources/refresh.png\")\n ImageResource refresh();\n\n /**\n * Will bundle the file 'editcut.png' residing in the package\n * 'gr.grnet.pithos.web.resources'.\n *\n * @return the image prototype\n */\n @Source(\"gr/grnet/pithos/resources/editcut.png\")\n ImageResource cut();\n\n /**\n * Will bundle the file 'editcopy.png' residing in the package\n * 'gr.grnet.pithos.web.resources'.\n *\n * @return the image prototype\n */\n @Source(\"gr/grnet/pithos/resources/editcopy.png\")\n ImageResource copy();\n\n /**\n * Will bundle the file 'editpaste.png' residing in the package\n * 'gr.grnet.pithos.web.resources'.\n *\n * @return the image prototype\n */\n @Source(\"gr/grnet/pithos/resources/editpaste.png\")\n ImageResource paste();\n\n /**\n * Will bundle the file 'editdelete.png' residing in the package\n * 'gr.grnet.pithos.web.resources'.\n *\n * @return the image prototype\n */\n @Source(\"gr/grnet/pithos/resources/editdelete.png\")\n ImageResource delete();\n\n /**\n * Will bundle the file 'translate.png' residing in the package\n * 'gr.grnet.pithos.web.resources'.\n *\n * @return the image prototype\n */\n @Source(\"gr/grnet/pithos/resources/translate.png\")\n ImageResource selectAll();\n \n @Source(\"gr/grnet/pithos/resources/internet.png\")\n ImageResource internet();\n }", "public interface PhotoService {\n\n /**\n * Add saved photo to a given user.\n * @param user current user's model object\n * @param photo photo model object\n */\n void addPhoto(User user, Photo photo);\n\n /**\n * Remove saved photo from a given user.\n * @param user current user's model object.\n * @param photoId NASA's API photo identifier.\n */\n void removePhoto(User user, String photoId);\n}", "public interface Common {\n void onLoadAdImage(boolean isSuccess, ImageInfo imageInfo);\n}", "public interface IMainScm {\n\n void getImage(String url,ImageView view);\n\n void getImagePath(HttpListener<String[]> httpListener);\n}", "public interface ImageLoader {\n\n}", "public interface Image {\n\n /**\n * Get number of pixels horizontally\n *\n * @return int number of pixels horizontally\n */\n int getWidth();\n\n /**\n * Get number of pixels vertically\n *\n * @return int number of pixels vertically\n */\n int getHeight();\n\n /**\n * Get the red value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the red value\n */\n int getRed(int x, int y);\n\n\n /**\n * Get the green value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the green value\n */\n int getGreen(int x, int y);\n\n /**\n * Get the blue value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @return the blue value\n */\n int getBlue(int x, int y);\n\n /**\n * Set the red value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setRed(int x, int y, int value);\n\n\n /**\n * Set the green value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setGreen(int x, int y, int value);\n\n /**\n * Set the blue value at the given pixel\n *\n * @param x coordinate of the pixel\n * @param y coordinate of the pixel\n * @param value of the pixel\n */\n void setBlue(int x, int y, int value);\n}", "void ProcessImage() {\n DoDescribe();\n }", "public interface IImageInputBoundary {\n\n List<ImageResponseModel> GetImagesByCategory(ImageRequestModel requestModel);\n List<ImageResponseModel> GetImagesByComposition(ImageRequestModel requestModel);\n}", "public interface ImageService {\n\n void saveImageFile(Long recipeId, MultipartFile imageFile);\n}", "public interface IRDubboProInvestImageService {\n /**\n * searchProInvestHotList\n * 品类网 特殊定制 合并调用 拼 pic 获取url\n @param hotStatus hot表状态\n * @param hot_siteId hot表站点id\n * @param orderType hot排序\n * @param webCategory 分类\n * @param num 显示条数\n * @param oldPicFormat old规格\n * @param newPicFormat new规格\n * @return\n * String\n * @author guoYang\n * @supply\n * @date 2013-8-8 下午3:44:53\n * @exception\n * @since 1.0\n */\n public String searchProInvestHotList(int hotStatus,int hot_siteId,String orderType,String webCategory,int num,\n String oldPicFormat,String newPicFormat);\n}", "private RoundImage img(String imgAddress) {\n return new RoundImage(\"frontend/src/images/books.png\",\"64px\",\"64px\");\n }", "protected abstract void setupImages(Context context);", "public Image getOne();", "public interface Image {\n public String getPath();\n\n public String getFormat();\n\n public String getWidth();\n\n public String getHeight();\n\n}", "private Images() {}", "protected abstract Image loadImage();", "public interface IFullWidthImageService extends IBaseEntityManager<FullWidthImage> {\n\n FullWidthImage findByUri(String uri);\n}", "public DownloadImageService() {\n\n super(\"DownloadImageService\");\n }", "public interface ImageView {\n void addImages(List<ImageBean> list);\n void showProgress();\n void hideProgress();\n void showLoadFailMsg();\n}", "public interface ImageUploadService {\n\n public ResponseInfo uploadFile(UploadFileVo uploadFileVo) ;\n}", "abstract public String imageUrl ();", "public interface HomeImgService extends BaseService {\n\n /**\n * 查询前5个首页图片的数据\n * @return\n */\n List<HomeImg> listHomeImg();\n\n}", "public interface ImageServer extends Remote {\n\n /**\n * Returns the identifier of the remote image. This method should be\n * called to return an identifier before any other methods are invoked.\n * The same ID must be used in all subsequent references to the remote\n * image.\n */\n Long getRemoteID() throws RemoteException;\n\n /**\n * Disposes of any resouces allocated to the client object with\n * the specified ID.\n */\n void dispose(Long id) throws RemoteException;\n\n /**\n * Increments the reference count for this id, i.e. increments the\n * number of RMIServerProxy objects that currently reference this id.\n */\n void incrementRefCount(Long id) throws RemoteException;\n\n\n /// Methods Common To Rendered as well as Renderable modes.\n\n\n /**\n * Gets a property from the property set of this image.\n * If the property name is not recognized, java.awt.Image.UndefinedProperty\n * will be returned.\n *\n * @param id An ID for the source which must be unique across all clients.\n * @param name the name of the property to get, as a String.\n * @return a reference to the property Object, or the value\n * java.awt.Image.UndefinedProperty.\n */\n Object getProperty(Long id, String name) throws RemoteException;\n\n /**\n * Returns a list of names recognized by getProperty(String).\n *\n * @return an array of Strings representing proeprty names.\n */\n String [] getPropertyNames(Long id) throws RemoteException;\n\n /**\n * Returns a list of names recognized by getProperty().\n *\n * @return an array of Strings representing property names.\n */\n String[] getPropertyNames(String opName) throws RemoteException;\n\n\n /// Rendered Mode Methods\n\n\n /** Returns the ColorModel associated with this image. */\n SerializableState getColorModel(Long id) throws RemoteException;\n\n /** Returns the SampleModel associated with this image. */\n SerializableState getSampleModel(Long id) throws RemoteException;\n\n /** Returns the width of the image on the ImageServer. */\n int getWidth(Long id) throws RemoteException;\n\n /** Returns the height of the image on the ImageServer. */\n int getHeight(Long id) throws RemoteException;\n\n /**\n * Returns the minimum X coordinate of the image on the ImageServer.\n */\n int getMinX(Long id) throws RemoteException;\n\n /**\n * Returns the minimum Y coordinate of the image on the ImageServer.\n */\n int getMinY(Long id) throws RemoteException;\n\n /** Returns the number of tiles across the image. */\n int getNumXTiles(Long id) throws RemoteException;\n\n /** Returns the number of tiles down the image. */\n int getNumYTiles(Long id) throws RemoteException;\n\n /**\n * Returns the index of the minimum tile in the X direction of the image.\n */\n int getMinTileX(Long id) throws RemoteException;\n\n /**\n * Returns the index of the minimum tile in the Y direction of the image.\n */\n int getMinTileY(Long id) throws RemoteException;\n\n /** Returns the width of a tile in pixels. */\n int getTileWidth(Long id) throws RemoteException;\n\n /** Returns the height of a tile in pixels. */\n int getTileHeight(Long id) throws RemoteException;\n\n /** Returns the X offset of the tile grid relative to the origin. */\n int getTileGridXOffset(Long id) throws RemoteException;\n\n /** Returns the Y offset of the tile grid relative to the origin. */\n int getTileGridYOffset(Long id) throws RemoteException;\n\n /**\n * Returns tile (x, y). Note that x and y are indices into the\n * tile array, not pixel locations. Unlike in the true RenderedImage\n * interface, the Raster that is returned should be considered a copy.\n *\n * @param id An ID for the source which must be unique across all clients.\n * @param x the x index of the requested tile in the tile array\n * @param y the y index of the requested tile in the tile array\n * @return a copy of the tile as a Raster.\n */\n SerializableState getTile(Long id, int x, int y) throws RemoteException;\n\n /**\n * Compresses tile (x, y) and returns the compressed tile's contents\n * as a byte array. Note that x and y are indices into the\n * tile array, not pixel locations.\n *\n * @param id An ID for the source which must be unique across all clients.\n * @param x the x index of the requested tile in the tile array\n * @param y the y index of the requested tile in the tile array\n * @return a byte array containing the compressed tile contents.\n */\n byte[] getCompressedTile(Long id, int x, int y) throws RemoteException;\n\n /**\n * Returns the entire image as a single Raster.\n *\n * @return a SerializableState containing a copy of this image's data.\n */\n SerializableState getData(Long id) throws RemoteException;\n\n /**\n * Returns an arbitrary rectangular region of the RenderedImage\n * in a Raster. The rectangle of interest will be clipped against\n * the image bounds.\n *\n * @param id An ID for the source which must be unique across all clients.\n * @param bounds the region of the RenderedImage to be returned.\n * @return a SerializableState containing a copy of the desired data.\n */\n SerializableState getData(Long id, Rectangle bounds) \n\tthrows RemoteException;\n\n /**\n * Returns the same result as getData(Rectangle) would for the\n * same rectangular region.\n */\n SerializableState copyData(Long id, Rectangle bounds)\n\tthrows RemoteException;\n\n /**\n * Creates a RenderedOp on the server side with a parameter block\n * empty of sources. The sources are set by separate calls depending\n * upon the type and serializabilty of the source.\n */\n\n void createRenderedOp(Long id, String opName,\n\t\t\t ParameterBlock pb,\n\t\t\t SerializableState hints) throws RemoteException;\n\n /**\n * Calls for Rendering of the Op and returns true if the RenderedOp\n * could be rendered else false\n */\n boolean getRendering(Long id) throws RemoteException;\n\n /**\n * Retrieve a node from the hashtable.\n */\n RenderedOp getNode(Long id) throws RemoteException;\n\n /**\n * Sets the source of the image as a RenderedImage on the server side\n */\n void setRenderedSource(Long id, RenderedImage source, int index)\n\tthrows RemoteException;\n\n /**\n * Sets the source of the image as a RenderedOp on the server side\n */\n void setRenderedSource(Long id, RenderedOp source, int index)\n\tthrows RemoteException;\n\n /**\n * Sets the source of the image which is on the same\n * server\n */\n void setRenderedSource(Long id, Long sourceId, int index)\n\tthrows RemoteException;\n\n /**\n * Sets the source of the image which is on a different\n * server\n */\n void setRenderedSource(Long id, Long sourceId, String serverName,\n\t\t\t String opName, int index) throws RemoteException;\n\n\n /// Renderable mode methods\n\n\n /** \n * Gets the minimum X coordinate of the rendering-independent image\n * stored against the given ID.\n *\n * @return the minimum X coordinate of the rendering-independent image\n * data.\n */\n float getRenderableMinX(Long id) throws RemoteException;\n\n /** \n * Gets the minimum Y coordinate of the rendering-independent image\n * stored against the given ID.\n *\n * @return the minimum X coordinate of the rendering-independent image\n * data.\n */\n float getRenderableMinY(Long id) throws RemoteException;\n\n /** \n * Gets the width (in user coordinate space) of the \n * <code>RenderableImage</code> stored against the given ID.\n *\n * @return the width of the renderable image in user coordinates.\n */\n float getRenderableWidth(Long id) throws RemoteException;\n \n /**\n * Gets the height (in user coordinate space) of the \n * <code>RenderableImage</code> stored against the given ID.\n *\n * @return the height of the renderable image in user coordinates.\n */\n float getRenderableHeight(Long id) throws RemoteException;\n\n /**\n * Creates a RenderedImage instance of this image with width w, and\n * height h in pixels. The RenderContext is built automatically\n * with an appropriate usr2dev transform and an area of interest\n * of the full image. All the rendering hints come from hints\n * passed in.\n *\n * <p> If w == 0, it will be taken to equal\n * Math.round(h*(getWidth()/getHeight())).\n * Similarly, if h == 0, it will be taken to equal\n * Math.round(w*(getHeight()/getWidth())). One of\n * w or h must be non-zero or else an IllegalArgumentException \n * will be thrown.\n *\n * <p> The created RenderedImage may have a property identified\n * by the String HINTS_OBSERVED to indicate which RenderingHints\n * were used to create the image. In addition any RenderedImages\n * that are obtained via the getSources() method on the created\n * RenderedImage may have such a property.\n *\n * @param w the width of rendered image in pixels, or 0.\n * @param h the height of rendered image in pixels, or 0.\n * @param hints a RenderingHints object containg hints.\n * @return a RenderedImage containing the rendered data.\n */\n RenderedImage createScaledRendering(Long id, \n\t\t\t\t\tint w, \n\t\t\t\t\tint h, \n\t\t\t\t\tSerializableState hintsState) \n\tthrows RemoteException;\n \n /** \n * Returnd a RenderedImage instance of this image with a default\n * width and height in pixels. The RenderContext is built\n * automatically with an appropriate usr2dev transform and an area\n * of interest of the full image. The rendering hints are\n * empty. createDefaultRendering may make use of a stored\n * rendering for speed.\n *\n * @return a RenderedImage containing the rendered data.\n */\n RenderedImage createDefaultRendering(Long id) throws RemoteException;\n \n /** \n * Creates a RenderedImage that represented a rendering of this image\n * using a given RenderContext. This is the most general way to obtain a\n * rendering of a RenderableImage.\n *\n * <p> The created RenderedImage may have a property identified\n * by the String HINTS_OBSERVED to indicate which RenderingHints\n * (from the RenderContext) were used to create the image.\n * In addition any RenderedImages\n * that are obtained via the getSources() method on the created\n * RenderedImage may have such a property.\n *\n * @param renderContext the RenderContext to use to produce the rendering.\n * @return a RenderedImage containing the rendered data.\n */\n RenderedImage createRendering(Long id, \n\t\t\t\t SerializableState renderContextState) \n\tthrows RemoteException;\n\n /**\n * Creates a RenderableOp on the server side with a parameter block\n * empty of sources. The sources are set by separate calls depending\n * upon the type and serializabilty of the source.\n */\n void createRenderableOp(Long id, String opName, ParameterBlock pb)\n\tthrows RemoteException;\n\n /**\n * Calls for rendering of a RenderableOp with the given SerializableState\n * which should be a RenderContextState.\n */\n Long getRendering(Long id, SerializableState rcs) throws RemoteException;\n\n /**\n * Sets the source of the image which is on the same\n * server\n */\n void setRenderableSource(Long id, Long sourceId, int index)\n\tthrows RemoteException;\n\n /**\n * Sets the source of the image which is on a different\n * server\n */\n void setRenderableSource(Long id, Long sourceId, String serverName,\n\t\t\t String opName, int index) throws RemoteException;\n\n /**\n * Sets the source of the operation refered to by the supplied \n * <code>id</code> to the <code>RenderableRMIServerProxy</code>\n * that exists on the supplied <code>serverName</code> under the\n * supplied <code>sourceId</code>. \n */\n void setRenderableRMIServerProxyAsSource(Long id,\n\t\t\t\t\t Long sourceId, \n\t\t\t\t\t String serverName,\n\t\t\t\t\t String opName,\n\t\t\t\t\t int index) throws RemoteException;\n\n /**\n * Sets the source of the image as a RenderableOp on the server side.\n */\n void setRenderableSource(Long id, RenderableOp source,\n\t\t\t int index) throws RemoteException;\n\n /**\n * Sets the source of the image as a RenderableImage on the server side.\n */\n void setRenderableSource(Long id, SerializableRenderableImage source,\n\t\t\t int index) throws RemoteException;\n\n /**\n * Sets the source of the image as a RenderedImage on the server side\n */\n void setRenderableSource(Long id, RenderedImage source, int index)\n\tthrows RemoteException;\n\n /**\n * Maps the RenderContext for the remote Image\n */\n SerializableState mapRenderContext(int id, Long nodeId,\n\t\t\t\t String operationName,\n\t\t\t\t SerializableState rcs)\n\tthrows RemoteException;\n\n /**\n * Gets the Bounds2D of the specified Remote Image\n */\n SerializableState getBounds2D(Long nodeId, String operationName)\n\tthrows RemoteException;\n\n /**\n * Returns <code>true</code> if successive renderings with the same\n * arguments may produce different results for this opName\n *\n * @return <code>false</code> indicating that the rendering is static.\n */\n public boolean isDynamic(String opName) throws RemoteException;\n\n /**\n * Returns <code>true</code> if successive renderings with the same\n * arguments may produce different results for this opName\n *\n * @return <code>false</code> indicating that the rendering is static.\n */\n public boolean isDynamic(Long id) throws RemoteException;\n\n /**\n * Gets the operation names supported on the Server\n */\n String[] getServerSupportedOperationNames() throws RemoteException;\n\n /**\n * Gets the <code>OperationDescriptor</code>s of the operations\n * supported on this server.\n */\n List getOperationDescriptors() throws RemoteException;\n\n /**\n * Calculates the region over which two distinct renderings\n * of an operation may be expected to differ.\n *\n * <p> The class of the returned object will vary as a function of\n * the nature of the operation. For rendered and renderable two-\n * dimensional images this should be an instance of a class which\n * implements <code>java.awt.Shape</code>.\n *\n * @return The region over which the data of two renderings of this\n * operation may be expected to be invalid or <code>null</code>\n * if there is no common region of validity.\n */\n SerializableState getInvalidRegion(Long id,\n\t\t\t\t ParameterBlock oldParamBlock,\n\t\t\t\t SerializableState oldHints,\n\t\t\t\t ParameterBlock newParamBlock,\n\t\t\t\t SerializableState newHints)\n\tthrows RemoteException;\n\n /**\n * Returns a conservative estimate of the destination region that\n * can potentially be affected by the pixels of a rectangle of a\n * given source. \n *\n * @param id A <code>Long</code> identifying the node for whom\n * the destination region needs to be calculated .\n * @param sourceRect The <code>Rectangle</code> in source coordinates.\n * @param sourceIndex The index of the source image.\n *\n * @return A <code>Rectangle</code> indicating the potentially\n * affected destination region, or <code>null</code> if\n * the region is unknown.\n */\n Rectangle mapSourceRect(Long id, Rectangle sourceRect, int sourceIndex)\n\tthrows RemoteException;\n\n /**\n * Returns a conservative estimate of the region of a specified\n * source that is required in order to compute the pixels of a\n * given destination rectangle. \n *\n * @param id A <code>Long</code> identifying the node for whom\n * the source region needs to be calculated .\n * @param destRect The <code>Rectangle</code> in destination coordinates.\n * @param sourceIndex The index of the source image.\n *\n * @return A <code>Rectangle</code> indicating the required source region.\n */\n Rectangle mapDestRect(Long id, Rectangle destRect, int sourceIndex)\n\tthrows RemoteException;\n\n /**\n * A method that handles a change in some critical parameter.\n */\n Long handleEvent(Long renderedOpID, \n\t\t String propName,\n\t\t Object oldValue, \n\t\t Object newValue) throws RemoteException;\n\n /**\n * A method that handles a change in one of it's source's rendering,\n * i.e. a change that would be signalled by RenderingChangeEvent.\n */\n Long handleEvent(Long renderedOpID, \n\t\t int srcIndex,\n\t\t SerializableState srcInvalidRegion, \n\t\t Object oldRendering) throws RemoteException;\n\n /**\n * Returns the server's capabilities as a\n * <code>NegotiableCapabilitySet</code>. Currently the only capabilities\n * that are returned are those of TileCodecs.\n */\n NegotiableCapabilitySet getServerCapabilities() throws RemoteException;\n\n /**\n * Informs the server of the negotiated values that are the result of\n * a successful negotiation.\n *\n * @param id An ID for the node which must be unique across all clients.\n * @param negotiatedValues The result of the negotiation.\n */\n void setServerNegotiatedValues(Long id, \n\t\t\t\t NegotiableCapabilitySet negotiatedValues)\n\tthrows RemoteException; \n}", "public CreateScaledImagesService() {\n super(\"CreateScaledImagesService\");\n }", "public interface AfterSaleService extends BaseService<AfterSale> {\r\n\r\n\r\n void uplaodPicture(Long orderid, MultipartFile[] myavatar) throws IOException;\r\n\r\n List<AfterSale> afterSales(Long orderid);\r\n\r\n}", "public interface PictureService {\n\n String uploadPicture(byte[] fileBuffer, String fileName) throws Exception;\n\n String uploadFile(String local_filename, String file_ext_name) throws Exception;\n\n}", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();", "public interface IClassifierService {\n\n List<String> detectImage(byte[] pixels) throws IOException;\n}", "public interface ImageRenderer {\n /** Set displayed image from ImageProvider. This method is recommended,\n * because it allows the Rendered to choose the most efficient transfer\n * format. \n */\n void setImageFromSpec(ImageProvider spec);\n\n /** Set displayed image from buffered image. */\n void setImage(BufferedImage i);\n \n /** \n * Specify whether rendering should keep the aspect ratio of the image. \n * If no, it well be stretched to the display surface. If yes, borders\n * may occur, if the aspect ratio of surface and source image are different.\n * The default is false.\n */\n public void setKeepAspectRatio(boolean keepAspect);\n \n /**\n * Setter for property imageLocation.\n * @param imageLocation New value of property imageLocation.\n */\n void setImageLocation(URL imageLocation) throws IOException;\n\n /**\n * Setter for property imageResource.\n * @param imageResource New value of property imageResource.\n */\n void setImageResource(String imageResource) throws IOException;\n\n}", "public interface IssuePhotoService extends BaseService<IssuePhotoBean> {\n}", "private void enhanceImage(){\n }", "Person addImage(String name, String imagePath);", "public interface FaroProfileImageDo {\n URL getPublicUrl();\n ImageProvider getImageProvider();\n boolean isThumbnail();\n}", "public interface IImaeView<T> extends IView<T> {\n\n void getImageRandom(ImageRes imageRes);\n}", "public interface IAlbumImageService extends IService<AlbumImage> {\n\n List<AlbumImage> queryList(Map map);\n\n int queryTotal(Map map);\n\n /**\n * Delete photos in batch\n * @param ids\n * @return\n */\n int batchDelete(List<Integer> ids);\n\n /**\n * Check the album according to the album ID\n * @param albumId\n * @return\n */\n List<AlbumImage> selectByAlbum(Integer albumId);\n\n\n}", "public interface FileService {\n\n Map<String,Object> uploadImage(MultipartFile upfile);\n}", "public interface FileService {\n\n Map<String,Object> uploadImage(MultipartFile upfile);\n}", "public Image getTwo();", "public interface ImageProvider {\r\n\r\n\t// Message related icons\r\n\tpublic static final String MSG_NEW = \"icons/mail-message-new.png\";\r\n\tpublic static final String MSG_REFRESH = \"icons/mail_refresh.png\";\r\n\tpublic static final String MSG_REPLY = \"icons/mail-reply-sender.png\";\r\n\tpublic static final String MSG_REPLY_ALL = \"icons/mail-reply-all.png\";\r\n\tpublic static final String MSG_FORWARD = \"icons/mail-forward.png\";\r\n\tpublic static final String MSG_READING_PANE_RIGHT = \"icons/message/preview-right.gif\";\r\n\tpublic static final String MSG_READING_PANE_BOTTOM = \"icons/message/preview-bottom.gif\";\r\n\tpublic static final String MSG_READING_PANE_HIDE = \"icons/message/preview-hide.gif\";\r\n\tpublic static final String MSG_COPY = \"icons/edit-copy.png\";\r\n\tpublic static final String MSG_MOVE = \"icons/shape_move_forwards.png\";\r\n\tpublic static final String MSG_DELETE = \"icons/user-trash.png\";\r\n\tpublic static final String MSG_SOURCE = \"icons/email_source.png\";\r\n\tpublic static final String MSG_MARK = \"icons/message/mark.gif\";\r\n\r\n\tpublic static final String MSG_STATUS_READ = \"icons/internet-mail.png\";\r\n\tpublic static final String MSG_STATUS_UNREAD = \"icons/mail_unread.png\";\r\n\tpublic static final String MSG_STATUS_DELETED = \"icons/message/email_deleted.png\";\r\n\tpublic static final String MSG_STATUS_ANSWERED = \"icons/mail-reply-sender.png\";\r\n\tpublic static final String MSG_STATUS_DRAFT = \"icons/message/mail_draft.png\";\r\n\r\n\tpublic static final String MSG_SEND = \"icons/message/email_go.png\";\r\n\tpublic static final String MSG_SAVE_DRAFT = \"icons/message/email_edit.png\";\r\n\tpublic static final String MSG_ADD_ATTACHMENT = \"icons/message/email_attach.png\";\r\n\r\n\tpublic static final String MSG_ATTACHMENT = \"icons/attach.png\";\r\n\tpublic static final String MSG_DOWNLOAD = \"icons/message/disk.png\";\r\n\tpublic static final String MSG_IMAGES_WARNING = \"icons/message/warning.gif\";\r\n\r\n\t// Folder related icons\r\n\tpublic static final String MAIL_FOLDER_NEW = \"icons/folder_add.png\";\r\n\tpublic static final String MAIL_FOLDER_DELETE = \"icons/folder_delete.png\";\r\n\tpublic static final String MAIL_FOLDER_MOVE = \"icons/shape_move_forwards.png\";\r\n\tpublic static final String MAIL_FOLDER_RENAME = \"icons/folder_edit.png\";\r\n\tpublic static final String MAIL_FOLDER_REFRESH = \"icons/mail_refresh.png\";\r\n\tpublic static final String MAIL_FOLDER_EMPTY = \"icons/user-trash.png\";\r\n\tpublic static final String MAIL_FOLDER = \"icons/folder.png\";\r\n\tpublic static final String MAIL_FOLDER_INBOX = \"icons/folder/folder_table.png\";\r\n\tpublic static final String MAIL_FOLDER_SENT = \"icons/folder_go.png\";\r\n\tpublic static final String MAIL_FOLDER_DRAFT = \"icons/folder_edit.png\";\r\n\tpublic static final String MAIL_FOLDER_TRASH_FULL = \"icons/user-trash-full.png\";\r\n\tpublic static final String MAIL_FOLDER_TRASH_EMPTY = \"icons/user-trash.png\";\r\n\tpublic static final String MAIL_FOLDER_MAILBOX = \"icons/email_link.png\";\r\n\r\n\t// Contact related icons\r\n\tpublic static final String CONTACT_ADD = \"icons/contact/user_add.png\";\r\n\tpublic static final String CONTACT_EDIT = \"icons/contact/user_edit.png\";\r\n\tpublic static final String CONTACT_DELETE = \"icons/contact/user_delete.png\";\r\n\tpublic static final String CONTACT_FOLDER_NEW = \"icons/folder_add.png\";\r\n\tpublic static final String CONTACT_FOLDER_DELETE = \"icons/folder_delete.png\";\r\n\tpublic static final String CONTACT_FOLDER_RENAME = \"icons/folder_edit.png\";\r\n\tpublic static final String CONTACT_FOLDER = \"icons/contact/folder_user.png\";\r\n\r\n\t// Identitiy related icons\r\n\tpublic static final String IDENTITY_ADD = \"icons/newspaper_add.png\";\r\n\tpublic static final String IDENTITY_DELETE = \"icons/newspaper_delete.png\";\r\n\r\n\t// global icons\r\n\tpublic static final String SYSTEM_LOGOUT = \"icons/system-log-out.png\";\r\n\tpublic static final String FILE_BLANK = \"icons/file.png\";\r\n\tpublic static final String PRINTER = \"icons/printer.gif\";\r\n\r\n\tpublic static final String PRIORITY_HIGH = \"icons/important.gif\";\r\n\tpublic static final String PRIORITY_LOW = \"icons/arrow_down.png\";\r\n\tpublic static final String PRIORITY_NORMAL = \"icons/arrow_in.png\";\r\n\r\n\tpublic static final String PREFERENCES = \"icons/preferences.png\";\r\n\tpublic static final String CLOSE = \"icons/cross.png\";\r\n\tpublic static final String CANCEL = \"icons/cancel.png\";\r\n}", "public interface ImagePathCallback {\n\n File createPhotoFile();\n}", "public interface CategoryImageService {\n\n /**\n * Save a categoryImage.\n *\n * @param categoryImageDTO the entity to save\n * @return the persisted entity\n */\n CategoryImageDTO save(CategoryImageDTO categoryImageDTO);\n\n /**\n * Get all the categoryImages.\n *\n * @return the list of entities\n */\n List<CategoryImageDTO> findAll();\n\n /**\n * Get the \"id\" categoryImage.\n *\n * @param id the id of the entity\n * @return the entity\n */\n CategoryImageDTO findOne(Long id);\n\n /**\n * Delete the \"id\" categoryImage.\n *\n * @param id the id of the entity\n */\n void delete(Long id);\n}", "public interface ImageService {\n\n //String ENDPOINT = \"http://n.xxt.cn:3000/\";\n //String ENDPOINT = \"http://api.laifudao.com/\";\n String ENDPOINT = \"http://image.baidu.com/\";\n\n @GET(\"/data/imgs?tag=性感&sort=0&pn=10&rn=50&p=channel&from=1\")\n Observable<JsonObject> getImages(@Query(\"col\") String col,\n @Query(\"tag\") String tag,\n @Query(\"pn\") int start,\n @Query(\"rn\") int end);\n\n class Creator {\n public static ImageService getService(Context context) {\n Retrofit retrofit = RemoteUtil.createRetrofitInstance(context, ENDPOINT);\n return retrofit.create(ImageService.class);\n }\n }\n}", "@Delegate\n @Path(\"/projects/{project}/global\")\n ImageApi getImageApi(@PathParam(\"project\") String projectName);", "public interface PictureService {\n UploadPictureResponseVO uploadPicture(MultipartFile multipartFile);\n}", "public interface IService {\n \n void savePictureFromUrl(String url, String destionationFile) throws IOException;\n \n}", "public interface ReceiptScanService {\r\n\t\r\n\t/**\r\n\t * Return a {@link Receipt} object from imagePath\r\n\t * @param imagePath an absolute file path for image\r\n\t * @return {@link Receipt}\r\n\t */\r\n\tpublic Receipt getReceiptFromImage(String imagePath);\r\n}", "public interface FileUploadService {\n\n /**\n *\n * @param form\n * @param path\n * @param fileName\n * @throws Exception\n */\n void uploadBase64Image(Base64ImageForm form, String path, String fileName) throws Exception;\n}", "public abstract void saveUserImage(Call serviceCall, Response serviceResponse, CallContext messageContext);", "public void setImage(Image itemImg) \n {\n img = itemImg;\n }", "public interface LeadImageContainer {\n\tLeadAsset getImage();\n}", "public interface ImageUpload {\n void imageUploadToServer(int selectedImageResourceId);\n}", "public interface ICardService {\r\n /**\r\n * @param params eg:{'bbsId':1,'customerId':1,'type':'','pubDateFrom':'20151008','pubDateTo':'20151108'}\r\n * @return\r\n * @throws Exception\r\n */\r\n String search(String params) throws Exception;\r\n\r\n /**\r\n * @param params eg: {'cardId':1}\r\n * @return\r\n * @throws Exception\r\n */\r\n String cardDetail(String params) throws Exception;\r\n\r\n /**\r\n * @param params, eg: {'bbsId':1,'customerId':1,'content':'test','lon':'1.1','lat':'1.1','address':'YanJiaQiao No.1','picUrls':'1,2,3'}\r\n * @return\r\n * @throws Exception\r\n */\r\n String create(String params) throws Exception;\r\n\r\n /**\r\n * save card\r\n * @param params\r\n * @return\r\n * @throws Exception\r\n */\r\n String save(String params)throws Exception;\r\n\r\n /**\r\n * delete card\r\n * @param params, eg: {'cardId':1}\r\n * @return\r\n * @throws Exception\r\n */\r\n String delete(String params) throws Exception;\r\n\r\n /**\r\n * 添加帖子图片\r\n * @param params (帖子ID,图片ID数组)\r\n * @return\r\n */\r\n String addPicture(String params) throws Exception;\r\n\r\n /**\r\n * 获取帖子图片\r\n * @param params(帖子ID)\r\n * @return\r\n * @throws Exception\r\n */\r\n String getPictures(String params) throws Exception;\r\n\r\n /**\r\n * 删除帖子图片\r\n * @param params,{'picId':1}\r\n * @return\r\n * @throws Exception\r\n */\r\n String deletePicture(String params) throws Exception;\r\n\r\n /**\r\n * 排序帖子图片\r\n * @param params,eg:{'picId':1,'sortno':2}\r\n * @return\r\n * @throws Exception\r\n */\r\n String resortPicture(String params) throws Exception;\r\n}", "public interface UploadFileService {\r\n Map upLoadPic(MultipartFile multipartFile);\r\n}", "public interface IHeadImageService {\n int insert(HeadImage dao);\n HeadImage get(String id);\n int update(HeadImage dao);\n}", "public interface IImageLoader {\n void displayHeadImage(Context context, String url, ImageView imageView);\n\n void displayImage(Context context, String url, ImageView imageView);\n\n void displayImage(Context context, File file, ImageView imageView);\n\n void displayImage(Context context, int resId, ImageView imageView);\n\n void displayImage(Context context, Bitmap bitmap, ImageView imageView);\n\n\n void displayCircleImage(Context context, String url, ImageView imageView);\n\n void displayCircleImage(Context context, File file, ImageView imageView);\n\n void displayCircleImage(Context context, int resId, ImageView imageView);\n\n void displayCircleImage(Context context, Bitmap bitmap, ImageView imageView);\n\n}", "interface Image {\n public void displayImage();\n}", "void setImage(IViewModel image);", "public interface Image {\n void display();\n}", "public interface WebsiteThumbGeneratorService extends ThumbGeneratorService {\n}", "com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();", "@Override\r\n\tprotected void updateImage(final IScope scope) {\n\t}", "public interface ImageEngine {\n\n //采用责任链模式\n\n void init();\n\n ImageEngine with(Context context);\n\n ImageEngine load(String path);\n\n ImageEngine into(ImageView target);\n\n\n}", "public interface SearchService {\n List<String> siftSearch(MultipartFile image) throws IOException;\n}", "public int getImage();", "public interface ImageReader {\n}", "Builder addImage(ImageObject value);", "Imagem getImagem();", "public interface ISignBiz {\n void upSignImage(String token, int orderId, TypedFile file, OnUpSignImageListener onUpSignImageListener);\n}", "public void mo38841a(ImagesRequest imagesRequest) {\n }", "public interface IImageMetadata {\n\n public String getImageType();\n\n public void setImageType(String imageType);\n\n public String getFilename();\n\n public void setFilename(String filename);\n\n public DateTime getLastModified();\n\n public void setLastModified(DateTime d);\n\n public DateTime getCreated();\n\n public void setCreated(DateTime d);\n\n public long getSize();\n\n public void setSize(long size);\n\n public String getReadableSize();\n\n}", "public void getImagePath(String imagePath);", "public interface FileService {\n Map<String,Object> uploadPicure(MultipartFile upfile) throws IOException;\n}", "Image createImage();", "String getImage();", "@Override\n\tpublic void onRxImage(String name, ImageMessage image) {\n\t\t\n\t}", "public interface ImageFactory {\r\n\t/**\r\n\t * @return resources for toolbar\r\n\t */\r\n\tpublic ToolbarResources getToolbarResources();\r\n\r\n\t/**\r\n\t * @return resources for menu and stylebar\r\n\t */\r\n\tpublic PerspectiveResources getPerspectiveResources();\r\n}", "public interface IImage {\n public int getWidth();\n public int getHeight();\n public IGraphics.ImageFormat getFormat();\n public void dispose();\n}", "public Image getBassClef();", "java.lang.String getImage();", "private void galleryAddPic() {\n\t}", "public Image call() throws IOException;", "PImage getImage() {\n return _img;\n }", "public interface LabelService {\n /**\n * 对一张图片整体标注\n * @param userID 用户ID location 图片位置 wholeLabel 图片标注 location采用 :任务名/图片名 的格式\n * @return 结果\n */\n public ResultMessage addWholeLabel(String userID, String location, String wholeLabel);\n\n /**\n * 更新一张图片的整体标注\n *\n * @param userID\n * @param location\n * @param wholeLabel\n * @return 是否成功\n */\n public ResultMessage updateWholeLabel(String userID, String location, String wholeLabel);\n\n /**\n * 根据用户id 和 location查询一张图片的标注\n *\n * @param userID\n * @param location\n * @return\n */\n public String getWholeLabelByUserIDAndLocation(String userID, String location);\n\n /**\n * 添加局部标注\n * @param userID 用户ID location 图片位置 采用任务名/图片名 的格式\n * @param labelList bean列表\n * @return\n */\n public ResultMessage LocalLabel(String userID,String location, List<LocalLabelBean> labelList);\n\n\n\n /**\n * 保存base64格式的图片\n * @param localLabel\n * @return\n */\n public ResultMessage SaveCanvas(LocalLabel localLabel);\n\n\n /**************************************/\n\n /**\n * 添加属性标注\n * @param userName\n * @param attributeLabel\n * @return\n */\n public ResultMessage addAttributeLabel(int missionID,String userName, AttributeLabel attributeLabel);\n\n /**\n * 添加整体标注\n * @param userName\n * @param captionLabel\n * @return\n */\n public ResultMessage addCaptionLabel(int missionID,String userName, CaptionLabel captionLabel);\n\n /**\n * 添加分类标注\n * @param userName\n * @param classificationLabel\n * @return\n */\n public ResultMessage addClassificationLabel(int missionID,String userName, ClassificationLabel classificationLabel);\n\n\n /**\n * 添加矩形标注\n * @param userName\n * @param detectionLabel\n * @return\n */\n public ResultMessage addDetectionLabel(int missionID,String userName, DetectionLabel detectionLabel);\n\n /**\n * 添加描边轮廓标注\n * @param userName\n * @param segmentationLabel\n * @return\n */\n public ResultMessage addSegmentationLabel(int missionID,String userName,SegmentationLabel segmentationLabel);\n\n\n /**\n * 查找属性标注\n * @param missionID\n * @param userName\n * @return\n */\n public List<AttributeLabel> getAttributeLabel(int missionID,String userName);\n\n /**\n * 添加整体标注\n * @param userName\n * @param missionID\n * @return\n */\n public List<CaptionLabel> getCaptionLabel(int missionID,String userName);\n\n /**\n * 添加分类标注\n * @param userName\n * @param missionID\n * @return\n */\n public List<ClassificationLabel> getClassificationLabel(int missionID,String userName);\n\n\n /**\n * 添加矩形标注\n * @param userName\n * @param missionID\n * @return\n */\n public List<DetectionLabel> getDetectionLabel(int missionID,String userName);\n\n /**\n * 添加描边轮廓标注\n * @param userName\n * @param missionID\n * @return\n */\n public List<SegmentationLabel> getSegmentationLabel(int missionID,String userName);\n public ResultMessage addOne(int missionID,String userName,String FileName);\n\n\n\n public ResultMessage addAutoClassificationLabel(AutoClassificationLabelBean autoClassificationLabelBean);\n\n\n public ResultMessage addAutoCaptionLabel( AutoCaptionLabelBean autoCaptionLabelBean);\n\n\n public ResultMessage addAutoDetectionLabel( AutoDetectionLabelBean autoDetectionLabelBean);\n\n public ResultMessage updateAutoClassificationLabel(AutoClassificationLabelBean autoClassificationLabelBean);\n\n\n public ResultMessage updateAutoCaptionLabel( AutoCaptionLabelBean autoCaptionLabelBean);\n\n\n public ResultMessage updateAutoDetectionLabel( AutoDetectionLabelBean autoDetectionLabelBean);\n\n public List<AutoCaptionLabel> getAutoCaptionLabel(String missionid,String username);\n public List<AutoClassificationLabel> getAutoClassificationLabel(String missionid,String username);\n\n public List<AutoDetectionLabel> getAutoDetectionLabel(String missionid,String username);\n}", "abstract public String getImageKey();", "public abstract String getImageFormat();", "private static ImageResource initImageResource() {\n\t\tImageResource imageResource = new ImageResource(Configuration.SUPERVISOR_LOGGER);\n\t\t\n\t\timageResource.addResource(ImageTypeAWMS.VERTICAL_BAR.name(), imagePath + \"blue_vertical_bar.png\");\n\t\timageResource.addResource(ImageTypeAWMS.HORIZONTAL_BAR.name(), imagePath + \"blue_horizontal_bar.png\");\n\t\timageResource.addResource(ImageTypeAWMS.WELCOME.name(), imagePath + \"welcome.png\");\n\t\t\n\t\t\n\t\treturn imageResource;\n\t}", "public interface Features {\n /**\n * Loads the image at the given filename into the controller's model.\n *\n * @param filename the location of the image to load\n * @throws IOException if the provided file path is invalid\n */\n void loadPhoto(String filename) throws IOException;\n\n /**\n * Loads a generated rainbow image into the controller's model.\n *\n * @param width width of image to generate in pixels\n * @param height height of image to generate in pixels\n * @param isHorizontal True for horizontal stripes, else vertical stripes\n */\n void loadRainbow(int width, int height, boolean isHorizontal);\n\n /**\n * Loads a generated checker board image into the controller's model.\n *\n * @param tileSize the side length of tiles for the generated image in pixels.\n */\n void loadCheckerBoard(int tileSize);\n\n /**\n * Saves the current state of the image in the controller's model to the specified file location.\n *\n * @param filename the location to save the image\n * @throws IOException if the provided file path is invalid\n */\n void saveToFile(String filename) throws IOException;\n\n /**\n * Applies the blur effect to the image loaded in the controller's model.\n */\n void blur();\n\n /**\n * Applies the sharpen effect to the image loaded in the controller's model.\n */\n void sharpen();\n\n /**\n * Applies the greyscale effect to the image loaded in the controller's model.\n */\n void greyscale();\n\n /**\n * Applies the sepia effect to the image loaded in the controller's model.\n */\n void sepia();\n\n /**\n * Applies the dither effect to the image loaded in the controller's model.\n */\n void dither();\n\n /**\n * Applies the Mosaic effect to the image loaded in the controller's model.\n *\n * @param seeds number of panes to generate in mosaic\n */\n void mosaic(int seeds);\n\n /**\n * reverts the controller's model to the image prior to the most recent effect.\n *\n * @throws IllegalStateException if no changes yet to undo\n */\n void undo();\n\n /**\n * reverts the controller's model to the image after the most recent effect.\n *\n * @throws IllegalStateException if no undos yet to restore\n */\n void redo();\n\n /**\n * Retrieves a copy of the image data stored in the controller's model image.\n *\n * @return a copy of the image data stored in the controller's model image\n */\n BufferedImage outputImage();\n\n /**\n * Runs the batch script commands provided in the given readable.\n *\n * @throws IOException if any issues with accessing the Readable\n */\n void executeScript(Readable script) throws IOException;\n}", "@Override\n\tpublic void readImages() {\n\t\t\n\t}" ]
[ "0.7330435", "0.7141623", "0.70917505", "0.6879578", "0.68324876", "0.68324876", "0.6827898", "0.68142444", "0.6731987", "0.6671204", "0.65969455", "0.6595908", "0.6585355", "0.6580275", "0.65648496", "0.6541453", "0.65192777", "0.6517626", "0.6506841", "0.65048194", "0.6496945", "0.64836955", "0.64700526", "0.6460564", "0.6458561", "0.64472914", "0.64418644", "0.6432339", "0.64265174", "0.6423499", "0.6410519", "0.6386092", "0.63507634", "0.6342774", "0.62978023", "0.6293969", "0.62868774", "0.62829703", "0.6259473", "0.6242844", "0.62416524", "0.6223104", "0.62226474", "0.6220948", "0.6209611", "0.6200505", "0.62004733", "0.61943203", "0.61943203", "0.61867136", "0.61493254", "0.6145686", "0.6142655", "0.614111", "0.6141051", "0.61211824", "0.61209905", "0.611821", "0.61116284", "0.61033523", "0.61021435", "0.61015224", "0.6100267", "0.60903615", "0.6089586", "0.6086904", "0.6077409", "0.6058392", "0.6057599", "0.60567725", "0.60540134", "0.60410696", "0.6028372", "0.60268164", "0.5999195", "0.59950227", "0.5989425", "0.5964028", "0.5955636", "0.5948232", "0.59357417", "0.591859", "0.59182966", "0.5911669", "0.5909482", "0.590336", "0.59021354", "0.58900857", "0.5889465", "0.5888133", "0.58791405", "0.58757037", "0.58674556", "0.58584243", "0.5853769", "0.58531255", "0.58530045", "0.5845219", "0.5841975", "0.5840848" ]
0.6061323
67
Crea un escenario donde al contacto inicial le inserta un contacto menor
private void setupEscenario2( ) { setupEscenario1( ); String nombre = "Alberto"; String direccion = "dirección"; String telefono = "1234567"; String email = "alberto@email.com"; Contacto contacto2 = new Contacto( nombre, telefono, direccion, email ); try { contacto1.insertar( contacto2 ); } catch( ContactoRepetidoException e ) { fail( "El contacto debió agregarse" ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void crearEntidad() throws EntidadNotFoundException {\r\n\t\tif (validarCampos(getNewEntidad())) {\r\n\t\t\tif (validarNomNitRepetidoEntidad(getNewEntidad())) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN, \"Advertencia: \", \"Nombre, Nit o Prejifo ya existe en GIA\"));\r\n\t\t\t} else {\r\n\t\t\t\tif (entidadController.crearEntidad(getNewEntidad())) {\r\n\t\t\t\t\tmensajeGrow(\"Entidad Creada Satisfactoriamente\", getNewEntidad());\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('entCrearDialog').hide()\");\r\n\t\t\t\t\tsetNewEntidad(new EntidadDTO());\r\n\t\t\t\t\tresetCodigoBUA();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmensajeGrow(\"Entidad No Fue Creada\", getNewEntidad());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlistarEntidades();\r\n\t\t\t// newEntidad = new EntidadDTO();\r\n\t\t\t// fechaActual();\r\n\t\t}\r\n\r\n\t}", "OperacionColeccion createOperacionColeccion();", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "private void insertData() {\n\n cliente = factory.manufacturePojo(ClienteEntity.class);\n em.persist(cliente);\n for (int i = 0; i < 3; i++) {\n FormaPagoEntity formaPagoEntity = factory.manufacturePojo(FormaPagoEntity.class);\n formaPagoEntity.setCliente(cliente);\n em.persist(formaPagoEntity);\n data.add(formaPagoEntity);\n }\n }", "Secuencia createSecuencia();", "public void guardar() {\n try {\n objConec.conectar();\n objConec.Sql = objConec.con.prepareStatement(\"insert into contacto values(null,?,?,?,?,?)\");\n objConec.Sql.setString(1, getNom_con());\n objConec.Sql.setInt(2, getTel_con()); \n objConec.Sql.setString(3, getEma_con());\n objConec.Sql.setString(4, getAsu_con());\n objConec.Sql.setString(5, getMen_con());\n objConec.Sql.executeUpdate();\n objConec.cerrar();\n JOptionPane.showMessageDialog(null, \"Mensaje enviado correctamente\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Error al enviar el mensaje\");\n\n }\n\n }", "@Override\n public ComprobanteContable createComprobante(Aerolinea a, Boleto boleto, Cliente cliente, String tipo, NotaDebito nota) throws CRUDException {\n\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n buff.append(a.getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas\n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n comprobante.setIdCliente(cliente);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(tipo);\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n\n //ComprobanteContablePK numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n comprobante.setIdNumeroGestion(numero);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n return comprobante;\n }", "public void create(Joueur joueur) {\n EntityManager em = EntityManagerHolder.getCurrentEntityManager();\n EntityTransaction tx = null;\n\n try {\n// session = HibernateUtil.getSessionFactory().getCurrentSession();\n// tx = session.beginTransaction();\n// session.persist(joueur);\n tx = em.getTransaction();\n em.persist(joueur);\n //declenche l'ajout d'un ou plusieurs elements -> synchronisation de la session et de la BDD\n\n System.out.println(\"Joueur créé avec succès\");\n } catch (Exception e) {\n\n e.printStackTrace();\n } finally {\n if (em != null) {\n em.close();\n }\n }\n }", "@Override\r\n public void crearCliente(Cliente cliente) throws Exception {\r\n entity.getTransaction().begin();//inicia la creacion\r\n entity.persist(cliente);//se crea el cliente\r\n entity.getTransaction().commit();//finaliza la creacion\r\n }", "public void insertar(Proceso p) {\n\t\tif (p == null) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.tllegada = p.tllegada;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.rrejecutada = p.rrejecutada;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\t\tint tamaņo = p.id.length();\n\t\tif (tamaņo == 1) {\n\t\t\tnuevo.id = p.id + \"1\";\n\t\t} else {\n\t\t\tchar id = p.id.charAt(0);\n\t\t\tint numeroId = Integer.parseInt(String.valueOf(p.id.charAt(1))) + 1;\n\t\t\tnuevo.id = String.valueOf(id) + String.valueOf(numeroId);\n\t\t}\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}", "public void addDicas(){\n\t\tMetaDica metaDicaOac = new MetaDica(oac, \"user1\", \"Não falte as aulas, toda aula tem ponto extra!\");\n\t\tmetaDicaOac.setConcordancias(5);\n\t\tdao.persist(metaDicaOac);\n\n\t\tdicaExerciciosOac = new DicaConselho(\"Os exercicios extras valem muitos pontos, nao deixe de fazer\");\n\t\tdicaExerciciosOac.setTema(temaOacExercicios);\n\t\ttemaOacExercicios.setDisciplina(oac);\n\t\tdicaExerciciosOac.setUser(\"user5\");\n\t\tdicaExerciciosOac.addUsuarioQueVotou(\"user1\");\n\t\tdicaExerciciosOac.addUsuarioQueVotou(\"user2\");\n\n\t\t//adiciona pontos a dica\n\t\tfor (int i = 0; i < 20;i++){\n\t\t\tdicaExerciciosOac.incrementaConcordancias();\n\t\t}\n\t\tfor (int i = 0; i < 5;i++){\n\t\t\tdicaExerciciosOac.incrementaDiscordancias();\n\t\t}\n\n\t\t//adiciona pontos a dica\n\t\tfor (int i = 0; i < 5;i++){\n\t\t\tdicaExerciciosOac.incrementaConcordancias();\n\t\t}\n\t\tfor (int i = 0; i < 25;i++){\n\t\t\tdicaExerciciosOac.incrementaDiscordancias();\n\t\t}\n\t\tdao.persist(dicaExerciciosOac);\n\n\t\tdicaRevisaoIcOac = new DicaAssunto(\"Antes das aulas faça uma boa revisao de IC\");\n\t\ttemaOacRevisaoIC.setDisciplina(oac);\n\t\tdicaRevisaoIcOac.setTema(temaOacRevisaoIC);\n\t\tdicaRevisaoIcOac.setUser(\"user4\");\n\t\tdicaRevisaoIcOac.addUsuarioQueVotou(\"user5\");\n\t\tdicaRevisaoIcOac.addUsuarioQueVotou(\"user1\");\n\t\tdicaRevisaoIcOac.incrementaConcordancias();\n\t\tdicaRevisaoIcOac.incrementaConcordancias();\n\n\t\t//cria meta dica em si\n\t\tMetaDica metaDicaSi1 = new MetaDica(si1, \"user2\", \"Seja autodidata! Procure por cursos online\");\n\t\tdao.persist(metaDicaSi1);\n\n\t\tdicaLabSi = new DicaConselho(\"Faça todo os labs, não deixe acumular\");\n\t\ttemaMinitestesSi.setDisciplina(si1);\n\t\tdicaLabSi.setTema(temaMinitestesSi);\n\t\tdicaLabSi.setUser(\"user1\");\n\t\tdicaLabSi.addUsuarioQueVotou(\"user2\");\n\t\tdicaLabSi.addUsuarioQueVotou(\"user3\");\n\t\tdicaLabSi.incrementaConcordancias();\n\t\tdicaLabSi.incrementaConcordancias();\n\t\tdao.persist(dicaLabSi);\n\n\t\tdicaPlaySi = new DicaConselho(\"Comece a configurar o Play no primeiro dia de aula, pois dá muuuito trabalho\");\n\t\ttemaPlaySi.setDisciplina(si1);\n\t\tdicaPlaySi.setTema(temaPlaySi);\n\t\tdicaPlaySi.setUser(\"user2\");\n\t\tdicaPlaySi.addUsuarioQueVotou(\"user5\");\n\t\tdicaPlaySi.addUsuarioQueVotou(\"user4\");\n\t\tdicaPlaySi.incrementaConcordancias();\n\t\tdicaPlaySi.incrementaConcordancias();\n\t\tdao.persist(dicaPlaySi);\n\n\t\tdicaMaterialSi = new DicaMaterial(\"http://www.wthreex.com/rup/process/workflow/ana_desi/co_swarch.htm\");\n\t\ttemaMaterialSi.setDisciplina(si1);\n\t\tdicaMaterialSi.setTema(temaMaterialSi);\n\t\tdicaMaterialSi.setUser(\"user2\");\n\t\tdicaMaterialSi.addUsuarioQueVotou(\"user5\");\n\t\tdicaMaterialSi.addUsuarioQueVotou(\"user4\");\n\t\tdicaMaterialSi.incrementaConcordancias();\n\t\tdicaMaterialSi.incrementaConcordancias();\n\t\tdao.persist(dicaMaterialSi);\n\n\n\t\t//cria meta dica logica\n\t\tMetaDica metaDicaLogica = new MetaDica(logica, \"user3\", \"Copie para o seu caderno tudo que o professor copiar no quadro, TUDO!\");\n\t\tdao.persist(metaDicaLogica);\n\n\t\tdicaListasLogica = new DicaConselho(\"Faça todas as listas possíveis\");\n\t\ttemaListasLogica.setDisciplina(logica);\n\t\tdicaListasLogica.setTema(temaListasLogica);\n\t\tdicaListasLogica.setTema(temaListasLogica);\n\t\tdicaListasLogica.setUser(\"user6\");\n\t\tdicaListasLogica.addUsuarioQueVotou(\"user3\");\n\t\tdicaListasLogica.addUsuarioQueVotou(\"user5\");\n\t\tdicaListasLogica.incrementaConcordancias();\n\t\tdicaListasLogica.incrementaConcordancias();\n\t\tdao.persist(dicaListasLogica);\n\n\t\tdicaProjetoLogica = new DicaAssunto(\"Peça ajuda ao monitor responsável por seu grupo, começe o projeto assim que for lançado!\");\n\t\ttemaProjetoLogica.setDisciplina(logica);\n\t\tdicaProjetoLogica.setTema(temaProjetoLogica);\n\t\tdicaProjetoLogica.setTema(temaProjetoLogica);\n\t\tdicaProjetoLogica.setUser(\"user4\");\n\t\tdicaProjetoLogica.addUsuarioQueVotou(\"user1\");\n\t\tdicaProjetoLogica.addUsuarioQueVotou(\"user2\");\n\t\tdicaProjetoLogica.incrementaConcordancias();\n\t\tdicaProjetoLogica.incrementaConcordancias();\n\t\tdao.persist(dicaProjetoLogica);\n\n\t\tdao.flush();\n\n\t}", "@Override\n public ComprobanteContable createComprobante(\n Aerolinea a, Boleto boleto, Cliente cliente, String tipo) throws CRUDException {\n Optional op;\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n buff.append(a.getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas\n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n comprobante.setIdCliente(cliente);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(tipo);\n\n //ComprobanteContablePK numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n comprobante.setIdNumeroGestion(numero);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\n return comprobante;\n }", "public abstract Anuncio creaAnuncioIndividualizado();", "public void insertar(Proceso p, int tiempo) {\n\t\tif (p == null || tiempo < 0) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.id = p.id;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.tllegada = tiempo;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}", "public void inserir(Comentario c);", "public void insert(Service servico){\n Database.servico.add(servico);\n }", "public void crearActividad (Actividad a) {\r\n String query = \"INSERT INTO actividad (identificacion_navegate, numero_matricula, fecha, hora, destino, eliminar) VALUES (\\\"\" \r\n + a.getIdentificacionNavegante()+ \"\\\", \" \r\n + a.getNumeroMatricula() + \", \\\"\" \r\n + a.getFecha() + \"\\\", \\\"\" \r\n + a.getHora() + \"\\\", \\\"\" \r\n + a.getDestino()+ \"\\\" ,false)\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad creada\", \"Operación exitosa\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "@Override\r\n\tpublic MensajeBean inserta(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.inserta(nuevo);\r\n\t}", "public static Servicio insertServicio(String nombre_servicio,\n String descripcion_servicio, \n String nombre_tipo_servicio){\n \n /*Se definen valores para servicio y se agrega a la base de datos*/\n Servicio miServicio = new Servicio(nombre_servicio, \n descripcion_servicio,\n nombre_tipo_servicio);\n try {\n miServicio.registrarServicio();\n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return miServicio;\n }", "private void insert(HttpServletRequest request)throws Exception {\n\t\tPedido p = new Pedido();\r\n\t\tCliente c = new Cliente();\r\n\t\tCancion ca = new Cancion();\r\n\t\tp.setCod_pedido(request.getParameter(\"codigo\"));\r\n\t\tca.setCod_cancion(request.getParameter(\"cod_cancion\"));\r\n\t\tc.setCod_cliente(request.getParameter(\"cod_cliente\"));\r\n\t\tp.setCan(ca);\r\n\t\tp.setCl(c);\r\n\t\t\r\n\t\tpdmodel.RegistrarPedido(p);\r\n\t\t\r\n\t}", "public static void creaHidatoAutomaticament()\n {\n ControladorVista.mostraCreacioHidatoAutomatica();\n }", "public void insertar() {\r\n if (vista.jTNombreempresa.getText().equals(\"\") || vista.jTTelefono.getText().equals(\"\") || vista.jTRFC.getText().equals(\"\") || vista.jTDireccion.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(null, \"Faltan Datos: No puedes dejar cuadros en blanco\");//C.P.M Verificamos si las casillas esta vacia si es asi lo notificamos\r\n } else {//C.P.M de lo contrario prosegimos\r\n modelo.setNombre(vista.jTNombreempresa.getText());//C.P.M mandamos las variabes al modelo \r\n modelo.setDireccion(vista.jTDireccion.getText());\r\n modelo.setRfc(vista.jTRFC.getText());\r\n modelo.setTelefono(vista.jTTelefono.getText());\r\n \r\n Error = modelo.insertar();//C.P.M Ejecutamos el metodo del modelo \r\n if (Error.equals(\"\")) {//C.P.M Si el modelo no regresa un error es que todo salio bien\r\n JOptionPane.showMessageDialog(null, \"Se guardo exitosamente la configuracion\");//C.P.M notificamos a el usuario\r\n vista.dispose();//C.P.M y cerramos la vista\r\n } else {//C.P.M de lo contrario \r\n JOptionPane.showMessageDialog(null, Error);//C.P.M notificamos a el usuario el error\r\n }\r\n }\r\n }", "Compuesta createCompuesta();", "public static void instanciarCreencias() {\n\t\tfor(int i =0; i < GestorPartida.getContJugadores(); i++) {\n\t\t\t\n\t\t\tGestorPartida.jugadores[i].setCreencias(new Creencias(GestorPartida.jugadores, GestorPartida.objetoJugador, GestorPartida.objetoSala, i)); \n\t\t}\n\t}", "public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ServicioEntity entity = factory.manufacturePojo(ServicioEntity.class);\n em.persist(entity);\n dataServicio.add(entity);\n }\n for (int i = 0; i < 3; i++) {\n QuejaEntity entity = factory.manufacturePojo(QuejaEntity.class);\n if (i == 0) {\n entity.setServicio(dataServicio.get(0));\n }\n em.persist(entity);\n data.add(entity);\n }\n }", "public void domicilioAgregar() {\r\n\t\tlog.info(\"Domicilio agregar \" + nuevoDomici.getDomicilio());\r\n\t\tboolean verifica = false;\r\n\t\tmensaje = null;\r\n\t\tnuevoDomici.setTbTipoCasa(objTipoCasaService.findTipoCasa(Tipocasanuevo));\r\n\t\tnuevoDomici.setDomicilio(domicilio);\r\n\t\tnuevoDomici.setReferencia(referencia);\r\n\t\tnuevoDomici.setTbUbigeo(objUbigeoService.findUbigeo(idUbigeo));\r\n\t\tlog.info(\"TIPO-CASA-NUEVO--->\"+nuevoDomici.getTbTipoCasa().getIdtipocasa());\r\n\t\tnuevoDomici.setNuevoD(1);\r\n\t\t//aqui ponfo el ID-Domicilio a la lista Domicilio temporalmente.\r\n\t\tnuevoDomici.setIddomiciliopersona(0);\r\n\t\tnuevoDomici.setTbEstadoGeneral(objEstadoGeneralService.findEstadogeneral(15));\r\n\t\t\r\n\t\tfor (int i = 0; i < DomicilioPersonaList.size(); i++) {\r\n\t\t\tlog.info(\" \"+ DomicilioPersonaList.get(i).getDomicilio() + \" \" + nuevoDomici.getDomicilio());\r\n\t\t\tif (DomicilioPersonaList.get(i).getDomicilio().equals(nuevoDomici.getDomicilio())) {\r\n\t\t\t\tverifica = false;\r\n\t\t\t\tmensaje = \"el Domicilio ya se encuentra registrado en la lista de domiclio cliente\";\r\n\t\t\t\tbreak;\r\n\t\t\t}else {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\tif (DomicilioPersonaList.size() == 0) {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\tif (verifica) {\r\n\t\t\t\tnuevoDomici.setItem(\"Por Agregar\");\r\n\t\t\t\tDomicilioPersonaList.add(nuevoDomici);\r\n\t\t\t\tlog.info(\"se agrego \"+ nuevoDomici.getDomicilio());\r\n\t\t\t\t}\r\n\t\t\tif (mensaje != null) {\r\n\t\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\t\t\t}\r\n\t\t\tnuevoDomici = new DomicilioPersonaSie();\r\n\t\t}", "public RespuestaBD crearRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioInsercion) {\n/* 342 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* 344 */ int elSiguiente = siguienteRegistro(codigoFlujo);\n/* 345 */ if (elSiguiente == 0) {\n/* 346 */ rta.setMensaje(\"Generando secuencia\");\n/* 347 */ return rta;\n/* */ } \n/* */ \n/* */ try {\n/* 351 */ String s = \"insert into wkf_detalle(codigo_flujo,secuencia,servicio_inicio,accion,codigo_estado,servicio_destino,nombre_procedimiento,correo_destino,enviar_solicitud,ind_mismo_proveedor,ind_mismo_cliente,estado,caracteristica,valor_caracteristica,caracteristica_correo,metodo_seleccion_proveedor,ind_correo_clientes,enviar_hermana,enviar_si_hermana_cerrada,ind_cliente_inicial,usuario_insercion,fecha_insercion) values (\" + codigoFlujo + \",\" + \"\" + elSiguiente + \",\" + \"\" + servicioInicio + \",\" + \"\" + accion + \",\" + \"\" + codigoEstado + \",\" + \"\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \"'\" + nombreProcedimiento + \"',\" + \"'\" + correoDestino + \"',\" + \"'\" + enviar + \"',\" + \"'\" + mismoProveedor + \"',\" + \"'\" + mismoCliente + \"',\" + \"'\" + estado + \"',\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \"'\" + usuarioInsercion + \"',\" + \"\" + Utilidades.getFechaBD() + \"\" + \")\";\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/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 398 */ rta = this.dat.executeUpdate2(s);\n/* 399 */ rta.setSecuencia(elSiguiente);\n/* */ }\n/* 401 */ catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"%FlujoDetalleDAO:crearRegistro \", e);\n/* 404 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 406 */ return rta;\n/* */ }", "private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }", "public void createNewClient(String nom, String prenom, String tel, String mail, String adresse) throws SQLException {\n\t\tint tmp = getLastClientId();\n\t\tSystem.out.println(tmp);\n\t\tif(tmp != 0) {\n\t\t\t//voir generated keys pour l'id\n\t\t\tClient tmpClient = new Client(tmp, nom, prenom, tel, mail, adresse);\n\t\t\tClient tmp2 = create(tmpClient);\n\t\t\tSystem.out.println(tmp2.getLogin());\n\t\t\tSystem.out.println(\"Succès lors de la création de l'utilisateur\");\n\t\t}else\n\t\t\tSystem.out.println(\"Erreur lors de la création de l'utilisateur\");\n\t}", "public void creaAziendaAgricola(){\n\t\tCantina nipozzano = creaCantina(\"Nipozzano\");\t\n\t\tBotte[] bottiNipozzano = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiNipozzano.length; i++){\n\t\t\tbottiNipozzano[i] = creaBotte(nipozzano, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\t\t\n\t\tVigna mormoreto = creaVigna(\"Mormoreto\", 330, 25, EsposizioneVigna.sud, \"Terreni ricchi di sabbia, ben drenati. Discreta presenza di calcio. pH neutro o leggermente alcalino\");\n\t\tFilare[] filariMormoreto = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMormoreto.length;i++){\n\t\t\tfilariMormoreto[i] = creaFilare(mormoreto, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\t\n\t\tVigna montesodi = creaVigna(\"Montesodi\", 400, 20, EsposizioneVigna.sud_ovest, \"Arido e sassoso, di alberese, argilloso e calcareo, ben drenato, poco ricco di sostanza organica\");\n\t\tFilare[] filariMontesodi = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMontesodi.length;i++){\n\t\t\tfilariMontesodi[i] = creaFilare(montesodi, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t/*\n\t\t * CANTINA: POMINO - VIGNETO BENEFIZIO\n\t\t */\n\t\t\n\t\tCantina pomino = creaCantina(\"Pomino\");\n\t\tBotte[] bottiPomino = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiPomino.length; i++){\n\t\t\tbottiPomino[i] = creaBotte(pomino, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\n\t\tVigna benefizio = creaVigna(\"Benefizio\", 700, 9, EsposizioneVigna.sud_ovest, \"Terreni ricchi di sabbia, forte presenza di scheletro. Molto drenanti. Ricchi in elementi minerali. PH acido o leggermente acido.\");\n\t\tFilare[] filariBenefizio = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariBenefizio.length;i++){\n\t\t\tfilariBenefizio[i] = creaFilare(benefizio, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(nipozzano);\n\t\taziendaAgricolaDAO.saveLuogo(mormoreto);\n\t\taziendaAgricolaDAO.saveLuogo(montesodi);\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(pomino);\n\t\taziendaAgricolaDAO.saveLuogo(benefizio);\n\t\t\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Giulio d'Afflitto\"));\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Francesco Ermini\"));\n\n\t\t\n\t}", "public void crearDepartamento(String nombredep, String num, int nvJefe, int horIn, int minIn, int horCi, int minCi) {\r\n\t\t// TODO Auto-generated method stub by carlos Sánchez\r\n\t\t//Agustin deberia devolverme algo q me indique si hay un fallo alcrearlo cual es\r\n\t\t//hazlo como mas facil te sea.Yo no se cuantos distintos puede haber.\r\n\t\r\n\t//para añadir el Dpto en la BBDD no se necesita el Nombre del Jefe\r\n\t//pero si su numero de vendedor (por eso lo he puesto como int) que forma parte de la PK \r\n\t\t\r\n\t\tint n= Integer.parseInt(num);\r\n\t\tString horaapertura=aplicacion.utilidades.Util.horaminutosAString(horIn, minIn);\r\n\t\tString horacierre=aplicacion.utilidades.Util.horaminutosAString(horCi, minCi);\r\n\t\tTime thI= Time.valueOf(horaapertura);\r\n\t\tTime thC=Time.valueOf(horacierre);\r\n\t\tthis.controlador.insertDepartamentoPruebas(nombredep, nvJefe,thI,thC); //tabla DEPARTAMENTO\r\n\t\tthis.controlador.insertNumerosDepartamento(n, nombredep); //tabla NumerosDEPARTAMENTOs\r\n\t\tthis.controlador.insertDepartamentoUsuario(nvJefe, nombredep); //tabla DepartamentoUsuario\r\n\r\n\t\t//insertamos en la cache\r\n\t\t//Departamento d=new Departamento(nombredep,Integer.parseInt(num),getEmpleado(nvJefe),null,null);\r\n\t\t//departamentosJefe.add(d);\r\n\t\t/*ArrayList<Object> aux=new ArrayList<Object>();\r\n\t\taux.add(nombredep);\r\n\t\taux.add(n);\r\n\t\taux.add(nvJefe);\r\n\t\tinsertCache(aux,\"crearDepartamento\");*///no quitar el parseInt\r\n\t}", "public static Posee insertPosee(Date fecha_inicio,ServicioAdicional serv_adicional,\n Producto producto){\n Posee miPosee = new Posee(fecha_inicio,serv_adicional,producto);\n miPosee.registrarPosee();\n \n return miPosee;\n }", "private void registrarCoactivoOficioBien(CoactivoOficioBienDTO coactivoOficioBienDTO) {\n CoactivoOficioBien coactivoOficioBien = CoactivoOficioBienHelper.toLevel1Entity(coactivoOficioBienDTO, null);\n em.persist(coactivoOficioBien);\n }", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "private static void teste01 () {\n\t\tEstoque e = new Estoque();\n\t\n\t\te.setCodigo(1);\n\t\te.setPreco(new Float(10));\n\t\te.setQuantidade(1);\n\t\te.setFornecedor(\"provider\");\n\t\n\t\te.insert();\n\n\t\tlog.debug(\"Estoque inserido.\");\n\t}", "public com.vh.locker.ejb.Contact create(java.lang.Long id, java.lang.String name, java.lang.String nickName, java.lang.String phone, java.lang.String email, com.vh.locker.ejb.User anUser) throws javax.ejb.CreateException;", "Negacion createNegacion();", "public void inseriPessoa() throws IOException {\n\t\tString r;\n\t\tvetPessoas[nPessoas] = new Pessoa();\n\t\tSystem.out.println(\"Inseri o nome \");\n\t\tr = EntradaTeclado.leString();\n\t\tvetPessoas[nPessoas].setNome(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o Cpf \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetPessoas[this.nPessoas].setCpf(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o Endereco \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetPessoas[this.nPessoas].setEndereco(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o Email \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetPessoas[this.nPessoas].setEmail(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o Data de Nascimento fomanto (dd/mm/aaaa)\");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetPessoas[this.nPessoas].setDataNascimento(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o Estado Civil \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetPessoas[this.nPessoas].setEstadoCivil(r);\n\t\t\n\t\tthis.nPessoas+=1;\n\t}", "private void insertData() {\n compra = factory.manufacturePojo(CompraVentaEntity.class);\n compra.setId(1L);\n compra.setQuejasReclamos(new ArrayList<>());\n em.persist(compra);\n\n for (int i = 0; i < 3; i++) {\n QuejasReclamosEntity entity = factory.manufacturePojo(QuejasReclamosEntity.class);\n entity.setCompraVenta(compra);\n em.persist(entity);\n data.add(entity);\n compra.getQuejasReclamos().add(entity);\n }\n }", "public static Consumo insertConsumo(int cantidad_consumo,Date fecha_inicio,\n Producto producto,Servicio servicio){\n Consumo miConsumo = new Consumo(cantidad_consumo,fecha_inicio, \n producto, servicio);\n miConsumo.registrarConsumo();\n return miConsumo;\n }", "@Override\n\tpublic MensajeBean inserta(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.inserta(nuevo);\n\t}", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "@Override\n\tpublic void insertarServicio(Servicio nuevoServicio) {\n\t\tservicioDao= new ServicioDaoImpl();\n\t\tservicioDao.insertarServicio(nuevoServicio);\n\t\t\n\t\t\n\t}", "public void insertar(int rafaga, int tiempo) {\n\t\tif (rafaga <= 0 || tiempo < 0) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.id = String.valueOf((char) this.caracter);\n\t\tthis.caracter++;\n\t\tnuevo.rafaga = rafaga;\n\t\tnuevo.tllegada = tiempo;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.ColaProviene = this.NombreCola;\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += rafaga;\n\t\tthis.Ordenamiento();\n\t}", "@Override\n public void agregarComentario(String pNumFinca, String pComentario) throws SQLException {\n Comentario comentario = new Comentario(pComentario, Integer.parseInt(pNumFinca));\n bdPropiedad.manipulationQuery(\"INSERT INTO COMENTARIO (ID_PROPIEDAD, COMENTARIO) VALUES (\" + \n comentario.getIdPropiedad() + \", '\" + comentario.getComentario() + \"')\");\n comentarios.add(comentario);\n }", "private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }", "public OrdemDeServico inserir (OrdemDeServico servico) {\n\t\tservico.setId((Long) null);\n\t\treturn repoOrdem.save(servico);\n\t}", "public co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.soltec\n\t\t.datos_publicacion\n\t\t.ejb\n\t\t.sb\n\t\t.DatosPublicacionSTLocal create()\n\t\tthrows javax.ejb.CreateException;", "void adicionaComentario(Comentario comentario);", "public boolean crear(String nombre, String apellido, String cedula) {\n Cliente cliente = new Cliente(generarId(), nombre, apellido, cedula); // Creo un nuevo cliente\n return datos.add(cliente); // Agrego a mi lista de datos\n }", "public String insertarOficial() {\r\n\t\tlog.info(\"LISTA DE DESHABILITADO--> \"+ TelefonoDeshabilitado.size()); \r\n\t\tlog.info(\"insertarOficial() \" + \"Id-Cliente-->\"+\" \"+ objClienteSie.getIdcliente() + \" \"+\"Nombre de Cliente\"+\" \"+ objClienteSie.getNombrecliente());\r\n\t\tString paginaretorno=\"\";\r\n\t\ttry {\r\n\t\t\tif (log.isInfoEnabled()) {\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlog.info(\"busca el Id-DNI\");\r\n\t\t\tobjClienteSie.setTbTipoDocumentoIdentidad(objTipoDocService.buscarTipoDocumento(TipoDocumento));\r\n\t\t\t\r\n\t\t\tlog.info(\"busca el Id-Ubigeo\");\r\n\t\t\tobjDomicilio.setTbUbigeo(objUbigeoService.findUbigeo(Integer.parseInt(idUbigeo1)));\r\n\t\t\t\r\n\t\t\tlog.info(\"*******AQUI ESTA SI HAY UN VALOR DENTRO DE LA LISTA TELEFONOS PARA ELIMINAR*******\");\r\n\t\t\tlog.info(\"Tel-FISICO--------->\"+ \" \"+ TelefonoDeshabilitado.size());\r\n\t\t\tlog.info(\"Tel-TEMPORAL------->\"+ \"\t\"+ TelefonoPersonaList.size());\r\n\t\t\t\r\n\t\t\tlog.info(\"*******AQUI ESTA SI HAY UN VALOR DENTRO DE LA LISTA DOMICILIO PARA ELIMINAR*******\");\r\n\t\t\tlog.info(\"Domicilio-FISICO--------->\"+ \" \"+ DomicilioPersonaDeshabilitado.size());\r\n\t\t\tlog.info(\"Domicilio-TEMPORAL------->\"+ \"\t\"+ DomicilioPersonaList.size());\r\n\t\t\tobjClienteService.updateCliente(objClienteSie,objDomicilio,idUbigeo1, idUbigeo, tipo, Tipocasanuevo,TelefonoPersona,TelefonoPersonaList, TelefonoDeshabilitado, DomicilioPersonaList, DomicilioPersonaDeshabilitado);\r\n\t\t\t\r\n\t\t\tmensaje = Constants.MESSAGE_ACTUALIZO_TITULO;\r\n\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_INFO,\r\n\t\t\tConstants.MESSAGE_INFO_TITULO, mensaje);\r\n\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tmensaje = e.getMessage();\r\n\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\tlog.error(e.getMessage());\r\n\t}\r\n\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\treturn getViewList();\r\n\t}", "public void create() {\r\n for(int i=0; i< 50; i++){\r\n long id = (new Date()).getTime();\r\n Benefit newBeneficio = new Benefit();\r\n newBeneficio.setId(\"\"+id); \r\n newBeneficio.setCategory(\"almacenes \"+id);\r\n newBeneficio.setDescription(\"description \"+id);\r\n newBeneficio.setDiscount(i);\r\n newBeneficio.setStart_date(\"start_date \"+id);\r\n newBeneficio.setEnd_date(\"end_date \"+id);\r\n newBeneficio.setReview(\"review \"+id);\r\n newBeneficio.setTitle(\"title \"+id);\r\n newBeneficio.setLogo(\"logo \"+id);\r\n newBeneficio.setTwitter(\"twitter \"+id);\r\n newBeneficio.setFacebook(\"facebook \"+id);\r\n newBeneficio.setUrl(\"url \"+ id);\r\n \r\n Address address = new Address();\r\n address.setCity(\"Santiago \"+ id);\r\n address.setCountry(\"Santiago \"+ id);\r\n address.setLine_1(\"Linea 1 \"+ id);\r\n address.setLine_2(\"Linea 2 \"+ id);\r\n address.setLine_3(\"Linea 3 \"+ id);\r\n address.setPostcode(\"\" + id);\r\n address.setState(\"Region Metropolitana \"+ id);\r\n \r\n Location location = new Location();\r\n double[] cordenadas = {-77.99283,-33.9980};\r\n location.setCoordinates(cordenadas);\r\n location.setDistance(5.445);\r\n location.setType(\"Point\");\r\n \r\n Lobby lobby = new Lobby();\r\n lobby.setHours(\"HORA \"+ + id);\r\n \r\n newBeneficio = service.persist(newBeneficio);\r\n LOGGER.info(newBeneficio.toString());\r\n }\r\n }", "private void populaFaixaEtariaCat()\n {\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"Até 15 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"De 16 a 19 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"De 20 a 30 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"De 31 a 45 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"De 46 a 60 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"Mais de 60 anos\"));\n faixaEtariaCatDAO.insert(new FaixaEtariaCat(\"Todas as idades\"));\n\n }", "public void insertar(Cliente c) {\n if (cabeza == null) { //En caso de que la cabeza sea nula, el dato sera el primero de la lista.\n cabeza = new NodoCliente(c);\n } else {\n if (c.getEspacios() <= cabeza.getDato().getEspacios()) { //Con ayuda de la condicion \"if\" y \"else\" de abajo, se orden los datos por espacios reservados,\n NodoCliente aux = new NodoCliente(c); //de menor a mayor.\n aux.setNext(cabeza);\n cabeza = aux;\n } else {\n if (cabeza.getNext() == null) {\n cabeza.setNext(new NodoCliente(c));\n } else {\n NodoCliente aux = cabeza;\n while (aux.getNext() != null && c.getEspacios() > aux.getNext().getDato().getEspacios()) {\n aux = aux.getNext();\n }\n NodoCliente temp = new NodoCliente(c);\n temp.setNext(aux.getNext());\n aux.setNext(temp);\n }\n }\n }\n }", "public void crear(Tarea t) {\n t.saveIt();\n }", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public void grabar(CalidadPcc o) {\n\t\ttry {\r\n\t\t\tem.getTransaction().begin();\r\n\t\t\tem.persist(o);\r\n\t\t\tem.getTransaction().commit();\r\n\t\t} finally {\r\n\t\t\tem.close();\r\n\t\t}\r\n\t}", "@Override\n public ComprobanteContable createAsientoDiarioBoleto(Boleto boleto) throws CRUDException {\n\n Optional op;\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n /*Aerolinea a = em.find(Aerolinea.class, boleto.getIdAerolinea().getIdAerolinea());\n if (a != null) {\n buff.append(a.getNumero());\n }*/\n buff.append(boleto.getIdAerolinea().getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas \n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n Cliente c = em.find(Cliente.class, boleto.getIdCliente().getIdCliente());\n op = Optional.ofNullable(c);\n\n if (!op.isPresent()) {\n throw new CRUDException(\"No se encontro un Cliente para el boleto\");\n }\n\n comprobante.setIdCliente(c);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(ComprobanteContable.Tipo.ASIENTO_DIARIO);\n\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), ComprobanteContable.Tipo.ASIENTO_DIARIO);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setIdNumeroGestion(numero);\n\n return comprobante;\n }", "com.spirit.crm.entity.ClienteContactoIf addClienteContacto(com.spirit.crm.entity.ClienteContactoIf model) throws GenericBusinessException;", "public synchronized Boolean nuevoCliente(JSONObject persona,JSONObject cliente) throws ExceptionViajesCompartidos {\n\n\n //creo los objectos a partir de los JSON recibidos\n \tPersona p= new Persona(persona);\n \tCliente c= new Cliente(cliente);\n \t/*\n \ttry{\n\t\t\t iniciarTransaccion( );\n\t\t\t c.setPersona(p);\n\t\t\t System.out.println(\"id persona antes de insert: \"+p.getId_persona());\n\t\t\t entitymanager.persist(p);\n\t\t\t System.out.println(\"id persona despues de insert: \"+p.getId_persona());\n\t\t\t System.out.println(\"id cliente antes de insert: \"+c.getId_usuario());\n\t\t\t entitymanager.persist(c);\n\t\t\t System.out.println(\"id cliente despues de insert: \"+c.getId_usuario());\n\t\t\t Query qry = entitymanager.createNamedQuery(\"Rol.porNombre\");\n\t \t qry.setParameter(\"nombre\", \"cliente\");\n\t\t\t Rol r= (Rol) qry.getSingleResult();\n\t\t\t c.asignarRol(r);\n\t\t\t entitymanager.getTransaction( ).commit( );\t\n\t\t\t \n\t\t\t System.out.println(\"id persona despues de commit: \"+p.getId_persona());\n\t\t\t System.out.println(\"id cliente despues de commit: \"+c.getId_usuario());\n\t\t\t Rol rol_recien_asignado= c.getRoles().get(0).getRol();\n\t\t\t System.out.println(\"nombre del rol recien asignado: \"+rol_recien_asignado.getNombre_rol());\n\t\t\t \n\t\t\t return true;\n\t\t}catch(Exception e){\n\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t} \n\t\t*/\t\n\t\tthis.iniciarTransaccion();\n\t\t c.setPersona(p);\n\t\t c.setPuntos(0);\n\t\t c.setReputacion(3);\n\t\t entitymanager.persist(p);\n\t\t entitymanager.persist(c);\n\t\t Query qry = entitymanager.createNamedQuery(\"Rol.porNombre\");\n\t\t qry.setParameter(\"nombre\", \"cliente\");\n\t\t Rol r= (Rol) qry.getSingleResult();\n c.asignarRol(r);\n try{\n this.entitymanager.getTransaction().commit();\n return true;\n\n }catch(RollbackException e){\n String error= ManejadorErrores.parsearRollback(e);\n throw new ExceptionViajesCompartidos(\"ERROR: \"+error);\n }\n\t}", "public void insertaMensaje(InfoMensaje m) throws Exception;", "Operacion createOperacion();", "com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();", "public void insere(Pessoa pessoa){\n\t\tdb.save(pessoa);\n\t}", "public static Contiene insertContiene(int cantidad_contiene,\n float costo_adicional_contiene,\n Paquete paquete,Servicio servicio){\n \n \n Contiene miContiene = new Contiene(cantidad_contiene, costo_adicional_contiene, \n paquete, servicio); \n \n try {\n miContiene.registrarContiene();\n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return miContiene;\n }", "public boolean crearCliente(Cliente cliente) {\n\t\ttry{\n\t\t\tString insert = \"INSERT INTO clientes(nit, email, pais, fecharegistro, \"\n + \"razonsocial, idioma, categoria) VALUES ( ?, ?, ?, ?, ?, ?, ? );\";\n\t\t\tPreparedStatement ps = con.prepareStatement(insert);\n\t\t\tps.setString(1, cliente.getNit());\n ps.setString(2, cliente.getEmail());\n ps.setString(3, cliente.getPais());\n ps.setDate(4, new java.sql.Date(cliente.getFechaRegistro().getTime()));\n ps.setString(5, cliente.getRazonSocial());\n ps.setString(6, cliente.getIdioma());\n ps.setString(7, cliente.getCategoria());\n //para marca un punto de referencia en la transacción para hacer un ROLLBACK parcial. \n\t\t\tSavepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\t\t\t\n\t\t\tps.executeUpdate();\t\n\t\t\tcon.commit();\n\t\t\treturn true;\n\t\t}catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\r\n /* OSINE791 - RSIS1 - Inicio */\r\n //public ExpedienteDTO generarExpedienteOrdenServicio(ExpedienteDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO) throws ExpedienteException{\r\n public ExpedienteGSMDTO generarExpedienteOrdenServicio(ExpedienteGSMDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO,String sigla) throws ExpedienteException{\r\n LOG.error(\"generarExpedienteOrdenServicio\");\r\n ExpedienteGSMDTO retorno= new ExpedienteGSMDTO();\r\n try{\r\n expedienteDTO.setEstado(Constantes.ESTADO_ACTIVO);\r\n PghExpediente pghExpediente = ExpedienteGSMBuilder.toExpedienteDomain(expedienteDTO);\r\n pghExpediente.setFechaEstadoProceso(new Date());\r\n pghExpediente.setDatosAuditoria(usuarioDTO);\r\n crud.create(pghExpediente);\r\n retorno=ExpedienteGSMBuilder.toExpedienteDto(pghExpediente);\r\n \r\n //reg historicoEstado\r\n MaestroColumnaDTO tipoHistorico=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_EXPEDIENTE).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstado=historicoEstadoDAO.registrar(pghExpediente.getIdExpediente(), null, pghExpediente.getIdEstadoProceso().getIdEstadoProceso(), pghExpediente.getIdPersonal().getIdPersonal(), pghExpediente.getIdPersonal().getIdPersonal(), tipoHistorico.getIdMaestroColumna(),null,null, null, usuarioDTO);\r\n LOG.info(\"historicoEstado-->\"+historicoEstado);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n //inserta ordenServicio\r\n Long idLocador=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)?expedienteDTO.getOrdenServicio().getLocador().getIdLocador():null;\r\n Long idSupervisoraEmpresa=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)?expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa():null;\r\n OrdenServicioDTO OrdenServicioDTO=ordenServicioDAO.registrar(retorno.getIdExpediente(), \r\n expedienteDTO.getOrdenServicio().getIdTipoAsignacion(), expedienteDTO.getOrdenServicio().getEstadoProceso().getIdEstadoProceso(), \r\n /* OSINE791 - RSIS1 - Inicio */\r\n //codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO);\r\n codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO,sigla);\r\n /* OSINE791 - RSIS1 - Fin */\r\n LOG.info(\"OrdenServicioDTO:\"+OrdenServicioDTO.getNumeroOrdenServicio());\r\n //busca idPersonalDest\r\n PersonalDTO personalDest=null;\r\n List<PersonalDTO> listPersonalDest=null;\r\n if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)){\r\n //personalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null)).get(0);\r\n listPersonalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null));\r\n }else if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)){\r\n //personalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa())).get(0);\r\n listPersonalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa()));\r\n }\r\n if(listPersonalDest==null || listPersonalDest.isEmpty()){\r\n throw new ExpedienteException(\"La Empresa Supervisora no tiene un Personal asignado\",null);\r\n }else{\r\n personalDest=listPersonalDest.get(0);\r\n }\r\n //inserta historico Orden Servicio\r\n EstadoProcesoDTO estadoProcesoDto=estadoProcesoDAO.find(new EstadoProcesoFilter(Constantes.IDENTIFICADOR_ESTADO_PROCESO_OS_REGISTRO)).get(0);\r\n MaestroColumnaDTO tipoHistoricoOS=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_ORDEN_SERVICIO).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstadoOS=historicoEstadoDAO.registrar(null, OrdenServicioDTO.getIdOrdenServicio(), estadoProcesoDto.getIdEstadoProceso(), expedienteDTO.getPersonal().getIdPersonal(), personalDest.getIdPersonal(), tipoHistoricoOS.getIdMaestroColumna(),null,null, null, usuarioDTO); \r\n LOG.info(\"historicoEstadoOS:\"+historicoEstadoOS);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n retorno.setOrdenServicio(new OrdenServicioDTO(OrdenServicioDTO.getIdOrdenServicio(),OrdenServicioDTO.getNumeroOrdenServicio()));\r\n }catch(Exception e){\r\n LOG.error(\"error en generarExpedienteOrdenServicio\",e);\r\n throw new ExpedienteException(e.getMessage(), e);\r\n }\r\n return retorno;\r\n }", "public void ajouter() {\n position = graph.edges.ajouterElement(this);\n origine.successeurs.inserer(destination);\n destination.predecesseurs.inserer(origine);\n origine.aretes_sortantes.inserer(this);\n destination.aretes_entrantes.inserer(this);\n }", "public void registrarPagoFacturaCredito(){\n if(facturaCredito != null){\n try{\n //NUEVA TRANSACCION\n Transaccion transac = new Transaccion();\n transac.setFechaTransac(new funciones().getTime());\n transac.setHoraTransac(new funciones().getTime());\n transac.setResponsableTransac(new JsfUtil().getEmpleado());\n transac.setTipoTransac(4); //REGISTRO DE PAGO\n transac.setIdtransac(ejbFacadeTransac.getNextIdTransac());\n ejbFacadeTransac.create(transac);\n //REGISTRAR PAGO\n PagoCompra pagoCompra = new PagoCompra();\n pagoCompra.setFacturaIngreso(facturaCredito);\n pagoCompra.setIdtransac(transac);\n pagoCompra.setInteresPagoCompra(new BigDecimal(intereses));\n pagoCompra.setMoraPagoCompra(new BigDecimal(mora));\n pagoCompra.setAbonoPagoCompra(new BigDecimal(pago));\n BigDecimal total = pagoCompra.getAbonoPagoCompra().add(pagoCompra.getInteresPagoCompra()).add(pagoCompra.getMoraPagoCompra());\n pagoCompra.setTotalPagoCompra(new BigDecimal(new funciones().redondearMas(total.floatValue(), 2)));\n pagoCompra.setIdpagoCompra(ejbFacadePagoCompra.getNextIdPagoCompra());\n ejbFacadePagoCompra.create(pagoCompra); // Registrar Pago en la BD\n //Actualizar Factura\n facturaCredito.getPagoCompraCollection().add(pagoCompra); //Actualizar Contexto\n BigDecimal saldo = facturaCredito.getSaldoCreditoCompra().subtract(pagoCompra.getAbonoPagoCompra());\n facturaCredito.setSaldoCreditoCompra(new BigDecimal(new funciones().redondearMas(saldo.floatValue(), 2)));\n if(facturaCredito.getSaldoCreditoCompra().compareTo(BigDecimal.ZERO)==0){\n facturaCredito.setEstadoCreditoCompra(\"CANCELADO\");\n facturaCredito.setFechaCancelado(transac.getFechaTransac());\n }\n facturaCredito.setUltimopagoCreditoCompra(transac.getFechaTransac());\n ejbFacadeFacturaIngreso.edit(facturaCredito);\n new funciones().setMsj(1, \"PAGO REGISTRADO CORRECTAMENTE\");\n if(facturaCredito.getEstadoCreditoCompra().equals(\"CANCELADO\")){\n RequestContext context = RequestContext.getCurrentInstance(); \n context.execute(\"alert('FACTURA CANCELADA POR COMPLETO');\");\n }\n prepararPago();\n }catch(Exception e){\n new funciones().setMsj(3, \"ERROR AL REGISTRAR PAGO\");\n }\n }\n }", "public void insertProblema() {\n \n \n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n \n this.equipo.setEstado(true);\n this.prob = new ReporteProblema(equipo, this.problema, true,fecha);\n f.registrarReporte(this.prob);\n \n }", "public static void insertar (tcus_clientes info){\n \tNodoArbol nuevo = new NodoArbol (info);\n if (raiz == null) {\n raiz = nuevo;\n } else {\n \tNodoArbol anterior = null, reco;\n reco = raiz;\n while (reco != null) {\n anterior = reco;\n if (info.getNmid() < reco.getNodo().getNmid())\n reco = reco.getIzq();\n else\n reco = reco.getDer();\n }\n if (info.getNmid() < anterior.getNodo().getNmid())//50<100\n anterior.setIzq(nuevo); \n else\n anterior.setDer(nuevo);\n }\n }", "public static Efectivo insertEfectivo(int id_efectivo, int numero_pago){\n \n Efectivo miEfectivo = new Efectivo(id_efectivo,numero_pago);\n miEfectivo.registrarEfectivo();\n return miEfectivo;\n }", "public void inseriEmpresa() throws IOException {\n\t\tString r;\n\t\tthis.vetEmpreas[this.nEmpresas] = new Empresa();\n\t\t\n\t\tSystem.out.println(\"Inseri o nome \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setNome(r);\n\n\t\tSystem.out.println(\"Inseri o CNPJ \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setCnpj(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o endereco \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setEndereco(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o email \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setEmail(r);\n\t\t\n\t\tSystem.out.println(\"Inseri InscricaoEstadual \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setInscricaoEstadual(r);\n\t\t\n\t\tSystem.out.println(\"Inseri Razao Social \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setRazaoSocial(r);\n\t\t\n\t\tthis.nEmpresas +=1;\n\t}", "@Override\n\tpublic boolean crear(Connection connection, Object DetalleSolicitud) {\t\n\t\tDetalleSolicitud detalleSolicitud = (DetalleSolicitud)DetalleSolicitud;\n\t\tString query = \"INSERT INTO detallesolicitudes (cantidad, fechaEntrega, disenoFk, solicitudFk) \"\n\t\t\t\t+ \"values ( ?, ?, ?, ?)\";\n\t\ttry {\t\n\t\t\tPreparedStatement preparedStatement = (PreparedStatement) connection.prepareStatement(query);\n\t\t\tpreparedStatement.setInt(1, detalleSolicitud.getCantidad());\n\t\t\tpreparedStatement.setDate(2, detalleSolicitud.getFechaEntrega());\n\t\t\tpreparedStatement.setInt(3, detalleSolicitud.getDisenoFk());\n\t\t\tpreparedStatement.setInt(4, detalleSolicitud.getSolicitudFk());\n\t\t\tpreparedStatement.execute();\n\t\t\treturn true; \n\t\t} catch (SQLException ex) {\n\t\t\tNotificacion.dialogoException(ex);\n\t\t\treturn false;\t\t\t\n\t\t}//FIN TRY/CATCH\n\t}", "public void addContactPeupler(IContact contact) {\n\n\t\ttry {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"*******************je suis dans addContact peupler *******************************************\");\n\t\t\tsessionFactory.getCurrentSession().save(contact);\n\n\t\t} catch (HibernateException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public RAMContactoDAO() {\r\n /*contacto.add(c1);\r\n contacto.add(c2);\r\n contacto.add(c3);\r\n contacto.add(c4);*/\r\n }", "public void abrirDialogoCustodio(){\n\t\tif(aut_empleado.getValor()!=null){\n\t\t\ttab_tarspaso_Custodio.limpiar();\n\t\t\ttab_tarspaso_Custodio.insertar();\n\t\t\t//tab_direccion.limpiar();\n\t\t//\ttab_direccion.insertar();\n\t\t\tdia_traspaso_custodio.dibujar();\n\t\t}\n\t\telse{\n\t\t\tutilitario.agregarMensaje(\"Inserte un Custodio\", \"\");\n\t\t}\n\n\t}", "@Override\n void create(Cliente cliente);", "public static void crearequipo(String nombre,String ciudad,String pais) {\r\n\r\n\t\t\tConnection c = ConnectionDB.conectarMySQL();\r\n\t\t\ttry {\r\n\t\t\t\tPreparedStatement stmt = c\r\n\t\t\t\t\t\t.prepareStatement(\"INSERT INTO equipo (nombre , ciudad ,pais ) Values('\"+ nombre + \"','\" + ciudad + \"','\" + pais + \"')\");\r\n\t\t\t\tstmt.executeUpdate();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}", "void crearNuevaPersona(Persona persona);", "public void adicionarServicos() {\n int i;\n if (hospedesCadastrados.isEmpty()) {\n System.err.println(\"Não existem hospedes cadastrados!\\n\");\n } else {\n\n System.err.println(\"Digite o cpf do hospede que deseja adicionar servicos:\");\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//pega o indice i do objeo pessoa, pega o id da pessoa e compara com o id da pessoa digitada\n if (hospedesCadastrados.get(i).getContrato().isSituacao()) {//verifica se a situaçao do contrato ainda está aberta para esse hospede\n\n System.err.println(\"O que deseja editar do contrato\\n\");\n //adicionar carro, trocar de quarto, adicionar conta de restaurante,\n //encerrar contrato\n\n System.err.println(\"Adicionar carro (1):\\nAdicionar restaurante (2):\\n\"\n + \"Adicionar horas de BabySitter (3):\\nAdicionar quarto(4):\\n\");\n int caso = verifica();\n switch (caso) {\n case 1://carro\n if (carrosCadastrados.isEmpty()) {\n System.err.println(\"Nao existem carros cadastrados!\\n\");\n } else {\n listarCarros();\n System.err.println(\"Digite o id do carro que deseja contratar:\\n\");\n int idCarro = verifica();\n\n for (int j = 0; j < carrosCadastrados.size(); j++) {\n if (carrosCadastrados.get(j).getId() == idCarro) {\n if (carrosCadastrados.get(j).isEstado()) {\n System.err.println(\"Esse carro já está cadastrado.\\n\");\n } else {\n hospedesCadastrados.get(i).getContrato().setCarros(carrosCadastrados.get(j));\n carrosCadastrados.get(j).setEstado(true);\n }\n }\n }\n }\n break;\n\n case 2://restaurante\n System.err.println(\"Digite o quanto deseja gastar no restaurente\\n\");\n double valorRestaurante = ler.nextDouble();\n// idd();\n// int idRestaurante = id;\n// Restaurante restaurante = new Restaurante(idRestaurante, valorRestaurante);\n hospedesCadastrados.get(i).getContrato().setValorRestaurante(valorRestaurante);\n break;\n case 3://babysitter\n System.err.println(\"Digite o tempo gasto no BabySytter em horas\\n\");\n double tempoBaby = ler.nextDouble();\n hospedesCadastrados.get(i).getContrato().setHorasBaby(tempoBaby);\n break;\n case 4://quartos\n\n if (quartosCadastrados.isEmpty()) {\n\n } else {\n System.err.println(\"Digite o numero do quarto que deseja contratar:\\n\");\n listarQuartos();\n int num = verifica();\n System.err.println(\"Digite a quantidade de dis que pretente alugar o quarto:\\n\");\n int dias = verifica();\n for (int j = 0; j < quartosCadastrados.size(); j++) {\n if (num == quartosCadastrados.get(j).getNumero()) {//verifica se o numero digitado é igual ao numero do quarto do laco\n if (quartosCadastrados.get(j).getEstado()) {//verifica se o estado do quarto está como true\n System.err.println(\"Este quarto já está cadastrado em um contrato\");\n } else {//se o estado tiver em true é porque o quarto ja está cadastrado\n\n hospedesCadastrados.get(i).getContrato().setQuartos(quartosCadastrados.get(j));\n hospedesCadastrados.get(i).getContrato().getQuartosCadastrados().get(j).setDias(dias);\n hospedesCadastrados.get(i).getContrato().getQuartosCadastrados().get(j).setEstado(true);//seta o estado do quarto como ocupado\n System.err.println(\"Quarto cadastrado!\\n\");\n }\n\n }\n\n }\n\n//remove all remove todas as pessoas com tal nome\t\n }\n break;\n\n }\n } else {\n System.err.println(\"O contrato deste Hospede encontra-se encerrado\");\n break;\n }\n }\n }\n }\n }", "public void crearAsistente(AsistenteDTO dto) throws SQLException {\n artFacade.crear(dto);\n }", "public void InsertarProceso(Proceso nuevo) {\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tthis.cabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t}", "Lancamento persistir(Lancamento lancamento);", "private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n UsuarioEntity entity = factory.manufacturePojo(UsuarioEntity.class);\r\n em.persist(entity);\r\n dataUsuario.add(entity);\r\n }\r\n for (int i = 0; i < 3; i++) {\r\n CarritoDeComprasEntity entity = factory.manufacturePojo(CarritoDeComprasEntity.class);\r\n if (i == 0 ){\r\n entity.setUsuario(dataUsuario.get(0));\r\n }\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }", "public void crearDisco( ){\r\n boolean parameter = true;\r\n String artista = panelDatos.darArtista( );\r\n String titulo = panelDatos.darTitulo( );\r\n String genero = panelDatos.darGenero( );\r\n String imagen = panelDatos.darImagen( );\r\n\r\n if( ( artista.equals( \"\" ) || titulo.equals( \"\" ) ) || ( genero.equals( \"\" ) || imagen.equals( \"\" ) ) ) {\r\n parameter = false;\r\n JOptionPane.showMessageDialog( this, \"Todos los campos deben ser llenados para crear el disco\" );\r\n }\r\n if( parameter){\r\n boolean ok = principal.crearDisco( titulo, artista, genero, imagen );\r\n if( ok )\r\n dispose( );\r\n }\r\n }", "Motivo create(Motivo motivo);", "public void crearPrograma(Programa prog) throws Exception {\r\n\t\tEntityManager em = AdministradorEntityManager.getEntityManager();\t\t\r\n\t\tem.getTransaction().begin();\r\n\t\tem.persist(prog);\r\n\t\tem.getTransaction().commit();\t\t\r\n\t}", "com.soa.SolicitarCreditoDocument.SolicitarCredito addNewSolicitarCredito();", "@Test\n public void createEspecieTest() throws BusinessLogicException\n {\n EspecieEntity newEspecie = factory.manufacturePojo(EspecieEntity.class);\n EspecieEntity result = especieLogic.crearEspecie(newEspecie);\n Assert.assertNotNull(result);\n EspecieEntity entity = em.find(EspecieEntity.class, result.getId());\n Assert.assertEquals(newEspecie.getId(), entity.getId());\n Assert.assertEquals(newEspecie.getNombre(), entity.getNombre());\n }", "private void insertData() {\r\n \r\n TeatroEntity teatro = factory.manufacturePojo(TeatroEntity.class);\r\n em.persist(teatro);\r\n FuncionEntity funcion = factory.manufacturePojo(FuncionEntity.class);\r\n List<FuncionEntity> lista = new ArrayList();\r\n lista.add(funcion);\r\n em.persist(funcion);\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n sala.setFuncion(lista);\r\n em.persist(sala);\r\n data.add(sala);\r\n }\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n em.persist(sala);\r\n sfdata.add(sala);\r\n }\r\n \r\n }", "private void addInstituicao() {\n\n if (txtNome.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Nome Invalido\");\n txtNome.grabFocus();\n return;\n } else if (txtNatureza.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Campo Natureza Invalido\");\n txtNatureza.grabFocus();\n return;\n }\n if ((instituicao == null) || (instituicaoController == null)) {\n instituicao = new Instituicao();\n instituicaoController = new InstituicaoController();\n }\n instituicao.setNome(txtNome.getText());\n instituicao.setNatureza_administrativa(txtNatureza.getText());\n if (instituicaoController.insereInstituicao(instituicao)) {\n limpaCampos();\n JOptionPane.showMessageDialog(null, \"Instituicao Cadastrada com Sucesso\");\n }\n }", "void create_MB(String nombre){\n if (Globales.UltimoIndiceMailbox == 6){\r\n PantallaError pe = new PantallaError(\"Ya hay 6 buzones (mailbox) en ejecución, no puede crear más.\");\r\n }\r\n else{\r\n Mailbox mb = new Mailbox(\"MB\"+nombre);\r\n Globales.mails[Globales.UltimoIndiceMailbox]=mb;\r\n //System.out.println(\"Globales.mails[\"+Globales.UltimoIndiceMailbox+\"] = \"+Globales.mails[Globales.UltimoIndiceMailbox].nombre);\r\n Globales.UltimoIndiceMailbox++;\r\n //System.out.println(\"creó el mb: \"+mb.nombre+\" y lo insertó el el arreglo global de mb\");\r\n }\r\n }", "public int Create(Objet obj) {\n\t\tPreparedStatement smt=null; \n\t\t\n\t\tString chaineSQL=\"\";\n int rep=0;\n \t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tchaineSQL=\"insert into objet_vente (Designation,Prix,Categories,Lieu,Date,Email) values(?,?,?,?,?,?)\";\t\t\t\n\t\t\tsmt=this.getCnn().prepareStatement(chaineSQL, Statement.RETURN_GENERATED_KEYS); //retourne le Id auto incrementé lors de l'envoie de la chaine sql\n\t\t\t\n\t\t\tsmt.setString(1, obj.getDesignation());\n\t\t\tsmt.setInt(2, Integer.parseInt(obj.getPrix()));\n\t\t\tsmt.setString(3, obj.getCategorie());\n\t\t\tsmt.setString(4, obj.getLieu());\n\t\t\tsmt.setDate(5, obj.getDate());\n\t\t\tsmt.setString(6, obj.getEmail());\n\t\t\t\n\t\t\t\t\t\n\t\t\trep=smt.executeUpdate();\n\t\t\t// rep contient le nbre d'enreigistrement effectué/ligne\n\t\t\tResultSet generatedKey = smt.getGeneratedKeys(); //getGeneratedKeys retourne le *id auto incrementé\n\t\t\tgeneratedKey.next();\n\t\t\t//on sait que y a q'une ligne ou on insere donc 1 seule .next()\n\t\t\tobj.setId(generatedKey.getInt(1));\n\t\t\t// lit dans la 1ere colonne avec la ligne correspondante a celle crée et retourne ici l'ID objet\n\t\t\t\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn rep;\n\t}", "public ReservaEntity createReserva(ReservaEntity reservaEntity) throws BusinessLogicException \n {\n LOGGER.log(Level.INFO, \"Inicia proceso de creación de la reserva\");\n UsuarioEntity usuario = persistenceUser.findUsuario(reservaEntity.getUsuario().getId());\n reservaEntity.setUsuario(usuario);\n persistence.create(reservaEntity);\n LOGGER.log(Level.INFO, \"Termina proceso de creación de la reserva\");\n return reservaEntity;\n }", "public void createDienst()\n\t{\n\t\twriteDb(\"INSERT INTO dienstleistung (Bezeichnung, Preis)\" + \"VALUES('\" + typ + \"', '\" + preis +\"')\", getWriteCon());\n\t\tcommitDbConnection(getWriteCon());\n\t}", "public static ServicioAdicional insertServicioAdicional(String nombre_servicio,\n String descripcion_servicio,\n String nombre_tipo_servicio,\n float tarifa_serv_adicional,\n int cantidad_serv_adicional,\n String tipo_plan_serv_adicional){\n \n ServicioAdicional miServAdicional = new ServicioAdicional(nombre_servicio,\n descripcion_servicio,\n nombre_tipo_servicio,\n tarifa_serv_adicional,\n cantidad_serv_adicional,\n tipo_plan_serv_adicional);\n \n \n try {\n miServAdicional.registrarServicioAd();\n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return miServAdicional;\n \n }", "public void insertFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);", "public void insertarPaciente ( String dni, String nombre, String apellidos, String telefono,String emaail,float peso_actual, float peso_objetivo, float altura, int edad, String sexo, String password,String complexion);" ]
[ "0.6738334", "0.6590132", "0.65507674", "0.6421089", "0.6419533", "0.6362563", "0.63499206", "0.633053", "0.63096714", "0.62972766", "0.6289395", "0.6279096", "0.6267313", "0.6264789", "0.6262639", "0.62564075", "0.62464255", "0.6244467", "0.6231782", "0.62254083", "0.61717874", "0.61706245", "0.6167877", "0.6166403", "0.6163436", "0.61632806", "0.61613744", "0.61582476", "0.6155409", "0.61463267", "0.6129514", "0.61259854", "0.61168444", "0.6113904", "0.6111185", "0.6108117", "0.6096039", "0.60936946", "0.60897887", "0.6085821", "0.6077731", "0.6077455", "0.60749537", "0.60728675", "0.6065233", "0.6047636", "0.60470265", "0.6045348", "0.60421216", "0.6035912", "0.60080975", "0.5995558", "0.59939545", "0.5990783", "0.5979156", "0.5970814", "0.59684366", "0.595703", "0.5945159", "0.59428287", "0.593542", "0.5934938", "0.59261817", "0.5925093", "0.5917312", "0.5915804", "0.591339", "0.59077513", "0.5904918", "0.59038514", "0.5889708", "0.5884256", "0.58807296", "0.5878375", "0.5870836", "0.5868892", "0.58622795", "0.5860467", "0.5859361", "0.58562857", "0.58552265", "0.5853888", "0.58456963", "0.58389246", "0.583775", "0.5835493", "0.58285093", "0.58237946", "0.58079875", "0.5807633", "0.5805573", "0.57971495", "0.5795885", "0.57956785", "0.57903683", "0.5787442", "0.578469", "0.5781939", "0.57797414", "0.577605" ]
0.6924798
0
Called by consumer to discover a service.
private void discoverDevicesAndServices( String uuid ) throws BluetoothStateException { discoverer.discoverDevices(); discoverer.discoverServices( uuid ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startDiscovery() {\n client.startDiscovery(getResources().getString(R.string.service_id), endpointDiscoveryCallback, new DiscoveryOptions(STRATEGY));\n }", "public void discoverServices() {\n mNsdManager.discoverServices(\n SERVICE_TYPE, NsdManager.PROTOCOL_DNS_SD, mDiscoveryListener);\n }", "@Override\n public void serviceResolved(ServiceEvent serviceEvent) {\n // Test service info is resolved.\n String[] serviceUrls = serviceEvent.getInfo().getURLs();\n\n logger.info(\"Found kinect service \" + serviceEvent.getInfo().getURLs()[0].toString());\n\n if (serviceUrls.length > 0) {\n logger.info(\"Connecting to kinect service 2\");\n\n try {\n final URL url = new URL(serviceUrls[0]);\n logger.info(\"Connecting to kinect service \" + url.getHost() + \":\" + url.getPort());\n final KinectConnector connector = new KinectConnector(url.getHost(), url.getPort());\n connector.setDeviceListCallback(new DeviceCallback() {\n @Override\n public void onItemsChanged(List<KinectItem> devices) {\n logger.info(\"Found kinect objects\");\n for (KinectItem item : devices) {\n createDevice(url.getHost(), url.getPort(), item.getName().replace(\" \", \"\"));\n }\n connector.stop();\n }\n });\n connector.start();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n }\n }", "@Override\n\tpublic void serviceAdded(ServiceEvent arg0) {\n\t\tServiceInfo serviceInfo = mJmDNS.getServiceInfo(arg0.getType(),\n\t\t\t\targ0.getName());\n\t\tif (onFoundListener != null) {\n\t\t\tonFoundListener.onFound(serviceInfo);\n\t\t}\n\t}", "public Object getService(String serviceName);", "public interface DiscoveryService {\n boolean saveDiscovery(Discovery discovery);\n\n boolean updateDiscovery(Discovery discovery);\n\n Discovery getDiscoveryById(int id);\n\n boolean deleteDiscovery(int id);\n\n boolean deleteDiscoveryByIdList(int[] idList);\n\n List<Discovery> getDiscoveryByRandomPage(int offset, int limit, int[] excludeIdList);\n\n List<Discovery> getDiscoveryByCreateTimeDescPage(int offset, int limit);\n\n int getDiscoveryCount();\n}", "public ServiceInstance lookupInstance(String serviceName);", "public abstract ServiceLocator find(String name);", "DiscoverServicesCommand(BluetoothGatt mBluetoothGatt) {\n this.mBluetoothGatt = mBluetoothGatt;\n }", "@Override\n\t\tpublic void getService(String system_id) throws RemoteException {\n\t\t\tSystem.out.println(\"get service invoke on \" + system_id);\n\t\t}", "Object getService(String serviceName);", "public abstract void addServiceListener(PhiDiscoverListener listener);", "public ServiceDiscoverer getServiceDiscoverer() {\n return serviceDiscoverer;\n }", "@Override\n public void onDiscoveryComplete() {\n BusProvider.getInstance().post(new DiscoveryCompleteEvent());\n }", "public void onCreate() {\n\t\tSystem.out.println(\"This service is called!\");\n\t\tmyBluetoothAdapter= BluetoothAdapter.getDefaultAdapter();\n\t\tmyBluetoothAdapter.enable();\n\t\tSystemClock.sleep(5000);\n\t\tif (myBluetoothAdapter.isEnabled()){\n\t\t\tSystem.out.println(\"BT is enabled...\");\n\t\t\tdiscover = myBluetoothAdapter.startDiscovery();\n\t\t}\n\t\tSystem.out.println(myBluetoothAdapter.getScanMode());\n\t\t\n\t\tSystem.out.println(\"Discovering: \"+myBluetoothAdapter.isDiscovering());\n\t\t//registerReceiver(bReceiver, new IntentFilter(BluetoothDevice.ACTION_FOUND));\n\t\tIntentFilter filter1 = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n\t\tIntentFilter filter2 = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n\t\tthis.registerReceiver(bReceiver, filter1);\n\t\tthis.registerReceiver(bReceiver, filter2);\n\t\t//registerReceiver(bReceiver, new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED));\n\t}", "private void doDiscovery() {\n Log.d(TAG, \"doDiscovery()\");\n\n // If we're already discovering, stop it\n if (mBtAdapter.isDiscovering()) {\n mBtAdapter.cancelDiscovery();\n }\n\n // Request discover from BluetoothAdapter\n mBtAdapter.startDiscovery();\n }", "Object getService(String serviceName, boolean checkExistence);", "public void service() {\n\t}", "@Override\n public void onServiceConnected(ComponentName componentName, IBinder service) {\n mNanoBLEService = ((NanoBLEService.LocalBinder) service).getService();\n\n //initialize bluetooth, if BLE is not available, then finish\n if (!mNanoBLEService.initialize()) {\n finish();\n }\n\n //Start scanning for devices that match DEVICE_NAME\n final BluetoothManager bluetoothManager =\n (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n mBluetoothLeScanner = mBluetoothAdapter.getBluetoothLeScanner();\n if(mBluetoothLeScanner == null){\n finish();\n Toast.makeText(NewScanActivity.this, \"Please ensure Bluetooth is enabled and try again\", Toast.LENGTH_SHORT).show();\n }\n mHandler = new Handler();\n if (SettingsManager.getStringPref(mContext, SettingsManager.SharedPreferencesKeys.preferredDevice, null) != null) {\n preferredDevice = SettingsManager.getStringPref(mContext, SettingsManager.SharedPreferencesKeys.preferredDevice, null);\n scanPreferredLeDevice(true);\n } else {\n scanLeDevice(true);\n }\n }", "@Override\n public void onEndpointDiscovered(String id, String name) {\n Log.d(TAG, \"endpoint discovered: \" + id + \" \" + name);\n }", "@Override\n\tpublic void loadService() {\n\t\t\n\t}", "private void registerService() {\r\n DFAgentDescription desc = new DFAgentDescription();\r\n desc.setName(getAID());\r\n ServiceDescription sd = new ServiceDescription();\r\n sd.setType(SERVICE_TYPE);\r\n sd.setName(SERVICE_NAME);\r\n desc.addServices(sd);\r\n try {\r\n DFService.register(this, desc);\r\n } catch (FIPAException e) {\r\n e.printStackTrace(System.err);\r\n }\r\n }", "private void doDiscovery() {\n\t\t// Indicate scanning in the title\n\t\t// setProgressBarIndeterminateVisibility(true);\n\t\tsetTitle(R.string.scanning);\n\n\t\t// Turn on sub-title for new devices\n\t\tfindViewById(R.id.title_new_devices).setVisibility(View.VISIBLE);\n\n\t\t// If we're already discovering, stop it\n\t\tif (m_BtAdapter.isDiscovering()) {\n\t\t\tm_BtAdapter.cancelDiscovery();\n\t\t}\n\n\t\t// Request discover from BluetoothAdapter\n\t\tm_BtAdapter.startDiscovery();\n\t}", "@RabbitListener(bindings = @QueueBinding(exchange = @Exchange(value = \"service.discovery.request\", type = ExchangeTypes.TOPIC), value = @org.springframework.amqp.rabbit.annotation.Queue))\n\tpublic ServiceDiscoveryResponse handleServiceDiscoveryRequest(ServiceDiscoveryRequest request,\n\t\t\t@Headers Map<String, Object> headers) {\n\n\t\tServiceDiscoveryResponse responseBean = new ServiceDiscoveryResponse();\n\t\tresponseBean.service = getServiceName();\n\t\tresponseBean.type = getServiceType();\n\t\ttry {\n\t\t\tresponseBean.requestSchema = generator.generateSchema(getRequestMessageClass());\n\t\t\tresponseBean.requestSchema.setDescription(getRequestMessageDescription());\n\t\t\tif (getResponseMessageClass() != null) {\n\t\t\t\tresponseBean.responseSchema = generator.generateSchema(getResponseMessageClass());\n\t\t\t\tresponseBean.responseSchema.setDescription(getResponseMessageDescription());\n\t\t\t}\n\t\t} catch (JsonMappingException e) {\n\t\t\tlog.warn(\"failed to generate json schema for hello message bean:\", e);\n\t\t}\n\t\treturn responseBean;\n\t}", "void register( ServiceDescription sd) {\r\n DFAgentDescription dfd = new DFAgentDescription();\r\n dfd.setName(getAID());\r\n\r\n try {\r\n DFAgentDescription list[] = DFService.search( this, dfd );\r\n if ( list.length>0 )\r\n DFService.deregister(this);\r\n\r\n dfd.addServices(sd);\r\n DFService.register(this,dfd);\r\n }\r\n catch (FIPAException fe) { fe.printStackTrace(); }\r\n }", "public static void discovery( int port ) throws Exception {\r\n\tSystem.out.println(\"discovery started\");\r\n\tCoapClient client = new CoapClient(\"coap://FF05::FD:\"+port+\"/.well-known/core\"); //base URI coap://FF05::FD:5683\r\n \tclient.useNONs(); //the request needs to be a NON GET request\r\n\t\t\tCoapResponse response = client.get();\r\n\t\t\tif ( response != null ) {\r\n\t\t\t System.out.println(\"discovery Response code: \" + response.getCode());\r\n\t\t\t System.out.println(\"discovery Resources: \" + response.getResponseText());\r\n\t\t\t System.out.println(\"discovery Options: \" + response.getOptions());\r\n\r\n\t\t\t // get serverís IP address\r\n\t\t\t InetAddress addr = response.advanced().getSource();\r\n\t\t\t int servport = response.advanced().getSourcePort();\r\n\t\t\t System.out.println(\"discovery Source address: \" + addr + \":\" + servport);\r\n\t\t\t} \t\t\r\n\t}", "public List<CatalogService> getService(String service);", "public final StarService invoke() {\n return (StarService) Net.createService(StarService.class);\n }", "public ServerServices searchServerService(String serviceName, int servId);", "@Override\n protected void onStarted() {\n\n super.onStarted();\n\n // No need for discovery services in Archive mode\n if (mIsArchive) return; //TODO: maybe remove this line - should be caught by the NETWORK_NONE case\n\n\n switch (mNetworkType) {\n case BabbleService.NETWORK_NONE:\n Log.i(TAG, \"NONE / Archive\");\n return;\n case BabbleService.NETWORK_WIFI:\n Log.i(TAG, \"WIFI / MDNS\");\n mAdvertiser = new MdnsAdvertiser(mGroupDescriptor, sDiscoveryPort, mAppContext);\n break;\n case BabbleService.NETWORK_P2P:\n Log.i(TAG, \"P2P\");\n mAdvertiser = P2PService.getInstance(mAppContext);\n break;\n }\n\n // mMdnsAdvertiser = new MdnsAdvertiser(mGroupDescriptor, sDiscoveryPort, mAppContext);\n\n Log.i(TAG, \"onStarted: Port \"+sDiscoveryPort);\n\n mHttpPeerDiscoveryServer = new HttpPeerDiscoveryServer(sDiscoveryPort, mBabbleNode); //TODO: use next available port?\n try {\n mHttpPeerDiscoveryServer.start();\n mAdvertiser.advertise(); // start mDNS advertising if server started\n mAdvertising = true;\n } catch (IOException ex) {\n //Probably the port is in use, we'll continue without the discovery service\n }\n }", "public interface LookupManager {\n\n /**\n * Look up a service instance by the service name.\n *\n * It selects one instance from a set of instances for a given service based on round robin strategy.\n *\n * @param serviceName The Service name.\n * @return The ServiceInstance.\n * @throws ServiceException\n */\n public ServiceInstance lookupInstance(String serviceName);\n\n /**\n * Look up a list of service instances for a given service.\n *\n * It returns the complete list of the service instances.\n *\n * @param serviceName The Service name.\n * @return The ServiceInstance list.\n * @throws ServiceException\n */\n public List<ServiceInstance> lookupInstances(String serviceName);\n\n /**\n * Query for a service instance based on the service name and some filtering criteria on the service metadata.\n *\n * It returns a service instance from the service instance list based on round robin selection strategy.\n * The ServiceInstance list is of the specified Service.\n *\n * @param serviceName The Service name.\n * @param query The ServiceInstanceQuery for filtering the service instances.\n * @return The ServiceInstance.\n * @throws ServiceException\n */\n public ServiceInstance queryInstanceByName(String serviceName, ServiceInstanceQuery query);\n\n /**\n * Query for all the ServiceInstances of the specified Service, which satisfy the query criteria on the service metadata.\n *\n * It returns all ServiceInstances of specified Service that satisfy the ServiceInstanceQuery.\n * The ServiceInstance list is of the specified Service.\n *\n * @param serviceName The Service name.\n * @param query The ServiceInstanceQuery for filtering the service instances.\n * @return The ServiceInstance list.\n * @throws ServiceException\n */\n public List<ServiceInstance> queryInstancesByName(String serviceName, ServiceInstanceQuery query);\n\n /**\n * Query for one the ServiceInstances which satisfy the query criteria on the service metadata.\n *\n * It returns a service instance from the service instance list based on round robin selection strategy.\n * The ServiceInstance list have different Services.\n *\n * @param query The ServiceInstanceQuery for filtering the service instances.\n * @return The ServiceInstance list.\n * @throws ServiceException\n */\n public ServiceInstance queryInstanceByKey(ServiceInstanceQuery query);\n\n /**\n * Query for all the ServiceInstances which satisfy the query criteria on the service metadata.\n *\n * It returns all ServiceInstances of different Services which satisfy the query criteria.\n *\n * @param query The ServiceInstanceQuery for filtering the service instances.\n * @return The ServiceInstance list.\n * @throws ServiceException\n */\n public List<ServiceInstance> queryInstancesByKey(ServiceInstanceQuery query);\n\n /**\n * Get a ServiceInstance.\n *\n * It returns a ServiceInstances of the Service including the ServiceInstance of OperationalStatus DOWN.\n *\n * @param serviceName\n * the service name.\n * @param instanceId\n * the istanceId\n * @return\n * the ServiceInstance.\n * @throws ServiceException\n */\n public ServiceInstance getInstance(String serviceName, String instanceId);\n\n /**\n * Get all ServiceInstance List of the target Service, including the DOWN ServiceInstance.\n *\n * It will return all ServiceInstances of the Service including the ServiceInstance of OperationalStatus DOWN.\n *\n * @param serviceName\n * the service name.\n * @return\n * the ServiceInstance List.\n * @throws ServiceException\n */\n public List<ServiceInstance> getAllInstances(String serviceName);\n\n /**\n * Get all ServiceInstances of the specified Service, including the DOWN ServiceIntance,\n * which satisfy the query criteria on the service metadata.\n *\n * It filter all ServiceInstances of the specified Service including the ServiceInstance of OperationalStatus DOWN,\n * against the ServiceInstanceQuery.\n *\n * @param serviceName\n * the Service name.\n * @param query\n * the ServiceInstanceQuery.\n * @return\n * the ServiceInstance List.\n * @throws ServiceException\n */\n public List<ServiceInstance> getAllInstances(String serviceName, ServiceInstanceQuery query);\n\n /**\n * Get all the ServiceInstances, including the DOWN ServiceInstance, which satisfy the query criteria on the service metadata.\n *\n * It filters all ServiceInstances of different Services, including the DOWN ServiceInstance,\n * which satisfy the query criteria.\n *\n * @param query\n * the ServiceInstanceQuery criteria.\n * @return\n * the ServiceInstance List.\n * @throws ServiceException\n */\n public List<ServiceInstance> getAllInstancesByKey(ServiceInstanceQuery query);\n\n /**\n * Get the all ServiceInstances in the ServiceDirectory including the DOWN ServiceInstance.\n *\n * @return\n * the ServiceInstance List.\n * @throws ServiceException\n */\n public List<ServiceInstance> getAllInstances();\n\n /**\n * Add a NotificationHandler to the Service.\n *\n * This method can check the duplicate NotificationHandler for the serviceName, if the NotificationHandler\n * already exists in the serviceName, do nothing.\n *\n * Throw IllegalArgumentException if serviceName or handler is null.\n *\n * @param serviceName\n * the service name.\n * @param handler\n * the NotificationHandler for the service.\n * @throws ServiceException\n */\n public void addNotificationHandler(String serviceName, NotificationHandler handler);\n\n /**\n * Remove the NotificationHandler from the Service.\n *\n * Throw IllegalArgumentException if serviceName or handler is null.\n *\n * @param serviceName\n * the service name.\n * @param handler\n * the NotificationHandler for the service.\n * @throws ServiceException\n */\n public void removeNotificationHandler(String serviceName, NotificationHandler handler) ;\n}", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n Log.d(\"service\", \"onServiceConnected() \" + name.getClassName());\n mMyServ = ((MyService.LocalBinder) service).getService();\n }", "private void doDiscovery() {\n if (D) Log.d(TAG, \"doDiscovery()\");\n\n // Indicate scanning in the title\n setProgressBarIndeterminateVisibility(true);\n setTitle(R.string.scanning);\n\n // Turn on sub-title for new devices\n findViewById(R.id.title_new_devices).setVisibility(View.VISIBLE);\n\n // If we're already discovering, stop it\n if (mBtAdapter.isDiscovering()) {\n mBtAdapter.cancelDiscovery();\n }\n\n // Request discover from BluetoothAdapter\n mBtAdapter.startDiscovery();\n }", "@Override\n\tpublic void serviceResolved(ServiceEvent arg0) {\n\n\t}", "private DFAgentDescription[] findService(String name, String type) {\n\t\ttry {\n\t\t\tServiceDescription filter = new ServiceDescription();\n\t\t\tfilter.setName(name);\n\t\t\tfilter.setType(type);\n\n\t\t\tDFAgentDescription dfd = new DFAgentDescription();\n\t\t\tdfd.addServices(filter);\n\n\t\t\tDFAgentDescription[] results = DFService.search(this, dfd);\n\t\t\treturn results;\n\n\t\t} catch (FIPAException e) {\n\t\t\tLOG.error(\"exception while searching service {}:{} : {}\", name, type, e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\t}", "@Override\r\n\tpublic sn.ucad.master.assurance.bo.Service consulterService(Integer idService) {\n\t\tService service= (Service) serviceRepository.findOne(idService);\r\n\t\tif(service==null) throw new RuntimeException(\"Service introuvable\");\r\n\t\treturn (sn.ucad.master.assurance.bo.Service) service;\r\n\t}", "@Override\n public void onServicesDiscovered(BluetoothGatt gatt, int status) {\n Log.i(\"onServicesDiscovered\", \"Obtaining device service information ......\");\n if (status == BluetoothGatt.GATT_SUCCESS) {\n try{\n String messages = \"-------------- (\"+Periphery.getAddress()+\")Service Services information : --------------------\\n\";\n List<BluetoothGattService> serviceList = gatt.getServices();\n messages += \"Total:\"+serviceList.size()+\"\\n\";\n for (int i = 0; i < serviceList.size(); i++) {\n BluetoothGattService theService = serviceList.get(i);\n BLEGattServiceList.add(new BLEGattService(theService));\n\n String serviceName = theService.getUuid().toString();\n String msg = \"---- Service UUID:\"+serviceName+\" -----\\n\";\n // Each Service contains multiple features\n List<BluetoothGattCharacteristic> characterList = theService.getCharacteristics();\n msg += \"Characteristic UUID List:\\n\";\n for (int j = 0; j < characterList.size(); j++) {\n BluetoothGattCharacteristic theCharacter = characterList.get(j);\n msg += \"(\"+(j+1)+\"):\"+theCharacter.getUuid()+\"\\n\";\n //msg += \" --> Value:\"+ StringConvertUtil.bytesToHexString(theCharacter.getValue())+\"\\n\";\n }\n msg += \"\\n\\n\";\n messages += msg;\n }\n messages += \"-------------- (\"+Periphery.getAddress()+\")--------------------\\n\";\n Log.i(\"onServicesDiscovered\", messages);\n }catch (Exception ex){\n Log.e(\"onServicesDiscovered\", \"Exception:\" + ex.toString());\n }\n }\n if (_PeripheryBluetoothServiceCallBack!=null){\n _PeripheryBluetoothServiceCallBack.OnServicesed(BLEGattServiceList);\n }\n super.onServicesDiscovered(gatt, status);\n }", "Service newService();", "public abstract void listen(ServiceConfig serviceConfig) throws IOException;", "public void serviceResolved(ServiceEvent event) {\n\t\t\tLog.e(\"z\", \"resolved serivce: \" + event);\n\t\t}", "public void onServiceRegistered() {\r\n \t// Nothing to do here\r\n }", "protected void onDiscoveryStarted() {\n logAndShowSnackbar(\"Subscription Started\");\n }", "private Set<ServiceNode> discoverService(Collection<ServiceNode> services, Set<String> searchSet) {\n\t\tSet<ServiceNode> found = new HashSet<ServiceNode>();\n\t\tfor (ServiceNode s: services) {\n\t\t\tif (isSubsumed(s.getInputs(), searchSet))\n\t\t\t\tfound.add(s);\n\t\t}\n\t\treturn found;\n\t}", "public Ice.AsyncResult begin_startService(String service);", "public void onStart() {\n Configuration curatorDiscoveryConf = Configuration.root().getConfig(\"curator.service.discovery\");\n\n if (curatorDiscoveryConf == null) {\n Logger.info(\"Curator Discovery settings not found.\");\n } else {\n serviceName = curatorDiscoveryConf.getString(\"name\", \"Play2CuratorService\");\n serviceDescription = curatorDiscoveryConf.getString(\"description\", \"Play2 Curator Service\");\n servicePath = curatorDiscoveryConf.getString(\"path\", \"/play2-curator-service-discovery-plugin\");\n autoRegister = curatorDiscoveryConf.getBoolean(\"autoregister\", Boolean.TRUE);\n uriSpecParam = curatorDiscoveryConf.getString(\"uri.spec\", \"{scheme}://{address}:{port}\");\n uriSpecSslParam = curatorDiscoveryConf.getString(\"ssl.uri.spec\", \"{scheme}://{address}:{ssl-port}\");\n\n Logger.info(\"CuratorServiceDiscoveryPlugin Settings:\");\n Logger.info(\" * serviceName: \" + serviceName);\n Logger.info(\" * serviceDescription: \" + serviceDescription);\n Logger.info(\" * servicePath: \" + servicePath);\n Logger.info(\" * autoRegister: \" + autoRegister);\n Logger.info(\" * uriSpec: \" + uriSpecParam);\n Logger.info(\" * uriSpecSsl: \" + uriSpecSslParam);\n\n zooServers = curatorDiscoveryConf.getString(\"zooServers\", \"localhost:2181\");\n Logger.info(\" * zooKeeper servers: \" + zooServers);\n\n if (zooServers.toLowerCase().contains(\"mock\")) {\n try {\n mockZooKeeper = new TestingServer(2181);\n zooServers = mockZooKeeper.getConnectString();\n Logger.info(\"Mock ZooKeeper started at: \" + zooServers);\n } catch (Exception e) {\n Logger.error(\"Could not start mock ZooKeeper server on port 2181: \" + e.getMessage());\n return;\n }\n }\n\n Logger.info(\"Curator Discovery settings found. ZooKeeper servers: \" + zooServers);\n if (autoRegister) {\n int port = 0;\n String sPort = Configuration.root().getString(\"http.port\");\n if (sPort != null) {\n try {\n port = Integer.parseInt(sPort);\n Logger.info(\" * port: \" + port);\n } catch (NumberFormatException nfe) {\n Logger.debug(\"port is not valid\");\n }\n }\n\n sPort = Configuration.root().getString(\"https.port\");\n int sslPort = 0;\n if (sPort != null) {\n try {\n sslPort = Integer.parseInt(sPort);\n Logger.info(\" * sslPort: \" + sslPort);\n } catch (NumberFormatException nfe) {\n Logger.debug(\"ssl-port is not valid\");\n }\n }\n if (port == 0 && sslPort == 0) {\n Logger.error(\"Can't register service. Port / sslPort not set\");\n } else {\n register(serviceName, serviceDescription, port, sslPort);\n }\n }\n }\n }", "@Override\n\tprotected void handleServiceConnected()\n\t{\n\t\t\n\t}", "@Override\n\tprotected void initAsService() {\n\t\tif (log.isDebugEnabled()) {\n\t\t\tlog.debug(\"Initiating service...\");\n\t\t}\n\t\trunnerFuture = activityRunner.schedule(this::scanModulesHealth, 500, TimeUnit.MILLISECONDS);\n\t}", "public void onServiceConnected(ComponentName className, IBinder service) {\n imService = ((FriendLocationService.IMBinder)service).getService(); \r\n \r\n \r\n }", "@FlashException(\"list\")\n public static void discover() {\n StorageProviderUtils.discoverAll();\n flash.success(MessagesUtils.get(DISCOVERY_STARTED));\n list();\n }", "public Ice.AsyncResult begin_startService(String service, java.util.Map<String, String> __ctx, Callback_ServiceManager_startService __cb);", "public void service(ServiceManager manager) throws ServiceException {\n super.service(manager);\n\n iClient = (IndexClient) manager.lookup(IndexClient.ROLE);\n broker = (EventBroker) manager.lookup(EventBroker.ROLE);\n try {\n broker.registerEvent(UrlResolvedEvent.ID);\n } catch (EventAlreadyRegisteredException e) {\n // event was already registered, so we have nothing more to do here\n }\n\n // the repository is lazily initialized to avoid circular dependency\n // between SourceResolver and JackrabbitRepository that leads to a\n // StackOverflowError at initialization time\n }", "void addService(ServiceInfo serviceInfo);", "private ServiceLocator(){}", "public interface ConsulService {\n\n /**\n * Deregisters a node, service, or check\n */\n public void deregister(SvcInfo svcInfo);\n\n /**\n * Lists known datacenters\n * @return\n */\n public List<String> getDatacenters();\n\n /**\n * Lists nodes in a given DC\n * @return\n */\n public List<Node> getNodes();\n\n /**\n * Lists services in a given DC\n */\n public Map<String, List<String>> getServices();\n\n /**\n * Lists the nodes in a given service\n * @return\n */\n public List<CatalogService> getService(String service);\n\n /**\n * Lists the services provided by a node\n */\n public CatalogNode getNode(String node);\n \n\n\n /**\n * Returns the health info of a node\n */\n public List<HealthCheck> getNodeChecks(String node);\n\n /**\n * Returns the checks of a service\n */\n public List<HealthCheck> getServiceChecks(String service);\n\n /**\n * Returns the nodes and health info of a service\n */\n public List<ServiceHealth> getServiceInstances(String service);\n\n /**\n * Returns the checks in a given state\n */\n public List<HealthCheck> getChecksByState(String state);\n\n}", "private void startDiscovery() {\n\t\tbtAdapter.cancelDiscovery();\n\t\tbtAdapter.startDiscovery();\n\t}", "public interface SearchClientService {\r\n\t/**\r\n\t * Get Search engine client\r\n\t * \r\n\t * @return\r\n\t */\r\n\tClient getClient();\r\n\r\n\tvoid setup();\r\n\r\n\tvoid shutdown();\r\n}", "public interface ConsumerService extends AbstractService<Consumer> {\n String sayHello(String name);\n}", "private void initService() {\r\n\t}", "public void registerServer() {\n log.info(\"Registering service {}\", serviceName);\n cancelDiscovery = discoveryService.register(\n ResolvingDiscoverable.of(new Discoverable(serviceName, httpService.getBindAddress())));\n }", "@Override\n public void doService(AdaptrisMessage msg) throws ServiceException {\n String serviceKey = createServiceKey(msg);\n String nextServiceId = valueMatcher.getNextServiceId(serviceKey, getMetadataToServiceIdMappings());\n\n if (nextServiceId == null) {\n if (isEmpty(getDefaultServiceId())) {\n throw new ServiceException(\"no ServiceId configured against key [\" + serviceKey + \"] and no default ServiceId configured\");\n }\n nextServiceId = getDefaultServiceId();\n log.debug(\"Using default ServiceId : {}\", getDefaultServiceId());\n }\n msg.setNextServiceId(nextServiceId);\n // logging is in BranchingServiceCollection\n }", "public void doService() {\n }", "public Ice.AsyncResult begin_startService(String service, java.util.Map<String, String> __ctx, Ice.Callback __cb);", "public Ice.AsyncResult begin_startService(String service, Ice.Callback __cb);", "Subscriber getSubscriber(Service service);", "@Override\n public void onDnsSdServiceAvailable(String instanceName, String registrationType, WifiP2pDevice sourceDevice) {\n Log.i(TAG, \"BonjourServiceAvailable: \\ninstanceName: \" + instanceName + \"\\n \" + sourceDevice.toString());\n }", "public List<ServerServices> searchExternalService(int servId, String dataPort, String servicePort);", "@Override\n public void onServiceConnected(ComponentName classname, IBinder obj) {\n Log.i(this.getClass().getName(), \"ServiceConnection\");\n mService = IAisinoService.Stub.asInterface(obj);\n }", "public interface Service {\n // Service-specific methods go here\n }", "@Override\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\tib = service;\n\t\t\tSystem.out.println(\"DEBUG>>>ServiceConnection.\");\n\t\t}", "public Ice.AsyncResult begin_startService(String service, java.util.Map<String, String> __ctx);", "public void setServiceName(String serviceName){\n this.serviceName = serviceName;\n }", "public interface ServiceProvider {\n\n /**\n * This method allows to define a priority for a registered ServiceProvider instance. When multiple providers are\n * registered in the system the provider with the highest priority value is taken.\n *\n * @return the provider's priority (default is 0).\n */\n int getPriority();\n\n /**\n * Access a list of services, given its type. The bootstrap mechanism should\n * order the instance for precedence, hereby the most significant should be\n * first in order. If no such services are found, an empty list should be\n * returned.\n *\n * @param serviceType the service type.\n * @return The instance to be used, never {@code null}\n */\n <T> List<T> getServices(Class<T> serviceType);\n\n /**\n * Access a single service, given its type. The bootstrap mechanism should\n * order the instance for precedence, hereby the most significant should be\n * first in order and returned. If no such services are found, null is\n * returned.\n *\n * @param serviceType the service type.\n * @return The instance, (with highest precedence) or {@code null}, if no such service is available.\n */\n default <T> T getService(Class<T> serviceType) {\n return getServices(serviceType).stream().findFirst().orElse(null);\n }\n}", "public Ice.AsyncResult begin_startService(String service, Callback_ServiceManager_startService __cb);", "@Override\n public void onCreate() {\n HandlerThread thread = new HandlerThread(\"ServiceStartArguments\", THREAD_PRIORITY_BACKGROUND);\n thread.start();\n Log.d(\"LOG19\", \"DiscoveryService onCreate\");\n\n this.mLocalBroadCastManager = LocalBroadcastManager.getInstance(this);\n // Get the HandlerThread's Looper and use it for our Handler\n mServiceLooper = thread.getLooper();\n\n mServiceHandler = new ServiceHandler(mServiceLooper);\n }", "public void setService(String service) {\n this.service = service;\n }", "@Override\r\n\tprotected void onServiceConnected() {\n\t\taccessibilityServiceInfo.eventTypes = AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED;\r\n \r\n // If you only want this service to work with specific applications, set their\r\n // package names here. Otherwise, when the service is activated, it will listen\r\n // to events from all applications.\r\n //info.packageNames = new String[]\r\n //{\"com.appone.totest.accessibility\", \"com.apptwo.totest.accessibility\"};\r\n \r\n // Set the type of feedback your service will provide.\r\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\r\n \taccessibilityServiceInfo.feedbackType = AccessibilityServiceInfo.FEEDBACK_ALL_MASK;\r\n } else {\r\n \taccessibilityServiceInfo.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC;\r\n } \r\n \r\n // Default services are invoked only if no package-specific ones are present\r\n // for the type of AccessibilityEvent generated. This service *is*\r\n // application-specific, so the flag isn't necessary. If this was a\r\n // general-purpose service, it would be worth considering setting the\r\n // DEFAULT flag.\r\n \r\n // info.flags = AccessibilityServiceInfo.DEFAULT;\r\n \r\n accessibilityServiceInfo.notificationTimeout = 100;\r\n \r\n this.setServiceInfo(accessibilityServiceInfo);\r\n\t}", "@Host(\"{endpoint}\")\n @ServiceInterface(name = \"SearchServiceRestClient\")\n private interface SearchServiceRestClientService {\n @Get(\"servicestats\")\n @ExpectedResponses({200})\n @UnexpectedResponseExceptionType(SearchErrorException.class)\n Mono<SimpleResponse<ServiceStatistics>> getServiceStatistics(@HostParam(\"endpoint\") String endpoint, @QueryParam(\"api-version\") String apiVersion, @HeaderParam(\"x-ms-client-request-id\") UUID xMsClientRequestId, Context context);\n }", "java.lang.String getService();", "java.lang.String getService();", "java.lang.String getService();", "public abstract String getServiceName();", "public void setService (String service) {\n\t this.service = service;\n\t}", "net.zyuiop.ovhapi.api.objects.services.Service getServiceNameServiceInfos(java.lang.String serviceName) throws java.io.IOException;", "private ServiceList serviceSetup()\n {\n SIManager simgr = sm.createSIManager();\n ServiceList services = simgr.filterServices(new ServiceFilter()\n {\n public boolean accept(Service service)\n {\n return !(service instanceof AbstractService);\n }\n });\n try\n {\n services = services.sortByNumber();\n }\n catch (SortNotAvailableException ex)\n {\n // don't sort then\n }\n\n // Check to see if there are arguments\n // If length of one, then sourceID was specified\n // If length of three, then freq/prognum/modformat was specified\n if (args.length == 1)\n {\n String sid = args[0];\n if (args[0].startsWith(\"0x\")) sid = sid.substring(2, sid.length());\n try\n {\n int sourceID = Integer.parseInt(sid, 16);\n OcapLocator[] locs = { new OcapLocator(sourceID) };\n LocatorFilter filter = new LocatorFilter(locs);\n services = simgr.filterServices(filter);\n }\n catch (NumberFormatException ex)\n {\n log(\"SourceID is not in the correct format\");\n log(\"Proceeding with normal SIDump process\");\n }\n catch (Exception ex)\n {\n log(\"Exception while getting specified service: \" + ex.getMessage());\n log(\"Proceeding with normal SIDump process\");\n }\n }\n if (args.length == 3)\n {\n try\n {\n int freq = Integer.parseInt(args[0]);\n int prog = Integer.parseInt(args[1]);\n int mod = Integer.parseInt(args[2]);\n OcapLocator[] locs = { new OcapLocator(freq, prog, mod) };\n LocatorFilter filter = new LocatorFilter(locs);\n services = simgr.filterServices(filter);\n }\n catch (NumberFormatException ex)\n {\n log(\"Freq/prognum/modformat values are not valid\");\n log(\"Proceeding with normal SIDump process\");\n }\n catch (Exception ex)\n {\n log(\"Exception while getting specified service: \" + ex.getMessage());\n log(\"Proceeding with normal SIDump process\");\n }\n }\n\n return services;\n }", "public void onServiceConnected(ComponentName className, IBinder service) {\n \tmServiceMessenger = new Messenger(service);\r\n // We want to monitor the service for as long as we are\r\n // connected to it.\r\n try {\r\n Message message = Message.obtain(null, WATCHiTServiceInterface.REGISTER_CLIENT);\r\n message.replyTo = mMessenger;\r\n mServiceMessenger.send(message);\r\n } catch (RemoteException e) {\r\n // In this case the service has crashed before we could even\r\n // do anything with it; we can count on soon being\r\n // disconnected (and then reconnected if it can be restarted)\r\n // so there is no need to do anything here.\r\n }\r\n // Toast.makeText(MainActivity.this, R.string.remote_service_bound, Toast.LENGTH_SHORT).show();\r\n }", "@Override\r\n\t\tpublic void onServiceConnected(ComponentName className, IBinder service) {\n\t\t\ttry {\r\n\t\t\t\tmSpiderX = SpiderX.Stub.asInterface(service);\r\n\t\t\t\tif(mSpiderX != null && spiderCallback != null){\r\n\t\t\t\t\tmSpiderX.setSpiderCallBack(spiderCallback);\r\n\t\t\t\t}\r\n\t\t\t\tfor(EventBus handler:mEventBus){\r\n\t\t\t\t\thandler.onEvent(TYPE_SERVICEBINDER_SUCESS,\"\",\"\");\r\n\t\t\t\t}\r\n\t\t\t} catch (RemoteException e) {\r\n\t\t\t\tLog.d(TAG, \" \"+e);\r\n\t\t\t}\r\n\t\t}", "public void discoverable()\n {\n if(mEnable) {\n Log.d(LOGTAG, \"Make discoverable\");\n if(mBluetoothAdapter.getScanMode() != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {\n listen(false); // Stop listening if were listening\n Intent i = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n i.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);\n mContext.startActivity(i);\n listen(true); // Start again\n }\n }\n }", "public void deviceDiscovered(IDiscoverer _discoverer, IDevice _device);", "public AddFavouriteService() {\n super(\"AddFavouriteService\");\n }", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n MyService.LocalBinder binder = (MyService.LocalBinder) service;\n myService = binder.getService();\n isBound = true;\n\n }", "public List<ServiceInstance> lookupInstances(String serviceName);", "public final DramaService invoke() {\n return (DramaService) C16943dj.m83996a(DramaService.class);\n }", "public void InitService() {\n\t\ttry {\r\n\t\t\tgetCommManager().register(this); \r\n\t\t} catch (CommunicationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void startDiscovery() {\n if (mApiClient != null) {\n Weave.DEVICE_API.startLoading(mApiClient, mDiscoveryListener);\n }\n }", "public void connectService() {\n log_d( \"connectService()\" );\n\t\t// no action if debug\n if ( BT_DEBUG_SERVICE ) {\n\t\t\ttoast_short( \"No Action in debug\" );\n \treturn;\n }\n\t\t// connect the BT device at once\n\t\t// if there is a device address. \n\t\tString address = getPrefAddress();\n\t\tif ( isPrefUseDevice() && ( address != null) && !address.equals(\"\") ) {\n\t \tBluetoothDevice device = mBluetoothAdapter.getRemoteDevice( address );\n\t \tif ( mBluetoothService != null ) {\n\t \t log_d( \"connect \" + address );\n\t \tmBluetoothService.connect( device );\n\t }\n\t\t// otherwise\n\t\t// send message for the intent of the BT device list\n\t\t} else {\n\t\t\tnotifyDeviceList();\n\t\t}\n\t}", "private ResolverService(Peer peer, EndpointService epService)\n {\n super(peer, RESSERVICE_NAME);\n\n // init fields\n initFields();\n \n \n this.epService = epService;\n epService.addListener(serviceName, this); //adding listener to end\n // point service\n\n cache = Cache.createInstance(); //creating cache\n cache.addResource(peer);\n \n\n // get SeedPeerList\n EndpointAddress[] seedPeerList = getSeedURIs();\n \n if (seedPeerList != null && seedPeerList.length > 0)\n {\n int seedListSize = (neighbors > seedPeerList.length ? seedPeerList.length : neighbors);\n seedURI = new EndpointAddress[seedListSize][1];\n for (int i = 0; i < seedListSize; i++)\n {\n seedURI[i][0] = seedPeerList[i];\n }\n }\n// try\n// {\n// mcastURI = new EndpointAddress(null, null, 0);\n// } catch (Exception e)\n// {\n// e.printStackTrace();\n// }\n\n// myPeer = peer;\n peerId = peer.getID().toString(); //TBD kuldeep - Is this needed?\n// peername = myPeer.getName();\n }", "public interface ServiceRegistry {\n\n /**\n * Add a service into the registry.\n *\n * @param serviceInfo\n */\n void addService(ServiceInfo serviceInfo);\n\n /**\n * Gets the interval in second of heartbeats.\n *\n * @return\n */\n int getHeartbeatInterval();\n\n /**\n * Sets the interval in second of heartbeats.\n *\n * @param interval\n */\n void setHeartbeatInterval(int interval);\n\n void run();\n\n void stop();\n}", "public interface ServiceManagerInterface {\n\n /**\n * add a Service\n * @param servicePackage the service package to register\n * @param configuration The configuration of the client\n * @param profile the client profile\n * @return The added service description\n * @throws IOException\n * @throws SoapException\n */\n AGServiceDescription addService(\n AGServicePackageDescription servicePackage,\n AGParameter[] configuration,\n ClientProfile profile)\n throws IOException, SoapException;\n\n /**\n * gets the service manager description\n * @return service manager description\n * @throws IOException\n * @throws SoapException\n */\n AGServiceManagerDescription getDescription()\n throws IOException, SoapException;\n\n /**\n * gets the url of the node service\n * @return url of node service\n * @throws IOException\n * @throws SoapException\n */\n String getNodeServiceUrl()\n throws IOException, SoapException;\n\n /**\n * gets the available services\n * @return a vector of available services\n * @throws IOException\n * @throws SoapException\n */\n AGServiceDescription[] getServices()\n throws IOException, SoapException;\n\n /**\n * test whether the service manager is valid\n * @return the 'valid' state\n * @throws IOException\n * @throws SoapException\n */\n int isValid() throws IOException, SoapException;\n\n /**\n * removes a service from the service manager\n * @param serviceDescription the description of the service to be removed\n * @throws IOException\n * @throws SoapException\n */\n void removeService(AGServiceDescription serviceDescription)\n throws IOException, SoapException;\n\n /**\n * removes all services from the service manager\n * @throws IOException\n * @throws SoapException\n */\n void removeServices() throws IOException, SoapException;\n\n /**\n * sets the url for node service\n * @param nodeServiceUri\n * @throws IOException\n * @throws SoapException\n */\n void setNodeServiceUrl(String nodeServiceUri)\n throws IOException, SoapException;\n\n /**\n * shuts down the service manager\n * @throws IOException\n * @throws SoapException\n */\n void shutdown() throws IOException, SoapException;\n\n /**\n * stops all services on service manager\n * @throws IOException\n * @throws SoapException\n */\n void stopServices() throws IOException, SoapException;\n\n /**\n * gets the version number of the service manager\n * @return string with version of service manager\n * @throws IOException\n * @throws SoapException\n */\n String getVersion() throws IOException, SoapException;\n\n\n /**\n * Requests to join a bridge\n * @param bridgeDescription The description of the bridge\n * @throws IOException\n * @throws SoapException\n */\n void joinBridge(BridgeDescription bridgeDescription)\n throws IOException, SoapException;\n\n /**\n * Sets the streams of this service manager\n *\n * @param streamDescriptionList a vector of stream descriptions\n * @throws IOException\n * @throws SoapException\n */\n void setStreams(StreamDescription[] streamDescriptionList)\n throws IOException, SoapException;\n /**\n * adds a stream\n * @param argname stream description of new stream\n * @throws IOException\n * @throws SoapException\n */\n void addStream(StreamDescription argname)\n throws IOException, SoapException;\n /**\n * Removes a stream\n * @param argname The stream to remove\n * @throws IOException\n * @throws SoapException\n */\n void removeStream(StreamDescription argname)\n throws IOException, SoapException;\n /**\n * Sets the point of reference for network traffic\n * @param url The url of the point of reference server\n * @throws IOException\n * @throws SoapException\n */\n void setPointOfReference(String url)\n throws IOException, SoapException;\n\n /**\n * Sets the encryption\n * @param encryption The encryption\n * @throws IOException\n * @throws SoapException\n */\n void setEncryption(String encryption)\n throws IOException, SoapException;\n /**\n * Instructs the client to run automatic bridging\n * @throws IOException\n * @throws SoapException\n */\n void runAutomaticBridging()\n throws IOException, SoapException;\n\n /**\n * Determines if a service is enabled\n * @param service The service to get the status of\n * @return True if enabled, false otherwise\n * @throws IOException\n * @throws SoapException\n */\n boolean isServiceEnabled(AGServiceDescription service)\n throws IOException, SoapException;\n\n /**\n * Enables or disables a service\n * @param service The service to control\n * @param enabled True to enable, false to disable\n * @throws IOException\n * @throws SoapException\n */\n void enableService(AGServiceDescription service, boolean enabled)\n throws IOException, SoapException;\n\n /**\n * Gets the configuration parameters of a service\n * @param service The service to get the configuration of\n * @return The parameters\n * @throws IOException\n * @throws SoapException\n */\n AGParameter[] getServiceConfiguration(AGServiceDescription service)\n throws IOException, SoapException;\n /**\n * Sets the configuration parameters for a service\n * @param service The service to configure\n * @param config The new parameters\n * @throws IOException\n * @throws SoapException\n */\n void setServiceConfiguration(AGServiceDescription service,\n AGParameter[] config)\n throws IOException, SoapException;\n\n /**\n * Sets the client profile\n * @param profile The new profile\n * @throws IOException\n * @throws SoapException\n */\n void setClientProfile(ClientProfile profile)\n throws IOException, SoapException;\n}", "@Override\n\tpublic void serviceTypeAdded(ServiceEvent arg0) {\n\t\tString type = arg0.getType();\n\t\tif (type.equals(TYPE)) {\n\t\t\tmJmDNS.addServiceListener(type, NetworkDiscovery.this);\n\t\t}\n\t}" ]
[ "0.709005", "0.69091016", "0.6389047", "0.61882615", "0.6140298", "0.6114506", "0.60818887", "0.6077915", "0.60758865", "0.60710907", "0.6006521", "0.59838164", "0.5966723", "0.59577376", "0.59211195", "0.5883306", "0.5879043", "0.5841707", "0.58377147", "0.58353305", "0.583419", "0.5821487", "0.5808722", "0.57801443", "0.5759576", "0.5754553", "0.57375985", "0.573268", "0.57315344", "0.57285595", "0.5719776", "0.57037413", "0.569984", "0.5659054", "0.56564975", "0.5639905", "0.561993", "0.5606788", "0.56065875", "0.56048274", "0.56029487", "0.55959463", "0.5586928", "0.557208", "0.55711645", "0.55711555", "0.55487025", "0.55459315", "0.55375797", "0.55320483", "0.5526681", "0.5522428", "0.55201524", "0.5513071", "0.55122554", "0.5510726", "0.55088335", "0.5505118", "0.55030805", "0.54962087", "0.54869384", "0.5473035", "0.5460751", "0.54586357", "0.54566973", "0.5450571", "0.5446796", "0.5446614", "0.5446413", "0.54377", "0.54357415", "0.5434099", "0.54330444", "0.54235715", "0.542265", "0.54122746", "0.54113746", "0.5405002", "0.54004115", "0.54004115", "0.54004115", "0.53944665", "0.5392921", "0.5390225", "0.5390103", "0.53839624", "0.5372955", "0.53679967", "0.5367519", "0.5346906", "0.5345535", "0.5332884", "0.5330401", "0.5329047", "0.5322147", "0.5315197", "0.53136605", "0.5313101", "0.5304582", "0.5304204" ]
0.55904967
42
Calculate the noise estimate via the histogram method.
public float histogramMethod(MCVolume volume) { Histogram hh = new Histogram(); int ii = 0; // // Compute the thresholded histogram. // float lower_threshold = (float)0.01; float upper_threshold = (float)0.3 * (float)Statistics.max(volume); hh.histogram( volume, lower_threshold, upper_threshold ); // // Get the counts and bins. // float[] bins = hh.getBins(); float[] counts = hh.getCounts(); // // Find the maximum count. // float max = (float)0.0; int max_index = 0; for(ii=0; ii<counts.length; ii++) { if( counts[ii] > max ) { max_index = ii; max = counts[ii]; } } // // Find the first minimum after the maximum // ii = max_index + 1; do { ii++; } while( counts[ii] < counts[ii-1] && ( ii < bins.length ) ); float sigma = (float)0.0; if( ii >= bins.length-1 ) { System.out.println("Gack...could not find the first minimum."); } else { sigma = bins[ii]; } return sigma; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double noise(SpIterNoiseObs noise) {\n return 3.0 * 60.0;\n }", "public void computeHistogram() {\n\t}", "public void recalcHistogram();", "public final double getEstimatedNoise() {\r\n return noise;\r\n }", "@Override\n double distribution(double height) {\n return (n0 * Math.exp(-a * height));\n }", "public double[] histogram() {\n int[][] data = toArray();\n double[] ans = new double[256];\n int totalSize = data.length * data[0].length;\n\n for (int i = 0; i < data.length; i++) {\n for (int j = 0; j < data[i].length; j++) {\n ans[data[i][j]]++;\n }\n }\n for (int i = 0; i < ans.length; i++) {\n ans[i] = ans[i] / totalSize;\n }\n return ans;\n }", "private void computeHistogramBins() {\r\n int nBins = (int) Math.ceil(hismax / binWidth);\r\n histoBins = new double[nBins];\r\n for (int i = 0; i < nBins; i++) {\r\n histoBins[i] = binWidth * (double) i + binWidth;\r\n }\r\n }", "public int noise(int xin, int yin, int zin);", "public float[] sense() {\r\n float[] ret = new float[landmarks.length];\r\n \r\n for(int i=0;i<landmarks.length;i++){\r\n float dist = (float) MathX.distance(x, y, landmarks[i].x, landmarks[i].y);\r\n ret[i] = dist + (float)random.nextGaussian() * senseNoise;\r\n } \r\n return ret;\r\n }", "M generateNoise();", "public int[] getHistogram()\r\n {\r\n\treturn histogram;\r\n }", "private double[] extractHistogram(int[] imagePixels){\n\t\tdouble[] histogram=new double[LEVELS_NUMBER];\n\t\tfor (int j = 0; j < imagePixels.length&&start; j++) {\n\t\t\thistogram[imagePixels[j]]++;\n\t\t}\n\t\treturn histogram;\n\t}", "public double[] calcNormHistogram()\r\n {\r\n\tdouble [] normHistogram = new double[histogram.length];\r\n\t\r\n\t//Find the normalized histogram by dividing each element of\r\n\t//the histogram by sum\r\n\tfor( int n = 0; n < histogram.length; n++ )\r\n\t normHistogram[n] = (double)histogram[n]/sum;\r\n\t\r\n\treturn normHistogram;\r\n }", "void calcWave() {\n yoff += 0.01f;\n \n //For every x value, calculate a y value based on sine or cosine\n float x = yoff; //**OPTION #1****/\n //float x = 0.0f; //**OPTION #2****/\n for (int i = 0; i < yvalues.length; i++) {\n float n = 2*noise(x)-1.0f; //**OPTION #1****/ //scale noise to be between 1 and -1\n //float n = 2*noise(x,yoff)-1.0f; //**OPTION #2****/ //scale noise to be between 1 and -1\n yvalues[i] = n*amplitude;\n x+=dx;\n }\n }", "public void injectSomeMoreNoise(double intensity) {\n//\t\taddBSCnoise(lambda,intensity);\n\t\t\n//\t\taddBSCnoise(posterior, intensity);\n//\t\tfor (int i=0; i<n; i++) lambda[i] = posterior[i];\n//\t\tcalc_q0 (posterior);\n//\n//\t\t// initialization of beta\n//\t\tfor (int i = 0; i <= m - 1; i++) {\n//\t\t\tfor (int j = 0; j <= row_weight[i] - 1; j++) {\n//\t\t\t\tbeta[i][j] = 0.0;\n//\t\t\t}\n//\t\t}\t\t\n\t\t\n\t}", "public float histogramMethod(Slice slice) \n\t{\n\t\tHistogram hh = new Histogram();\n\t\tint ii = 0;\n\n\t\t//\n\t\t// Compute the thresholded histogram.\n\t\t//\n\t\tfloat lower_threshold = (float)0.01;\n\t\tfloat upper_threshold = (float)0.3 * (float)Statistics.max(slice);\n\t\thh.histogram( slice, lower_threshold, upper_threshold );\n\n\t\t//\n\t\t// Get the counts and bins.\n\t\t//\n\t\tfloat[] bins = hh.getBins();\n\t\tfloat[] counts = hh.getCounts();\n\n\t\t//\n\t\t// Find the maximum count.\n\t\t//\n\t\tfloat max = (float)0.0; int max_index = 0;\n\t\tfor(ii=0; ii<counts.length; ii++) {\n\t\t\tif( counts[ii] > max ) {\n\t\t\t\tmax_index = ii;\n\t\t\t\tmax = counts[ii];\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\t// Find the first minimum after the maximum\n\t\t//\n\t\tii = max_index + 1;\n\t\tdo {\n\t\t\tii++;\n\t\t} while( counts[ii] < counts[ii-1] && ( ii < bins.length ) );\n\n\t\tfloat sigma = (float)0.0;\n\t\tif( ii >= bins.length-1 ) {\n\t\t\tSystem.out.println(\"Gack...could not find the first minimum.\");\n\t\t}\n\t\telse {\n\t\t\tsigma = bins[ii];\n\t\t}\n\n\t\treturn sigma;\n\t}", "private double noisyIntensity(double value) {\n\n\t\t// add multiplicative noise: log the value, add noise then take the exp\n\t\tdouble logValue = Math.log(value);\n\t\tdouble multiplicativeNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getIntensityStdev());\n\t\tlogValue += multiplicativeNoise;\n\t\tvalue = Math.exp(logValue);\n\n\t\t// then add additive noise as well\n\t\tdouble additiveNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getIntensityStdev());\n\t\tvalue += additiveNoise;\n\t\t\n\t\t// value must always be >= 0\n\t\tif (value < 0) {\n\t\t\tvalue = 0;\n\t\t}\n\t\treturn value;\n\n\t}", "private void histogramScore() {\r\n View.histogram(score, 0, this.getSize().width + 15, 0);\r\n }", "public double measurementProb(float[] measurement) {\r\n double prob = 1.0;\r\n for(int i=0;i<landmarks.length;i++) {\r\n float dist = (float) MathX.distance(x, y, landmarks[i].x, landmarks[i].y); \r\n prob *= MathX.Gaussian(dist, senseNoise, measurement[i]); \r\n } \r\n \r\n probability = prob;\r\n \r\n return prob;\r\n }", "public double getNoiseMean() {\n\t\t\treturn NOISE_MEAN;\n\t\t}", "public void histNormalize() {\n\n double max = max();\n double min = min();\n max = max - min;\n for (int i = 0; i < pixelData.length; i++) {\n double value = pixelData[i] & 0xff;\n pixelData[i] = (byte) Math.floor((value - min) * 255 / max);\n }\n }", "private static double[] addNominalNoise(double[] in, double noiseProbability, int startCol, int endCol, \n\t\t\tMatrix data, Random rand)\n\t{\n assert noiseProbability <= 1.00001 && noiseProbability >= -0.00001;\n\t\tdouble[] result = new double[in.length];\n\t\tfor (int i = 0; i < result.length; i++)\n\t\t{\n\t\t\tresult[i] = in[i];\n\t\t\tif (i < startCol || i >= endCol)\n\t\t\t\tcontinue;\n\t\t\tif (rand.nextFloat() <= noiseProbability)\n\t\t\t{\n//\t\t\t\tresult[i] = rand.nextInt(data.valueCount(i));\n\t\t\t\tif (rand.nextBoolean())\n\t\t\t\t{\n\t\t\t\t\tresult[i] += 1;\n\t\t\t\t\tif (result[i] > data.getValueCount(i) - 1)\n\t\t\t\t\t\tresult[i] = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresult [i] -= 1;\n\t\t\t\t\tif (result[i] < 0)\n\t\t\t\t\t\tresult[i] = data.getValueCount(i) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "JFreeChart generateHist();", "@Test\n public void computeResult_addsNoiseToCount() {\n mockDoubleNoise(0);\n // Mock the noise mechanism so that it adds noise to the count == 2.\n mockLongNoise(2);\n\n variance =\n BoundedVariance.builder()\n .epsilon(EPSILON)\n .delta(DELTA)\n .noise(noise)\n .maxPartitionsContributed(1)\n .maxContributionsPerPartition(1)\n .lower(-100)\n .upper(100)\n .build();\n\n variance.addEntry(20);\n variance.addEntry(20);\n // midpoint = (lower + upper) / 2 = 0,\n // noised_normalized_sum_of_squares = (x1 - midpoint)^2 + (x2 - midpoint)^2 + noise = 20^2 +\n // 20^2 = 800,\n // noised_normalized_sum = (x1 + x2) - midpoint * count + noise = 20 + 20 - 0 + 0 = 40,\n // noised_count = count + noise = 2 + 2 = 4,\n // BoundedVariance.computeResult() = noised_normalized_sum_of_squares / noised_count -\n // (noised_normalized_sum / noised_count)^2 = 800 / 4 - (40 / 4)^2 = 100\n assertThat(variance.computeResult()).isEqualTo(100.0);\n }", "int yBins();", "public final Image getNormal(final double intensity) {\n if (width * height < RESOLUTION_HIGH) {\n return null;\n }\n WritableImage img = new WritableImage(width, height);\n PixelWriter writer = img.getPixelWriter();\n normalLoop:\n for (int j = 0; j < height; j++) {\n for (int i = 0; i < width; i++) {\n if (Thread.interrupted()) {\n break normalLoop;\n }\n double tl = noiseBuffer[(height + j - 1) % height]\n [(width + i - 1) % width];\n double t = noiseBuffer[(height + j - 1) % height][i];\n double tr = noiseBuffer[(height + j - 1) % height]\n [(i + 1) % width];\n double r = noiseBuffer[j][(i + 1) % width];\n double br = noiseBuffer[(j + 1) % height][(i + 1) % width];\n double b = noiseBuffer[(j + 1) % height][i];\n double bl = noiseBuffer[(j + 1) % height]\n [(width + i - 1) % width];\n double l = noiseBuffer[j][(width + i - 1) % width];\n double dx = (tl + 2.0 * l + bl) - (tr + 2.0 * r + br);\n double dy = (tl + 2.0 * t + tr) - (bl + 2.0 * b + br);\n double dz = 1.0 / intensity;\n double mag = Math.sqrt(dx * dx + dy * dy + dz * dz);\n dx = (1 + dx / mag) / 2.0;\n dy = (1 + dy / mag) / 2.0;\n dz = (1 + dz / mag) / 2.0;\n writer.setColor(i, j, Color.color(dx, dy, dz));\n }\n }\n return img;\n }", "@Test\n public void computeResult_addsNoiseToSum() {\n mockDoubleNoise(-10);\n // Mock the noise mechanism so that it adds noise to the count == 0.\n mockLongNoise(0);\n\n variance =\n BoundedVariance.builder()\n .epsilon(EPSILON)\n .delta(DELTA)\n .noise(noise)\n .maxPartitionsContributed(1)\n .maxContributionsPerPartition(1)\n .lower(-100)\n .upper(100)\n .build();\n\n variance.addEntry(10);\n variance.addEntry(10);\n // midpoint = (lower + upper) / 2 = 0,\n // noised_normalized_sum_of_squares = (x1 - midpoint)^2 + (x2 - midpoint)^2 + noise = 10^2 +\n // 10^2 - 10 = 190,\n // noised_normalized_sum = (x1 + x2) - midpoint * count + noise = 10 + 10 - 0 - 10 = 10,\n // noised_count = count + noise = 2 + 0 = 2,\n // BoundedVariance.computeResult() = noised_normalized_sum_of_squares / noised_count -\n // (noised_normalized_sum / noised_count)^2 = 190 / 2 - (10 / 2)^2 = 70\n assertThat(variance.computeResult()).isEqualTo(70.0);\n }", "private void drawHistogram(int n, double left, double right, double[] inputStream) {\n prepareCanvas(left, right);\n doDraw(n, left, right, inputStream);\n drawGrid(left, right);\n }", "public float histogramMethod(Volume volume) \n\t{\n\t\tHistogram hh = new Histogram();\n\t\tint ii = 0;\n\n\t\t//\n\t\t// Compute the thresholded histogram.\n\t\t//\n\t\tfloat lower_threshold = (float)0.01;\n\t\tfloat upper_threshold = (float)0.3 * (float)Statistics.max(volume);\n\t\thh.histogram( volume, lower_threshold, upper_threshold );\n\n\t\t//\n\t\t// Get the counts and bins.\n\t\t//\n\t\tfloat[] bins = hh.getBins();\n\t\tfloat[] counts = hh.getCounts();\n\n\t\t//\n\t\t// Find the maximum count.\n\t\t//\n\t\tfloat max = (float)0.0; int max_index = 0;\n\t\tfor(ii=0; ii<counts.length; ii++) {\n\t\t\tif( counts[ii] > max ) {\n\t\t\t\tmax_index = ii;\n\t\t\t\tmax = counts[ii];\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\t// Find the first minimum after the maximum\n\t\t//\n\t\tii = max_index + 1;\n\t\tdo {\n\t\t\tii++;\n\t\t} while( counts[ii] < counts[ii-1] && ( ii < bins.length ) );\n\n\t\tfloat sigma = (float)0.0;\n\t\tif( ii >= bins.length-1 ) {\n\t\t\tSystem.out.println(\"Gack...could not find the first minimum.\");\n\t\t}\n\t\telse {\n\t\t\tsigma = bins[ii];\n\t\t}\n\n\t\treturn sigma;\n\t}", "com.google.protobuf.ByteString\n getNoiseBytes();", "@java.lang.Override\n public int getNoisySampleCount() {\n return noisySampleCount_;\n }", "public float getNoise(int x, int y) {\n\t\treturn getRealNoise(x * .3f, y * .3f);\n\t}", "private double[] normalizeHistogram(double[] inputHistogram, int totalPixels) {\n\t\tdouble[] normalized=new double[inputHistogram.length];\n\t\tfor(int i=0;i<inputHistogram.length&&start;i++){\n\t\t\tnormalized[i]=inputHistogram[i]/totalPixels;\n\t\t}\n\t\treturn normalized;\n\t}", "@java.lang.Override\n public int getNoisySampleCount() {\n return noisySampleCount_;\n }", "public int getFrequency(int height);", "@Override\r\n\tpublic int[] getSample(Random rng) {\r\n\t\tif (!ready)\r\n\t\t\tthrow new RuntimeException(\"must normalize first\");\r\n\t\t\r\n\t\tint bins[] = new int[no_goods];\r\n\t\t\r\n\t\tfor (int i = 0; i<no_goods; i++) {\r\n\t\t\tdouble[] pmf = prob[i].get(r_tmp[i]);\r\n\t\r\n\t\t\t// choose a random spot on the cdf\r\n\t\t\tdouble random = rng.nextDouble();\r\n\t\t\t\r\n\t\t\t// compute cdf. todo: maybe we should precompute inverse of cdf in normalize() so that\r\n\t\t\t// we can avoid a loop here?\r\n\t\t\tdouble cdf = 0.0;\r\n\t\t\tfor (int j = 0; j<pmf.length; j++) {\r\n\t\t\t\tcdf += pmf[j];\r\n\t\t\t\t\r\n\t\t\t\tif (cdf >= random) {\r\n\t\t\t\t\tbins[i] = j;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// add index to realized so that in next round we get the pmf conditional\r\n\t\t\t\t\t// on our result for this round\r\n\t\t\t\t\tfor (int k = 0; k<=i; k++)\r\n\t\t\t\t\t\tr_tmp[i+1].d[k] = bins[k];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// go onto next good\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// sanity check: make sure we picked something. \r\n\t\t}\r\n\t\t\r\n\t\treturn bins;\r\n\t}", "public BufferedImage Histogram(BufferedImage timg,BufferedImage timg1) {\n\n\n int width = timg.getWidth();\n int height = timg.getHeight();\n\n int[][][] ImageArray = convertToArray(timg);\n int[][][] ImageArray2 = convertToArray(timg);\n\n float[] HistgramR = new float[256];\n float[] HistgramB = new float[256];\n float[] HistgramG = new float[256];\n\n for (int k = 0; k <= 255; k++) {\n HistgramR[k] = 0;\n HistgramG[k] = 0;\n HistgramB[k] = 0;\n }\n\n //int a = 255;\n\n int a = 0;\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n\n int r = ImageArray[x][y][1];\n int g = ImageArray[x][y][2];\n int b = ImageArray[x][y][3];\n\n HistgramR[r]++;\n HistgramG[g]++;\n HistgramB[b]++;\n }\n a++;\n }\n\n System.out.println(a);\n\n System.out.println(\"Pixel count for Red, Green and Blue Channel respectively\");\n for (int z = 0; z < HistgramR.length; z++) {\n\n\n System.out.println(z + \"\\t\" + HistgramR[z] + \"\\t\" + HistgramG[z] + \"\\t\" + HistgramB[z]);\n System.out.println();\n }\n System.out.println();\n\n\n // Histogram Normalisation\n for (int x = 0; x < HistgramR.length; x++) {\n\n HistgramR[x] = HistgramR[x] / (a*a);\n HistgramG[x] = HistgramG[x] / (a*a);\n HistgramB[x] = HistgramB[x] / (a*a);\n }\n\n System.out.println(\"Normalised Pixel count for Red, Green and Blue Channel respectively\");\n for (int y = 0; y < HistgramR.length; y++) {\n\n\n System.out.println(y + \"\\t\" + HistgramR[y] + \"\\t\" + HistgramG[y] + \"\\t\" + HistgramB[y]);\n System.out.println();\n }\n\n BufferedImage resizedImg = resizeImg(timg1, 512, 512);\n\n int[][][] ImageArray1 = convertToArray(resizedImg);\n\n return convertToBimage(ImageArray1);\n }", "public abstract void makeNoise();", "public static double noise(double x, double y, double z) {\n\n\t\tdouble s = (x+y+z)/3.0;\n\t\ti = fastfloor(x+s); j = fastfloor(y+s); k = fastfloor(z+s);\n\t\ts = (i+j+k)/6.0; u = x-i+s; v = y-j+s; w = z-k+s;\n\t\tA[0] = A[1] = A[2] = 0;\n\t\tint hi = (u>=w ? (u>=v ? 0 : 1) : (v>=w ? 1 : 2));\n\t\tint lo = (u< w ? (u< v ? 0 : 1) : (v< w ? 1 : 2));\n\t\treturn 4.0 * (K(hi) + K(3-hi-lo) + K(lo) + K(0));\n\t}", "private double entropy(double x) {\r\n\t\tif (x > 0)\r\n\t\t\treturn -(x * (Math.log(x) / Math.log(2.0)));\r\n\t\telse\r\n\t\t\treturn 0.0;\r\n\t}", "boolean hasNoise();", "@Override\n\tpublic void makeNoise() {\n\t\tSystem.out.println(\"Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink \");\n\t}", "@Test\n public void genNeighStateProbability() {\n double[] metrics = new double[STATES.length * STATES.length];\n double sum = 0;\n Random rand = new Random();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (x == y) {\n metrics[i] = 0;\n } else {\n double d = Math.abs(rand.nextGaussian());//Math.exp(-Math.abs(STATES[x] - STATES[y]) / 3) * Math.abs(rand.nextGaussian());\n metrics[i] = d;\n sum += d;\n }\n }\n final double finalSum = sum;\n metrics = DoubleStream.of(metrics).map(d -> d / finalSum).toArray();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (metrics[i] > 0.01) {\n System.out.printf(\"%d:%d:%.4f\\n\", STATES[x], STATES[y], metrics[i]);\n }\n }\n }", "public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }", "private double[][] computeMeanAndStdevHistogram(double[][] histo) {\r\n\r\n int nBins = histo[0].length;\r\n double[] means, stdevs, bins;\r\n means = new double[nBins];\r\n stdevs = new double[nBins];\r\n bins = new double[nBins];\r\n\r\n int nhistos = histo.length;\r\n double[] binValues = new double[nhistos];\r\n double m, sd;\r\n for (int i = 0; i < nBins; i++) {\r\n // extract all the values for the current bin. \r\n for (int j = 0; j < nhistos; j++) {\r\n binValues[j] = histo[j][i];\r\n }\r\n // compute the mean and standard deviation. \r\n m = StatUtils.mean(binValues);\r\n sd = Math.sqrt(StatUtils.variance(binValues, m));\r\n means[i] = m;\r\n stdevs[i] = sd;\r\n // record the bins\r\n bins[i] = binWidth * (double) i + binWidth;\r\n }\r\n\r\n return new double[][]{bins, means, stdevs};\r\n }", "public double[][] normalisedHistogram(BufferedImage image) {\r\n double[][] rgbCount = getHistogram(image);\r\n int size = image.getHeight() * image.getWidth();\r\n for (int i = 0; i < 3; i++) {\r\n for (int j = 0; j <= 255; j++) {\r\n rgbCount[i][j] /= size; //normalise\r\n }\r\n }\r\n return rgbCount;\r\n }", "int xBins();", "public double getTotalSignalEstBackCount(){\n\t\tdouble total=0;\n\t\tfor(ControlledExperiment r : replicates){\n\t\t\ttotal+=r.getNoiseCount();\n\t\t}\n\t\treturn total;\n\t}", "private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public double[] areaHistogram(double x, double y, double width,\n double height) {\n int[] data = areaToVector(x, y, width, height);\n double[] ans = new double[256];\n int totalSize = data.length;\n\n for (int i = 0; i < data.length; i++) {\n ans[data[i]] += 1.0 / totalSize;\n }\n return ans;\n }", "public double sampleVariance() {\n/* 262 */ Preconditions.checkState((this.count > 1L));\n/* 263 */ if (Double.isNaN(this.sumOfSquaresOfDeltas)) {\n/* 264 */ return Double.NaN;\n/* */ }\n/* 266 */ return DoubleUtils.ensureNonNegative(this.sumOfSquaresOfDeltas) / (this.count - 1L);\n/* */ }", "@java.lang.Override\n public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "java.lang.String getNoise();", "WeightedRandomSampling(double[] w){\n int len = w.length;\n aggregatedW = new double[len];\n counts = new int[len];\n double temp = 0;\n\n for(int i=0; i<len; i++){\n aggregatedW[i] = temp;\n //System.out.println(aggregatedW[i]);\n temp+= w[i];\n }\n }", "public static List<Double> getGaussianSmoothed(List<Double> listToSmooth, double standardDeviation) {\r\n if (standardDeviation < 0.0) {\r\n throw new IllegalArgumentException(\"standardDeviation invalid\");\r\n } else if (standardDeviation == 0.0) {\r\n return listToSmooth;\r\n }\r\n \r\n // Create a new, identical but empty Histogram.\r\n List<Double> smoothedList = new ArrayList<Double>();\r\n \r\n // Determine the number of weights (must be odd).\r\n int numWeights = (int) (2 * 2.58 * standardDeviation + 0.5);\r\n if (numWeights % 2 == 0) {\r\n numWeights++;\r\n }\r\n \r\n // Initialize the smoothing weights.\r\n double[] weights = new double[numWeights];\r\n int m = numWeights / 2;\r\n double var = standardDeviation * standardDeviation;\r\n double gain = 1.0 / Math.sqrt(2.0 * Math.PI * var);\r\n double exp = -1.0 / (2.0 * var);\r\n for (int i = m; i < numWeights; i++) {\r\n double del = i - m;\r\n weights[i] = gain * Math.exp(exp * del * del);\r\n weights[numWeights - 1 - i] = weights[i];\r\n }\r\n \r\n // Clear the band total count for the smoothed histogram.\r\n double sum = 0;\r\n double originalSum = 0;\r\n \r\n double[] smoothedValues = new double[listToSmooth.size()];\r\n \r\n for (int b = 0; b < listToSmooth.size(); b++) {\r\n // Determine clipped range.\r\n int min = Math.max(b - m, 0);\r\n int max = Math.min(b + m, listToSmooth.size());\r\n \r\n // Calculate the offset into the weight array.\r\n int offset = m > b ? m - b : 0;\r\n \r\n // Accumulate the total for the range.\r\n double acc = 0;\r\n double weightTotal = 0;\r\n for (int i = min; i < max; i++) {\r\n double w = weights[offset++];\r\n acc += listToSmooth.get(i) * w;\r\n weightTotal += w;\r\n }\r\n \r\n // Round the accumulated value.\r\n smoothedValues[b] = acc / weightTotal;\r\n \r\n // Accumulate total for band.\r\n sum += smoothedValues[b];\r\n originalSum += listToSmooth.get(b);\r\n }\r\n \r\n // Rescale the counts such that the band total is approximately\r\n // the same as for the same band of the original histogram.\r\n double factor = originalSum / sum;\r\n for (int b = 0; b < listToSmooth.size(); b++) {\r\n double smoothedValue = smoothedValues[b] * factor;\r\n smoothedList.add(smoothedValue);\r\n }\r\n \r\n assert smoothedList.size() == listToSmooth.size();\r\n \r\n return smoothedList;\r\n }", "public double sampleStandardDeviation() {\n/* 288 */ return Math.sqrt(sampleVariance());\n/* */ }", "private double entropy(double[][] beliefs) {\n\t\tdouble sum = 0;\n\t\tdouble log2 = Math.log(2);\n\t\tfor (int x = 0; x < beliefs.length; x++) {\n\t\t\tfor (int y = 0; y < beliefs[0].length; y++) {\n\t\t\t\tif (beliefs[x][y] > 0) // because we can't take log of 0 (but we can skit around it because we would be multiplying it by 0 anyway so even if it existed it wouldn't contribute to the sum)\n\t\t\t\t\tsum += beliefs[x][y] * (Math.log(beliefs[x][y])/log2); // because logb(n) = log(n)/log(b)\n\t\t\t}\n\t\t}\n\n\t\treturn -sum;\n\t}", "public void highscorenoise()\n {\n if(!mute)\n {\n try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Darkmoon Caverns.wav\");\n double c = Math.random();\n if(c<=.25)\n url = this.getClass().getClassLoader().getResource(\"Mario Kart Win.wav\");\n else if(c<=.50)\n url = this.getClass().getClassLoader().getResource(\"Pirate Lagoon.wav\");\n else if(c<=.75)\n url = this.getClass().getClassLoader().getResource(\"Crescent Island.wav\"); \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n hclip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n hclip.open(audioIn); \n \n hclip.start();\n hclip.loop(Clip.LOOP_CONTINUOUSLY);\n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n }\n }", "public double computeAverageJointEntropy() {\r\n\t\tdouble entropy = 0.0;\r\n\t\tfor (int b = 0; b < totalObservations; b++) {\r\n\t\t\tdouble prob = mvkeJoint.getCount(observations[b], b);\r\n\t\t\tdouble cont = 0.0;\r\n\t\t\tif (prob > 0.0) {\r\n\t\t\t\tcont = - Math.log(prob);\r\n\t\t\t}\r\n\t\t\tentropy += cont;\r\n\t\t\tif (debug) {\r\n\t\t\t\tSystem.out.println(b + \": \" + prob\r\n\t\t\t\t\t\t+ \" -> \" + cont/Math.log(2.0) + \" -> sum: \" + (entropy/Math.log(2.0)));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn entropy / (double) totalObservations / Math.log(2.0);\r\n\t}", "private void calcHist(ByteBuffer depthBuffer) {\n\t\tif (mHistogram == null) {\n\t\t\tmHistogram = new float[10000];\n\t\t}\n\n\t\t// reset\n\t\tfor (int i = 0; i < mHistogram.length; ++i)\n\t\t\tmHistogram[i] = 0;\n\n\t\tint points = 0;\n\t\twhile (depthBuffer.remaining() > 0) {\n\t\t\tint depth = depthBuffer.getShort() & 0xFFFF;\n\t\t\tif (depth != 0) {\n\t\t\t\tmHistogram[depth]++;\n\t\t\t\tpoints++;\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 1; i < mHistogram.length; i++) {\n\t\t\tmHistogram[i] += mHistogram[i - 1];\n\t\t}\n\n\t\tif (points > 0) {\n\t\t\tfor (int i = 1; i < mHistogram.length; i++) {\n\t\t\t\tmHistogram[i] = (int) (256 * (1.0f - (mHistogram[i] / (float) points)));\n\t\t\t}\n\t\t}\n\t}", "public double getSigProp(){\n\t\tdouble s=0, n=0;\n\t\tfor(ControlledExperiment rep : replicates){\n\t\t\ts+=rep.getSigCount();\n\t\t\tn+=rep.getNoiseCount();\n\t\t}return(s/(s+n));\n\t}", "public com.google.protobuf.ByteString\n getNoiseBytes() {\n java.lang.Object ref = noise_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n noise_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public NumericalDistributionModel( Integer binCount, Double span ){\n\t\tinterval = span / binCount.doubleValue();\n\t\tlog.info( \"bin-interval is {}\", interval );\n\t\thistogram = new Integer[ binCount ];\n\t\t\n\t\tfor( int i = 0; i < histogram.length; i++ )\n\t\t\thistogram[i] = 0;\n\t}", "public static double generateDensity() {\n double lower = config.getDensityLowerBound();\n double upper = config.getDensityUpperBound();\n\n Random random = new Random();\n return lower + (upper - lower) * random.nextDouble();\n }", "public com.google.protobuf.ByteString\n getNoiseBytes() {\n java.lang.Object ref = noise_;\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 noise_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static int numDimensions_infos_noise() {\n return 1;\n }", "public int[] get_infos_noise() {\n int[] tmp = new int[3];\n for (int index0 = 0; index0 < numElements_infos_noise(0); index0++) {\n tmp[index0] = getElement_infos_noise(index0);\n }\n return tmp;\n }", "public int alphaBinNum(float[] values) {\n\n /* Check if histogram sampling is possible. */\n if (values == null || values.length == 0) {\n\n return currentBinNum;\n }\n\n float minBin = 10;\n float minLbl = 10;\n\n /* Show a depiction of the weights being used. */\n int i, j, n, n2;\n\n /*\n * Histogram case, the most complex, start by gathering the values. If\n * none are toggled on, we will base this on all inputs which exist.\n */\n\n float minVal, maxVal;\n minVal = maxVal = 0;\n n = values.length;\n n2 = 2 * n;\n\n for (i = j = 0; i < n2; i++) {\n j = i % n;\n if (i == j) {\n n2 = n;\n }\n\n float oneval = values[j];\n\n if (oneval == Float.NaN) {\n continue;\n }\n\n if (minVal == maxVal && maxVal == 0) {\n minVal = maxVal = oneval;\n } else if (oneval < minVal) {\n minVal = oneval;\n } else if (oneval > maxVal) {\n maxVal = oneval;\n }\n }\n\n /*\n * Compute the best size to use for the value bins (dv). This responds\n * to density by using smaller increments along the x-axis when density\n * is larger.\n */\n\n if (minVal >= maxVal) {\n\n return currentBinNum;\n }\n float dv = minBin;\n\n dv = (float) .5;\n float delLbl = minLbl * dv / minBin;\n if (dv == 0.5) {\n delLbl = 1;\n } else if (dv == 0 || (maxVal - minVal) > dv * 25) {\n float minDv = (maxVal > -minVal ? maxVal : -minVal) / 5000;\n if (dv < minDv) {\n dv = minDv;\n }\n computeBinDelta(dv, delLbl);\n } else if (dv != minBin) {\n computeBinDelta(dv, delLbl);\n }\n\n int nbMax = 20;\n if ((maxVal - minVal) / dv > nbMax) {\n float dvSeed, dvPrev;\n for (dvSeed = dvPrev = dv, i = 0; i < 100; i++) {\n dvSeed *= 1.4;\n dv = dvSeed;\n computeBinDelta(dv, delLbl);\n if (dv == dvPrev) {\n continue;\n }\n if ((maxVal - minVal) / dv < nbMax) {\n break;\n }\n dvPrev = dvSeed = dv;\n }\n }\n\n /*\n * We want edge of the bins to be at half the bin size, containing at\n * least two even values of del2.\n */\n\n float del2 = delLbl * 2;\n float edge = dv * (((int) (minVal / dv)) - (float) 0.5);\n while (minVal - edge > dv) {\n edge += dv;\n }\n while (edge > minVal) {\n edge -= dv;\n }\n minVal = edge;\n edge = dv * (((int) (maxVal / dv)) + (float) 0.5);\n while (edge - maxVal > dv) {\n edge -= dv;\n }\n while (edge < maxVal) {\n edge += dv;\n }\n maxVal = edge;\n int nbins = (int) (0.5 + (maxVal - minVal) / dv);\n float mean2 = (minVal + maxVal) / 2;\n mean2 = mean2 > 0 ? del2 * (int) (0.5 + mean2 / del2) : -del2\n * (int) (0.5 - mean2 / del2);\n while (minVal > mean2 - del2 && maxVal < mean2 + del2) {\n nbins += 2;\n minVal -= dv;\n maxVal += dv;\n }\n\n return nbins;\n }", "private double randn(){\r\n\t\t//* http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.html\r\n\t\t//RandomNumber rnd = new RandomNumber(System.currentTimeMillis());\r\n\t\t//return rnd.normal();\r\n\t\treturn rnd.nextGaussian();\r\n\t\t//return 0;\r\n\t}", "public static void main(String[] args) {\n int N = Integer.parseInt(args[0]);\n int x = Integer.parseInt(args[1]);\n Integer[] a = new Integer[N];\n for (int i = 0; i < N; i++) {\n a[i] = i % x;\n }\n StdOut.printf(\"H = %4.2f\\n\", entropy(a));\n }", "public abstract void newSpeechNoise(long ms, int n);", "public static int size_infos_valid_noise_samples() {\n return (8 / 8);\n }", "public Map<String, Integer> describeThisHist() {\n \tchar[] copyOfLut = new char[256];\n \tlut[0]='+';\n \tfor (int a=1; a<255; a++) {\n \t\tif (lut[a]>lut[a-1]) copyOfLut[a]='+';\n \t\telse copyOfLut[a]='-';\n \t}\n \tSystem.out.println(Arrays.toString(lut));\n \t\n \t// TODELETE START\n \t\n \t for (int maxlit=0, maxlval=0,\n \t\t\t maxrit=0, maxrval=0,\n \t\t\t lit=0, rit=255;;lit++,rit--) {\n \t\t\t if (lut[lit]>maxlval) {maxlit=lit; maxlval=lut[lit]; histDesc.put(\"peak1idx\", lit); histDesc.put(\"peak1val\", lut[lit]);}\n \t\t\t if (lut[rit]>maxrval) {maxrit=rit; maxrval=lut[rit]; histDesc.put(\"peak2idx\", rit); histDesc.put(\"peak2val\", lut[rit]);}\n \t\t\t if (maxlit==maxrit && maxlval==maxrval) break;\n \t}\n \t\n \t// Now find the minimum between the peaks\n \tfor (int i=histDesc.get(\"peak1idx\"), valleyidx=0, valleyval=255; i<histDesc.get(\"peak2idx\"); i++) {\n \t\tif (lut[i]<valleyval) {valleyval=lut[i]; valleyidx=i; histDesc.put(\"valleyidx\", i); histDesc.put(\"valleyval\", lut[i]);}\n \t} \n \t\n \t// TODELETE END\n \t\n \tboolean isSmoothed=false;\n \tint windowSize=4;\n \tint sensitivity=2;\n \t\n \twhile (!isSmoothed) {\n \t\tisSmoothed=true;\n \t\tint noOfPluses=0;\n \t\tfor (int i=0; i<copyOfLut.length-windowSize-1; i++) {\n \t\t\tfor (int j=0; j<windowSize; j++) if (lut[i+j+1]>lut[i+j]) noOfPluses++;\n \t\t\tif (noOfPluses>=sensitivity) {\n \t\t\t\tif (copyOfLut[i]=='-') {\n \t\t\t\t\tcopyOfLut[i]='+';\n \t\t\t\t\tisSmoothed=false;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n \t\n \tisSmoothed=false;\n \t\n \twhile (!isSmoothed) {\n \t\tisSmoothed=true;\n \t\tint noOfPluses=0;\n \t\tfor (int i=0; i<copyOfLut.length-windowSize-1; i++) {\n \t\t\tfor (int j=0; j<windowSize; j++) if (lut[i+j+1]<lut[i+j]) noOfPluses++;\n \t\t\tif (noOfPluses>=sensitivity) {\n \t\t\t\tif (copyOfLut[i]=='+') {\n \t\t\t\t\tcopyOfLut[i]='-';\n \t\t\t\t\tisSmoothed=false;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n \t\n \tArrayList<Paire> listofpluses = new ArrayList<>();\n \t\n \tint startcounter=0; int endcounter=0; boolean counting=false;\n \tfor (int i=0; i<copyOfLut.length; i++){\n \t\tif (copyOfLut[i]=='+') {\n \t\t\tif (counting) endcounter=i;\n \t\t\telse {startcounter=i; counting=true;}\n \t\t}\n \t\tif (copyOfLut[i]=='-') {\n \t\t\tif (counting) {\n \t\t\t\tendcounter=i-1;\n \t\t\t\tlistofpluses.add(new Paire(startcounter,endcounter));\n \t\t\t\tcounting=false;\n \t\t\t}\n \t\t}\n \t}\n \t\n // \tlistofpluses.forEach(x -> System.out.println(x));\n \t\n \t\n \t\n \treturn histDesc; \t\n }", "public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "private static void filterNoise(BufferedImage image) {\n\t\tfor (int x=0; x<image.getWidth(); x++) {\r\n\t\t\tfor (int y=0; y<image.getHeight(); y++) {\r\n\t\t\t\t\r\n\t\t\t\tint pixelVal = image.getRGB(x, y);\r\n\r\n\t\t\t\t// check how many pixels in a 2 x 2 rectangle with this point \r\n\t\t\t\t// in the center have the same color as this point; if not \r\n\t\t\t\t// many, flip this pixel's color\r\n\t\t\t\tint startX = Math.max(x-2, 0);\r\n\t\t\t\tint startY = Math.max(y-2, 0);\r\n\t\t\t\tint endX = Math.min(x+2, image.getWidth()-1);\r\n\t\t\t\tint endY = Math.min(y+2, image.getHeight()-1);\r\n\r\n\t\t\t\tint matchCount = 0;\r\n\t\t\t\tint totalCount = 0;\r\n\t\t\t\tfor (int i=startX; i<=endX; i++) {\r\n\t\t\t\t\tfor (int j=startY; j<=endY; j++) {\r\n\t\t\t\t\t\tif (image.getRGB(i,j) == pixelVal) {\r\n\t\t\t\t\t\t\tmatchCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttotalCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ((matchCount / (double) totalCount) < .2) {\r\n\t\t\t\t\tif (pixelVal == Color.YELLOW.getRGB()) {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.BLACK.getRGB());\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.YELLOW.getRGB());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (debug) {\r\n\t\t\ttry {\r\n\t\t\t\tImageIO.write(image, \"gif\", new File(\"noiseFiltered.gif\"));\r\n\t\t\t} catch (Exception e) {e.printStackTrace();}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic String makeANoise() {\n\t\treturn \"deer noise\";\r\n\t}", "public double entropyPotential() {\n \n return (-1.0);\n}", "static int linear(int[] hist) {\n final int len = hist.length;\n // look from the point of view of each individual x (rather than in terms of areas)\n // each individual position can contribute a bar of water from the top of the bar to water level\n // ... and water level, if any, is determined by the min of 2 higher bars to left and right\n\n // prepare maxima from the left\n final int[] lftMax = new int[len];\n for (int i = 0, max = 0; i < len; i++) {\n max = lftMax[i] = Math.max(max, hist[i]);\n }\n\n // prepare maxima from the right\n final int[] rgtMax = new int[len];\n for (int i = len, max = 0; --i >= 0; ) {\n max = rgtMax[i] = Math.max(max, hist[i]);\n }\n\n int water = 0;\n for (int i = 0; i < len; i++) {\n final int level = Math.min(lftMax[i], rgtMax[i]);\n final int waterAbove = level - hist[i]; // negative if bar higher than level\n if (waterAbove > 0) {\n water += waterAbove;\n }\n }\n return water;\n }", "private int[] histogram(Bitmap bmp) {\n int[] res = new int[256];\n int w = bmp.getWidth();\n int h = bmp.getHeight();\n Bitmap bmCopy = bmp.copy(bmp.getConfig(), true);\n toGray(bmCopy);\n\n int pixels[] = new int[w*h];\n bmCopy.getPixels(pixels, 0, w, 0, 0, w, h);\n for (int i = 0; i < w*h; i++)\n res[Color.red(pixels[i])]++;\n return res;\n }", "public void updateHistogram() {\n\n // Dont bother updating histogram if tab not even visible, save resources.\n if (!this.isVisible()) {\n return;\n }\n\n // Initialize imp variable.\n MimsPlus imp = null;\n\n // Get the title of the window currently selected in the combobox.\n // Then get the window associated with that title. \n String title = (String) jComboBox1.getSelectedItem();\n if (title != null) {\n imp = (MimsPlus) windows.get(title);\n }\n\n // Not sure why but sometimes images have NULL image processors.\n // Cant update histogram if it does not have one.\n if (imp == null) {\n return;\n }\n ImageProcessor ip = imp.getProcessor();\n if (ip == null) {\n return;\n }\n\n // Update the sliders.\n contrastAdjuster1.update(imp);\n\n // Get Pixel values.\n int i = 0;\n int width = imp.getWidth();\n int height = imp.getHeight();\n int nbins = 256;\n double[] pixels = new double[width * height];\n double pixelVal, maxVal = 0.0;\n for (int x = 0; x < width; x++) {\n for (int y = 0; y < height; y++) {\n pixelVal = ip.getPixelValue(x, y);\n pixels[i] = pixelVal;\n if (maxVal < pixelVal) {\n maxVal = pixelVal;\n }\n i++;\n }\n }\n\n // return if no data avaialable\n if (pixels == null) {\n return;\n }\n if (pixels.length == 0) {\n return;\n }\n\n // Setup and plot histogram.\n HistogramDataset dataset = new HistogramDataset();\n dataset.addSeries(\"\", pixels, nbins);\n MimsXYPlot plot = (MimsXYPlot) chart.getPlot();\n plot.setDataset(dataset);\n\n // Show contrast window.\n updateContrastWindow();\n\n // Final plot adjustments. maxVal cannot be zero, or JFreeChart will generate this error:\n // IllegalArgumentException: A positive range length is required: Range[0.0,0.0]\n if (maxVal == 0) {\n maxVal = 0.00001;\n }\n plot.getDomainAxis().setRange(0, maxVal);\n plot.setDomainGridlinesVisible(false);\n chart.fireChartChanged();\n }", "public List<Peak> filterNoise(List<Peak> peaks, double threshold, double experimentalPrecursorMzRatio);", "private float noise(Vector2 point) {\n\t\tVector2 bottomLeft = randomGrid[(int) point.x][(int) point.y];\n\t\tVector2 topLeft = randomGrid[(int) point.x][(int) point.y + 1];\n\t\tVector2 bottomRight = randomGrid[(int) point.x + 1][(int) point.y];\n\t\tVector2 topRight = randomGrid[(int) point.x + 1][(int) point.y + 1];\n\n\t\tfloat bottomLeftValue = bottomLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y));\n\t\tfloat topLeftValue = topLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y + 1));\n\t\tfloat bottomRightValue = bottomRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y));\n\t\tfloat topRightValue = topRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y + 1));\n\n\t\tfloat bottomValue = bottomLeftValue * (1 - point.x % 1) + bottomRightValue * (point.x % 1);\n\t\tfloat topValue = topLeftValue * (1 - point.x % 1) + topRightValue * (point.x % 1);\n\t\tfloat value = bottomValue * (1 - point.y % 1) + topValue * (point.y % 1);\n\n\t\treturn value;\n\t}", "public static int numElements_infos_noise() {\n return 3;\n }", "static int volume(final int[] hist) {\n final int len = hist.length;\n final int[] deltas = new int[len];\n deltas[0] = hist[0]; // as if delta from 0\n for (int i = 1; i < len; i++) {\n deltas[i] = hist[i] - hist[i - 1];\n }\n System.out.println(Arrays.toString(deltas));\n return 0;\n }", "public Histogram makeIntegratedHistogram() {\n int[] inBins = new int[bins.length];\n inBins[0] = bins[0];\n for (int i = 1; i < inBins.length; i++) {\n inBins[i] = inBins[i - 1] + bins[i];\n }\n return new IntegratedHistogram(inBins, minValue, maxValue);\n }", "public abstract double samplingFrequency();", "public void setNoise(double noiseCoefficient) {\n this.noiseCoefficient = noiseCoefficient;\n }", "private static native void rollingGuidanceFilter_0(long src_nativeObj, long dst_nativeObj, int d, double sigmaColor, double sigmaSpace, int numOfIter, int borderType);", "Histogram() {\n type = name = \"\";\n feature_index = -1;\n histogram_features = null;\n histogram_proportions = null;\n histogram_counts = null;\n }", "private static ArrayList<double[]> createSamples(double p, int n) {\n\t\tArrayList<double[]> result = new ArrayList<double[]>();\n\t\tint cutoff = (int) Math.round(n * p);\n\t\tfor (int i = 0; i < cutoff; i++) result.add(new double[] {1});\n\t\tfor (int i = cutoff; i < n; i++) result.add(new double[] {0});\n\t\treturn result;\n\t}", "public double confidenceHi() \n {\n double mean = mean();\n double stddev = stddev();\n return mean + 1.96 * stddev / Math.sqrt(count);\n }", "private double[] computeHistrogram(ArrayList<Feature> freature, String keyID) {\r\n\r\n int nBins = (int) Math.ceil(hismax / binWidth);\r\n ArrayList<Double> values = FeatureOps.getSpecifiedFeatureNumericalPropertyAsArrayList(freature, keyID);\r\n double[] d1 = List2Prims.doubleFromDouble(values);\r\n\r\n double[] hist = new double[nBins];\r\n\r\n int bin;\r\n for (int i = 0; i < d1.length; i++) {\r\n bin = (int) Math.floor((double) nBins * (d1[i] / hismax));// \r\n bin = Math.min(nBins - 1, bin);\r\n hist[bin]++;\r\n }\r\n return hist;\r\n }", "public static long computeBin(final long[] histogram) {\n\t\tint threshold = -1;\n\t\tfinal double ptile = 0.5; // default fraction of foreground pixels\n\t\tfinal double[] avec = new double[histogram.length];\n\n\t\tfor (int i = 0; i < histogram.length; i++)\n\t\t\tavec[i] = 0.0;\n\n\t\tfinal double total = partialSum(histogram, histogram.length - 1);\n\t\tdouble temp = 1.0;\n\t\tfor (int i = 0; i < histogram.length; i++) {\n\t\t\tavec[i] = Math.abs((partialSum(histogram, i) / total) - ptile);\n\t\t\t// IJ.log(\"Ptile[\"+i+\"]:\"+ avec[i]);\n\t\t\tif (avec[i] < temp) {\n\t\t\t\ttemp = avec[i];\n\t\t\t\tthreshold = i;\n\t\t\t}\n\t\t}\n\t\treturn threshold;\n\t}", "public double confidenceHi() {\n\t\treturn mean + 1.96 * stddev / Math.sqrt(experiments);\n\t}", "@java.lang.Override\n public boolean hasNoiseSigma() {\n return gradientNoiseSigmaCase_ == 1;\n }", "public IntensityImage drawHistogram(boolean cumulative,\r\n\t\t\t\t\tint height, int space)\r\n {\r\n\tborder = 30;\r\n\tint width = 255 * (1 + space) + 2*border;\r\n\tRGBImage image = new RGBImage(height, width);\r\n\tBufferedImage bim = image.makeBufferedImage();\r\n\tGraphics g = bim.getGraphics();\r\n\t\r\n\tdraw(cumulative, g, 0, 0, height, space);\r\n\r\n\timage.setBImage(bim);\r\n\t\r\n\treturn new IntensityImage(image);\r\n }", "public static void Histogramme(Mat m,int[] hist)\n\t{\n\t\tbyte[] pixel=new byte[3];\n\t\tfor(int i=0;i<m.rows();i++)\n\t\t{\n\t\t\tfor(int j=0;j<m.cols();j++)\n\t\t\t{\t\t\t\t\t\n\t\t\t\tm.get(i, j,pixel);\t\t\t\t\n\t\t\t\thist[byteColorCVtoIntJava(pixel[0])]+=1;\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "double sample();", "public Double[] mvNextDouble(Random rng) {\n\t\t\n Double Y[] = new Double[nVar];\n Double X[] = new Double[nVar];\n\n for (int i = 0; i <= nVar - 1; i++){\n X[i] = super.inverseF(rng.nextDouble());\n Y[i] = meanArray[i];\n }\n\n if (NotPD) {\n \tfor (int i = 0; i <= nVar - 1; i++){\n \t\tY[i] += X[i];\n }\n }\n else{\n \tfor (int i = 0; i <= nVar - 1; i++){\n \tfor (int j = 0; j <= i; j++){\n Y[i] += H[i][j] * X[j];\n \t}\n }\n }\n\t\treturn Y;\n\t}", "public double confidenceHi(){\n return mean() + ((1.96 * stddev()) / Math.sqrt(numberOfTrials));\n }" ]
[ "0.5936452", "0.58772236", "0.5874683", "0.58690625", "0.58523893", "0.58420837", "0.5813659", "0.57622784", "0.57114553", "0.5648255", "0.55944306", "0.55868435", "0.55126154", "0.54727525", "0.546788", "0.5459223", "0.54416996", "0.5438648", "0.5433011", "0.5432485", "0.5410689", "0.5368665", "0.52936697", "0.5289087", "0.5288521", "0.5271244", "0.5257504", "0.5240402", "0.52211857", "0.5185654", "0.51803", "0.5150187", "0.5133467", "0.5124281", "0.5123266", "0.5100704", "0.5096672", "0.5096643", "0.5093561", "0.508151", "0.506005", "0.50587684", "0.50493646", "0.5015976", "0.5008811", "0.49839", "0.4979018", "0.49788094", "0.49698848", "0.4966089", "0.49656802", "0.4964795", "0.49558344", "0.49525976", "0.49456277", "0.494445", "0.49368584", "0.49314088", "0.49252224", "0.49243528", "0.492406", "0.49181932", "0.491809", "0.4910797", "0.48890364", "0.48686105", "0.48572528", "0.48526883", "0.4851513", "0.48498303", "0.48339608", "0.48103365", "0.48013642", "0.47965053", "0.47857255", "0.47852984", "0.47825792", "0.4772499", "0.47721872", "0.47712567", "0.47638458", "0.4763022", "0.47607386", "0.47395083", "0.4739201", "0.47235945", "0.47226614", "0.4716773", "0.47130626", "0.47068265", "0.47011304", "0.4700629", "0.4698808", "0.46895337", "0.46859398", "0.46727002", "0.46551475", "0.4655001", "0.46521848", "0.46468422" ]
0.5143761
32
Calculate the noise estimate via the histogram method.
public float histogramMethod(Volume volume) { Histogram hh = new Histogram(); int ii = 0; // // Compute the thresholded histogram. // float lower_threshold = (float)0.01; float upper_threshold = (float)0.3 * (float)Statistics.max(volume); hh.histogram( volume, lower_threshold, upper_threshold ); // // Get the counts and bins. // float[] bins = hh.getBins(); float[] counts = hh.getCounts(); // // Find the maximum count. // float max = (float)0.0; int max_index = 0; for(ii=0; ii<counts.length; ii++) { if( counts[ii] > max ) { max_index = ii; max = counts[ii]; } } // // Find the first minimum after the maximum // ii = max_index + 1; do { ii++; } while( counts[ii] < counts[ii-1] && ( ii < bins.length ) ); float sigma = (float)0.0; if( ii >= bins.length-1 ) { System.out.println("Gack...could not find the first minimum."); } else { sigma = bins[ii]; } return sigma; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double noise(SpIterNoiseObs noise) {\n return 3.0 * 60.0;\n }", "public void computeHistogram() {\n\t}", "public void recalcHistogram();", "public final double getEstimatedNoise() {\r\n return noise;\r\n }", "@Override\n double distribution(double height) {\n return (n0 * Math.exp(-a * height));\n }", "public double[] histogram() {\n int[][] data = toArray();\n double[] ans = new double[256];\n int totalSize = data.length * data[0].length;\n\n for (int i = 0; i < data.length; i++) {\n for (int j = 0; j < data[i].length; j++) {\n ans[data[i][j]]++;\n }\n }\n for (int i = 0; i < ans.length; i++) {\n ans[i] = ans[i] / totalSize;\n }\n return ans;\n }", "private void computeHistogramBins() {\r\n int nBins = (int) Math.ceil(hismax / binWidth);\r\n histoBins = new double[nBins];\r\n for (int i = 0; i < nBins; i++) {\r\n histoBins[i] = binWidth * (double) i + binWidth;\r\n }\r\n }", "public int noise(int xin, int yin, int zin);", "public float[] sense() {\r\n float[] ret = new float[landmarks.length];\r\n \r\n for(int i=0;i<landmarks.length;i++){\r\n float dist = (float) MathX.distance(x, y, landmarks[i].x, landmarks[i].y);\r\n ret[i] = dist + (float)random.nextGaussian() * senseNoise;\r\n } \r\n return ret;\r\n }", "M generateNoise();", "public int[] getHistogram()\r\n {\r\n\treturn histogram;\r\n }", "private double[] extractHistogram(int[] imagePixels){\n\t\tdouble[] histogram=new double[LEVELS_NUMBER];\n\t\tfor (int j = 0; j < imagePixels.length&&start; j++) {\n\t\t\thistogram[imagePixels[j]]++;\n\t\t}\n\t\treturn histogram;\n\t}", "public double[] calcNormHistogram()\r\n {\r\n\tdouble [] normHistogram = new double[histogram.length];\r\n\t\r\n\t//Find the normalized histogram by dividing each element of\r\n\t//the histogram by sum\r\n\tfor( int n = 0; n < histogram.length; n++ )\r\n\t normHistogram[n] = (double)histogram[n]/sum;\r\n\t\r\n\treturn normHistogram;\r\n }", "void calcWave() {\n yoff += 0.01f;\n \n //For every x value, calculate a y value based on sine or cosine\n float x = yoff; //**OPTION #1****/\n //float x = 0.0f; //**OPTION #2****/\n for (int i = 0; i < yvalues.length; i++) {\n float n = 2*noise(x)-1.0f; //**OPTION #1****/ //scale noise to be between 1 and -1\n //float n = 2*noise(x,yoff)-1.0f; //**OPTION #2****/ //scale noise to be between 1 and -1\n yvalues[i] = n*amplitude;\n x+=dx;\n }\n }", "public void injectSomeMoreNoise(double intensity) {\n//\t\taddBSCnoise(lambda,intensity);\n\t\t\n//\t\taddBSCnoise(posterior, intensity);\n//\t\tfor (int i=0; i<n; i++) lambda[i] = posterior[i];\n//\t\tcalc_q0 (posterior);\n//\n//\t\t// initialization of beta\n//\t\tfor (int i = 0; i <= m - 1; i++) {\n//\t\t\tfor (int j = 0; j <= row_weight[i] - 1; j++) {\n//\t\t\t\tbeta[i][j] = 0.0;\n//\t\t\t}\n//\t\t}\t\t\n\t\t\n\t}", "public float histogramMethod(Slice slice) \n\t{\n\t\tHistogram hh = new Histogram();\n\t\tint ii = 0;\n\n\t\t//\n\t\t// Compute the thresholded histogram.\n\t\t//\n\t\tfloat lower_threshold = (float)0.01;\n\t\tfloat upper_threshold = (float)0.3 * (float)Statistics.max(slice);\n\t\thh.histogram( slice, lower_threshold, upper_threshold );\n\n\t\t//\n\t\t// Get the counts and bins.\n\t\t//\n\t\tfloat[] bins = hh.getBins();\n\t\tfloat[] counts = hh.getCounts();\n\n\t\t//\n\t\t// Find the maximum count.\n\t\t//\n\t\tfloat max = (float)0.0; int max_index = 0;\n\t\tfor(ii=0; ii<counts.length; ii++) {\n\t\t\tif( counts[ii] > max ) {\n\t\t\t\tmax_index = ii;\n\t\t\t\tmax = counts[ii];\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\t// Find the first minimum after the maximum\n\t\t//\n\t\tii = max_index + 1;\n\t\tdo {\n\t\t\tii++;\n\t\t} while( counts[ii] < counts[ii-1] && ( ii < bins.length ) );\n\n\t\tfloat sigma = (float)0.0;\n\t\tif( ii >= bins.length-1 ) {\n\t\t\tSystem.out.println(\"Gack...could not find the first minimum.\");\n\t\t}\n\t\telse {\n\t\t\tsigma = bins[ii];\n\t\t}\n\n\t\treturn sigma;\n\t}", "private void histogramScore() {\r\n View.histogram(score, 0, this.getSize().width + 15, 0);\r\n }", "private double noisyIntensity(double value) {\n\n\t\t// add multiplicative noise: log the value, add noise then take the exp\n\t\tdouble logValue = Math.log(value);\n\t\tdouble multiplicativeNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getIntensityStdev());\n\t\tlogValue += multiplicativeNoise;\n\t\tvalue = Math.exp(logValue);\n\n\t\t// then add additive noise as well\n\t\tdouble additiveNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getIntensityStdev());\n\t\tvalue += additiveNoise;\n\t\t\n\t\t// value must always be >= 0\n\t\tif (value < 0) {\n\t\t\tvalue = 0;\n\t\t}\n\t\treturn value;\n\n\t}", "public double measurementProb(float[] measurement) {\r\n double prob = 1.0;\r\n for(int i=0;i<landmarks.length;i++) {\r\n float dist = (float) MathX.distance(x, y, landmarks[i].x, landmarks[i].y); \r\n prob *= MathX.Gaussian(dist, senseNoise, measurement[i]); \r\n } \r\n \r\n probability = prob;\r\n \r\n return prob;\r\n }", "public double getNoiseMean() {\n\t\t\treturn NOISE_MEAN;\n\t\t}", "public void histNormalize() {\n\n double max = max();\n double min = min();\n max = max - min;\n for (int i = 0; i < pixelData.length; i++) {\n double value = pixelData[i] & 0xff;\n pixelData[i] = (byte) Math.floor((value - min) * 255 / max);\n }\n }", "private static double[] addNominalNoise(double[] in, double noiseProbability, int startCol, int endCol, \n\t\t\tMatrix data, Random rand)\n\t{\n assert noiseProbability <= 1.00001 && noiseProbability >= -0.00001;\n\t\tdouble[] result = new double[in.length];\n\t\tfor (int i = 0; i < result.length; i++)\n\t\t{\n\t\t\tresult[i] = in[i];\n\t\t\tif (i < startCol || i >= endCol)\n\t\t\t\tcontinue;\n\t\t\tif (rand.nextFloat() <= noiseProbability)\n\t\t\t{\n//\t\t\t\tresult[i] = rand.nextInt(data.valueCount(i));\n\t\t\t\tif (rand.nextBoolean())\n\t\t\t\t{\n\t\t\t\t\tresult[i] += 1;\n\t\t\t\t\tif (result[i] > data.getValueCount(i) - 1)\n\t\t\t\t\t\tresult[i] = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresult [i] -= 1;\n\t\t\t\t\tif (result[i] < 0)\n\t\t\t\t\t\tresult[i] = data.getValueCount(i) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "JFreeChart generateHist();", "int yBins();", "@Test\n public void computeResult_addsNoiseToCount() {\n mockDoubleNoise(0);\n // Mock the noise mechanism so that it adds noise to the count == 2.\n mockLongNoise(2);\n\n variance =\n BoundedVariance.builder()\n .epsilon(EPSILON)\n .delta(DELTA)\n .noise(noise)\n .maxPartitionsContributed(1)\n .maxContributionsPerPartition(1)\n .lower(-100)\n .upper(100)\n .build();\n\n variance.addEntry(20);\n variance.addEntry(20);\n // midpoint = (lower + upper) / 2 = 0,\n // noised_normalized_sum_of_squares = (x1 - midpoint)^2 + (x2 - midpoint)^2 + noise = 20^2 +\n // 20^2 = 800,\n // noised_normalized_sum = (x1 + x2) - midpoint * count + noise = 20 + 20 - 0 + 0 = 40,\n // noised_count = count + noise = 2 + 2 = 4,\n // BoundedVariance.computeResult() = noised_normalized_sum_of_squares / noised_count -\n // (noised_normalized_sum / noised_count)^2 = 800 / 4 - (40 / 4)^2 = 100\n assertThat(variance.computeResult()).isEqualTo(100.0);\n }", "public final Image getNormal(final double intensity) {\n if (width * height < RESOLUTION_HIGH) {\n return null;\n }\n WritableImage img = new WritableImage(width, height);\n PixelWriter writer = img.getPixelWriter();\n normalLoop:\n for (int j = 0; j < height; j++) {\n for (int i = 0; i < width; i++) {\n if (Thread.interrupted()) {\n break normalLoop;\n }\n double tl = noiseBuffer[(height + j - 1) % height]\n [(width + i - 1) % width];\n double t = noiseBuffer[(height + j - 1) % height][i];\n double tr = noiseBuffer[(height + j - 1) % height]\n [(i + 1) % width];\n double r = noiseBuffer[j][(i + 1) % width];\n double br = noiseBuffer[(j + 1) % height][(i + 1) % width];\n double b = noiseBuffer[(j + 1) % height][i];\n double bl = noiseBuffer[(j + 1) % height]\n [(width + i - 1) % width];\n double l = noiseBuffer[j][(width + i - 1) % width];\n double dx = (tl + 2.0 * l + bl) - (tr + 2.0 * r + br);\n double dy = (tl + 2.0 * t + tr) - (bl + 2.0 * b + br);\n double dz = 1.0 / intensity;\n double mag = Math.sqrt(dx * dx + dy * dy + dz * dz);\n dx = (1 + dx / mag) / 2.0;\n dy = (1 + dy / mag) / 2.0;\n dz = (1 + dz / mag) / 2.0;\n writer.setColor(i, j, Color.color(dx, dy, dz));\n }\n }\n return img;\n }", "@Test\n public void computeResult_addsNoiseToSum() {\n mockDoubleNoise(-10);\n // Mock the noise mechanism so that it adds noise to the count == 0.\n mockLongNoise(0);\n\n variance =\n BoundedVariance.builder()\n .epsilon(EPSILON)\n .delta(DELTA)\n .noise(noise)\n .maxPartitionsContributed(1)\n .maxContributionsPerPartition(1)\n .lower(-100)\n .upper(100)\n .build();\n\n variance.addEntry(10);\n variance.addEntry(10);\n // midpoint = (lower + upper) / 2 = 0,\n // noised_normalized_sum_of_squares = (x1 - midpoint)^2 + (x2 - midpoint)^2 + noise = 10^2 +\n // 10^2 - 10 = 190,\n // noised_normalized_sum = (x1 + x2) - midpoint * count + noise = 10 + 10 - 0 - 10 = 10,\n // noised_count = count + noise = 2 + 0 = 2,\n // BoundedVariance.computeResult() = noised_normalized_sum_of_squares / noised_count -\n // (noised_normalized_sum / noised_count)^2 = 190 / 2 - (10 / 2)^2 = 70\n assertThat(variance.computeResult()).isEqualTo(70.0);\n }", "private void drawHistogram(int n, double left, double right, double[] inputStream) {\n prepareCanvas(left, right);\n doDraw(n, left, right, inputStream);\n drawGrid(left, right);\n }", "com.google.protobuf.ByteString\n getNoiseBytes();", "@java.lang.Override\n public int getNoisySampleCount() {\n return noisySampleCount_;\n }", "public float getNoise(int x, int y) {\n\t\treturn getRealNoise(x * .3f, y * .3f);\n\t}", "public float histogramMethod(MCVolume volume) \n\t{\n\t\tHistogram hh = new Histogram();\n\t\tint ii = 0;\n\n\t\t//\n\t\t// Compute the thresholded histogram.\n\t\t//\n\t\tfloat lower_threshold = (float)0.01;\n\t\tfloat upper_threshold = (float)0.3 * (float)Statistics.max(volume);\n\t\thh.histogram( volume, lower_threshold, upper_threshold );\n\n\t\t//\n\t\t// Get the counts and bins.\n\t\t//\n\t\tfloat[] bins = hh.getBins();\n\t\tfloat[] counts = hh.getCounts();\n\n\t\t//\n\t\t// Find the maximum count.\n\t\t//\n\t\tfloat max = (float)0.0; int max_index = 0;\n\t\tfor(ii=0; ii<counts.length; ii++) {\n\t\t\tif( counts[ii] > max ) {\n\t\t\t\tmax_index = ii;\n\t\t\t\tmax = counts[ii];\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\t// Find the first minimum after the maximum\n\t\t//\n\t\tii = max_index + 1;\n\t\tdo {\n\t\t\tii++;\n\t\t} while( counts[ii] < counts[ii-1] && ( ii < bins.length ) );\n\n\t\tfloat sigma = (float)0.0;\n\t\tif( ii >= bins.length-1 ) {\n\t\t\tSystem.out.println(\"Gack...could not find the first minimum.\");\n\t\t}\n\t\telse {\n\t\t\tsigma = bins[ii];\n\t\t}\n\n\t\treturn sigma;\n\t}", "private double[] normalizeHistogram(double[] inputHistogram, int totalPixels) {\n\t\tdouble[] normalized=new double[inputHistogram.length];\n\t\tfor(int i=0;i<inputHistogram.length&&start;i++){\n\t\t\tnormalized[i]=inputHistogram[i]/totalPixels;\n\t\t}\n\t\treturn normalized;\n\t}", "public int getFrequency(int height);", "@java.lang.Override\n public int getNoisySampleCount() {\n return noisySampleCount_;\n }", "@Override\r\n\tpublic int[] getSample(Random rng) {\r\n\t\tif (!ready)\r\n\t\t\tthrow new RuntimeException(\"must normalize first\");\r\n\t\t\r\n\t\tint bins[] = new int[no_goods];\r\n\t\t\r\n\t\tfor (int i = 0; i<no_goods; i++) {\r\n\t\t\tdouble[] pmf = prob[i].get(r_tmp[i]);\r\n\t\r\n\t\t\t// choose a random spot on the cdf\r\n\t\t\tdouble random = rng.nextDouble();\r\n\t\t\t\r\n\t\t\t// compute cdf. todo: maybe we should precompute inverse of cdf in normalize() so that\r\n\t\t\t// we can avoid a loop here?\r\n\t\t\tdouble cdf = 0.0;\r\n\t\t\tfor (int j = 0; j<pmf.length; j++) {\r\n\t\t\t\tcdf += pmf[j];\r\n\t\t\t\t\r\n\t\t\t\tif (cdf >= random) {\r\n\t\t\t\t\tbins[i] = j;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// add index to realized so that in next round we get the pmf conditional\r\n\t\t\t\t\t// on our result for this round\r\n\t\t\t\t\tfor (int k = 0; k<=i; k++)\r\n\t\t\t\t\t\tr_tmp[i+1].d[k] = bins[k];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// go onto next good\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// sanity check: make sure we picked something. \r\n\t\t}\r\n\t\t\r\n\t\treturn bins;\r\n\t}", "public BufferedImage Histogram(BufferedImage timg,BufferedImage timg1) {\n\n\n int width = timg.getWidth();\n int height = timg.getHeight();\n\n int[][][] ImageArray = convertToArray(timg);\n int[][][] ImageArray2 = convertToArray(timg);\n\n float[] HistgramR = new float[256];\n float[] HistgramB = new float[256];\n float[] HistgramG = new float[256];\n\n for (int k = 0; k <= 255; k++) {\n HistgramR[k] = 0;\n HistgramG[k] = 0;\n HistgramB[k] = 0;\n }\n\n //int a = 255;\n\n int a = 0;\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n\n int r = ImageArray[x][y][1];\n int g = ImageArray[x][y][2];\n int b = ImageArray[x][y][3];\n\n HistgramR[r]++;\n HistgramG[g]++;\n HistgramB[b]++;\n }\n a++;\n }\n\n System.out.println(a);\n\n System.out.println(\"Pixel count for Red, Green and Blue Channel respectively\");\n for (int z = 0; z < HistgramR.length; z++) {\n\n\n System.out.println(z + \"\\t\" + HistgramR[z] + \"\\t\" + HistgramG[z] + \"\\t\" + HistgramB[z]);\n System.out.println();\n }\n System.out.println();\n\n\n // Histogram Normalisation\n for (int x = 0; x < HistgramR.length; x++) {\n\n HistgramR[x] = HistgramR[x] / (a*a);\n HistgramG[x] = HistgramG[x] / (a*a);\n HistgramB[x] = HistgramB[x] / (a*a);\n }\n\n System.out.println(\"Normalised Pixel count for Red, Green and Blue Channel respectively\");\n for (int y = 0; y < HistgramR.length; y++) {\n\n\n System.out.println(y + \"\\t\" + HistgramR[y] + \"\\t\" + HistgramG[y] + \"\\t\" + HistgramB[y]);\n System.out.println();\n }\n\n BufferedImage resizedImg = resizeImg(timg1, 512, 512);\n\n int[][][] ImageArray1 = convertToArray(resizedImg);\n\n return convertToBimage(ImageArray1);\n }", "public abstract void makeNoise();", "public static double noise(double x, double y, double z) {\n\n\t\tdouble s = (x+y+z)/3.0;\n\t\ti = fastfloor(x+s); j = fastfloor(y+s); k = fastfloor(z+s);\n\t\ts = (i+j+k)/6.0; u = x-i+s; v = y-j+s; w = z-k+s;\n\t\tA[0] = A[1] = A[2] = 0;\n\t\tint hi = (u>=w ? (u>=v ? 0 : 1) : (v>=w ? 1 : 2));\n\t\tint lo = (u< w ? (u< v ? 0 : 1) : (v< w ? 1 : 2));\n\t\treturn 4.0 * (K(hi) + K(3-hi-lo) + K(lo) + K(0));\n\t}", "private double entropy(double x) {\r\n\t\tif (x > 0)\r\n\t\t\treturn -(x * (Math.log(x) / Math.log(2.0)));\r\n\t\telse\r\n\t\t\treturn 0.0;\r\n\t}", "boolean hasNoise();", "@Override\n\tpublic void makeNoise() {\n\t\tSystem.out.println(\"Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink \");\n\t}", "@Test\n public void genNeighStateProbability() {\n double[] metrics = new double[STATES.length * STATES.length];\n double sum = 0;\n Random rand = new Random();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (x == y) {\n metrics[i] = 0;\n } else {\n double d = Math.abs(rand.nextGaussian());//Math.exp(-Math.abs(STATES[x] - STATES[y]) / 3) * Math.abs(rand.nextGaussian());\n metrics[i] = d;\n sum += d;\n }\n }\n final double finalSum = sum;\n metrics = DoubleStream.of(metrics).map(d -> d / finalSum).toArray();\n for (int i = 0; i < metrics.length; i++) {\n int x = i / STATES.length;\n int y = i % STATES.length;\n if (metrics[i] > 0.01) {\n System.out.printf(\"%d:%d:%.4f\\n\", STATES[x], STATES[y], metrics[i]);\n }\n }\n }", "public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }", "private double[][] computeMeanAndStdevHistogram(double[][] histo) {\r\n\r\n int nBins = histo[0].length;\r\n double[] means, stdevs, bins;\r\n means = new double[nBins];\r\n stdevs = new double[nBins];\r\n bins = new double[nBins];\r\n\r\n int nhistos = histo.length;\r\n double[] binValues = new double[nhistos];\r\n double m, sd;\r\n for (int i = 0; i < nBins; i++) {\r\n // extract all the values for the current bin. \r\n for (int j = 0; j < nhistos; j++) {\r\n binValues[j] = histo[j][i];\r\n }\r\n // compute the mean and standard deviation. \r\n m = StatUtils.mean(binValues);\r\n sd = Math.sqrt(StatUtils.variance(binValues, m));\r\n means[i] = m;\r\n stdevs[i] = sd;\r\n // record the bins\r\n bins[i] = binWidth * (double) i + binWidth;\r\n }\r\n\r\n return new double[][]{bins, means, stdevs};\r\n }", "public double[][] normalisedHistogram(BufferedImage image) {\r\n double[][] rgbCount = getHistogram(image);\r\n int size = image.getHeight() * image.getWidth();\r\n for (int i = 0; i < 3; i++) {\r\n for (int j = 0; j <= 255; j++) {\r\n rgbCount[i][j] /= size; //normalise\r\n }\r\n }\r\n return rgbCount;\r\n }", "int xBins();", "public double getTotalSignalEstBackCount(){\n\t\tdouble total=0;\n\t\tfor(ControlledExperiment r : replicates){\n\t\t\ttotal+=r.getNoiseCount();\n\t\t}\n\t\treturn total;\n\t}", "private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public double[] areaHistogram(double x, double y, double width,\n double height) {\n int[] data = areaToVector(x, y, width, height);\n double[] ans = new double[256];\n int totalSize = data.length;\n\n for (int i = 0; i < data.length; i++) {\n ans[data[i]] += 1.0 / totalSize;\n }\n return ans;\n }", "public double sampleVariance() {\n/* 262 */ Preconditions.checkState((this.count > 1L));\n/* 263 */ if (Double.isNaN(this.sumOfSquaresOfDeltas)) {\n/* 264 */ return Double.NaN;\n/* */ }\n/* 266 */ return DoubleUtils.ensureNonNegative(this.sumOfSquaresOfDeltas) / (this.count - 1L);\n/* */ }", "@java.lang.Override\n public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "WeightedRandomSampling(double[] w){\n int len = w.length;\n aggregatedW = new double[len];\n counts = new int[len];\n double temp = 0;\n\n for(int i=0; i<len; i++){\n aggregatedW[i] = temp;\n //System.out.println(aggregatedW[i]);\n temp+= w[i];\n }\n }", "java.lang.String getNoise();", "public static List<Double> getGaussianSmoothed(List<Double> listToSmooth, double standardDeviation) {\r\n if (standardDeviation < 0.0) {\r\n throw new IllegalArgumentException(\"standardDeviation invalid\");\r\n } else if (standardDeviation == 0.0) {\r\n return listToSmooth;\r\n }\r\n \r\n // Create a new, identical but empty Histogram.\r\n List<Double> smoothedList = new ArrayList<Double>();\r\n \r\n // Determine the number of weights (must be odd).\r\n int numWeights = (int) (2 * 2.58 * standardDeviation + 0.5);\r\n if (numWeights % 2 == 0) {\r\n numWeights++;\r\n }\r\n \r\n // Initialize the smoothing weights.\r\n double[] weights = new double[numWeights];\r\n int m = numWeights / 2;\r\n double var = standardDeviation * standardDeviation;\r\n double gain = 1.0 / Math.sqrt(2.0 * Math.PI * var);\r\n double exp = -1.0 / (2.0 * var);\r\n for (int i = m; i < numWeights; i++) {\r\n double del = i - m;\r\n weights[i] = gain * Math.exp(exp * del * del);\r\n weights[numWeights - 1 - i] = weights[i];\r\n }\r\n \r\n // Clear the band total count for the smoothed histogram.\r\n double sum = 0;\r\n double originalSum = 0;\r\n \r\n double[] smoothedValues = new double[listToSmooth.size()];\r\n \r\n for (int b = 0; b < listToSmooth.size(); b++) {\r\n // Determine clipped range.\r\n int min = Math.max(b - m, 0);\r\n int max = Math.min(b + m, listToSmooth.size());\r\n \r\n // Calculate the offset into the weight array.\r\n int offset = m > b ? m - b : 0;\r\n \r\n // Accumulate the total for the range.\r\n double acc = 0;\r\n double weightTotal = 0;\r\n for (int i = min; i < max; i++) {\r\n double w = weights[offset++];\r\n acc += listToSmooth.get(i) * w;\r\n weightTotal += w;\r\n }\r\n \r\n // Round the accumulated value.\r\n smoothedValues[b] = acc / weightTotal;\r\n \r\n // Accumulate total for band.\r\n sum += smoothedValues[b];\r\n originalSum += listToSmooth.get(b);\r\n }\r\n \r\n // Rescale the counts such that the band total is approximately\r\n // the same as for the same band of the original histogram.\r\n double factor = originalSum / sum;\r\n for (int b = 0; b < listToSmooth.size(); b++) {\r\n double smoothedValue = smoothedValues[b] * factor;\r\n smoothedList.add(smoothedValue);\r\n }\r\n \r\n assert smoothedList.size() == listToSmooth.size();\r\n \r\n return smoothedList;\r\n }", "public double sampleStandardDeviation() {\n/* 288 */ return Math.sqrt(sampleVariance());\n/* */ }", "private double entropy(double[][] beliefs) {\n\t\tdouble sum = 0;\n\t\tdouble log2 = Math.log(2);\n\t\tfor (int x = 0; x < beliefs.length; x++) {\n\t\t\tfor (int y = 0; y < beliefs[0].length; y++) {\n\t\t\t\tif (beliefs[x][y] > 0) // because we can't take log of 0 (but we can skit around it because we would be multiplying it by 0 anyway so even if it existed it wouldn't contribute to the sum)\n\t\t\t\t\tsum += beliefs[x][y] * (Math.log(beliefs[x][y])/log2); // because logb(n) = log(n)/log(b)\n\t\t\t}\n\t\t}\n\n\t\treturn -sum;\n\t}", "public void highscorenoise()\n {\n if(!mute)\n {\n try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Darkmoon Caverns.wav\");\n double c = Math.random();\n if(c<=.25)\n url = this.getClass().getClassLoader().getResource(\"Mario Kart Win.wav\");\n else if(c<=.50)\n url = this.getClass().getClassLoader().getResource(\"Pirate Lagoon.wav\");\n else if(c<=.75)\n url = this.getClass().getClassLoader().getResource(\"Crescent Island.wav\"); \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n hclip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n hclip.open(audioIn); \n \n hclip.start();\n hclip.loop(Clip.LOOP_CONTINUOUSLY);\n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n }\n }", "private void calcHist(ByteBuffer depthBuffer) {\n\t\tif (mHistogram == null) {\n\t\t\tmHistogram = new float[10000];\n\t\t}\n\n\t\t// reset\n\t\tfor (int i = 0; i < mHistogram.length; ++i)\n\t\t\tmHistogram[i] = 0;\n\n\t\tint points = 0;\n\t\twhile (depthBuffer.remaining() > 0) {\n\t\t\tint depth = depthBuffer.getShort() & 0xFFFF;\n\t\t\tif (depth != 0) {\n\t\t\t\tmHistogram[depth]++;\n\t\t\t\tpoints++;\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 1; i < mHistogram.length; i++) {\n\t\t\tmHistogram[i] += mHistogram[i - 1];\n\t\t}\n\n\t\tif (points > 0) {\n\t\t\tfor (int i = 1; i < mHistogram.length; i++) {\n\t\t\t\tmHistogram[i] = (int) (256 * (1.0f - (mHistogram[i] / (float) points)));\n\t\t\t}\n\t\t}\n\t}", "public double computeAverageJointEntropy() {\r\n\t\tdouble entropy = 0.0;\r\n\t\tfor (int b = 0; b < totalObservations; b++) {\r\n\t\t\tdouble prob = mvkeJoint.getCount(observations[b], b);\r\n\t\t\tdouble cont = 0.0;\r\n\t\t\tif (prob > 0.0) {\r\n\t\t\t\tcont = - Math.log(prob);\r\n\t\t\t}\r\n\t\t\tentropy += cont;\r\n\t\t\tif (debug) {\r\n\t\t\t\tSystem.out.println(b + \": \" + prob\r\n\t\t\t\t\t\t+ \" -> \" + cont/Math.log(2.0) + \" -> sum: \" + (entropy/Math.log(2.0)));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn entropy / (double) totalObservations / Math.log(2.0);\r\n\t}", "public double getSigProp(){\n\t\tdouble s=0, n=0;\n\t\tfor(ControlledExperiment rep : replicates){\n\t\t\ts+=rep.getSigCount();\n\t\t\tn+=rep.getNoiseCount();\n\t\t}return(s/(s+n));\n\t}", "public NumericalDistributionModel( Integer binCount, Double span ){\n\t\tinterval = span / binCount.doubleValue();\n\t\tlog.info( \"bin-interval is {}\", interval );\n\t\thistogram = new Integer[ binCount ];\n\t\t\n\t\tfor( int i = 0; i < histogram.length; i++ )\n\t\t\thistogram[i] = 0;\n\t}", "public com.google.protobuf.ByteString\n getNoiseBytes() {\n java.lang.Object ref = noise_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n noise_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static double generateDensity() {\n double lower = config.getDensityLowerBound();\n double upper = config.getDensityUpperBound();\n\n Random random = new Random();\n return lower + (upper - lower) * random.nextDouble();\n }", "public com.google.protobuf.ByteString\n getNoiseBytes() {\n java.lang.Object ref = noise_;\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 noise_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static int numDimensions_infos_noise() {\n return 1;\n }", "public int[] get_infos_noise() {\n int[] tmp = new int[3];\n for (int index0 = 0; index0 < numElements_infos_noise(0); index0++) {\n tmp[index0] = getElement_infos_noise(index0);\n }\n return tmp;\n }", "public int alphaBinNum(float[] values) {\n\n /* Check if histogram sampling is possible. */\n if (values == null || values.length == 0) {\n\n return currentBinNum;\n }\n\n float minBin = 10;\n float minLbl = 10;\n\n /* Show a depiction of the weights being used. */\n int i, j, n, n2;\n\n /*\n * Histogram case, the most complex, start by gathering the values. If\n * none are toggled on, we will base this on all inputs which exist.\n */\n\n float minVal, maxVal;\n minVal = maxVal = 0;\n n = values.length;\n n2 = 2 * n;\n\n for (i = j = 0; i < n2; i++) {\n j = i % n;\n if (i == j) {\n n2 = n;\n }\n\n float oneval = values[j];\n\n if (oneval == Float.NaN) {\n continue;\n }\n\n if (minVal == maxVal && maxVal == 0) {\n minVal = maxVal = oneval;\n } else if (oneval < minVal) {\n minVal = oneval;\n } else if (oneval > maxVal) {\n maxVal = oneval;\n }\n }\n\n /*\n * Compute the best size to use for the value bins (dv). This responds\n * to density by using smaller increments along the x-axis when density\n * is larger.\n */\n\n if (minVal >= maxVal) {\n\n return currentBinNum;\n }\n float dv = minBin;\n\n dv = (float) .5;\n float delLbl = minLbl * dv / minBin;\n if (dv == 0.5) {\n delLbl = 1;\n } else if (dv == 0 || (maxVal - minVal) > dv * 25) {\n float minDv = (maxVal > -minVal ? maxVal : -minVal) / 5000;\n if (dv < minDv) {\n dv = minDv;\n }\n computeBinDelta(dv, delLbl);\n } else if (dv != minBin) {\n computeBinDelta(dv, delLbl);\n }\n\n int nbMax = 20;\n if ((maxVal - minVal) / dv > nbMax) {\n float dvSeed, dvPrev;\n for (dvSeed = dvPrev = dv, i = 0; i < 100; i++) {\n dvSeed *= 1.4;\n dv = dvSeed;\n computeBinDelta(dv, delLbl);\n if (dv == dvPrev) {\n continue;\n }\n if ((maxVal - minVal) / dv < nbMax) {\n break;\n }\n dvPrev = dvSeed = dv;\n }\n }\n\n /*\n * We want edge of the bins to be at half the bin size, containing at\n * least two even values of del2.\n */\n\n float del2 = delLbl * 2;\n float edge = dv * (((int) (minVal / dv)) - (float) 0.5);\n while (minVal - edge > dv) {\n edge += dv;\n }\n while (edge > minVal) {\n edge -= dv;\n }\n minVal = edge;\n edge = dv * (((int) (maxVal / dv)) + (float) 0.5);\n while (edge - maxVal > dv) {\n edge -= dv;\n }\n while (edge < maxVal) {\n edge += dv;\n }\n maxVal = edge;\n int nbins = (int) (0.5 + (maxVal - minVal) / dv);\n float mean2 = (minVal + maxVal) / 2;\n mean2 = mean2 > 0 ? del2 * (int) (0.5 + mean2 / del2) : -del2\n * (int) (0.5 - mean2 / del2);\n while (minVal > mean2 - del2 && maxVal < mean2 + del2) {\n nbins += 2;\n minVal -= dv;\n maxVal += dv;\n }\n\n return nbins;\n }", "public static void main(String[] args) {\n int N = Integer.parseInt(args[0]);\n int x = Integer.parseInt(args[1]);\n Integer[] a = new Integer[N];\n for (int i = 0; i < N; i++) {\n a[i] = i % x;\n }\n StdOut.printf(\"H = %4.2f\\n\", entropy(a));\n }", "private double randn(){\r\n\t\t//* http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.html\r\n\t\t//RandomNumber rnd = new RandomNumber(System.currentTimeMillis());\r\n\t\t//return rnd.normal();\r\n\t\treturn rnd.nextGaussian();\r\n\t\t//return 0;\r\n\t}", "public abstract void newSpeechNoise(long ms, int n);", "public static int size_infos_valid_noise_samples() {\n return (8 / 8);\n }", "public Map<String, Integer> describeThisHist() {\n \tchar[] copyOfLut = new char[256];\n \tlut[0]='+';\n \tfor (int a=1; a<255; a++) {\n \t\tif (lut[a]>lut[a-1]) copyOfLut[a]='+';\n \t\telse copyOfLut[a]='-';\n \t}\n \tSystem.out.println(Arrays.toString(lut));\n \t\n \t// TODELETE START\n \t\n \t for (int maxlit=0, maxlval=0,\n \t\t\t maxrit=0, maxrval=0,\n \t\t\t lit=0, rit=255;;lit++,rit--) {\n \t\t\t if (lut[lit]>maxlval) {maxlit=lit; maxlval=lut[lit]; histDesc.put(\"peak1idx\", lit); histDesc.put(\"peak1val\", lut[lit]);}\n \t\t\t if (lut[rit]>maxrval) {maxrit=rit; maxrval=lut[rit]; histDesc.put(\"peak2idx\", rit); histDesc.put(\"peak2val\", lut[rit]);}\n \t\t\t if (maxlit==maxrit && maxlval==maxrval) break;\n \t}\n \t\n \t// Now find the minimum between the peaks\n \tfor (int i=histDesc.get(\"peak1idx\"), valleyidx=0, valleyval=255; i<histDesc.get(\"peak2idx\"); i++) {\n \t\tif (lut[i]<valleyval) {valleyval=lut[i]; valleyidx=i; histDesc.put(\"valleyidx\", i); histDesc.put(\"valleyval\", lut[i]);}\n \t} \n \t\n \t// TODELETE END\n \t\n \tboolean isSmoothed=false;\n \tint windowSize=4;\n \tint sensitivity=2;\n \t\n \twhile (!isSmoothed) {\n \t\tisSmoothed=true;\n \t\tint noOfPluses=0;\n \t\tfor (int i=0; i<copyOfLut.length-windowSize-1; i++) {\n \t\t\tfor (int j=0; j<windowSize; j++) if (lut[i+j+1]>lut[i+j]) noOfPluses++;\n \t\t\tif (noOfPluses>=sensitivity) {\n \t\t\t\tif (copyOfLut[i]=='-') {\n \t\t\t\t\tcopyOfLut[i]='+';\n \t\t\t\t\tisSmoothed=false;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n \t\n \tisSmoothed=false;\n \t\n \twhile (!isSmoothed) {\n \t\tisSmoothed=true;\n \t\tint noOfPluses=0;\n \t\tfor (int i=0; i<copyOfLut.length-windowSize-1; i++) {\n \t\t\tfor (int j=0; j<windowSize; j++) if (lut[i+j+1]<lut[i+j]) noOfPluses++;\n \t\t\tif (noOfPluses>=sensitivity) {\n \t\t\t\tif (copyOfLut[i]=='+') {\n \t\t\t\t\tcopyOfLut[i]='-';\n \t\t\t\t\tisSmoothed=false;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n \t\n \tArrayList<Paire> listofpluses = new ArrayList<>();\n \t\n \tint startcounter=0; int endcounter=0; boolean counting=false;\n \tfor (int i=0; i<copyOfLut.length; i++){\n \t\tif (copyOfLut[i]=='+') {\n \t\t\tif (counting) endcounter=i;\n \t\t\telse {startcounter=i; counting=true;}\n \t\t}\n \t\tif (copyOfLut[i]=='-') {\n \t\t\tif (counting) {\n \t\t\t\tendcounter=i-1;\n \t\t\t\tlistofpluses.add(new Paire(startcounter,endcounter));\n \t\t\t\tcounting=false;\n \t\t\t}\n \t\t}\n \t}\n \t\n // \tlistofpluses.forEach(x -> System.out.println(x));\n \t\n \t\n \t\n \treturn histDesc; \t\n }", "public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "private static void filterNoise(BufferedImage image) {\n\t\tfor (int x=0; x<image.getWidth(); x++) {\r\n\t\t\tfor (int y=0; y<image.getHeight(); y++) {\r\n\t\t\t\t\r\n\t\t\t\tint pixelVal = image.getRGB(x, y);\r\n\r\n\t\t\t\t// check how many pixels in a 2 x 2 rectangle with this point \r\n\t\t\t\t// in the center have the same color as this point; if not \r\n\t\t\t\t// many, flip this pixel's color\r\n\t\t\t\tint startX = Math.max(x-2, 0);\r\n\t\t\t\tint startY = Math.max(y-2, 0);\r\n\t\t\t\tint endX = Math.min(x+2, image.getWidth()-1);\r\n\t\t\t\tint endY = Math.min(y+2, image.getHeight()-1);\r\n\r\n\t\t\t\tint matchCount = 0;\r\n\t\t\t\tint totalCount = 0;\r\n\t\t\t\tfor (int i=startX; i<=endX; i++) {\r\n\t\t\t\t\tfor (int j=startY; j<=endY; j++) {\r\n\t\t\t\t\t\tif (image.getRGB(i,j) == pixelVal) {\r\n\t\t\t\t\t\t\tmatchCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttotalCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ((matchCount / (double) totalCount) < .2) {\r\n\t\t\t\t\tif (pixelVal == Color.YELLOW.getRGB()) {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.BLACK.getRGB());\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.YELLOW.getRGB());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (debug) {\r\n\t\t\ttry {\r\n\t\t\t\tImageIO.write(image, \"gif\", new File(\"noiseFiltered.gif\"));\r\n\t\t\t} catch (Exception e) {e.printStackTrace();}\r\n\t\t}\r\n\t}", "public double entropyPotential() {\n \n return (-1.0);\n}", "@Override\r\n\tpublic String makeANoise() {\n\t\treturn \"deer noise\";\r\n\t}", "public void updateHistogram() {\n\n // Dont bother updating histogram if tab not even visible, save resources.\n if (!this.isVisible()) {\n return;\n }\n\n // Initialize imp variable.\n MimsPlus imp = null;\n\n // Get the title of the window currently selected in the combobox.\n // Then get the window associated with that title. \n String title = (String) jComboBox1.getSelectedItem();\n if (title != null) {\n imp = (MimsPlus) windows.get(title);\n }\n\n // Not sure why but sometimes images have NULL image processors.\n // Cant update histogram if it does not have one.\n if (imp == null) {\n return;\n }\n ImageProcessor ip = imp.getProcessor();\n if (ip == null) {\n return;\n }\n\n // Update the sliders.\n contrastAdjuster1.update(imp);\n\n // Get Pixel values.\n int i = 0;\n int width = imp.getWidth();\n int height = imp.getHeight();\n int nbins = 256;\n double[] pixels = new double[width * height];\n double pixelVal, maxVal = 0.0;\n for (int x = 0; x < width; x++) {\n for (int y = 0; y < height; y++) {\n pixelVal = ip.getPixelValue(x, y);\n pixels[i] = pixelVal;\n if (maxVal < pixelVal) {\n maxVal = pixelVal;\n }\n i++;\n }\n }\n\n // return if no data avaialable\n if (pixels == null) {\n return;\n }\n if (pixels.length == 0) {\n return;\n }\n\n // Setup and plot histogram.\n HistogramDataset dataset = new HistogramDataset();\n dataset.addSeries(\"\", pixels, nbins);\n MimsXYPlot plot = (MimsXYPlot) chart.getPlot();\n plot.setDataset(dataset);\n\n // Show contrast window.\n updateContrastWindow();\n\n // Final plot adjustments. maxVal cannot be zero, or JFreeChart will generate this error:\n // IllegalArgumentException: A positive range length is required: Range[0.0,0.0]\n if (maxVal == 0) {\n maxVal = 0.00001;\n }\n plot.getDomainAxis().setRange(0, maxVal);\n plot.setDomainGridlinesVisible(false);\n chart.fireChartChanged();\n }", "static int linear(int[] hist) {\n final int len = hist.length;\n // look from the point of view of each individual x (rather than in terms of areas)\n // each individual position can contribute a bar of water from the top of the bar to water level\n // ... and water level, if any, is determined by the min of 2 higher bars to left and right\n\n // prepare maxima from the left\n final int[] lftMax = new int[len];\n for (int i = 0, max = 0; i < len; i++) {\n max = lftMax[i] = Math.max(max, hist[i]);\n }\n\n // prepare maxima from the right\n final int[] rgtMax = new int[len];\n for (int i = len, max = 0; --i >= 0; ) {\n max = rgtMax[i] = Math.max(max, hist[i]);\n }\n\n int water = 0;\n for (int i = 0; i < len; i++) {\n final int level = Math.min(lftMax[i], rgtMax[i]);\n final int waterAbove = level - hist[i]; // negative if bar higher than level\n if (waterAbove > 0) {\n water += waterAbove;\n }\n }\n return water;\n }", "private int[] histogram(Bitmap bmp) {\n int[] res = new int[256];\n int w = bmp.getWidth();\n int h = bmp.getHeight();\n Bitmap bmCopy = bmp.copy(bmp.getConfig(), true);\n toGray(bmCopy);\n\n int pixels[] = new int[w*h];\n bmCopy.getPixels(pixels, 0, w, 0, 0, w, h);\n for (int i = 0; i < w*h; i++)\n res[Color.red(pixels[i])]++;\n return res;\n }", "public List<Peak> filterNoise(List<Peak> peaks, double threshold, double experimentalPrecursorMzRatio);", "private float noise(Vector2 point) {\n\t\tVector2 bottomLeft = randomGrid[(int) point.x][(int) point.y];\n\t\tVector2 topLeft = randomGrid[(int) point.x][(int) point.y + 1];\n\t\tVector2 bottomRight = randomGrid[(int) point.x + 1][(int) point.y];\n\t\tVector2 topRight = randomGrid[(int) point.x + 1][(int) point.y + 1];\n\n\t\tfloat bottomLeftValue = bottomLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y));\n\t\tfloat topLeftValue = topLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y + 1));\n\t\tfloat bottomRightValue = bottomRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y));\n\t\tfloat topRightValue = topRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y + 1));\n\n\t\tfloat bottomValue = bottomLeftValue * (1 - point.x % 1) + bottomRightValue * (point.x % 1);\n\t\tfloat topValue = topLeftValue * (1 - point.x % 1) + topRightValue * (point.x % 1);\n\t\tfloat value = bottomValue * (1 - point.y % 1) + topValue * (point.y % 1);\n\n\t\treturn value;\n\t}", "public static int numElements_infos_noise() {\n return 3;\n }", "static int volume(final int[] hist) {\n final int len = hist.length;\n final int[] deltas = new int[len];\n deltas[0] = hist[0]; // as if delta from 0\n for (int i = 1; i < len; i++) {\n deltas[i] = hist[i] - hist[i - 1];\n }\n System.out.println(Arrays.toString(deltas));\n return 0;\n }", "public Histogram makeIntegratedHistogram() {\n int[] inBins = new int[bins.length];\n inBins[0] = bins[0];\n for (int i = 1; i < inBins.length; i++) {\n inBins[i] = inBins[i - 1] + bins[i];\n }\n return new IntegratedHistogram(inBins, minValue, maxValue);\n }", "public abstract double samplingFrequency();", "public void setNoise(double noiseCoefficient) {\n this.noiseCoefficient = noiseCoefficient;\n }", "private static native void rollingGuidanceFilter_0(long src_nativeObj, long dst_nativeObj, int d, double sigmaColor, double sigmaSpace, int numOfIter, int borderType);", "Histogram() {\n type = name = \"\";\n feature_index = -1;\n histogram_features = null;\n histogram_proportions = null;\n histogram_counts = null;\n }", "private static ArrayList<double[]> createSamples(double p, int n) {\n\t\tArrayList<double[]> result = new ArrayList<double[]>();\n\t\tint cutoff = (int) Math.round(n * p);\n\t\tfor (int i = 0; i < cutoff; i++) result.add(new double[] {1});\n\t\tfor (int i = cutoff; i < n; i++) result.add(new double[] {0});\n\t\treturn result;\n\t}", "private double[] computeHistrogram(ArrayList<Feature> freature, String keyID) {\r\n\r\n int nBins = (int) Math.ceil(hismax / binWidth);\r\n ArrayList<Double> values = FeatureOps.getSpecifiedFeatureNumericalPropertyAsArrayList(freature, keyID);\r\n double[] d1 = List2Prims.doubleFromDouble(values);\r\n\r\n double[] hist = new double[nBins];\r\n\r\n int bin;\r\n for (int i = 0; i < d1.length; i++) {\r\n bin = (int) Math.floor((double) nBins * (d1[i] / hismax));// \r\n bin = Math.min(nBins - 1, bin);\r\n hist[bin]++;\r\n }\r\n return hist;\r\n }", "public double confidenceHi() \n {\n double mean = mean();\n double stddev = stddev();\n return mean + 1.96 * stddev / Math.sqrt(count);\n }", "public static long computeBin(final long[] histogram) {\n\t\tint threshold = -1;\n\t\tfinal double ptile = 0.5; // default fraction of foreground pixels\n\t\tfinal double[] avec = new double[histogram.length];\n\n\t\tfor (int i = 0; i < histogram.length; i++)\n\t\t\tavec[i] = 0.0;\n\n\t\tfinal double total = partialSum(histogram, histogram.length - 1);\n\t\tdouble temp = 1.0;\n\t\tfor (int i = 0; i < histogram.length; i++) {\n\t\t\tavec[i] = Math.abs((partialSum(histogram, i) / total) - ptile);\n\t\t\t// IJ.log(\"Ptile[\"+i+\"]:\"+ avec[i]);\n\t\t\tif (avec[i] < temp) {\n\t\t\t\ttemp = avec[i];\n\t\t\t\tthreshold = i;\n\t\t\t}\n\t\t}\n\t\treturn threshold;\n\t}", "public double confidenceHi() {\n\t\treturn mean + 1.96 * stddev / Math.sqrt(experiments);\n\t}", "@java.lang.Override\n public boolean hasNoiseSigma() {\n return gradientNoiseSigmaCase_ == 1;\n }", "public IntensityImage drawHistogram(boolean cumulative,\r\n\t\t\t\t\tint height, int space)\r\n {\r\n\tborder = 30;\r\n\tint width = 255 * (1 + space) + 2*border;\r\n\tRGBImage image = new RGBImage(height, width);\r\n\tBufferedImage bim = image.makeBufferedImage();\r\n\tGraphics g = bim.getGraphics();\r\n\t\r\n\tdraw(cumulative, g, 0, 0, height, space);\r\n\r\n\timage.setBImage(bim);\r\n\t\r\n\treturn new IntensityImage(image);\r\n }", "public static void Histogramme(Mat m,int[] hist)\n\t{\n\t\tbyte[] pixel=new byte[3];\n\t\tfor(int i=0;i<m.rows();i++)\n\t\t{\n\t\t\tfor(int j=0;j<m.cols();j++)\n\t\t\t{\t\t\t\t\t\n\t\t\t\tm.get(i, j,pixel);\t\t\t\t\n\t\t\t\thist[byteColorCVtoIntJava(pixel[0])]+=1;\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "double sample();", "public Double[] mvNextDouble(Random rng) {\n\t\t\n Double Y[] = new Double[nVar];\n Double X[] = new Double[nVar];\n\n for (int i = 0; i <= nVar - 1; i++){\n X[i] = super.inverseF(rng.nextDouble());\n Y[i] = meanArray[i];\n }\n\n if (NotPD) {\n \tfor (int i = 0; i <= nVar - 1; i++){\n \t\tY[i] += X[i];\n }\n }\n else{\n \tfor (int i = 0; i <= nVar - 1; i++){\n \tfor (int j = 0; j <= i; j++){\n Y[i] += H[i][j] * X[j];\n \t}\n }\n }\n\t\treturn Y;\n\t}", "public double confidenceHi(){\n return mean() + ((1.96 * stddev()) / Math.sqrt(numberOfTrials));\n }" ]
[ "0.5932934", "0.5881219", "0.5878538", "0.5865497", "0.58533853", "0.5844371", "0.58161974", "0.57580036", "0.57100844", "0.5644349", "0.55961734", "0.5588187", "0.5515392", "0.54704887", "0.54657954", "0.5460978", "0.54407215", "0.54382133", "0.54323447", "0.54283", "0.5411443", "0.53667647", "0.52963006", "0.5290946", "0.52895665", "0.52698845", "0.5257731", "0.5242745", "0.51826453", "0.5177198", "0.51457673", "0.5145345", "0.5135373", "0.51240844", "0.51211816", "0.5101794", "0.5098374", "0.50923765", "0.50895387", "0.5080999", "0.505474", "0.50543517", "0.5051257", "0.5018778", "0.5011601", "0.4986347", "0.4981724", "0.49790004", "0.4971471", "0.49679804", "0.4965315", "0.49626294", "0.4952506", "0.49515775", "0.49472663", "0.49432275", "0.49382997", "0.49274787", "0.49268532", "0.4925512", "0.49245387", "0.49202874", "0.49142864", "0.4908437", "0.48852086", "0.48657346", "0.48547584", "0.48544043", "0.48508316", "0.4849192", "0.48308316", "0.4807814", "0.4803088", "0.4794275", "0.47829702", "0.4782635", "0.47811392", "0.4774633", "0.4774489", "0.47733772", "0.4760473", "0.475951", "0.47585618", "0.47416416", "0.47409043", "0.47231063", "0.47198007", "0.47165585", "0.47150224", "0.47058934", "0.47029543", "0.4700911", "0.47000015", "0.46887708", "0.46829367", "0.46735847", "0.4656518", "0.46535328", "0.4652291", "0.46466327" ]
0.52228576
28
Noise estimation via the histogram method on a single slice.
public float histogramMethod(Slice slice) { Histogram hh = new Histogram(); int ii = 0; // // Compute the thresholded histogram. // float lower_threshold = (float)0.01; float upper_threshold = (float)0.3 * (float)Statistics.max(slice); hh.histogram( slice, lower_threshold, upper_threshold ); // // Get the counts and bins. // float[] bins = hh.getBins(); float[] counts = hh.getCounts(); // // Find the maximum count. // float max = (float)0.0; int max_index = 0; for(ii=0; ii<counts.length; ii++) { if( counts[ii] > max ) { max_index = ii; max = counts[ii]; } } // // Find the first minimum after the maximum // ii = max_index + 1; do { ii++; } while( counts[ii] < counts[ii-1] && ( ii < bins.length ) ); float sigma = (float)0.0; if( ii >= bins.length-1 ) { System.out.println("Gack...could not find the first minimum."); } else { sigma = bins[ii]; } return sigma; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void computeHistogram() {\n\t}", "public void recalcHistogram();", "private double[] extractHistogram(int[] imagePixels){\n\t\tdouble[] histogram=new double[LEVELS_NUMBER];\n\t\tfor (int j = 0; j < imagePixels.length&&start; j++) {\n\t\t\thistogram[imagePixels[j]]++;\n\t\t}\n\t\treturn histogram;\n\t}", "public int[] getHistogram()\r\n {\r\n\treturn histogram;\r\n }", "public abstract void makeNoise();", "private static double[] addNominalNoise(double[] in, double noiseProbability, int startCol, int endCol, \n\t\t\tMatrix data, Random rand)\n\t{\n assert noiseProbability <= 1.00001 && noiseProbability >= -0.00001;\n\t\tdouble[] result = new double[in.length];\n\t\tfor (int i = 0; i < result.length; i++)\n\t\t{\n\t\t\tresult[i] = in[i];\n\t\t\tif (i < startCol || i >= endCol)\n\t\t\t\tcontinue;\n\t\t\tif (rand.nextFloat() <= noiseProbability)\n\t\t\t{\n//\t\t\t\tresult[i] = rand.nextInt(data.valueCount(i));\n\t\t\t\tif (rand.nextBoolean())\n\t\t\t\t{\n\t\t\t\t\tresult[i] += 1;\n\t\t\t\t\tif (result[i] > data.getValueCount(i) - 1)\n\t\t\t\t\t\tresult[i] = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresult [i] -= 1;\n\t\t\t\t\tif (result[i] < 0)\n\t\t\t\t\t\tresult[i] = data.getValueCount(i) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public void InitiateImageData (int channel, int slice)\n\t{\n\t\t// get current slice properties\n\t\tImageStack stack1 = i1.getStack();\n\t\tcurrentSlice = slice;\n\t\tipWallSegment = stack1.getProcessor(currentSlice);\n\t\tcurrentStage[currentSlice-1] = -1;\n\n\t\t// Stretch the Histogram\n\t\t//float s2 = (float)(16);\n\t\t//float[] kernelSm = {1/s2,2/s2,1/s2,2/s2,4/s2,2/s2,1/s2,2/s2,1/s2};\n\t\t//ipWallSegment.convolve( kernelSm, 3, 3);\n\t\t//IJ.run(\"Enhance Contrast\", \"saturated=0.0 normalize_all\");\n\t\ti1.updateAndDraw();\n\t\tint w = ipWallSegment.getWidth();\n\t\tint h = ipWallSegment.getHeight();\n\t}", "public double[] histogram() {\n int[][] data = toArray();\n double[] ans = new double[256];\n int totalSize = data.length * data[0].length;\n\n for (int i = 0; i < data.length; i++) {\n for (int j = 0; j < data[i].length; j++) {\n ans[data[i][j]]++;\n }\n }\n for (int i = 0; i < ans.length; i++) {\n ans[i] = ans[i] / totalSize;\n }\n return ans;\n }", "public void injectSomeMoreNoise(double intensity) {\n//\t\taddBSCnoise(lambda,intensity);\n\t\t\n//\t\taddBSCnoise(posterior, intensity);\n//\t\tfor (int i=0; i<n; i++) lambda[i] = posterior[i];\n//\t\tcalc_q0 (posterior);\n//\n//\t\t// initialization of beta\n//\t\tfor (int i = 0; i <= m - 1; i++) {\n//\t\t\tfor (int j = 0; j <= row_weight[i] - 1; j++) {\n//\t\t\t\tbeta[i][j] = 0.0;\n//\t\t\t}\n//\t\t}\t\t\n\t\t\n\t}", "M generateNoise();", "public int noise(int xin, int yin, int zin);", "boolean hasNoise();", "int yBins();", "@SuppressWarnings(\"unchecked\")\r\n private void makeIntensityProfiles(int sliceNum) {\r\n \r\n // sanity check\r\n if (sliceNum < 0 || sliceNum >= zDim) return;\r\n\r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM(sliceNum);\r\n int xcm = centerOfMass[0];\r\n int ycm = centerOfMass[1];\r\n \r\n // There should be only one VOI\r\n VOIVector vois = abdomenImage.getVOIs();\r\n VOI theVOI = vois.get(0);\r\n\r\n // there should be only one curve on each slice corresponding to the external abdomen boundary\r\n VOIContour curve = ((VOIContour)theVOI.getCurves().elementAt(sliceNum)); \r\n int[] xVals;\r\n int[] yVals;\r\n int[] zVals;\r\n try {\r\n xVals = new int [curve.size()];\r\n yVals = new int [curve.size()];\r\n zVals = new int [curve.size()];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"makeIntensityProfiles(): Can NOT allocate the abdomen VOI arrays\");\r\n return;\r\n }\r\n curve.exportArrays(xVals, yVals, zVals);\r\n \r\n // one intensity profile for each radial line. Each radial line is 3 degrees and\r\n // there are 360 degrees in a circle\r\n try {\r\n intensityProfiles = new ArrayList[360 /angularResolution];\r\n xProfileLocs = new ArrayList[360 / angularResolution];\r\n yProfileLocs = new ArrayList[360 / angularResolution];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"makeIntensityProfiles(): Can NOT allocate profile arrays\");\r\n return;\r\n }\r\n \r\n // load the srcImage into the slice buffer (it has the segmented abdomen image in it now)\r\n try {\r\n srcImage.exportData(sliceNum * sliceSize, sliceSize, sliceBuffer);\r\n } catch (IOException ex) {\r\n System.err.println(\"JCATsegmentAbdomen2D(): Error exporting data\");\r\n return;\r\n }\r\n\r\n double angleRad;\r\n int count;\r\n int contourPointIdx = 0;\r\n for (int angle = 0; angle < 360; angle += angularResolution) {\r\n count = 0;\r\n int x = xcm;\r\n int y = ycm;\r\n int yOffset = y * xDim;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n // allocate the ArrayLists for each radial line\r\n try {\r\n intensityProfiles[contourPointIdx] = new ArrayList<Short>();\r\n xProfileLocs[contourPointIdx] = new ArrayList<Integer>();\r\n yProfileLocs[contourPointIdx] = new ArrayList<Integer>();\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"makeIntensityProfiles(): Can NOT allocate profile list: \" +contourPointIdx);\r\n return;\r\n }\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n // increment x each step\r\n scaleFactor = Math.tan(angleRad);\r\n while (x < xVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n intensityProfiles[contourPointIdx].add((short)sliceBuffer[yOffset + x]);\r\n xProfileLocs[contourPointIdx].add(x);\r\n yProfileLocs[contourPointIdx].add(y);\r\n count++;\r\n \r\n // walk out in x and compute the value of y for the given radial line\r\n x++;\r\n y = ycm - (int)((x - xcm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n // decrement y each step\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n while (y > yVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n intensityProfiles[contourPointIdx].add((short)sliceBuffer[yOffset + x]);\r\n xProfileLocs[contourPointIdx].add(x);\r\n yProfileLocs[contourPointIdx].add(y);\r\n count++;\r\n \r\n // walk to the top of the image and compute values of x for the given radial line\r\n y--;\r\n x = xcm + (int)((ycm - y) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n // decrement x each step\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n while (x > xVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n intensityProfiles[contourPointIdx].add((short)sliceBuffer[yOffset + x]);\r\n xProfileLocs[contourPointIdx].add(x);\r\n yProfileLocs[contourPointIdx].add(y);\r\n count++;\r\n \r\n x--;\r\n y = ycm - (int)((xcm - x) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n\r\n } else if (angle > 225 && angle <= 315) {\r\n // increment y each step\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n while (y < yVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n intensityProfiles[contourPointIdx].add((short)sliceBuffer[yOffset + x]);\r\n xProfileLocs[contourPointIdx].add(x);\r\n yProfileLocs[contourPointIdx].add(y);\r\n count++;\r\n \r\n y++;\r\n x = xcm - (int)((y - ycm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n }\r\n \r\n contourPointIdx++;\r\n } // end for (angle = 0; ...\r\n\r\n // intensityProfiles, xProfileLocs, and yProfileLocs are set, we can find the \r\n // internal boundary of the subcutaneous fat now\r\n }", "private void histogramScore() {\r\n View.histogram(score, 0, this.getSize().width + 15, 0);\r\n }", "private void drawHistogram(int n, double left, double right, double[] inputStream) {\n prepareCanvas(left, right);\n doDraw(n, left, right, inputStream);\n drawGrid(left, right);\n }", "public HistogramTest(String title) {\r\n super(title);\r\n IntervalXYDataset dataset = createDataset();\r\n JFreeChart chart = createChart(dataset);\r\n ChartPanel chartPanel = new ChartPanel(chart);\r\n chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));\r\n chartPanel.setMouseZoomable(true, false);\r\n setContentPane(chartPanel);\r\n }", "public double measurementProb(float[] measurement) {\r\n double prob = 1.0;\r\n for(int i=0;i<landmarks.length;i++) {\r\n float dist = (float) MathX.distance(x, y, landmarks[i].x, landmarks[i].y); \r\n prob *= MathX.Gaussian(dist, senseNoise, measurement[i]); \r\n } \r\n \r\n probability = prob;\r\n \r\n return prob;\r\n }", "private void computeHistogramBins() {\r\n int nBins = (int) Math.ceil(hismax / binWidth);\r\n histoBins = new double[nBins];\r\n for (int i = 0; i < nBins; i++) {\r\n histoBins[i] = binWidth * (double) i + binWidth;\r\n }\r\n }", "@java.lang.Override\n public int getNoisySampleCount() {\n return noisySampleCount_;\n }", "private double[] normalizeHistogram(double[] inputHistogram, int totalPixels) {\n\t\tdouble[] normalized=new double[inputHistogram.length];\n\t\tfor(int i=0;i<inputHistogram.length&&start;i++){\n\t\t\tnormalized[i]=inputHistogram[i]/totalPixels;\n\t\t}\n\t\treturn normalized;\n\t}", "public int getFrequency(int height);", "public final double getEstimatedNoise() {\r\n return noise;\r\n }", "@Override\n\tpublic void makeNoise() {\n\t\tSystem.out.println(\"Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink \");\n\t}", "HistogramInterface createHistogram(String name);", "JFreeChart generateHist();", "@Test\n public void computeResult_addsNoiseToCount() {\n mockDoubleNoise(0);\n // Mock the noise mechanism so that it adds noise to the count == 2.\n mockLongNoise(2);\n\n variance =\n BoundedVariance.builder()\n .epsilon(EPSILON)\n .delta(DELTA)\n .noise(noise)\n .maxPartitionsContributed(1)\n .maxContributionsPerPartition(1)\n .lower(-100)\n .upper(100)\n .build();\n\n variance.addEntry(20);\n variance.addEntry(20);\n // midpoint = (lower + upper) / 2 = 0,\n // noised_normalized_sum_of_squares = (x1 - midpoint)^2 + (x2 - midpoint)^2 + noise = 20^2 +\n // 20^2 = 800,\n // noised_normalized_sum = (x1 + x2) - midpoint * count + noise = 20 + 20 - 0 + 0 = 40,\n // noised_count = count + noise = 2 + 2 = 4,\n // BoundedVariance.computeResult() = noised_normalized_sum_of_squares / noised_count -\n // (noised_normalized_sum / noised_count)^2 = 800 / 4 - (40 / 4)^2 = 100\n assertThat(variance.computeResult()).isEqualTo(100.0);\n }", "static int volume(final int[] hist) {\n final int len = hist.length;\n final int[] deltas = new int[len];\n deltas[0] = hist[0]; // as if delta from 0\n for (int i = 1; i < len; i++) {\n deltas[i] = hist[i] - hist[i - 1];\n }\n System.out.println(Arrays.toString(deltas));\n return 0;\n }", "public float getNoise(int x, int y) {\n\t\treturn getRealNoise(x * .3f, y * .3f);\n\t}", "java.lang.String getNoise();", "public HistogramDataSet getData();", "com.google.protobuf.ByteString\n getNoiseBytes();", "public NumericalDistributionModel( Integer binCount, Double span ){\n\t\tinterval = span / binCount.doubleValue();\n\t\tlog.info( \"bin-interval is {}\", interval );\n\t\thistogram = new Integer[ binCount ];\n\t\t\n\t\tfor( int i = 0; i < histogram.length; i++ )\n\t\t\thistogram[i] = 0;\n\t}", "@java.lang.Override\n public int getNoisySampleCount() {\n return noisySampleCount_;\n }", "static int linear(int[] hist) {\n final int len = hist.length;\n // look from the point of view of each individual x (rather than in terms of areas)\n // each individual position can contribute a bar of water from the top of the bar to water level\n // ... and water level, if any, is determined by the min of 2 higher bars to left and right\n\n // prepare maxima from the left\n final int[] lftMax = new int[len];\n for (int i = 0, max = 0; i < len; i++) {\n max = lftMax[i] = Math.max(max, hist[i]);\n }\n\n // prepare maxima from the right\n final int[] rgtMax = new int[len];\n for (int i = len, max = 0; --i >= 0; ) {\n max = rgtMax[i] = Math.max(max, hist[i]);\n }\n\n int water = 0;\n for (int i = 0; i < len; i++) {\n final int level = Math.min(lftMax[i], rgtMax[i]);\n final int waterAbove = level - hist[i]; // negative if bar higher than level\n if (waterAbove > 0) {\n water += waterAbove;\n }\n }\n return water;\n }", "public double sampleVariance() {\n/* 262 */ Preconditions.checkState((this.count > 1L));\n/* 263 */ if (Double.isNaN(this.sumOfSquaresOfDeltas)) {\n/* 264 */ return Double.NaN;\n/* */ }\n/* 266 */ return DoubleUtils.ensureNonNegative(this.sumOfSquaresOfDeltas) / (this.count - 1L);\n/* */ }", "@Override\r\n\tprotected void generateAreas() {\n\t\tPerlinNoise noise = new PerlinNoise((int) getSeed(), perlinTemplate.getScale(), perlinTemplate.getOctaves(), perlinTemplate.getPersistence());\r\n\t\tfor (int y = 0; y < getHeight(); y ++) {\r\n\t\t\tfor (int x = 0; x < getWidth(); x ++) {\r\n\t\t\t\tif (getValue(x, y) != BASE) {\r\n\t\t\t\t\tif (noise.perlinNoise(x, y) > perlinTemplate.getThreshold()) {\r\n\t\t\t\t\t\tsetValue(x, y, WALL);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsetValue(x, y, FLOOR);\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}", "HistogramInterface registerHistogram(HistogramInterface histogram);", "private void resampleAbdomenVOI( int sliceIdx, VOIContour curve ) {\r\n \r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM(sliceIdx);\r\n int xcm = centerOfMass[0];\r\n int ycm = centerOfMass[1];\r\n// ViewUserInterface.getReference().getMessageFrame().append(\"Xcm: \" +xcm +\" Ycm: \" +ycm);\r\n \r\n\r\n ArrayList<Integer> xValsAbdomenVOI = new ArrayList<Integer>();\r\n ArrayList<Integer> yValsAbdomenVOI = new ArrayList<Integer>();\r\n\r\n // angle in radians\r\n double angleRad;\r\n \r\n for (int angle = 0; angle < 360; angle += angularResolution) {\r\n int x = xcm;\r\n int y = ycm;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n // increment x each step\r\n scaleFactor = Math.tan(angleRad);\r\n while (x < xDim && curve.contains(x, y)) {\r\n \r\n // walk out in x and compute the value of y for the given radial line\r\n x++;\r\n y = ycm - (int)((x - xcm) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n // decrement y each step\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n while (y > 0 && curve.contains(x, y)) {\r\n\r\n // walk to the top of the image and compute values of x for the given radial line\r\n y--;\r\n x = xcm + (int)((ycm - y) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n // decrement x each step\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n while (x > 0 && curve.contains(x, y)) {\r\n \r\n x--;\r\n y = ycm - (int)((xcm - x) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n\r\n } else if (angle > 225 && angle <= 315) {\r\n // increment y each step\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n while (y < yDim && curve.contains(x, y)) {\r\n \r\n y++;\r\n x = xcm - (int)((y - ycm) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n }\r\n } // end for (angle = 0; ...\r\n \r\n// ViewUserInterface.getReference().getMessageFrame().append(\"resample VOI number of points: \" +xValsAbdomenVOI.size());\r\n\r\n curve.clear();\r\n for(int idx = 0; idx < xValsAbdomenVOI.size(); idx++) {\r\n curve.add( new Vector3f( xValsAbdomenVOI.get(idx), yValsAbdomenVOI.get(idx), sliceIdx ) );\r\n }\r\n }", "int xBins();", "public static int numElements_infos_noise(int dimension) {\n int array_dims[] = { 3, };\n if (dimension < 0 || dimension >= 1) throw new ArrayIndexOutOfBoundsException();\n if (array_dims[dimension] == 0) throw new IllegalArgumentException(\"Array dimension \"+dimension+\" has unknown size\");\n return array_dims[dimension];\n }", "private double noise(SpIterNoiseObs noise) {\n return 3.0 * 60.0;\n }", "public HistogramDataGroup getHistogramData();", "public double[] areaHistogram(double x, double y, double width,\n double height) {\n int[] data = areaToVector(x, y, width, height);\n double[] ans = new double[256];\n int totalSize = data.length;\n\n for (int i = 0; i < data.length; i++) {\n ans[data[i]] += 1.0 / totalSize;\n }\n return ans;\n }", "void calcWave() {\n yoff += 0.01f;\n \n //For every x value, calculate a y value based on sine or cosine\n float x = yoff; //**OPTION #1****/\n //float x = 0.0f; //**OPTION #2****/\n for (int i = 0; i < yvalues.length; i++) {\n float n = 2*noise(x)-1.0f; //**OPTION #1****/ //scale noise to be between 1 and -1\n //float n = 2*noise(x,yoff)-1.0f; //**OPTION #2****/ //scale noise to be between 1 and -1\n yvalues[i] = n*amplitude;\n x+=dx;\n }\n }", "public float[] sense() {\r\n float[] ret = new float[landmarks.length];\r\n \r\n for(int i=0;i<landmarks.length;i++){\r\n float dist = (float) MathX.distance(x, y, landmarks[i].x, landmarks[i].y);\r\n ret[i] = dist + (float)random.nextGaussian() * senseNoise;\r\n } \r\n return ret;\r\n }", "@Test\n public void computeResult_addsNoiseToSum() {\n mockDoubleNoise(-10);\n // Mock the noise mechanism so that it adds noise to the count == 0.\n mockLongNoise(0);\n\n variance =\n BoundedVariance.builder()\n .epsilon(EPSILON)\n .delta(DELTA)\n .noise(noise)\n .maxPartitionsContributed(1)\n .maxContributionsPerPartition(1)\n .lower(-100)\n .upper(100)\n .build();\n\n variance.addEntry(10);\n variance.addEntry(10);\n // midpoint = (lower + upper) / 2 = 0,\n // noised_normalized_sum_of_squares = (x1 - midpoint)^2 + (x2 - midpoint)^2 + noise = 10^2 +\n // 10^2 - 10 = 190,\n // noised_normalized_sum = (x1 + x2) - midpoint * count + noise = 10 + 10 - 0 - 10 = 10,\n // noised_count = count + noise = 2 + 0 = 2,\n // BoundedVariance.computeResult() = noised_normalized_sum_of_squares / noised_count -\n // (noised_normalized_sum / noised_count)^2 = 190 / 2 - (10 / 2)^2 = 70\n assertThat(variance.computeResult()).isEqualTo(70.0);\n }", "public static int numDimensions_infos_noise() {\n return 1;\n }", "private static void filterNoise(BufferedImage image) {\n\t\tfor (int x=0; x<image.getWidth(); x++) {\r\n\t\t\tfor (int y=0; y<image.getHeight(); y++) {\r\n\t\t\t\t\r\n\t\t\t\tint pixelVal = image.getRGB(x, y);\r\n\r\n\t\t\t\t// check how many pixels in a 2 x 2 rectangle with this point \r\n\t\t\t\t// in the center have the same color as this point; if not \r\n\t\t\t\t// many, flip this pixel's color\r\n\t\t\t\tint startX = Math.max(x-2, 0);\r\n\t\t\t\tint startY = Math.max(y-2, 0);\r\n\t\t\t\tint endX = Math.min(x+2, image.getWidth()-1);\r\n\t\t\t\tint endY = Math.min(y+2, image.getHeight()-1);\r\n\r\n\t\t\t\tint matchCount = 0;\r\n\t\t\t\tint totalCount = 0;\r\n\t\t\t\tfor (int i=startX; i<=endX; i++) {\r\n\t\t\t\t\tfor (int j=startY; j<=endY; j++) {\r\n\t\t\t\t\t\tif (image.getRGB(i,j) == pixelVal) {\r\n\t\t\t\t\t\t\tmatchCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttotalCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ((matchCount / (double) totalCount) < .2) {\r\n\t\t\t\t\tif (pixelVal == Color.YELLOW.getRGB()) {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.BLACK.getRGB());\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.YELLOW.getRGB());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (debug) {\r\n\t\t\ttry {\r\n\t\t\t\tImageIO.write(image, \"gif\", new File(\"noiseFiltered.gif\"));\r\n\t\t\t} catch (Exception e) {e.printStackTrace();}\r\n\t\t}\r\n\t}", "public BufferedImage Histogram(BufferedImage timg,BufferedImage timg1) {\n\n\n int width = timg.getWidth();\n int height = timg.getHeight();\n\n int[][][] ImageArray = convertToArray(timg);\n int[][][] ImageArray2 = convertToArray(timg);\n\n float[] HistgramR = new float[256];\n float[] HistgramB = new float[256];\n float[] HistgramG = new float[256];\n\n for (int k = 0; k <= 255; k++) {\n HistgramR[k] = 0;\n HistgramG[k] = 0;\n HistgramB[k] = 0;\n }\n\n //int a = 255;\n\n int a = 0;\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n\n int r = ImageArray[x][y][1];\n int g = ImageArray[x][y][2];\n int b = ImageArray[x][y][3];\n\n HistgramR[r]++;\n HistgramG[g]++;\n HistgramB[b]++;\n }\n a++;\n }\n\n System.out.println(a);\n\n System.out.println(\"Pixel count for Red, Green and Blue Channel respectively\");\n for (int z = 0; z < HistgramR.length; z++) {\n\n\n System.out.println(z + \"\\t\" + HistgramR[z] + \"\\t\" + HistgramG[z] + \"\\t\" + HistgramB[z]);\n System.out.println();\n }\n System.out.println();\n\n\n // Histogram Normalisation\n for (int x = 0; x < HistgramR.length; x++) {\n\n HistgramR[x] = HistgramR[x] / (a*a);\n HistgramG[x] = HistgramG[x] / (a*a);\n HistgramB[x] = HistgramB[x] / (a*a);\n }\n\n System.out.println(\"Normalised Pixel count for Red, Green and Blue Channel respectively\");\n for (int y = 0; y < HistgramR.length; y++) {\n\n\n System.out.println(y + \"\\t\" + HistgramR[y] + \"\\t\" + HistgramG[y] + \"\\t\" + HistgramB[y]);\n System.out.println();\n }\n\n BufferedImage resizedImg = resizeImg(timg1, 512, 512);\n\n int[][][] ImageArray1 = convertToArray(resizedImg);\n\n return convertToBimage(ImageArray1);\n }", "public float histogramMethod(Volume volume) \n\t{\n\t\tHistogram hh = new Histogram();\n\t\tint ii = 0;\n\n\t\t//\n\t\t// Compute the thresholded histogram.\n\t\t//\n\t\tfloat lower_threshold = (float)0.01;\n\t\tfloat upper_threshold = (float)0.3 * (float)Statistics.max(volume);\n\t\thh.histogram( volume, lower_threshold, upper_threshold );\n\n\t\t//\n\t\t// Get the counts and bins.\n\t\t//\n\t\tfloat[] bins = hh.getBins();\n\t\tfloat[] counts = hh.getCounts();\n\n\t\t//\n\t\t// Find the maximum count.\n\t\t//\n\t\tfloat max = (float)0.0; int max_index = 0;\n\t\tfor(ii=0; ii<counts.length; ii++) {\n\t\t\tif( counts[ii] > max ) {\n\t\t\t\tmax_index = ii;\n\t\t\t\tmax = counts[ii];\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\t// Find the first minimum after the maximum\n\t\t//\n\t\tii = max_index + 1;\n\t\tdo {\n\t\t\tii++;\n\t\t} while( counts[ii] < counts[ii-1] && ( ii < bins.length ) );\n\n\t\tfloat sigma = (float)0.0;\n\t\tif( ii >= bins.length-1 ) {\n\t\t\tSystem.out.println(\"Gack...could not find the first minimum.\");\n\t\t}\n\t\telse {\n\t\t\tsigma = bins[ii];\n\t\t}\n\n\t\treturn sigma;\n\t}", "public interface VoxelNoise {\n /*\n * This method returns the voxel type for a location\n */\n public int noise(int xin, int yin, int zin);\n}", "public static void Histogramme(Mat m,int[] hist)\n\t{\n\t\tbyte[] pixel=new byte[3];\n\t\tfor(int i=0;i<m.rows();i++)\n\t\t{\n\t\t\tfor(int j=0;j<m.cols();j++)\n\t\t\t{\t\t\t\t\t\n\t\t\t\tm.get(i, j,pixel);\t\t\t\t\n\t\t\t\thist[byteColorCVtoIntJava(pixel[0])]+=1;\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Override\n double distribution(double height) {\n return (n0 * Math.exp(-a * height));\n }", "Histogram() {\n type = name = \"\";\n feature_index = -1;\n histogram_features = null;\n histogram_proportions = null;\n histogram_counts = null;\n }", "@java.lang.Override\n public boolean hasNoiseSigma() {\n return gradientNoiseSigmaCase_ == 1;\n }", "public List<Peak> filterNoise(List<Peak> peaks, double threshold, double experimentalPrecursorMzRatio);", "public void popFrequency(int height);", "public static void main(String[] args)\n {\n ArrayList<DataPoint> sampleData = new ArrayList<DataPoint>();\n Histogram hist = new Histogram(sampleData, \"title\", \"idependant\", \"independant\");\n\n hist.addData(new DataPoint(1));\n hist.addData(new DataPoint(2));\n hist.addData(new DataPoint(2));\n hist.addData(new DataPoint(2));\n hist.addData(new DataPoint(2));\n hist.addData(new DataPoint(2));\n hist.addData(new DataPoint(3));\n hist.addData(new DataPoint(4));\n hist.addData(new DataPoint(5));\n hist.addData(new DataPoint(6));\n hist.addData(new DataPoint(7));\n hist.addData(new DataPoint(8));\n hist.addData(new DataPoint(9));\n hist.addData(new DataPoint(50));\n\n\n JFrame frame = new JFrame(\"Histogram\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\n\n\n frame.add(hist);\n frame.setSize(475,475);\n frame.setVisible(true);\n\n\n }", "public int samplesOnePixel() {\r\n\t\tif (getGraphWidth() > 0) {\r\n\t\t\t// avoid division by zero\r\n\t\t\treturn section.getLength() / getGraphWidth();\r\n\t\t}\r\n\t\treturn 1;\r\n\t}", "public IntensityImage drawHistogram(boolean cumulative,\r\n\t\t\t\t\tint height, int space)\r\n {\r\n\tborder = 30;\r\n\tint width = 255 * (1 + space) + 2*border;\r\n\tRGBImage image = new RGBImage(height, width);\r\n\tBufferedImage bim = image.makeBufferedImage();\r\n\tGraphics g = bim.getGraphics();\r\n\t\r\n\tdraw(cumulative, g, 0, 0, height, space);\r\n\r\n\timage.setBImage(bim);\r\n\t\r\n\treturn new IntensityImage(image);\r\n }", "public static int numElements_infos_noise() {\n return 3;\n }", "public void histNormalize() {\n\n double max = max();\n double min = min();\n max = max - min;\n for (int i = 0; i < pixelData.length; i++) {\n double value = pixelData[i] & 0xff;\n pixelData[i] = (byte) Math.floor((value - min) * 255 / max);\n }\n }", "public static long computeBin(final long[] histogram) {\n\t\tint threshold = -1;\n\t\tfinal double ptile = 0.5; // default fraction of foreground pixels\n\t\tfinal double[] avec = new double[histogram.length];\n\n\t\tfor (int i = 0; i < histogram.length; i++)\n\t\t\tavec[i] = 0.0;\n\n\t\tfinal double total = partialSum(histogram, histogram.length - 1);\n\t\tdouble temp = 1.0;\n\t\tfor (int i = 0; i < histogram.length; i++) {\n\t\t\tavec[i] = Math.abs((partialSum(histogram, i) / total) - ptile);\n\t\t\t// IJ.log(\"Ptile[\"+i+\"]:\"+ avec[i]);\n\t\t\tif (avec[i] < temp) {\n\t\t\t\ttemp = avec[i];\n\t\t\t\tthreshold = i;\n\t\t\t}\n\t\t}\n\t\treturn threshold;\n\t}", "public IntensityImage drawHistogram(boolean cumulative)\r\n {\r\n\treturn drawHistogram(cumulative, 200, 1);\r\n }", "@Override\n\tpublic void smooth(int n) {\n\n\t\tint arr[][] = new int[this.frame.length][this.frame[0].length];\n\n\t\tif (n <= 2) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (n%2 == 0) {\n\t\t\tn--;\n\t\t}\n\n\t\tfor (int i = 0; i < this.frame.length; i++) {\n\t\t\tfor (int j = 0; j < this.frame[0].length; j++) {\n\t\t\t\tint counter = 0;\n\t\t\t\tint avg = 0;\n\n\t\t\t\tfor (int a = i-(n/2); a<= i+(n/2); a++) {\n\t\t\t\t\tfor (int b = j-(n/2); b<= j+(n/2); b++) {\n\t\t\t\t\t\tif (isInside(this.frame, a, b)) {\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\tavg += this.frame[a][b];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tarr[i][j] = avg/(counter);\n\t\t\t}\n\t\t}\n\n\t\tthis.frame = arr;\n\t}", "public float histogramMethod(MCVolume volume) \n\t{\n\t\tHistogram hh = new Histogram();\n\t\tint ii = 0;\n\n\t\t//\n\t\t// Compute the thresholded histogram.\n\t\t//\n\t\tfloat lower_threshold = (float)0.01;\n\t\tfloat upper_threshold = (float)0.3 * (float)Statistics.max(volume);\n\t\thh.histogram( volume, lower_threshold, upper_threshold );\n\n\t\t//\n\t\t// Get the counts and bins.\n\t\t//\n\t\tfloat[] bins = hh.getBins();\n\t\tfloat[] counts = hh.getCounts();\n\n\t\t//\n\t\t// Find the maximum count.\n\t\t//\n\t\tfloat max = (float)0.0; int max_index = 0;\n\t\tfor(ii=0; ii<counts.length; ii++) {\n\t\t\tif( counts[ii] > max ) {\n\t\t\t\tmax_index = ii;\n\t\t\t\tmax = counts[ii];\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\t// Find the first minimum after the maximum\n\t\t//\n\t\tii = max_index + 1;\n\t\tdo {\n\t\t\tii++;\n\t\t} while( counts[ii] < counts[ii-1] && ( ii < bins.length ) );\n\n\t\tfloat sigma = (float)0.0;\n\t\tif( ii >= bins.length-1 ) {\n\t\t\tSystem.out.println(\"Gack...could not find the first minimum.\");\n\t\t}\n\t\telse {\n\t\t\tsigma = bins[ii];\n\t\t}\n\n\t\treturn sigma;\n\t}", "@Override\n\tpublic double getIntensity() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic Object hesseI(double[] point) {\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n private void makeIntensityProfiles() {\r\n\r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM();\r\n int xcm = centerOfMass[0];\r\n int ycm = centerOfMass[1];\r\n \r\n // There should be only one VOI\r\n VOIVector vois = abdomenImage.getVOIs();\r\n VOI theVOI = vois.get(0);\r\n\r\n // there should be only one curve corresponding to the external abdomen boundary\r\n VOIContour curve = ((VOIContour)theVOI.getCurves().get(0));\r\n int[] xVals;\r\n int[] yVals;\r\n int[] zVals;\r\n try {\r\n xVals = new int [curve.size()];\r\n yVals = new int [curve.size()];\r\n zVals = new int [curve.size()];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"makeIntensityProfiles(): Can NOT allocate the abdomen VOI arrays\");\r\n return;\r\n }\r\n curve.exportArrays(xVals, yVals, zVals);\r\n \r\n // one intensity profile for each radial line. Each radial line is 3 degrees and\r\n // there are 360 degrees in a circle\r\n try {\r\n intensityProfiles = new ArrayList[360 /angularResolution];\r\n xProfileLocs = new ArrayList[360 / angularResolution];\r\n yProfileLocs = new ArrayList[360 / angularResolution];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"makeIntensityProfiles(): Can NOT allocate profile arrays\");\r\n return;\r\n }\r\n \r\n // load the srcImage into the slice buffer (it has the segmented abdomen image in it now)\r\n try {\r\n srcImage.exportData(0, sliceSize, sliceBuffer);\r\n } catch (IOException ex) {\r\n System.err.println(\"JCATsegmentAbdomen2D(): Error exporting data\");\r\n return;\r\n }\r\n\r\n double angleRad;\r\n int count;\r\n int contourPointIdx = 0;\r\n for (int angle = 0; angle < 360; angle += angularResolution) {\r\n count = 0;\r\n int x = xcm;\r\n int y = ycm;\r\n int yOffset = y * xDim;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n // allocate the ArrayLists for each radial line\r\n try {\r\n intensityProfiles[contourPointIdx] = new ArrayList<Short>();\r\n xProfileLocs[contourPointIdx] = new ArrayList<Integer>();\r\n yProfileLocs[contourPointIdx] = new ArrayList<Integer>();\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"makeIntensityProfiles(): Can NOT allocate profile list: \" +contourPointIdx);\r\n return;\r\n }\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n // increment x each step\r\n scaleFactor = Math.tan(angleRad);\r\n while (x < xVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n intensityProfiles[contourPointIdx].add((short)sliceBuffer[yOffset + x]);\r\n xProfileLocs[contourPointIdx].add(x);\r\n yProfileLocs[contourPointIdx].add(y);\r\n count++;\r\n \r\n // walk out in x and compute the value of y for the given radial line\r\n x++;\r\n y = ycm - (int)((x - xcm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n // decrement y each step\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n while (y > yVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n intensityProfiles[contourPointIdx].add((short)sliceBuffer[yOffset + x]);\r\n xProfileLocs[contourPointIdx].add(x);\r\n yProfileLocs[contourPointIdx].add(y);\r\n count++;\r\n \r\n // walk to the top of the image and compute values of x for the given radial line\r\n y--;\r\n x = xcm + (int)((ycm - y) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n // decrement x each step\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n while (x > xVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n intensityProfiles[contourPointIdx].add((short)sliceBuffer[yOffset + x]);\r\n xProfileLocs[contourPointIdx].add(x);\r\n yProfileLocs[contourPointIdx].add(y);\r\n count++;\r\n \r\n x--;\r\n y = ycm - (int)((xcm - x) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n\r\n } else if (angle > 225 && angle <= 315) {\r\n // increment y each step\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n while (y < yVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n intensityProfiles[contourPointIdx].add((short)sliceBuffer[yOffset + x]);\r\n xProfileLocs[contourPointIdx].add(x);\r\n yProfileLocs[contourPointIdx].add(y);\r\n count++;\r\n \r\n y++;\r\n x = xcm - (int)((y - ycm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n }\r\n \r\n contourPointIdx++;\r\n } // end for (angle = 0; ...\r\n\r\n // intensityProfiles, xProfileLocs, and yProfileLocs are set, we can find the \r\n // internal boundary of the subcutaneous fat now\r\n }", "public abstract double sample();", "@Override\r\n\tvoid makeNoise() {\n\t\tSystem.out.println(\"Moo\");\r\n\t}", "@Override\r\n\tpublic String makeANoise() {\n\t\treturn \"deer noise\";\r\n\t}", "public void populateNoiseArray(double[] p_76308_1_, double p_76308_2_, double p_76308_4_, double p_76308_6_, int p_76308_8_, int p_76308_9_, int p_76308_10_, double p_76308_11_, double p_76308_13_, double p_76308_15_, double p_76308_17_) {\n/* 81 */ if (p_76308_9_ == 1) {\n/* */ \n/* 83 */ boolean var64 = false;\n/* 84 */ boolean var65 = false;\n/* 85 */ boolean var21 = false;\n/* 86 */ boolean var68 = false;\n/* 87 */ double var70 = 0.0D;\n/* 88 */ double var73 = 0.0D;\n/* 89 */ int var75 = 0;\n/* 90 */ double var77 = 1.0D / p_76308_17_;\n/* */ \n/* 92 */ for (int var30 = 0; var30 < p_76308_8_; var30++) {\n/* */ \n/* 94 */ double var31 = p_76308_2_ + var30 * p_76308_11_ + this.xCoord;\n/* 95 */ int var78 = (int)var31;\n/* */ \n/* 97 */ if (var31 < var78)\n/* */ {\n/* 99 */ var78--;\n/* */ }\n/* */ \n/* 102 */ int var34 = var78 & 0xFF;\n/* 103 */ var31 -= var78;\n/* 104 */ double var35 = var31 * var31 * var31 * (var31 * (var31 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 106 */ for (int var37 = 0; var37 < p_76308_10_; var37++)\n/* */ {\n/* 108 */ double var38 = p_76308_6_ + var37 * p_76308_15_ + this.zCoord;\n/* 109 */ int var40 = (int)var38;\n/* */ \n/* 111 */ if (var38 < var40)\n/* */ {\n/* 113 */ var40--;\n/* */ }\n/* */ \n/* 116 */ int var41 = var40 & 0xFF;\n/* 117 */ var38 -= var40;\n/* 118 */ double var42 = var38 * var38 * var38 * (var38 * (var38 * 6.0D - 15.0D) + 10.0D);\n/* 119 */ int var19 = this.permutations[var34] + 0;\n/* 120 */ int var66 = this.permutations[var19] + var41;\n/* 121 */ int var67 = this.permutations[var34 + 1] + 0;\n/* 122 */ int var22 = this.permutations[var67] + var41;\n/* 123 */ var70 = lerp(var35, func_76309_a(this.permutations[var66], var31, var38), grad(this.permutations[var22], var31 - 1.0D, 0.0D, var38));\n/* 124 */ var73 = lerp(var35, grad(this.permutations[var66 + 1], var31, 0.0D, var38 - 1.0D), grad(this.permutations[var22 + 1], var31 - 1.0D, 0.0D, var38 - 1.0D));\n/* 125 */ double var79 = lerp(var42, var70, var73);\n/* 126 */ int var10001 = var75++;\n/* 127 */ p_76308_1_[var10001] = p_76308_1_[var10001] + var79 * var77;\n/* */ }\n/* */ \n/* */ } \n/* */ } else {\n/* */ \n/* 133 */ int var19 = 0;\n/* 134 */ double var20 = 1.0D / p_76308_17_;\n/* 135 */ int var22 = -1;\n/* 136 */ boolean var23 = false;\n/* 137 */ boolean var24 = false;\n/* 138 */ boolean var25 = false;\n/* 139 */ boolean var26 = false;\n/* 140 */ boolean var27 = false;\n/* 141 */ boolean var28 = false;\n/* 142 */ double var29 = 0.0D;\n/* 143 */ double var31 = 0.0D;\n/* 144 */ double var33 = 0.0D;\n/* 145 */ double var35 = 0.0D;\n/* */ \n/* 147 */ for (int var37 = 0; var37 < p_76308_8_; var37++) {\n/* */ \n/* 149 */ double var38 = p_76308_2_ + var37 * p_76308_11_ + this.xCoord;\n/* 150 */ int var40 = (int)var38;\n/* */ \n/* 152 */ if (var38 < var40)\n/* */ {\n/* 154 */ var40--;\n/* */ }\n/* */ \n/* 157 */ int var41 = var40 & 0xFF;\n/* 158 */ var38 -= var40;\n/* 159 */ double var42 = var38 * var38 * var38 * (var38 * (var38 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 161 */ for (int var44 = 0; var44 < p_76308_10_; var44++) {\n/* */ \n/* 163 */ double var45 = p_76308_6_ + var44 * p_76308_15_ + this.zCoord;\n/* 164 */ int var47 = (int)var45;\n/* */ \n/* 166 */ if (var45 < var47)\n/* */ {\n/* 168 */ var47--;\n/* */ }\n/* */ \n/* 171 */ int var48 = var47 & 0xFF;\n/* 172 */ var45 -= var47;\n/* 173 */ double var49 = var45 * var45 * var45 * (var45 * (var45 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 175 */ for (int var51 = 0; var51 < p_76308_9_; var51++) {\n/* */ \n/* 177 */ double var52 = p_76308_4_ + var51 * p_76308_13_ + this.yCoord;\n/* 178 */ int var54 = (int)var52;\n/* */ \n/* 180 */ if (var52 < var54)\n/* */ {\n/* 182 */ var54--;\n/* */ }\n/* */ \n/* 185 */ int var55 = var54 & 0xFF;\n/* 186 */ var52 -= var54;\n/* 187 */ double var56 = var52 * var52 * var52 * (var52 * (var52 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 189 */ if (var51 == 0 || var55 != var22) {\n/* */ \n/* 191 */ var22 = var55;\n/* 192 */ int var69 = this.permutations[var41] + var55;\n/* 193 */ int var71 = this.permutations[var69] + var48;\n/* 194 */ int var72 = this.permutations[var69 + 1] + var48;\n/* 195 */ int var74 = this.permutations[var41 + 1] + var55;\n/* 196 */ int var75 = this.permutations[var74] + var48;\n/* 197 */ int var76 = this.permutations[var74 + 1] + var48;\n/* 198 */ var29 = lerp(var42, grad(this.permutations[var71], var38, var52, var45), grad(this.permutations[var75], var38 - 1.0D, var52, var45));\n/* 199 */ var31 = lerp(var42, grad(this.permutations[var72], var38, var52 - 1.0D, var45), grad(this.permutations[var76], var38 - 1.0D, var52 - 1.0D, var45));\n/* 200 */ var33 = lerp(var42, grad(this.permutations[var71 + 1], var38, var52, var45 - 1.0D), grad(this.permutations[var75 + 1], var38 - 1.0D, var52, var45 - 1.0D));\n/* 201 */ var35 = lerp(var42, grad(this.permutations[var72 + 1], var38, var52 - 1.0D, var45 - 1.0D), grad(this.permutations[var76 + 1], var38 - 1.0D, var52 - 1.0D, var45 - 1.0D));\n/* */ } \n/* */ \n/* 204 */ double var58 = lerp(var56, var29, var31);\n/* 205 */ double var60 = lerp(var56, var33, var35);\n/* 206 */ double var62 = lerp(var49, var58, var60);\n/* 207 */ int var10001 = var19++;\n/* 208 */ p_76308_1_[var10001] = p_76308_1_[var10001] + var62 * var20;\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ }", "@java.lang.Override\n public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "private void setupHistogram() {\n\n // Create chart using the ChartFactory.\n chart = MimsChartFactory.createMimsHistogram(\"\", \"Pixel Value\", \"\", null, PlotOrientation.VERTICAL, true, true, false);\n chart.setBackgroundPaint(this.getBackground());\n chart.removeLegend();\n\n // Set the renderer.\n MimsXYPlot plot = (MimsXYPlot) chart.getPlot();\n XYBarRenderer renderer = (XYBarRenderer) plot.getRenderer();\n renderer.setDrawBarOutline(false);\n renderer.setShadowVisible(false);\n renderer.setBarPainter(new StandardXYBarPainter());\n\n // Listen for key pressed events.\n KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new KeyEventDispatcher() {\n public boolean dispatchKeyEvent(KeyEvent e) {\n if (e.getID() == KeyEvent.KEY_PRESSED && thisIsVisible() && ui.isActive()) {\n chartPanel.keyPressed(e);\n }\n return false;\n }\n });\n\n // Movable range and domain.\n plot.setDomainPannable(true);\n plot.setRangePannable(true);\n\n chartPanel = new MimsChartPanel(chart);\n chartPanel.setSize(350, 225);\n jPanel1.add(chartPanel);\n }", "protected double samplesOnePixelF() {\r\n\t\tif (getGraphWidth() > 1) {\r\n\t\t\t// avoid division by zero\r\n\t\t\treturn ((double) section.getLength()) / getGraphWidth();\r\n\t\t}\r\n\t\treturn 1.0;\r\n\t}", "public KeyProbability(double segmentTime) { \n filters.add(new SingleKeyProbabilityFilter(true, \"ionian\", \t\t\t\tnew double[] { 0.2, 0.0, 0.12, 0.0, 0.16, 0.12, 0.0, 0.16, 0.0, 0.12, 0.0, 0.12 } ));\n filters.add(new SingleKeyProbabilityFilter(true, \"lydian\",\t\t\t\tnew double[] { 0.2, 0.0, 0.12, 0.0, 0.16, 0.0, 0.12, 0.16, 0.0, 0.12, 0.0, 0.12 } ));\n filters.add(new SingleKeyProbabilityFilter(true, \"mixolydian\",\t\t\tnew double[] { 0.2, 0.0, 0.12, 0.0, 0.16, 0.12, 0.0, 0.16, 0.0, 0.12, 0.12, 0.0 } ));\n filters.add(new MultiKeyProbabilityFilter(false, \"aeolian\",\t\t\t\tnew double[][] {\n new double[] { 0.2, 0.0, 0.12, 0.16, 0.0, 0.12, 0.0, 0.16, 0.12, 0.0, 0.12, 0.0 },\n new double[] { 0.2, 0.0, 0.12, 0.16, 0.0, 0.12, 0.0, 0.16, 0.12, 0.0, 0.0, 0.12 } // harmonic\n } )); \n filters.add(new MultiKeyProbabilityFilter(false, \"dorian\",\t\t\t\tnew double[][] {\n new double[] { 0.2, 0.0, 0.12, 0.16, 0.0, 0.12, 0.0, 0.16, 0.0, 0.12, 0.12, 0.0 },\n new double[] { 0.2, 0.0, 0.12, 0.16, 0.0, 0.12, 0.0, 0.16, 0.0, 0.12, 0.0, 0.12 } // augmented\n } )); \n filters.add(new SingleKeyProbabilityFilter(false, \"phrygian\",\t\t\tnew double[] { 0.2, 0.12, 0.0, 0.16, 0.0, 0.12, 0.0, 0.16, 0.12, 0.0, 0.12, 0.0 } ));\n }", "public int getDelta(int histogramType);", "public final Image getNormal(final double intensity) {\n if (width * height < RESOLUTION_HIGH) {\n return null;\n }\n WritableImage img = new WritableImage(width, height);\n PixelWriter writer = img.getPixelWriter();\n normalLoop:\n for (int j = 0; j < height; j++) {\n for (int i = 0; i < width; i++) {\n if (Thread.interrupted()) {\n break normalLoop;\n }\n double tl = noiseBuffer[(height + j - 1) % height]\n [(width + i - 1) % width];\n double t = noiseBuffer[(height + j - 1) % height][i];\n double tr = noiseBuffer[(height + j - 1) % height]\n [(i + 1) % width];\n double r = noiseBuffer[j][(i + 1) % width];\n double br = noiseBuffer[(j + 1) % height][(i + 1) % width];\n double b = noiseBuffer[(j + 1) % height][i];\n double bl = noiseBuffer[(j + 1) % height]\n [(width + i - 1) % width];\n double l = noiseBuffer[j][(width + i - 1) % width];\n double dx = (tl + 2.0 * l + bl) - (tr + 2.0 * r + br);\n double dy = (tl + 2.0 * t + tr) - (bl + 2.0 * b + br);\n double dz = 1.0 / intensity;\n double mag = Math.sqrt(dx * dx + dy * dy + dz * dz);\n dx = (1 + dx / mag) / 2.0;\n dy = (1 + dy / mag) / 2.0;\n dz = (1 + dz / mag) / 2.0;\n writer.setColor(i, j, Color.color(dx, dy, dz));\n }\n }\n return img;\n }", "private void makeSubcutaneousFatVOIfromIntensityProfiles(int sliceNum) {\r\n \r\n int[] xLocsSubcutaneousVOI;\r\n int[] yLocsSubcutaneousVOI;\r\n int[] zVals;\r\n try {\r\n xLocsSubcutaneousVOI = new int [360 / angularResolution];\r\n yLocsSubcutaneousVOI = new int [360 / angularResolution];\r\n zVals = new int [360 / angularResolution];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"makeSubcutaneousFatVOIfromIntensityProfiles(): Can NOT allocate xLocsSubcutaneousVOI\");\r\n return;\r\n }\r\n \r\n for(int idx = 0; idx < 360 / angularResolution; idx++) {\r\n // fixSubcutaneiousFat2DVOI requires the zVal to be 0 (does VOI extraction on a 2D slice image)\r\n zVals[idx] = 0;\r\n }\r\n \r\n int numSamples;\r\n \r\n for(int idx = 0; idx < 360 / angularResolution; idx++) {\r\n numSamples = intensityProfiles[idx].size();\r\n \r\n int sampleIdx = numSamples - 10; // skip over the skin\r\n while (sampleIdx >= 0 &&\r\n intensityProfiles[idx].get(sampleIdx) < muscleThresholdHU &&\r\n intensityProfiles[idx].get(sampleIdx) > airThresholdHU) {\r\n sampleIdx--;\r\n }\r\n if (sampleIdx <= 0) {\r\n // could not find a valid subcutaneous fat point in the intensity profile\r\n// MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find the subcutaneous fat VOI point in the intensity profile for angle: \" +idx * angularResolution);\r\n if (idx > 0) {\r\n // assign this subcutaneous fat VOI point to the previous point if one exists\r\n xLocsSubcutaneousVOI[idx] = xLocsSubcutaneousVOI[idx-1];\r\n yLocsSubcutaneousVOI[idx] = yLocsSubcutaneousVOI[idx-1];\r\n } else {\r\n // assign this subcutaneous fat VOI point to the abdomen VOI point\r\n xLocsSubcutaneousVOI[idx] = xProfileLocs[idx].get(numSamples - 1);\r\n yLocsSubcutaneousVOI[idx] = yProfileLocs[idx].get(numSamples - 1);\r\n }\r\n } else {\r\n // we found a point in the intensity profile that matches subcutaneous fat\r\n xLocsSubcutaneousVOI[idx] = xProfileLocs[idx].get(sampleIdx);\r\n yLocsSubcutaneousVOI[idx] = yProfileLocs[idx].get(sampleIdx);\r\n }\r\n \r\n } // end for (int idx = 0; ...)\r\n\r\n // make the VOI's and add the points to them\r\n subcutaneousVOI.importCurve(xLocsSubcutaneousVOI, yLocsSubcutaneousVOI, zVals);\r\n\r\n }", "public KernelHistogram(int index, int size) {\n\n this.size = size / 2;\n value = index == MIDDLE ? size * size / 2 : index;\n\n }", "double sample();", "public float gradientMethod(Slice slice) \n\t{\n\t\t//\n\t\t// Intialize variables.\n\t\t//\n\t\tint nrows = slice.getNRows();\n\t\tint ncols = slice.getNCols();\n\n\t\tfloat[] v = new float[nrows*ncols]; int v_numset = 0;\n\t\tfloat t = (float)0.0; \n\t\tfloat sig_y = (float)0.0;\n\t\tfloat sig_x = (float)0.0;\n\n\t\t//\n\t\t// Compute the column gradient\n\t\t//\n\t\tfor(int row=0; row<nrows; row++) {\n\t\t\tfor(int col=1; col<ncols-1; col++) {\n\t\t\t\tt = slice.getData(row,col+1) - (float)2.0 * slice.getData(row,col) + slice.getData(row,col-1);\n\n\t\t\t\tif( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) {\n\t\t\t\t\tv[v_numset] = t; v_numset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( v_numset <= 10 ) {\n\t\t\tsig_y = (float)0.0;\n\t\t}\n\t\telse {\n\t\t\tsig_y = vec_stdDevMod(v, v_numset);\n\t\t}\n\n\t\tv_numset = 0;\n\n\t\t//\n\t\t// Compute the row gradient\n\t\t//\n\t\tfor(int col=0; col<ncols; col++) {\n\t\t\tfor(int row=1; row<nrows-1; row++) {\n\t\t\t\tt = slice.getData(row+1,col) - (float)2.0 * slice.getData(row,col) + slice.getData(row-1,col);\n\n\t\t\t\tif( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) {\n\t\t\t\t\tv[v_numset] = t; v_numset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( v_numset <= 10 ) {\n\t\t\tsig_x = (float)0.0;\n\t\t}\n\t\telse {\n\t\t\tsig_x = vec_stdDevMod(v, v_numset);\n\t\t}\n\n\t\treturn (float)Math.sqrt( (double)(sig_x * sig_x + sig_y * sig_y) ) / (float)2.0;\n\t}", "public void updateHistogram() {\n\n // Dont bother updating histogram if tab not even visible, save resources.\n if (!this.isVisible()) {\n return;\n }\n\n // Initialize imp variable.\n MimsPlus imp = null;\n\n // Get the title of the window currently selected in the combobox.\n // Then get the window associated with that title. \n String title = (String) jComboBox1.getSelectedItem();\n if (title != null) {\n imp = (MimsPlus) windows.get(title);\n }\n\n // Not sure why but sometimes images have NULL image processors.\n // Cant update histogram if it does not have one.\n if (imp == null) {\n return;\n }\n ImageProcessor ip = imp.getProcessor();\n if (ip == null) {\n return;\n }\n\n // Update the sliders.\n contrastAdjuster1.update(imp);\n\n // Get Pixel values.\n int i = 0;\n int width = imp.getWidth();\n int height = imp.getHeight();\n int nbins = 256;\n double[] pixels = new double[width * height];\n double pixelVal, maxVal = 0.0;\n for (int x = 0; x < width; x++) {\n for (int y = 0; y < height; y++) {\n pixelVal = ip.getPixelValue(x, y);\n pixels[i] = pixelVal;\n if (maxVal < pixelVal) {\n maxVal = pixelVal;\n }\n i++;\n }\n }\n\n // return if no data avaialable\n if (pixels == null) {\n return;\n }\n if (pixels.length == 0) {\n return;\n }\n\n // Setup and plot histogram.\n HistogramDataset dataset = new HistogramDataset();\n dataset.addSeries(\"\", pixels, nbins);\n MimsXYPlot plot = (MimsXYPlot) chart.getPlot();\n plot.setDataset(dataset);\n\n // Show contrast window.\n updateContrastWindow();\n\n // Final plot adjustments. maxVal cannot be zero, or JFreeChart will generate this error:\n // IllegalArgumentException: A positive range length is required: Range[0.0,0.0]\n if (maxVal == 0) {\n maxVal = 0.00001;\n }\n plot.getDomainAxis().setRange(0, maxVal);\n plot.setDomainGridlinesVisible(false);\n chart.fireChartChanged();\n }", "public static double calcSignalToNoiseRatio( double[] inArray, int eonset) {\r\n if ((inArray == null) || (inArray.length == 0) || \r\n (eonset <= 0) || (eonset > inArray.length)) {\r\n return -1;\r\n }\r\n double[] power = calculatePower( inArray );\r\n double snr;\r\n ArrayStats arstats = new ArrayStats( power );\r\n double aps = arstats.getMean();\r\n double apn = findSubsetMean( power, 0, eonset );\r\n if (Double.compare(apn, 0.0 ) != 0) {\r\n snr = 10.0 * Math.log10(aps / apn);\r\n } else {\r\n snr = -1.0;\r\n }\r\n return snr;\r\n }", "public ImagePlus reescaleHistogram(ImagePlus img, int type, int beta1, int beta2);", "public double getNoiseMean() {\n\t\t\treturn NOISE_MEAN;\n\t\t}", "private Histogram(int[] bins, double minValue, double maxValue) {\n this(bins.length - 2, minValue, maxValue);\n System.arraycopy(bins, 0, this.bins, 0, bins.length);\n }", "@Override\n public void makeNoise() {\n System.out.println(getName()+ \" Oink Oink\");\n }", "@Override\r\n\tpublic int[] getSample(Random rng) {\r\n\t\tif (!ready)\r\n\t\t\tthrow new RuntimeException(\"must normalize first\");\r\n\t\t\r\n\t\tint bins[] = new int[no_goods];\r\n\t\t\r\n\t\tfor (int i = 0; i<no_goods; i++) {\r\n\t\t\tdouble[] pmf = prob[i].get(r_tmp[i]);\r\n\t\r\n\t\t\t// choose a random spot on the cdf\r\n\t\t\tdouble random = rng.nextDouble();\r\n\t\t\t\r\n\t\t\t// compute cdf. todo: maybe we should precompute inverse of cdf in normalize() so that\r\n\t\t\t// we can avoid a loop here?\r\n\t\t\tdouble cdf = 0.0;\r\n\t\t\tfor (int j = 0; j<pmf.length; j++) {\r\n\t\t\t\tcdf += pmf[j];\r\n\t\t\t\t\r\n\t\t\t\tif (cdf >= random) {\r\n\t\t\t\t\tbins[i] = j;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// add index to realized so that in next round we get the pmf conditional\r\n\t\t\t\t\t// on our result for this round\r\n\t\t\t\t\tfor (int k = 0; k<=i; k++)\r\n\t\t\t\t\t\tr_tmp[i+1].d[k] = bins[k];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// go onto next good\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// sanity check: make sure we picked something. \r\n\t\t}\r\n\t\t\r\n\t\treturn bins;\r\n\t}", "public int index_bin(Example e) {\n\n int i;\n int index = -1; // -1 = EXAMPLES HAS UNKNOWN FEATURE VALUE\n int number_satisfied = 0;\n if (!Example.FEATURE_IS_UNKNOWN(e, feature_index)) { // written for checks, can be sped up\n for (i = 0; i < histogram_proportions.size(); i++) {\n if (Feature.EXAMPLE_MATCHES_FEATURE(\n e,\n histogram_features.elementAt(i),\n feature_index,\n histogram_features.elementAt(i).type)) {\n if ((index == -1) || (Algorithm.R.nextDouble() < 0.5)) {\n index = i;\n number_satisfied++;\n }\n }\n }\n if (index == -1) {\n System.out.println(e + \" :: \");\n for (i = 0; i < histogram_proportions.size(); i++)\n System.out.println(histogram_features.elementAt(i));\n\n Dataset.perror(\"Histogram.class :: example \" + e + \" has no bin in histogram \");\n }\n }\n return index;\n }", "public com.google.protobuf.ByteString\n getNoiseBytes() {\n java.lang.Object ref = noise_;\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 noise_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getNoiseBytes() {\n java.lang.Object ref = noise_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n noise_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private double noisyIntensity(double value) {\n\n\t\t// add multiplicative noise: log the value, add noise then take the exp\n\t\tdouble logValue = Math.log(value);\n\t\tdouble multiplicativeNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getIntensityStdev());\n\t\tlogValue += multiplicativeNoise;\n\t\tvalue = Math.exp(logValue);\n\n\t\t// then add additive noise as well\n\t\tdouble additiveNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getIntensityStdev());\n\t\tvalue += additiveNoise;\n\t\t\n\t\t// value must always be >= 0\n\t\tif (value < 0) {\n\t\t\tvalue = 0;\n\t\t}\n\t\treturn value;\n\n\t}", "private void initializeChartPanel() {\n\n Rectangle region = new Rectangle(0, 0, clip.getFrameCount(), clip.getFrameFreqSamples());\n\n //toClipCoords(region);\n region.y = clip.getFrameFreqSamples() - (region.y + region.height);\n\n final int endCol = region.x + region.width;\n final int endRow = region.y + region.height;\n\n //System.out.println(\"endCol = \" + endCol + \" endRow = \" + endRow);\n\n XYSeries xy = new XYSeries(\"data\");\n XYSeries xySpline = new XYSeries(\"spline\");\n\n // Displays the single MAX or STRONGEST Frequency for each column\n // captures every x'th element for fitting spline\n int maxItensity = 0;\n int[] rows = new int[endCol];\n int[] intensities = new int[endCol];\n\n// int SPLINEPRECISION = chartPrefJSlider2.getValue(); // 1 is highest precision; default = 40\n int SPLINEPRECISION = 40; // 1 is highest precision; default = 40\n int splineCounter = 0;\n\n for (int col = region.x; col < endCol; col++) {\n Frame fr = clip.getFrame(col);\n int strongestFreq = 0;\n int strongestFreqStrength = 0;\n for (int row = region.y; row < endRow; row++) {\n // the following is a MUCH faster equivalent to: img.setRGB(col, row, greyVal);\n //int greyVal = (int) (brightness + (contrast * Math.log1p(Math.abs(preMult * val))));\n int greyVal = (int) (0 + (625.0 * Math.log1p(Math.abs(11.2 * fr.getReal(row)))));\n greyVal = Math.min(255, Math.max(0, greyVal));\n int thisFreqStrength = (greyVal << 16) | (greyVal << 8) | (greyVal);\n\n if (thisFreqStrength > strongestFreqStrength) {\n strongestFreqStrength = thisFreqStrength;\n strongestFreq = row;\n }\n if (thisFreqStrength > maxItensity) {\n maxItensity = thisFreqStrength;\n }\n }\n rows[col] = strongestFreq;\n intensities[col] = strongestFreqStrength;\n }\n System.out.println(\"maxItensity = \" + maxItensity);\n\n // Average neighboring data values\n // Use minIntensity amoung neighbors for averaged row\n // Use threshold to exclude weak signals\n //int NUMPOINTSAVERAGED = 20;\n int NUMPOINTSAVERAGED = jSlider1.getValue(); // default = 20\n double INTENSITYTHRESHOLD = 0.95;\n int[] data = new int[endCol - NUMPOINTSAVERAGED];\n int[] dataAveraged = new int[endCol - NUMPOINTSAVERAGED];\n int[] minIntensities = new int[endCol - NUMPOINTSAVERAGED];\n for (int col = region.x; col < endCol - NUMPOINTSAVERAGED; col++) {\n int sumRows = 0;\n int minIntensity = maxItensity;\n for (int i = col; i < col + NUMPOINTSAVERAGED; i++) {\n sumRows += rows[i];\n minIntensity = java.lang.Math.min(minIntensity, intensities[i]);\n }\n data[col] = rows[col];\n dataAveraged[col] = java.lang.Math.round(sumRows / NUMPOINTSAVERAGED);\n minIntensities[col] = minIntensity;\n }\n\n for (int col = region.x; col < endCol - 2 * NUMPOINTSAVERAGED; col++) {\n splineCounter++;\n for (int row = region.y; row < endRow; row++) {\n if (row == data[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds actual data\n xy.add((double) col, (double) convertYCoordToFreq(row));\n //System.out.println(\"adding data point (\" + col + \",\" + row + \")\");\n }\n\n if (row == dataAveraged[col] && minIntensities[col] > INTENSITYTHRESHOLD * maxItensity) {\n // adds averaged data\n //xy.add((double) col, (double) convertYCoordToFreq(row));\n //System.out.println(\"adding data point (\" + col + \",\" + row + \")\");\n if (splineCounter % SPLINEPRECISION == 0) {\n xySpline.add((double) (col + NUMPOINTSAVERAGED / 2), (double) convertYCoordToFreq(row));\n }\n }\n }\n }\n\n dataset.removeAllSeries();\n dataset.addSeries(xy);\n\n //XYSeriesCollection splineDataset = new XYSeriesCollection();\n dataset.addSeries(xySpline);\n\n JFreeChart chart = ChartFactory.createXYLineChart(\n //JFreeChart chart = ChartFactory.createScatterPlot(\n clip.getFileName(), \"Time (ms)\", \"Frequency (Hz)\", dataset, PlotOrientation.VERTICAL, true, true, false);\n XYPlot xyplot = (XYPlot) chart.getPlot();\n xyplot.setRenderer(new XYSplineRenderer());\n XYLineAndShapeRenderer xylineandshaperenderer = (XYLineAndShapeRenderer) xyplot.getRenderer();\n xylineandshaperenderer.setSeriesShape(0, new java.awt.Rectangle(1, 1, 1, 1));\n xylineandshaperenderer.setSeriesLinesVisible(0, false);\n xylineandshaperenderer.setSeriesShapesVisible(0, true);\n xylineandshaperenderer.setSeriesLinesVisible(1, false);\n xylineandshaperenderer.setSeriesShapesVisible(1, false);\n\n// ChartFrame frame = new ChartFrame(\"First\", chart);\n// frame.pack();\n// frame.setVisible(true);\n\n\n jCheckBox1.setEnabled(true);\n jCheckBox1.setSelected(true);\n\n jCheckBox2.setEnabled(true);\n jCheckBox2.setSelected(false);\n\n jSlider1.setEnabled(true);\n jSlider2.setEnabled(true);\n\n jTextField9.setText(clip.getFileName());\n\n chartPanel = new ChartPanel(chart);\n }", "public abstract double samplingFrequency();", "public void set_infos_noise(int[] value) {\n for (int index0 = 0; index0 < value.length; index0++) {\n setElement_infos_noise(index0, value[index0]);\n }\n }", "private final void probabilityFromRecursiveRidgeFilter( float[] filter, float[] shape) {\n\t\tint nb = 0;\n\t\tdouble min = 1e9;\n\t\tdouble max = 0.0;\n\t\tfor (int x=2;x<nx-2;x++) for (int y=2;y<ny-2;y++) for (int z=2;z<nz-2;z++) {\n\t\t\tint xyz = x + nx*y + nx*ny*z;\n\t\t\t\t// keep only the proper sign\n\t\t\t\tif (filter[xyz]<=0) filter[xyz] = 0.0f;\n\t\t\t\telse {\n\t\t\t\t\t// fit exp only to non-zero data\n\t\t\t\t\tnb++;\n\t\t\t\t\tmin = Numerics.min(filter[xyz], min);\n\t\t\t\t\tmax = Numerics.max(filter[xyz], max);\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t// robust measures? pb is the exponential is not steep enough\n\t\tdouble[] response = new double[nb];\n\t\tint n=0;\n\t\tfor (int x=2;x<nx-2;x++) for (int y=2;y<ny-2;y++) for (int z=2;z<nz-2;z++) {\n\t\t\tint xyz = x + nx*y + nx*ny*z;\n\t\t\t\tif (filter[xyz]>0) {\n\t\t\t\t\tresponse[n] = filter[xyz];\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t}\n\t\tPercentile measure = new Percentile();\n\t\tdouble median = measure.evaluate(response, 50.0);\n\t\tdouble beta = median/FastMath.log(2.0);\n\t\t\n\t\tBasicInfo.displayMessage(\"exponential parameter estimates: median \"+median+\", beta \"+beta+\",\\n\");\n\t\t\n\t\t// model the filter response as something more interesting, e.g. log-normal (removing the bg samples)\n\t\tdouble[] weights = new double[nb];\n\t\tfor (int b=0;b<nb;b++) { \n\t\t\tweights[b] = (1.0-FastMath.exp( -response[b]/beta));\n\t\t\tresponse[b] = FastMath.log(response[b]);\n\t\t}\n\t\t\n\t\tdouble fmean = ImageStatistics.weightedPercentile(response,weights,50.0,nb);\n\t\t\n\t\t// stdev: 50% +/- 1/2*erf(1/sqrt(2)) (~0.341344746..)\n\t\tdouble dev = 100.0*0.5*Erf.erf(1.0/FastMath.sqrt(2.0));\n\t\tdouble fdev = 0.5*(ImageStatistics.weightedPercentile(response,weights,50.0+dev,nb) - ImageStatistics.weightedPercentile(response,weights,50.0-dev,nb));\n\t\t\n\t\tBasicInfo.displayMessage(\"Log-normal parameter estimates: mean = \"+FastMath.exp(fmean)+\", stdev = \"+FastMath.exp(fdev)+\",\\n\");\n\t\t\n\t\tfor (int x=0;x<nx;x++) for (int y=0;y<ny;y++) for (int z=0;z<nz;z++){\n\t\t\tint xyz = x + nx*y + nx*ny*z;\n\t\t\tif (filter[xyz]>0) {\n\t\t\t\tdouble pe = FastMath.exp( -filter[xyz]/beta)/beta;\n\t\t\t\tdouble plg = FastMath.exp(-Numerics.square(FastMath.log(filter[xyz])-fmean)/(2.0*fdev*fdev))/FastMath.sqrt(2.0*FastMath.PI*fdev*fdev);\n\t\t\t\tshape[xyz] = (float)(plg/(plg+pe));\n\t\t\t\t//shape[xyz] = (float)(1.0-pe);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "private static native void rollingGuidanceFilter_0(long src_nativeObj, long dst_nativeObj, int d, double sigmaColor, double sigmaSpace, int numOfIter, int borderType);" ]
[ "0.57103384", "0.56926835", "0.5481837", "0.53986704", "0.53349596", "0.52810746", "0.5259992", "0.5243857", "0.52164257", "0.5204911", "0.513133", "0.5125006", "0.51114297", "0.5089314", "0.5082169", "0.50687754", "0.5031835", "0.50257933", "0.5005417", "0.49567503", "0.49378783", "0.49274793", "0.49195853", "0.48892543", "0.48834708", "0.48784843", "0.4874258", "0.4867129", "0.48654267", "0.48601058", "0.48565584", "0.48545817", "0.48531532", "0.48431185", "0.48403212", "0.48318192", "0.4830571", "0.48304123", "0.4816558", "0.48126248", "0.48119092", "0.4801531", "0.4757062", "0.47540447", "0.47495437", "0.47464326", "0.47424576", "0.47415134", "0.47370112", "0.47363314", "0.47339794", "0.4724793", "0.47162637", "0.46948227", "0.4690125", "0.468746", "0.46865588", "0.46678013", "0.46633738", "0.46607447", "0.46527484", "0.46346974", "0.4633545", "0.46262375", "0.46191627", "0.4606945", "0.46028787", "0.45734695", "0.4554001", "0.45537794", "0.45502687", "0.45390946", "0.45381328", "0.4537653", "0.45315626", "0.4527618", "0.45267263", "0.45092106", "0.45005345", "0.44936356", "0.44871333", "0.44841924", "0.44795084", "0.44792026", "0.44775116", "0.44669673", "0.44665548", "0.44654104", "0.44651833", "0.4454925", "0.44447535", "0.44342017", "0.44337517", "0.4419842", "0.44197348", "0.44127125", "0.440629", "0.4403459", "0.43994614", "0.4395858" ]
0.6308347
0
Calculate the noise estimate via the gradient method given a specific slice.
public float gradientMethod(Slice slice) { // // Intialize variables. // int nrows = slice.getNRows(); int ncols = slice.getNCols(); float[] v = new float[nrows*ncols]; int v_numset = 0; float t = (float)0.0; float sig_y = (float)0.0; float sig_x = (float)0.0; // // Compute the column gradient // for(int row=0; row<nrows; row++) { for(int col=1; col<ncols-1; col++) { t = slice.getData(row,col+1) - (float)2.0 * slice.getData(row,col) + slice.getData(row,col-1); if( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) { v[v_numset] = t; v_numset++; } } } if( v_numset <= 10 ) { sig_y = (float)0.0; } else { sig_y = vec_stdDevMod(v, v_numset); } v_numset = 0; // // Compute the row gradient // for(int col=0; col<ncols; col++) { for(int row=1; row<nrows-1; row++) { t = slice.getData(row+1,col) - (float)2.0 * slice.getData(row,col) + slice.getData(row-1,col); if( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) { v[v_numset] = t; v_numset++; } } } if( v_numset <= 10 ) { sig_x = (float)0.0; } else { sig_x = vec_stdDevMod(v, v_numset); } return (float)Math.sqrt( (double)(sig_x * sig_x + sig_y * sig_y) ) / (float)2.0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double noise(SpIterNoiseObs noise) {\n return 3.0 * 60.0;\n }", "Gradient gradientAt(Point point);", "public float gradientMethod(Volume vol) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tnes += gradientMethod( vol.getSlice(ii) );\n\t\t}\n\n\t\treturn (nes / (float)vol.getNSlices());\n\t}", "public float gradientMethod(Volume vol, int slice_num) \n\t{\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tSlice slice = vol.getSlice(slice_num);\n\n\t\treturn gradientMethod(slice);\n\t}", "public float gradientMethod(MCVolume vol) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tfor(int jj=0; jj<vol.getNChannels(); jj++) {\n\t\t\t\tnes += gradientMethod( vol.getSlice(ii, jj) );\n\t\t\t}\n\t\t}\n\n\t\treturn (nes / ((float)vol.getNSlices()*(float)vol.getNChannels()) );\n\t}", "public int noise(int xin, int yin, int zin);", "public final double getEstimatedNoise() {\r\n return noise;\r\n }", "public abstract double gradient(double betaForDimension, int dimension);", "@java.lang.Override\n public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "M generateNoise();", "public native MagickImage reduceNoiseImage(double radius)\n\t\t\tthrows MagickException;", "public abstract void makeNoise();", "void computeGradient(GradientCalc calc);", "public float gradientMethod(MCVolume vol, int slice_num, int channel_num) \n\t{\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tSlice slice = vol.getSlice(slice_num, channel_num);\n\n\t\treturn gradientMethod(slice);\n\t}", "void calcWave() {\n yoff += 0.01f;\n \n //For every x value, calculate a y value based on sine or cosine\n float x = yoff; //**OPTION #1****/\n //float x = 0.0f; //**OPTION #2****/\n for (int i = 0; i < yvalues.length; i++) {\n float n = 2*noise(x)-1.0f; //**OPTION #1****/ //scale noise to be between 1 and -1\n //float n = 2*noise(x,yoff)-1.0f; //**OPTION #2****/ //scale noise to be between 1 and -1\n yvalues[i] = n*amplitude;\n x+=dx;\n }\n }", "int computeGradient(\n int gx, int gy);", "private float noise(Vector2 point) {\n\t\tVector2 bottomLeft = randomGrid[(int) point.x][(int) point.y];\n\t\tVector2 topLeft = randomGrid[(int) point.x][(int) point.y + 1];\n\t\tVector2 bottomRight = randomGrid[(int) point.x + 1][(int) point.y];\n\t\tVector2 topRight = randomGrid[(int) point.x + 1][(int) point.y + 1];\n\n\t\tfloat bottomLeftValue = bottomLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y));\n\t\tfloat topLeftValue = topLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y + 1));\n\t\tfloat bottomRightValue = bottomRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y));\n\t\tfloat topRightValue = topRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y + 1));\n\n\t\tfloat bottomValue = bottomLeftValue * (1 - point.x % 1) + bottomRightValue * (point.x % 1);\n\t\tfloat topValue = topLeftValue * (1 - point.x % 1) + topRightValue * (point.x % 1);\n\t\tfloat value = bottomValue * (1 - point.y % 1) + topValue * (point.y % 1);\n\n\t\treturn value;\n\t}", "public float getNoise(int x, int y) {\n\t\treturn getRealNoise(x * .3f, y * .3f);\n\t}", "@java.lang.Override\n public boolean hasNoiseSigma() {\n return gradientNoiseSigmaCase_ == 1;\n }", "private void compute() {\r\n int i, j, k;\r\n float gx, gy, gz;\r\n for (int q = 0; q < data.length; q++) {\r\n data[q] = new VoxelGradient();\r\n }\r\n\r\n\r\n // gradient at extremes, 0 and dim-1\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n gx = (volume.data[(i + 1) + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n gy = (volume.data[i + (dimX * ((j + 1) + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n gz = (volume.data[i + (dimX * (j + (dimY * (k + 1))))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n i = dimX - 1;\r\n j = dimY - 1;\r\n k = dimZ - 1;\r\n gx = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[(i - 1) + (dimX * (j + (dimY * k)))]) / 1;\r\n gy = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * ((j - 1) + (dimY * k)))]) / 1;\r\n gz = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * (k - 1))))]) / 1;\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n\r\n\r\n //gradient in non-extreme points\r\n for (i = 1; i < dimX - 1; i++) {\r\n for (j = 1; j < dimY - 1; j++) {\r\n for (k = 1; k < dimZ - 1; k++) {\r\n\r\n gx = (volume.data[(i + 1) + (dimX * (j + (dimY * k)))] - volume.data[(i - 1) + (dimX * (j + (dimY * k)))]) / 2;\r\n\r\n gy = (volume.data[i + (dimX * ((j + 1) + (dimY * k)))] - volume.data[i + (dimX * ((j - 1) + (dimY * k)))]) / 2;\r\n\r\n gz = (volume.data[i + (dimX * (j + (dimY * (k + 1))))] - volume.data[i + (dimX * (j + (dimY * (k - 1))))]) / 2;\r\n\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n\r\n\r\n }\r\n }\r\n }\r\n }", "public float gradientMethod(MCVolume vol, int channel_num) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tnes += gradientMethod( vol.getSlice(ii, channel_num) );\n\t\t}\n\n\t\treturn (nes / (float)vol.getNSlices());\n\t}", "public Builder clearNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n gradientNoiseSigmaCase_ = 0;\n gradientNoiseSigma_ = null;\n onChanged();\n }\n return this;\n }", "@Override\n\tpublic Vector3d gradient(Particle p_j) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic FloatMat gradient() { return this.gradient; }", "public double getYNoise(double x, double z)\n {\n double var11 = 0.5D * (square3 - 1.0D);\n double var13 = (x + z) * var11;\n int var15 = fastFloor(x + var13);\n int var16 = fastFloor(z + var13);\n double var17 = (3.0D - square3) / 6.0D;\n double var19 = (double)(var15 + var16) * var17;\n double var21 = (double)var15 - var19;\n double var23 = (double)var16 - var19;\n double var25 = x - var21;\n double var27 = z - var23;\n byte var29;\n byte var30;\n\n if (var25 > var27)\n {\n var29 = 1;\n var30 = 0;\n }\n else\n {\n var29 = 0;\n var30 = 1;\n }\n\n double var31 = var25 - (double)var29 + var17;\n double var33 = var27 - (double)var30 + var17;\n double var35 = var25 - 1.0D + 2.0D * var17;\n double var37 = var27 - 1.0D + 2.0D * var17;\n int var39 = var15 & 255;\n int var40 = var16 & 255;\n int var41 = this.permutationTable[var39 + this.permutationTable[var40]] % 12;\n int var42 = this.permutationTable[var39 + var29 + this.permutationTable[var40 + var30]] % 12;\n int var43 = this.permutationTable[var39 + 1 + this.permutationTable[var40 + 1]] % 12;\n double var44 = 0.5D - var25 * var25 - var27 * var27;\n double var5;\n\n if (var44 < 0.0D)\n {\n var5 = 0.0D;\n }\n else\n {\n var44 *= var44;\n var5 = var44 * var44 * dot(grad3[var41], var25, var27);\n }\n\n double var46 = 0.5D - var31 * var31 - var33 * var33;\n double var7;\n\n if (var46 < 0.0D)\n {\n var7 = 0.0D;\n }\n else\n {\n var46 *= var46;\n var7 = var46 * var46 * dot(grad3[var42], var31, var33);\n }\n\n double var48 = 0.5D - var35 * var35 - var37 * var37;\n double var9;\n\n if (var48 < 0.0D)\n {\n var9 = 0.0D;\n }\n else\n {\n var48 *= var48;\n var9 = var48 * var48 * dot(grad3[var43], var35, var37);\n }\n\n return 70.0D * (var5 + var7 + var9);\n }", "public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "@Override\r\n\t\tpublic double[] gradient(double x, double... parameters) {\n\t\t\tfinal double a = parameters[0];\r\n\t\t\tfinal double b = parameters[1];\r\n\t\t\tfinal double c = parameters[2];\r\n\t\t\tfinal double d = parameters[3];\r\n\t\t\tfinal double e = parameters[4];\r\n\t\t\t\r\n\t\t\tdouble[] gradients = new double[5];\r\n\t\t\t//double den = 1 + Math.pow((x+e)/c, b);\r\n\t\t\t//gradients[0] = 1 / den; // Yes a Derivation \r\n\t\t\t//gradients[1] = -((a - d) * Math.pow(x / c, b) * Math.log(x / c)) / (den * den); // Yes b Derivation \r\n\t\t\t//gradients[2] = (b * Math.pow(x / c, b - 1) * (x / (c * c)) * (a - d)) / (den * den); // Yes c Derivation \r\n\t\t\t//gradients[3] = 1 - (1 / den); // Yes d Derivation \r\n\t\t\t\r\n\t\t\t//Derivation\r\n\t\t\tfinal double c_b = Math.pow(c, b);\r\n\t\t\tfinal double c_b1 = Math.pow(c, b+1.);\r\n\t\t\tfinal double c_2b = Math.pow(c, 2.*b);\r\n\t\t\tfinal double c_2b1 = Math.pow(c, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tfinal double xe_b = Math.pow(x+e, b);\r\n\t\t\tfinal double xe_2b = Math.pow(x+e, 2.*b);\r\n\t\t\tfinal double xe_2b1 = Math.pow(x+e, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tgradients[0] = c_b/(xe_b+c_b);\r\n\t\t\tgradients[1] = ((c_b*d-a*c_b)*xe_b*Math.log(x+e)+(a*c_b*Math.log(c)-c_b*Math.log(c)*d)*xe_b)/(xe_2b+2*c_b*xe_b+c_2b);\r\n\t\t\tgradients[2] = -((b*c_b*d-a*b*c_b)*xe_b)/(c*xe_2b+2*c_b1*xe_b+c_2b1);\r\n\t\t\tgradients[3] = xe_b/(xe_b+c_b);\r\n\t\t\tgradients[4] = ((b*c_b*d-a*b*c_b)*xe_b)/(xe_2b1+xe_b*(2*c_b*x+2*c_b*e)+c_2b*x+c_2b*e);\r\n\t\t\treturn gradients;\r\n\t\t}", "public static double noise(double x, double y, double z) {\n\n\t\tdouble s = (x+y+z)/3.0;\n\t\ti = fastfloor(x+s); j = fastfloor(y+s); k = fastfloor(z+s);\n\t\ts = (i+j+k)/6.0; u = x-i+s; v = y-j+s; w = z-k+s;\n\t\tA[0] = A[1] = A[2] = 0;\n\t\tint hi = (u>=w ? (u>=v ? 0 : 1) : (v>=w ? 1 : 2));\n\t\tint lo = (u< w ? (u< v ? 0 : 1) : (v< w ? 1 : 2));\n\t\treturn 4.0 * (K(hi) + K(3-hi-lo) + K(lo) + K(0));\n\t}", "public float getGradPoint() { return gradientPoint; }", "java.lang.String getNoise();", "public VoxelGradient getGradient(double[] coord) {\r\n\r\n //if improper coordinates given, return\r\n if (coord[0] < 0 || coord[0] > (dimX - 2) || coord[1] < 0 || coord[1] > (dimY - 2) || coord[2] < 0 || coord[2] > (dimZ - 2)) {\r\n return zero;\r\n }\r\n\r\n /* notice that in this framework we assume that the distance between neighbouring voxels is 1 in all directions*/\r\n float x = (float) coord[0];\r\n float y = (float) coord[1];\r\n float z = (float) coord[2];\r\n\r\n int x0 = (int) Math.floor(coord[0]);\r\n int y0 = (int) Math.floor(coord[1]);\r\n int z0 = (int) Math.floor(coord[2]);\r\n int x1 = (int) Math.ceil(coord[0]);\r\n int y1 = (int) Math.ceil(coord[1]);\r\n int z1 = (int) Math.ceil(coord[2]);\r\n\r\n float xfactor = (x - x0) / (x1 - x0);\r\n float yfactor = (y - y0) / (y1 - y0);\r\n float zfactor = (z - z0) / (z1 - z0);\r\n\r\n //defining 8 voxel gradiant data-points of a voxel\r\n VoxelGradient c000 = new VoxelGradient(x0, y0, z0);\r\n VoxelGradient c001 = new VoxelGradient(x0, y0, z1);\r\n VoxelGradient c010 = new VoxelGradient(x0, y1, z0);\r\n VoxelGradient c011 = new VoxelGradient(x0, y1, z1);\r\n VoxelGradient c100 = new VoxelGradient(x1, y0, z0);\r\n VoxelGradient c101 = new VoxelGradient(x1, y0, z1);\r\n VoxelGradient c110 = new VoxelGradient(x1, y1, z0);\r\n VoxelGradient c111 = new VoxelGradient(x1, y1, z1);\r\n\r\n //7 linear interpolations\r\n //4 in x direction\r\n VoxelGradient c00 = new VoxelGradient();\r\n VoxelGradient c01 = new VoxelGradient();\r\n VoxelGradient c10 = new VoxelGradient();\r\n VoxelGradient c11 = new VoxelGradient();\r\n interpolate(c000, c100, xfactor, c00);\r\n interpolate(c001, c101, xfactor, c01);\r\n interpolate(c010, c110, xfactor, c10);\r\n interpolate(c011, c111, xfactor, c11);\r\n //2 in y direction\r\n VoxelGradient c0 = new VoxelGradient();\r\n VoxelGradient c1 = new VoxelGradient();\r\n interpolate(c00, c10, yfactor, c0);\r\n interpolate(c01, c11, yfactor, c1);\r\n //1 in z direction\r\n VoxelGradient c = new VoxelGradient();\r\n interpolate(c0, c1, zfactor, c);\r\n\r\n return c;\r\n }", "boolean hasNoise();", "public Builder setNoiseSigma(float value) {\n\n gradientNoiseSigmaCase_ = 1;\n gradientNoiseSigma_ = value;\n onChanged();\n return this;\n }", "private double noise(final double xin, final double yin, final double zin) {\n double n0, n1, n2, n3;\n double s = (xin + yin + zin) * F3;\n int i = fastfloor(xin + s);\n int j = fastfloor(yin + s);\n int k = fastfloor(zin + s);\n double t = (i + j + k) * G3;\n double x0 = xin - (i - t);\n double y0 = yin - (j - t);\n double z0 = zin - (k - t);\n int i1, j1, k1;\n int i2, j2, k2;\n if (x0 >= y0) {\n if (y0 >= z0) {\n i1 = 1;\n j1 = 0;\n k1 = 0;\n i2 = 1;\n j2 = 1;\n k2 = 0;\n } else if (x0 >= z0) {\n i1 = 1;\n j1 = 0;\n k1 = 0;\n i2 = 1;\n j2 = 0;\n k2 = 1;\n } else {\n i1 = 0;\n j1 = 0;\n k1 = 1;\n i2 = 1;\n j2 = 0;\n k2 = 1;\n }\n } else {\n if (y0 < z0) {\n i1 = 0;\n j1 = 0;\n k1 = 1;\n i2 = 0;\n j2 = 1;\n k2 = 1;\n } else if (x0 < z0) {\n i1 = 0;\n j1 = 1;\n k1 = 0;\n i2 = 0;\n j2 = 1;\n k2 = 1;\n } else {\n i1 = 0;\n j1 = 1;\n k1 = 0;\n i2 = 1;\n j2 = 1;\n k2 = 0;\n }\n }\n double x1 = x0 - i1 + G3;\n double y1 = y0 - j1 + G3;\n double z1 = z0 - k1 + G3;\n double x2 = x0 - i2 + 2.0 * G3;\n double y2 = y0 - j2 + 2.0 * G3;\n double z2 = z0 - k2 + 2.0 * G3;\n double x3 = x0 - 1.0 + 3.0 * G3;\n double y3 = y0 - 1.0 + 3.0 * G3;\n double z3 = z0 - 1.0 + 3.0 * G3;\n int ii = i & (SUPPLY_LENGTH - 1);\n int jj = j & (SUPPLY_LENGTH - 1);\n int kk = k & (SUPPLY_LENGTH - 1);\n int gi0 = permMod12[ii + perm[jj + perm[kk]]];\n int gi1 = permMod12[ii + i1 + perm[jj + j1 + perm[kk + k1]]];\n int gi2 = permMod12[ii + i2 + perm[jj + j2 + perm[kk + k2]]];\n int gi3 = permMod12[ii + 1 + perm[jj + 1 + perm[kk + 1]]];\n double t0 = CONTRIBUTION_FACTOR - x0 * x0 - y0 * y0 - z0 * z0;\n if (t0 < 0) {\n n0 = 0.0;\n } else {\n t0 *= t0;\n n0 = t0 * t0 * dot(GTAB[gi0], x0, y0, z0);\n }\n double t1 = CONTRIBUTION_FACTOR - x1 * x1 - y1 * y1 - z1 * z1;\n if (t1 < 0) {\n n1 = 0.0;\n } else {\n t1 *= t1;\n n1 = t1 * t1 * dot(GTAB[gi1], x1, y1, z1);\n }\n double t2 = CONTRIBUTION_FACTOR - x2 * x2 - y2 * y2 - z2 * z2;\n if (t2 < 0) {\n n2 = 0.0;\n } else {\n t2 *= t2;\n n2 = t2 * t2 * dot(GTAB[gi2], x2, y2, z2);\n }\n double t3 = CONTRIBUTION_FACTOR - x3 * x3 - y3 * y3 - z3 * z3;\n if (t3 < 0) {\n n3 = 0.0;\n } else {\n t3 *= t3;\n n3 = t3 * t3 * dot(GTAB[gi3], x3, y3, z3);\n }\n return NORMALIZE_FACTOR * (n0 + n1 + n2 + n3);\n }", "public double calculateCurvatureGradient(int i){\n Node3D node = mesh.nodes.get(i);\n Set<Node3D> neighbors = getNeighbors(node);\n\n double[] k1 = calculateMeanCurvatureNormal(node, node_to_triangle.get(node));\n double kh = Vector3DOps.normalize(k1)/2;\n double[] k2 = new double[k1.length];\n double kneighbors = 0;\n for(Node3D neighbor: neighbors){\n double[] ki = calculateMeanCurvatureNormal(node, node_to_triangle.get(node));\n\n }\n\n return 0;\n }", "public void setNoise(double noiseCoefficient) {\n this.noiseCoefficient = noiseCoefficient;\n }", "public void populateNoiseArray(double[] p_76308_1_, double p_76308_2_, double p_76308_4_, double p_76308_6_, int p_76308_8_, int p_76308_9_, int p_76308_10_, double p_76308_11_, double p_76308_13_, double p_76308_15_, double p_76308_17_) {\n/* 81 */ if (p_76308_9_ == 1) {\n/* */ \n/* 83 */ boolean var64 = false;\n/* 84 */ boolean var65 = false;\n/* 85 */ boolean var21 = false;\n/* 86 */ boolean var68 = false;\n/* 87 */ double var70 = 0.0D;\n/* 88 */ double var73 = 0.0D;\n/* 89 */ int var75 = 0;\n/* 90 */ double var77 = 1.0D / p_76308_17_;\n/* */ \n/* 92 */ for (int var30 = 0; var30 < p_76308_8_; var30++) {\n/* */ \n/* 94 */ double var31 = p_76308_2_ + var30 * p_76308_11_ + this.xCoord;\n/* 95 */ int var78 = (int)var31;\n/* */ \n/* 97 */ if (var31 < var78)\n/* */ {\n/* 99 */ var78--;\n/* */ }\n/* */ \n/* 102 */ int var34 = var78 & 0xFF;\n/* 103 */ var31 -= var78;\n/* 104 */ double var35 = var31 * var31 * var31 * (var31 * (var31 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 106 */ for (int var37 = 0; var37 < p_76308_10_; var37++)\n/* */ {\n/* 108 */ double var38 = p_76308_6_ + var37 * p_76308_15_ + this.zCoord;\n/* 109 */ int var40 = (int)var38;\n/* */ \n/* 111 */ if (var38 < var40)\n/* */ {\n/* 113 */ var40--;\n/* */ }\n/* */ \n/* 116 */ int var41 = var40 & 0xFF;\n/* 117 */ var38 -= var40;\n/* 118 */ double var42 = var38 * var38 * var38 * (var38 * (var38 * 6.0D - 15.0D) + 10.0D);\n/* 119 */ int var19 = this.permutations[var34] + 0;\n/* 120 */ int var66 = this.permutations[var19] + var41;\n/* 121 */ int var67 = this.permutations[var34 + 1] + 0;\n/* 122 */ int var22 = this.permutations[var67] + var41;\n/* 123 */ var70 = lerp(var35, func_76309_a(this.permutations[var66], var31, var38), grad(this.permutations[var22], var31 - 1.0D, 0.0D, var38));\n/* 124 */ var73 = lerp(var35, grad(this.permutations[var66 + 1], var31, 0.0D, var38 - 1.0D), grad(this.permutations[var22 + 1], var31 - 1.0D, 0.0D, var38 - 1.0D));\n/* 125 */ double var79 = lerp(var42, var70, var73);\n/* 126 */ int var10001 = var75++;\n/* 127 */ p_76308_1_[var10001] = p_76308_1_[var10001] + var79 * var77;\n/* */ }\n/* */ \n/* */ } \n/* */ } else {\n/* */ \n/* 133 */ int var19 = 0;\n/* 134 */ double var20 = 1.0D / p_76308_17_;\n/* 135 */ int var22 = -1;\n/* 136 */ boolean var23 = false;\n/* 137 */ boolean var24 = false;\n/* 138 */ boolean var25 = false;\n/* 139 */ boolean var26 = false;\n/* 140 */ boolean var27 = false;\n/* 141 */ boolean var28 = false;\n/* 142 */ double var29 = 0.0D;\n/* 143 */ double var31 = 0.0D;\n/* 144 */ double var33 = 0.0D;\n/* 145 */ double var35 = 0.0D;\n/* */ \n/* 147 */ for (int var37 = 0; var37 < p_76308_8_; var37++) {\n/* */ \n/* 149 */ double var38 = p_76308_2_ + var37 * p_76308_11_ + this.xCoord;\n/* 150 */ int var40 = (int)var38;\n/* */ \n/* 152 */ if (var38 < var40)\n/* */ {\n/* 154 */ var40--;\n/* */ }\n/* */ \n/* 157 */ int var41 = var40 & 0xFF;\n/* 158 */ var38 -= var40;\n/* 159 */ double var42 = var38 * var38 * var38 * (var38 * (var38 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 161 */ for (int var44 = 0; var44 < p_76308_10_; var44++) {\n/* */ \n/* 163 */ double var45 = p_76308_6_ + var44 * p_76308_15_ + this.zCoord;\n/* 164 */ int var47 = (int)var45;\n/* */ \n/* 166 */ if (var45 < var47)\n/* */ {\n/* 168 */ var47--;\n/* */ }\n/* */ \n/* 171 */ int var48 = var47 & 0xFF;\n/* 172 */ var45 -= var47;\n/* 173 */ double var49 = var45 * var45 * var45 * (var45 * (var45 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 175 */ for (int var51 = 0; var51 < p_76308_9_; var51++) {\n/* */ \n/* 177 */ double var52 = p_76308_4_ + var51 * p_76308_13_ + this.yCoord;\n/* 178 */ int var54 = (int)var52;\n/* */ \n/* 180 */ if (var52 < var54)\n/* */ {\n/* 182 */ var54--;\n/* */ }\n/* */ \n/* 185 */ int var55 = var54 & 0xFF;\n/* 186 */ var52 -= var54;\n/* 187 */ double var56 = var52 * var52 * var52 * (var52 * (var52 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 189 */ if (var51 == 0 || var55 != var22) {\n/* */ \n/* 191 */ var22 = var55;\n/* 192 */ int var69 = this.permutations[var41] + var55;\n/* 193 */ int var71 = this.permutations[var69] + var48;\n/* 194 */ int var72 = this.permutations[var69 + 1] + var48;\n/* 195 */ int var74 = this.permutations[var41 + 1] + var55;\n/* 196 */ int var75 = this.permutations[var74] + var48;\n/* 197 */ int var76 = this.permutations[var74 + 1] + var48;\n/* 198 */ var29 = lerp(var42, grad(this.permutations[var71], var38, var52, var45), grad(this.permutations[var75], var38 - 1.0D, var52, var45));\n/* 199 */ var31 = lerp(var42, grad(this.permutations[var72], var38, var52 - 1.0D, var45), grad(this.permutations[var76], var38 - 1.0D, var52 - 1.0D, var45));\n/* 200 */ var33 = lerp(var42, grad(this.permutations[var71 + 1], var38, var52, var45 - 1.0D), grad(this.permutations[var75 + 1], var38 - 1.0D, var52, var45 - 1.0D));\n/* 201 */ var35 = lerp(var42, grad(this.permutations[var72 + 1], var38, var52 - 1.0D, var45 - 1.0D), grad(this.permutations[var76 + 1], var38 - 1.0D, var52 - 1.0D, var45 - 1.0D));\n/* */ } \n/* */ \n/* 204 */ double var58 = lerp(var56, var29, var31);\n/* 205 */ double var60 = lerp(var56, var33, var35);\n/* 206 */ double var62 = lerp(var49, var58, var60);\n/* 207 */ int var10001 = var19++;\n/* 208 */ p_76308_1_[var10001] = p_76308_1_[var10001] + var62 * var20;\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ }", "@Test\n public void computeResult_addsNoiseToSum() {\n mockDoubleNoise(-10);\n // Mock the noise mechanism so that it adds noise to the count == 0.\n mockLongNoise(0);\n\n variance =\n BoundedVariance.builder()\n .epsilon(EPSILON)\n .delta(DELTA)\n .noise(noise)\n .maxPartitionsContributed(1)\n .maxContributionsPerPartition(1)\n .lower(-100)\n .upper(100)\n .build();\n\n variance.addEntry(10);\n variance.addEntry(10);\n // midpoint = (lower + upper) / 2 = 0,\n // noised_normalized_sum_of_squares = (x1 - midpoint)^2 + (x2 - midpoint)^2 + noise = 10^2 +\n // 10^2 - 10 = 190,\n // noised_normalized_sum = (x1 + x2) - midpoint * count + noise = 10 + 10 - 0 - 10 = 10,\n // noised_count = count + noise = 2 + 0 = 2,\n // BoundedVariance.computeResult() = noised_normalized_sum_of_squares / noised_count -\n // (noised_normalized_sum / noised_count)^2 = 190 / 2 - (10 / 2)^2 = 70\n assertThat(variance.computeResult()).isEqualTo(70.0);\n }", "public Builder clearNoise() {\n bitField0_ = (bitField0_ & ~0x00010000);\n noise_ = getDefaultInstance().getNoise();\n onChanged();\n return this;\n }", "@Override\n public Vector2d gradient(Vector2d p) {\n\n return null;\n }", "private void gradientDecent(double[][] X, double[] y){\n double[] h = matrix.sigmoid(matrix.multiply(X,Theta));\n double[] cp = costPrime(X,h,y);\n\n double scp = 0;\n for(double i: cp){\n scp = scp + i;\n }\n System.out.println(+ cost(h,y));\n // Average Cost\n scp = round(scp/h.length,5);\n System.out.println(scp);\n int j = 0;\n\n // while Average Cost is not 0\n while(scp > 0.00001){\n Theta = matrix.subtract(Theta,matrix.multiply(alpha,cp));\n h = matrix.sigmoid(matrix.multiply(X,Theta));\n cp = costPrime(X,h,y);\n double sum = 0;\n for(double i: cp){\n sum = sum + i;\n }\n scp = round(sum/h.length,5);\n System.out.println(scp);\n }\n }", "public double getNoiseMean() {\n\t\t\treturn NOISE_MEAN;\n\t\t}", "void addGradient(Vector gradientVector, double gradient);", "@java.lang.Override\n public boolean hasFeatureNoiseSigma() {\n return gradientNoiseSigmaCase_ == 2;\n }", "@Override\r\n\tpublic String makeANoise() {\n\t\treturn \"deer noise\";\r\n\t}", "public interface VoxelNoise {\n /*\n * This method returns the voxel type for a location\n */\n public int noise(int xin, int yin, int zin);\n}", "public void injectSomeMoreNoise(double intensity) {\n//\t\taddBSCnoise(lambda,intensity);\n\t\t\n//\t\taddBSCnoise(posterior, intensity);\n//\t\tfor (int i=0; i<n; i++) lambda[i] = posterior[i];\n//\t\tcalc_q0 (posterior);\n//\n//\t\t// initialization of beta\n//\t\tfor (int i = 0; i <= m - 1; i++) {\n//\t\t\tfor (int j = 0; j <= row_weight[i] - 1; j++) {\n//\t\t\t\tbeta[i][j] = 0.0;\n//\t\t\t}\n//\t\t}\t\t\n\t\t\n\t}", "public VoxelGradient getGradient(int x, int y, int z) {\r\n return data[x + dimX * (y + dimY * z)];\r\n }", "@Override\n\tpublic void makeNoise() {\n\t\tSystem.out.println(\"Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink \");\n\t}", "@java.lang.Override\n public boolean hasFeatureNoiseSigma() {\n return gradientNoiseSigmaCase_ == 2;\n }", "public void calculate() {\n float xoff = 0;\n for (int i = 0; i < cols; i++)\n { \n float yoff = 0;\n for (int j = 0; j < rows; j++)\n {\n z[i][j] = map(noise(xoff, yoff,zoff), 0, 1, -120, 120);\n yoff += 0.1f;\n }\n xoff += 0.1f;\n }\n zoff+=0.01f;\n }", "public void calculateGradients(int dataIndex, double learningRate){\r\n for (int i = 0; i < outputLayer.length; i++) {\r\n for (int j = 0; j < outputLayer[i].weights.length; j++) {\r\n outputLayer[i].dw[j] = -2*((attribute[dataIndex] == i ? 1 : 0) - sigmoid(outputLayer[i].z))*sigmoidDeri(outputLayer[i].z)*outputLayer[i].data[j];\r\n }\r\n outputLayer[i].db = -2*((attribute[dataIndex] == i ? 1 : 0) - sigmoid(outputLayer[i].z))*sigmoidDeri(outputLayer[i].z);\r\n }\r\n\r\n adjust(learningRate, true);\r\n calculateDesireHiddenLayerActivation(dataIndex);\r\n\r\n for (int i = 0; i < hiddenLayer.length; i++) {\r\n for (int j = 0; j < hiddenLayer[i].weights.length; j++) {\r\n hiddenLayer[i].dw[j] = -2*(desireHiddenLayerActivation[i] - hiddenLayer[i].a)*sigmoidDeri(hiddenLayer[i].z)*hiddenLayer[i].data[j];\r\n }\r\n hiddenLayer[i].db = -2*(desireHiddenLayerActivation[i] - hiddenLayer[i].a)*sigmoidDeri(hiddenLayer[i].z);\r\n }\r\n\r\n adjust(learningRate, false);\r\n }", "@Override\n /**\n * @param X The input vector. An array of doubles.\n * @return The value returned by th LUT or NN for this input vector\n */\n\n public double outputFor(double[] X) {\n int i = 0, j = 0;\n for(i=0;i<argNumInputs;i++){\n S[0][i] = X[i];\n NeuronCell[0][i] = X[i];\n }\n //then add the bias term\n S[0][argNumInputs] = 1;\n NeuronCell[0][argNumInputs] = customSigmoid(S[0][argNumInputs]);\n S[1][argNumHidden] = 1;\n NeuronCell[1][argNumHidden] = customSigmoid(S[1][argNumInputs]);\n\n for(i=0;i<argNumHidden;i++){\n for(j=0;j<=argNumInputs;j++){\n //Wji : weigth from j to i\n WeightSum+=NeuronCell[0][j]*Weight[0][j][i];\n }\n //Sj = sigma(Wji * Xi)\n S[1][i]=WeightSum;\n NeuronCell[1][i]=(customSigmoid(WeightSum));\n //reset weigthsum\n WeightSum=0;\n }\n\n for(i = 0; i < argNumOutputs; i++){\n for(j = 0;j <= argNumHidden;j++){\n WeightSum += NeuronCell[1][j] * Weight[1][j][i];\n }\n NeuronCell[2][i]=customSigmoid(WeightSum);\n S[2][i]=WeightSum;\n WeightSum=0;\n }\n //if we only return 1 double, it means we only have one output, so actually we can write return NeuronCell[2][0]\n return NeuronCell[2][0];\n }", "public Double[] mvNextDouble(Random rng) {\n\t\t\n Double Y[] = new Double[nVar];\n Double X[] = new Double[nVar];\n\n for (int i = 0; i <= nVar - 1; i++){\n X[i] = super.inverseF(rng.nextDouble());\n Y[i] = meanArray[i];\n }\n\n if (NotPD) {\n \tfor (int i = 0; i <= nVar - 1; i++){\n \t\tY[i] += X[i];\n }\n }\n else{\n \tfor (int i = 0; i <= nVar - 1; i++){\n \tfor (int j = 0; j <= i; j++){\n Y[i] += H[i][j] * X[j];\n \t}\n }\n }\n\t\treturn Y;\n\t}", "public double noise2D(double xin, double yin) {\n double n0, n1, n2;\n double s = (xin + yin) * F2;\n int i = fastfloor(xin + s);\n int j = fastfloor(yin + s);\n double t = (i + j) * G2;\n double X0 = i - t;\n double Y0 = j - t;\n double x0 = xin - X0;\n double y0 = yin - Y0;\n int i1, j1;\n if(x0 > y0) {\n i1 = 1;\n j1 = 0;\n } else {\n i1 = 0;\n j1 = 1;\n }\n double x1 = x0 - i1 + G2;\n double y1 = y0 - j1 + G2;\n double x2 = x0 - 1.0 + 2.0 * G2;\n double y2 = y0 - 1.0 + 2.0 * G2;\n int ii = i & (SUPPLY_LENGTH - 1);\n int jj = j & (SUPPLY_LENGTH - 1);\n int gi0 = permMod12[perm[ii + perm[jj]]];\n int gi1 = permMod12[perm[ii + i1 + perm[jj + j1]]];\n int gi2 = permMod12[perm[ii + 1 + perm[jj + 1]]];\n double t0 = CONTRIBUTION_FACTOR - x0 * x0 - y0 * y0;\n if(t0 < 0) {\n n0 = 0.0;\n } else {\n t0 *= t0;\n n0 = t0 * t0 * dot(GTAB[gi0], x0, y0, 0);\n }\n double t1 = CONTRIBUTION_FACTOR - x1 * x1 - y1 * y1;\n if(t1 < 0) {\n n1 = 0.0;\n } else {\n t1 *= t1;\n n1 = t1 * t1 * dot(GTAB[gi1], x1, y1, 0);\n }\n double t2 = CONTRIBUTION_FACTOR - x2 * x2 - y2 * y2;\n if(t2 < 0) {\n n2 = 0.0;\n } else {\n t2 *= t2;\n n2 = t2 * t2 * dot(GTAB[gi2], x2, y2, 0);\n }\n return NORMALIZE_FACTOR_2D * (n0 + n1 + n2);\n }", "public boolean hasNoiseSigma() {\n return gradientNoiseSigmaCase_ == 1;\n }", "private double innerEnergy(int x, int y)\n {\n Color left = this.picture.get(x-1, y);\n Color right = this.picture.get(x+1, y);\n Color up = this.picture.get(x, y-1);\n Color down = this.picture.get(x, y+1);\n return gradient(left, right) + gradient(up, down);\n }", "public Builder setNoise(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00010000;\n noise_ = value;\n onChanged();\n return this;\n }", "@Override\r\n public void getValueGradient(double[] gradient) {\n double[] llhGrad = new double[N];\r\n for (int n = 0; n < N; n++) {\r\n llhGrad[n] = ZTy[n];\r\n for (int m = 0; m < N; m++) {\r\n llhGrad[n] -= ZTZ[n][m] * parameters[m];\r\n }\r\n llhGrad[n] /= (rhoSquare);\r\n }\r\n\r\n // gradient of the log prior\r\n double[] lprior = new double[N];\r\n for (int n = 0; n < N; n++) {\r\n // uplink\r\n double uplinkPrior = 0.0;\r\n int parentIndex = upwardLink.get(n);\r\n if (parentIndex == -1) {\r\n uplinkPrior += parameters[n] - mu;\r\n } else {\r\n uplinkPrior += parameters[n] - parameters[parentIndex];\r\n }\r\n uplinkPrior /= (-sigmaSquares[n]);\r\n\r\n // downlinks\r\n double downlinkPrior = 0.0;\r\n for (int child : downwardLinks.get(n)) {\r\n downlinkPrior += (parameters[n] - parameters[child]) / (-sigmaSquares[child]);\r\n }\r\n\r\n lprior[n] = uplinkPrior + downlinkPrior;\r\n }\r\n// for(int n=0; n<N; n++)\r\n// lprior[n] = - (parameters[n] - mus[n]) / sigmaSquares[n];\r\n\r\n // combine\r\n for (int n = 0; n < N; n++) {\r\n gradient[n] = llhGrad[n] + lprior[n];\r\n }\r\n }", "private static double[] addNominalNoise(double[] in, double noiseProbability, int startCol, int endCol, \n\t\t\tMatrix data, Random rand)\n\t{\n assert noiseProbability <= 1.00001 && noiseProbability >= -0.00001;\n\t\tdouble[] result = new double[in.length];\n\t\tfor (int i = 0; i < result.length; i++)\n\t\t{\n\t\t\tresult[i] = in[i];\n\t\t\tif (i < startCol || i >= endCol)\n\t\t\t\tcontinue;\n\t\t\tif (rand.nextFloat() <= noiseProbability)\n\t\t\t{\n//\t\t\t\tresult[i] = rand.nextInt(data.valueCount(i));\n\t\t\t\tif (rand.nextBoolean())\n\t\t\t\t{\n\t\t\t\t\tresult[i] += 1;\n\t\t\t\t\tif (result[i] > data.getValueCount(i) - 1)\n\t\t\t\t\t\tresult[i] = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tresult [i] -= 1;\n\t\t\t\t\tif (result[i] < 0)\n\t\t\t\t\t\tresult[i] = data.getValueCount(i) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public native MagickImage addNoiseImage(int noiseType)\n\t\t\tthrows MagickException;", "@java.lang.Override\n public com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma getFeatureNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 2) {\n return (com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma) gradientNoiseSigma_;\n }\n return com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma.getDefaultInstance();\n }", "public Point getFinalPoint(int maxX, int maxY, double noise, double percentOfExcess, int x, int y) {\n Point alteredPoint = new Point();\n //Alter coords\n double maxXRange = maxX * noise; //Now we have the max number that could be added to the actual x coord. The range will be composed of 0 - maxRange\n double maxYRange = maxY * noise; //Getting the X and Y value according to the noise percent.\n\n //Lets get the formula for determine which value between 0 and RANGE would be added acording to the level\n //Cero for 0% of excess, maxRange for 100% of excess\n //Solve y=ax^2\n\n double a_x = maxXRange / (100 * 100);\n double a_y = maxYRange / (100 * 100);\n\n //Then, lets look for a random number with the help of the number that the formula throw in this kind of range: -6 form < form < + 6 form\n //By this way, we could ensure that the directions will probably not be the same in a short time\n\n\n double noiseX = getNoiseAccordingExcessPercent(a_x, percentOfExcess); //This noise is direclty proportional to the percentOfExcess on breathing rate\n double noiseY = getNoiseAccordingExcessPercent(a_y, percentOfExcess);\n\n //If you want to be more accurate, you can use different values for different levels\n int minimum = 10;//< If you want to change in what excess the user will note a bigger change in the robot control, change this.\n\n noiseX += minimum;\n noiseY += minimum; //By this way, we ensure that also in low levels, we will get a minimum noise of 25. for example at 1% of excess\n\n int adjust = 6;//For make the range\n\n alteredPoint.x = getAlteredPointOfCoord(x, (int) noiseX, adjust);\n alteredPoint.y = getAlteredPointOfCoord(y, (int) noiseY, adjust);\n\n //Just to stay in bounds\n if (alteredPoint.x >= maxX) { //Because if we reach the max, it's like start again\n alteredPoint.x = maxX - 1;\n } else if (alteredPoint.y >= maxY) {\n alteredPoint.y = maxY - 1;\n }\n return alteredPoint;\n }", "public static double noise(double x, double y, double z, double w){\n\t\t\n\t\tdouble n0,n1,n2,n3,n4; // Noise contributions from the five corners\n\t\t// Skew the (x,y,z,w) space to determine which cell of 24 simplices we're in\n\t\tdouble s=(x+y+z+w)*F4; // Factor for 4D skewing\n\t\tint i=fastfloor(x+s);\n\t\tint j=fastfloor(y+s);\n\t\tint k=fastfloor(z+s);\n\t\tint l=fastfloor(w+s);\n\t\tdouble t=(i+j+k+l)*G4; // Factor for 4D unskewing\n\t\tdouble X0=i-t; // Unskew the cell origin back to (x,y,z,w) space\n\t\tdouble Y0=j-t;\n\t\tdouble Z0=k-t;\n\t\tdouble W0=l-t;\n\t\tdouble x0=x-X0; // The x,y,z,w distances from the cell origin\n\t\tdouble y0=y-Y0;\n\t\tdouble z0=z-Z0;\n\t\tdouble w0=w-W0;\n\t\t// For the 4D case, the simplex is a 4D shape I won't even try to describe.\n\t\t// To find out which of the 24 possible simplices we're in, we need to\n\t\t// determine the magnitude ordering of x0, y0, z0 and w0.\n\t\t// Six pair-wise comparisons are performed between each possible pair\n\t\t// of the four coordinates, and the results are used to rank the numbers.\n\t\tint rankx=0;\n\t\tint ranky=0;\n\t\tint rankz=0;\n\t\tint rankw=0;\n\t\tif(x0>y0) rankx++;\n\t\telse ranky++;\n\t\tif(x0>z0) rankx++;\n\t\telse rankz++;\n\t\tif(x0>w0) rankx++;\n\t\telse rankw++;\n\t\tif(y0>z0) ranky++;\n\t\telse rankz++;\n\t\tif(y0>w0) ranky++;\n\t\telse rankw++;\n\t\tif(z0>w0) rankz++;\n\t\telse rankw++;\n\t\tint i1,j1,k1,l1; // The integer offsets for the second simplex corner\n\t\tint i2,j2,k2,l2; // The integer offsets for the third simplex corner\n\t\tint i3,j3,k3,l3; // The integer offsets for the fourth simplex corner\n\t\t// [rankx, ranky, rankz, rankw] is a 4-vector with the numbers 0, 1, 2 and 3\n\t\t// in some order. We use a thresholding to set the coordinates in turn.\n\t\t// Rank 3 denotes the largest coordinate.\n\t\ti1=rankx>=3?1:0;\n\t\tj1=ranky>=3?1:0;\n\t\tk1=rankz>=3?1:0;\n\t\tl1=rankw>=3?1:0;\n\t\t// Rank 2 denotes the second largest coordinate.\n\t\ti2=rankx>=2?1:0;\n\t\tj2=ranky>=2?1:0;\n\t\tk2=rankz>=2?1:0;\n\t\tl2=rankw>=2?1:0;\n\t\t// Rank 1 denotes the second smallest coordinate.\n\t\ti3=rankx>=1?1:0;\n\t\tj3=ranky>=1?1:0;\n\t\tk3=rankz>=1?1:0;\n\t\tl3=rankw>=1?1:0;\n\t\t// The fifth corner has all coordinate offsets = 1, so no need to compute that.\n\t\tdouble x1=x0-i1+G4; // Offsets for second corner in (x,y,z,w) coords\n\t\tdouble y1=y0-j1+G4;\n\t\tdouble z1=z0-k1+G4;\n\t\tdouble w1=w0-l1+G4;\n\t\tdouble x2=x0-i2+2.0*G4; // Offsets for third corner in (x,y,z,w) coords\n\t\tdouble y2=y0-j2+2.0*G4;\n\t\tdouble z2=z0-k2+2.0*G4;\n\t\tdouble w2=w0-l2+2.0*G4;\n\t\tdouble x3=x0-i3+3.0*G4; // Offsets for fourth corner in (x,y,z,w) coords\n\t\tdouble y3=y0-j3+3.0*G4;\n\t\tdouble z3=z0-k3+3.0*G4;\n\t\tdouble w3=w0-l3+3.0*G4;\n\t\tdouble x4=x0-1.0+4.0*G4; // Offsets for last corner in (x,y,z,w) coords\n\t\tdouble y4=y0-1.0+4.0*G4;\n\t\tdouble z4=z0-1.0+4.0*G4;\n\t\tdouble w4=w0-1.0+4.0*G4;\n\t\t// Work out the hashed gradient indices of the five simplex corners\n\t\tint ii=i&255;\n\t\tint jj=j&255;\n\t\tint kk=k&255;\n\t\tint ll=l&255;\n\t\tint gi0=perm[ii+perm[jj+perm[kk+perm[ll]]]]%32;\n\t\tint gi1=perm[ii+i1+perm[jj+j1+perm[kk+k1+perm[ll+l1]]]]%32;\n\t\tint gi2=perm[ii+i2+perm[jj+j2+perm[kk+k2+perm[ll+l2]]]]%32;\n\t\tint gi3=perm[ii+i3+perm[jj+j3+perm[kk+k3+perm[ll+l3]]]]%32;\n\t\tint gi4=perm[ii+1+perm[jj+1+perm[kk+1+perm[ll+1]]]]%32;\n\t\t// Calculate the contribution from the five corners\n\t\tdouble t0=0.6-x0*x0-y0*y0-z0*z0-w0*w0;\n\t\tif(t0<0) n0=0.0;\n\t\telse{\n\t\t\tt0*=t0;\n\t\t\tn0=t0*t0*dot(grad4[gi0], x0, y0, z0, w0);\n\t\t}\n\t\tdouble t1=0.6-x1*x1-y1*y1-z1*z1-w1*w1;\n\t\tif(t1<0) n1=0.0;\n\t\telse{\n\t\t\tt1*=t1;\n\t\t\tn1=t1*t1*dot(grad4[gi1], x1, y1, z1, w1);\n\t\t}\n\t\tdouble t2=0.6-x2*x2-y2*y2-z2*z2-w2*w2;\n\t\tif(t2<0) n2=0.0;\n\t\telse{\n\t\t\tt2*=t2;\n\t\t\tn2=t2*t2*dot(grad4[gi2], x2, y2, z2, w2);\n\t\t}\n\t\tdouble t3=0.6-x3*x3-y3*y3-z3*z3-w3*w3;\n\t\tif(t3<0) n3=0.0;\n\t\telse{\n\t\t\tt3*=t3;\n\t\t\tn3=t3*t3*dot(grad4[gi3], x3, y3, z3, w3);\n\t\t}\n\t\tdouble t4=0.6-x4*x4-y4*y4-z4*z4-w4*w4;\n\t\tif(t4<0) n4=0.0;\n\t\telse{\n\t\t\tt4*=t4;\n\t\t\tn4=t4*t4*dot(grad4[gi4], x4, y4, z4, w4);\n\t\t}\n\t\t// Sum up and scale the result to cover the range [-1,1]\n\t\treturn 27.0*(n0+n1+n2+n3+n4);\n\t}", "public VoxelGradient getGradient2(double[] coord) {\r\n if (coord[0] < 0 || coord[0] > (dimX - 2) || coord[1] < 0 || coord[1] > (dimY - 2)\r\n || coord[2] < 0 || coord[2] > (dimZ - 2)) {\r\n return zero;\r\n }\r\n\r\n int x = (int) Math.round(coord[0]);\r\n int y = (int) Math.round(coord[1]);\r\n int z = (int) Math.round(coord[2]);\r\n return getGradient(x, y, z);\r\n }", "public void generateGradient(int startX, int startY, int endX, int endY, int startSat, int endSat, int hueSat, int brightnessSat) {\n colorMode(HSB,360,100,100);\n int dX = Math.abs(endX-startX);\n int dY = Math.abs(endY-startY);\n double changePerPixel = (endSat-startSat)/(double)dY;\n strokeWeight(2);\n int changePerFrameY = endY > startY ? 1 : -1;\n for(int i=0;i<Math.abs(dY);i++){\n stroke((int)(startSat+changePerPixel*i),hueSat,brightnessSat);\n line(startX, i*changePerFrameY+startY, endX, i*changePerFrameY+startY);\n }\n}", "private static void reduceNoise(Mat image) {\n\n\t\t// create structuring element that will be used to \"dilate\" and \"erode\"\n\t\t// image. the element chosen here is a 3px by 3px rectangle\n\t\tMat erodeElement = Imgproc.getStructuringElement(Imgproc.MORPH_RECT,\n\t\t\t\tnew Size(1, 1));\n\n\t\t// dilate with larger element so make sure object is nicely visible\n\t\tMat dilateElement = Imgproc.getStructuringElement(Imgproc.MORPH_RECT,\n\t\t\t\tnew Size(12, 12));\n\n\t\t// Erode will shrink the grouping of pixels\n\t\tImgproc.erode(image, image, erodeElement);\n\t\tImgproc.erode(image, image, erodeElement);\n\t\tImgproc.erode(image, image, erodeElement);\n\n\t\t// // Dilate will expand the grouping of pixels\n\t\tImgproc.dilate(image, image, dilateElement);\n\t\tImgproc.dilate(image, image, dilateElement);\n\t\t// Imgproc.dilate(image, image, dilateElement);\n\n\t}", "public double sampleVariance() {\n/* 262 */ Preconditions.checkState((this.count > 1L));\n/* 263 */ if (Double.isNaN(this.sumOfSquaresOfDeltas)) {\n/* 264 */ return Double.NaN;\n/* */ }\n/* 266 */ return DoubleUtils.ensureNonNegative(this.sumOfSquaresOfDeltas) / (this.count - 1L);\n/* */ }", "public static @NotNull Image genNoisePerlin(int width, int height, int offsetX, int offsetY, double scale)\n {\n Color.Buffer pixels = Color.malloc(ColorFormat.RGBA, width * height);\n \n for (int j = 0; j < height; j++)\n {\n for (int i = 0; i < width; i++)\n {\n float nx = (i + offsetX) * (float) scale / width;\n float ny = (j + offsetY) * (float) scale / height;\n \n // Typical values to start playing with:\n // lacunarity = ~2.0 -- spacing between successive octaves (use exactly 2.0 for wrapping output)\n // gain = 0.5 -- relative weighting applied to each successive octave\n // octaves = 6 -- number of \"octaves\" of noise3() to sum\n \n // NOTE: We need to translate the data from [-1..1] to [0..1]\n float p = (stb_perlin_fbm_noise3(nx, ny, 1.0F, 2.0F, 0.5F, 6) + 1.0F) / 2.0F;\n \n pixels.put(j * width + i, (int) (p * 255), 255);\n }\n }\n \n return new Image(pixels, width, height, 1, ColorFormat.RGBA);\n }", "private double noisyRt(double value) {\n\n\t\t// then add additive noise as well\n\t\tdouble additiveNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getRtStdev());\n\t\tvalue += additiveNoise;\n\t\t\n\t\t// value must always be >= 0\n\t\tif (value < 0) {\n\t\t\tvalue = 0;\n\t\t}\n\t\treturn value;\n\n\t}", "private double sumWeights(int index, Image image){\n double sum = 0;\n for(int i= 0; i<400 ; i++){\n sum+=perceptrons.get(i).getWeight(index)\n *normalizeImageValue(image.getImage()[i]);\n }\n return sum;\n }", "public Builder clearFeatureNoiseSigma() {\n if (featureNoiseSigmaBuilder_ == null) {\n if (gradientNoiseSigmaCase_ == 2) {\n gradientNoiseSigmaCase_ = 0;\n gradientNoiseSigma_ = null;\n onChanged();\n }\n } else {\n if (gradientNoiseSigmaCase_ == 2) {\n gradientNoiseSigmaCase_ = 0;\n gradientNoiseSigma_ = null;\n }\n featureNoiseSigmaBuilder_.clear();\n }\n return this;\n }", "NeuralNetwork mutate(float rate);", "public VoxelGradient getVoxel(int i) {\r\n return data[i];\r\n }", "public GradientVolume(Volume vol) {\r\n volume = vol;\r\n dimX = vol.getDimX();\r\n dimY = vol.getDimY();\r\n dimZ = vol.getDimZ();\r\n data = new VoxelGradient[dimX * dimY * dimZ];\r\n compute();\r\n maxmag = -1.0;\r\n }", "@java.lang.Override\n public com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma getFeatureNoiseSigma() {\n if (featureNoiseSigmaBuilder_ == null) {\n if (gradientNoiseSigmaCase_ == 2) {\n return (com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma) gradientNoiseSigma_;\n }\n return com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma.getDefaultInstance();\n } else {\n if (gradientNoiseSigmaCase_ == 2) {\n return featureNoiseSigmaBuilder_.getMessage();\n }\n return com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma.getDefaultInstance();\n }\n }", "public static int numDimensions_infos_noise() {\n return 1;\n }", "private double[] computeFiniteDifferenceGradient(double[] point, double[] step, int[] batch) {\n double[] fd = new double[point.length];\n\n for (int i = 0; i < point.length; i++) {\n double[] upper = new double[point.length];\n System.arraycopy(point, 0, upper, 0, point.length);\n upper[i] += step[i];\n double[] lower = new double[point.length];\n System.arraycopy(point, 0, lower, 0, point.length);\n lower[i] -= step[i];\n fd[i] = (evaluate(upper, batch) - evaluate(lower, batch)) / 2.0 / step[i];\n }\n\n return fd;\n }", "public Vector3D getGradient(int x, int y) {\n\t\tif (x < 1 || x >= mSizeX - 1) {\n\t\t\treturn new Vector3D(0, 0, 0);\n\t\t}\n\n\t\tif (y < 1 || y >= mSizeY - 1) {\n\t\t\treturn new Vector3D(0, 0, 0);\n\t\t}\n\n\t\treturn new Vector3D(mData[x - 1][y] - mData[x + 1][y], mData[x][y - 1] - mData[x][y + 1], 2);\n\t}", "private static void filterNoise(BufferedImage image) {\n\t\tfor (int x=0; x<image.getWidth(); x++) {\r\n\t\t\tfor (int y=0; y<image.getHeight(); y++) {\r\n\t\t\t\t\r\n\t\t\t\tint pixelVal = image.getRGB(x, y);\r\n\r\n\t\t\t\t// check how many pixels in a 2 x 2 rectangle with this point \r\n\t\t\t\t// in the center have the same color as this point; if not \r\n\t\t\t\t// many, flip this pixel's color\r\n\t\t\t\tint startX = Math.max(x-2, 0);\r\n\t\t\t\tint startY = Math.max(y-2, 0);\r\n\t\t\t\tint endX = Math.min(x+2, image.getWidth()-1);\r\n\t\t\t\tint endY = Math.min(y+2, image.getHeight()-1);\r\n\r\n\t\t\t\tint matchCount = 0;\r\n\t\t\t\tint totalCount = 0;\r\n\t\t\t\tfor (int i=startX; i<=endX; i++) {\r\n\t\t\t\t\tfor (int j=startY; j<=endY; j++) {\r\n\t\t\t\t\t\tif (image.getRGB(i,j) == pixelVal) {\r\n\t\t\t\t\t\t\tmatchCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttotalCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ((matchCount / (double) totalCount) < .2) {\r\n\t\t\t\t\tif (pixelVal == Color.YELLOW.getRGB()) {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.BLACK.getRGB());\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.YELLOW.getRGB());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (debug) {\r\n\t\t\ttry {\r\n\t\t\t\tImageIO.write(image, \"gif\", new File(\"noiseFiltered.gif\"));\r\n\t\t\t} catch (Exception e) {e.printStackTrace();}\r\n\t\t}\r\n\t}", "@java.lang.Override\n public com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigmaOrBuilder\n getFeatureNoiseSigmaOrBuilder() {\n if (gradientNoiseSigmaCase_ == 2) {\n return (com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma) gradientNoiseSigma_;\n }\n return com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma.getDefaultInstance();\n }", "@Override\n public double evaluate(\n final int i, final double[] point, final double[] params,\n final double[] derivatives) {\n final int dims = getNumberOfDimensions();\n double result = 0.0;\n double diff;\n double param;\n for (int j = 0; j < dims; j++) {\n param = params[j];\n diff = param - point[j];\n result += diff * diff;\n derivatives[j] = 2.0 * diff;\n }\n\n return result;\n }", "public void gaussianSmooth(Img i, double sigma) {\n int half = (int) (sigma * Math.sqrt(6 * Math.log(10)));\n int size = 1 + 2 * half;\n System.out.printf(\"Size: %d\\n\", size);\n double[] mask = new double[size];\n double mask_sum = 0;\n for (int k = 0; k <= half; k++) {\n double value = Math.exp(-k * k / (2 * sigma * sigma)) / (sigma * Math.sqrt(2 * Math.PI));\n mask_sum += (k == 0) ? value : value * 2;\n mask[half + k] = value;\n mask[half - k] = value;\n }\n // normalize the mask\n for (int k = 0; k < size; k++) {\n mask[k] = mask[k] / mask_sum;\n }\n System.out.printf(\"Mask: %s\\n\", Arrays.toString(mask));\n\n // 2D convolution using 1D mask in x\n double[] i_temp = new double[i.img.length];\n for (int x = 0; x < i.img.length; x++) {\n i_temp[x] = (double) (i.img[x] & 0xFF);\n }\n for (int x = half; x < i.height - half; x++) {\n for (int y = half; y < i.width - half; y++) {\n i_temp[x * i.width + y] = 0;\n for (int s = -half; s <= half; s++) {\n i_temp[x * i.width + y] += (double) (i.img[(x + s) * i.width + y] & 0xFF) * mask[half - s];\n }\n }\n }\n\n // 2D convolution using 1D mask in y\n for (int x = half; x < i.height - half; x++) {\n for (int y = half; y < i.width - half; y++) {\n double f = 0;\n for (int s = -half; s <= half; s++) {\n f += i_temp[x * i.width + y + s] * mask[half - s];\n }\n i.img[x * i.width + y] = (byte) f;\n }\n }\n }", "public void derivative3p1o(ImagePlus img, ImageStack stack, int width, int height, int slices, int mul){\r\n\t\t\r\n\t\tImageProcessor resIp = img.getProcessor();\r\n\r\n\t\tfloat f_[] = new float[slices+1];\r\n\t\tfloat out[] = new float[slices+1];\r\n\r\n\t\tfor(int x = 0; x < height; x++){\r\n\t\t\tfor(int y = 0 ; y < width; y++){\r\n\t\t\t\t\tfor(int z=1;z<slices+1;z++){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tresIp = stack.getProcessor(z);\r\n\t\t\t\t\t\tf_[z] = resIp.getf(x,y);\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\tfor(int w=2;w<slices;w++){\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tout[w] = mul * ((-1*f_[w-1] + 0* f_[w] + f_[w+1])/2);\r\n\t\t\t\t\t\tresIp = stack.getProcessor(w);\r\n\t\t\t\t\t\tresIp.setf(x,y,out[w]);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(1);\r\n\t\t\t\t\tout[1] = mul * ((-3*f_[1]+4*f_[1+1]-1*f_[1+2])/2);\r\n\t\t\t\t\tresIp.setf(x,y,(out[1]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(slices);\r\n\t\t\t\t\tout[slices] = mul * ((f_[slices-2]-4*f_[slices-1] + 3*f_[slices])/2);\r\n\t\t\t\t\tresIp.setf(x,y,(out[slices]));\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public double energy(int x, int y) {\n Color upper = picture.get(x, (y - 1 + this.height()) % this.height());\n Color lower = picture.get(x, (y + 1 + this.height()) % this.height());\n Color left = picture.get((x - 1 + this.width()) % this.width(), y);\n Color right = picture.get((x + 1 + this.width()) % this.width(), y);\n return getGradient(upper, lower) + getGradient(left, right);\n }", "public List<Peak> filterNoise(List<Peak> peaks, double threshold, double experimentalPrecursorMzRatio);", "public static double[]getDataForVoxelGaussian(ImagePlus imgIn,int xCor,int yCor,int curT,int totalT,int curZ,int totalZ,int nEchoesExpected,int crossWidth,int crossThick,boolean gaussianWeighting){\n\t\tif(gaussianWeighting) {IJ.showMessage(\"Not applicable : gaussian weighting. Abort\");gaussianWeighting=false;}\n\t\tint xMax=imgIn.getWidth();\n\t\tint yMax=imgIn.getHeight();\n\t\tint zMax=imgIn.getNSlices();\n\t\tint zCor=curZ;\n\t\tint xm,ym,xM,yM,zm,zM;\n\t\txm=xCor-crossWidth;\n\t\txM=xCor+crossWidth;\n\t\tym=yCor-crossWidth;\n\t\tyM=yCor+crossWidth;\n\t\tzm=curZ-crossThick;\n\t\tzM=curZ+crossThick;\n\t\txm=Math.max(xm, 0);\n\t\txM=Math.min(xMax-1, xM);\n\t\tym=Math.max(ym, 0);\n\t\tyM=Math.min(yMax-1, yM);\n\t\tzm=Math.max(zm, 0);\n\t\tzM=Math.min(zMax-1, zM);\n\t\tdouble[]data= new double[nEchoesExpected];\n\t\tint nHits=(xM-xm+1)*(yM-ym+1)*(zM-zm+1);\n\t\tif( (xCor>xMax-1) || (yCor>yMax-1)) {IJ.log(\"Bad coordinates. Data set to 0\"); return data;}\n\t\tdouble[][][]weights=new double[xM-xm+1][yM-ym+1][zM-zm+1];\n\t\tdouble sigmaX=crossWidth;\n\t\tdouble sigmaY=crossWidth;\n\t\tdouble sigmaZ=crossThick;\n\t\t\n\t\t\n\t\tdouble sum=0;\n\t\tfor(int x=xm;x<=xM;x++) {\n\t\t\tfor(int y=ym;y<=yM;y++) {\n\t\t\t\tfor(int z=zm;z<=zM;z++) {\t\n\t\t\t\t\tif(!gaussianWeighting)weights[x-xm][y-ym][z-zm]=1.0/nHits;\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(sigmaX<=0 && sigmaZ<=0) {//One point\n\t\t\t\t\t\t\tweights[x-xm][y-ym][z-zm]=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(sigmaX<=0 && sigmaZ>0) {//Mono dimensional along z\n\t\t\t\t\t\t\tweights[x-xm][y-ym][z-zm]=1/(Math.pow(2*Math.PI,0.5)*sigmaZ) * Math.exp(- (z-zCor)*(z-zCor)/(sigmaZ*sigmaZ));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(sigmaX>0 && sigmaZ<=0) {//Two dimensional along x and y\n\t\t\t\t\t\t\tweights[x-xm][y-ym][z-zm]=1/(Math.pow(2*Math.PI,1)*sigmaX*sigmaY) * Math.exp(- (x-xCor)*(x-xCor)/(sigmaX*sigmaX) - (y-yCor)*(y-yCor)/(sigmaY*sigmaY));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {//Three dimensional gaussian\n\t\t\t\t\t\t\tweights[x-xm][y-ym][z-zm]=1/(Math.pow(2*Math.PI,1.5)*sigmaX*sigmaY*sigmaZ) * Math.exp(- (x-xCor)*(x-xCor)/(sigmaX*sigmaX) - (y-yCor)*(y-yCor)/(sigmaY*sigmaY) - (z-zCor)*(z-zCor)/(sigmaZ*sigmaZ));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsum+=weights[x-xm][y-ym][z-zm];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(gaussianWeighting) {\n\t\t\tfor(int x=xm;x<=xM;x++) {\n\t\t\t\tfor(int y=ym;y<=yM;y++) {\n\t\t\t\t\tfor(int z=zm;z<=zM;z++) {\t\n\t\t\t\t\t\tweights[x-xm][y-ym][z-zm]/=sum;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int ec=0;ec<nEchoesExpected;ec++) {\t\t\t\n\t\t\tfor(int z=zm;z<=zM;z++) {\n\t\t\t\tint indexZ=nEchoesExpected*totalZ*curT+nEchoesExpected*z+1+ec;\n\t\t\t\tfor(int x=xm;x<=xM;x++) {\n\t\t\t\t\tfor(int y=ym;y<=yM;y++) {\n\t\t\t\t\t\tdata[ec]+=weights[x-xm][y-ym][z-zm]*(double)((float[])(imgIn.getStack().getProcessor(indexZ).getPixels()))[x + xMax * y];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn data;\n\t\t\n\t}", "private double noisyIntensity(double value) {\n\n\t\t// add multiplicative noise: log the value, add noise then take the exp\n\t\tdouble logValue = Math.log(value);\n\t\tdouble multiplicativeNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getIntensityStdev());\n\t\tlogValue += multiplicativeNoise;\n\t\tvalue = Math.exp(logValue);\n\n\t\t// then add additive noise as well\n\t\tdouble additiveNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getIntensityStdev());\n\t\tvalue += additiveNoise;\n\t\t\n\t\t// value must always be >= 0\n\t\tif (value < 0) {\n\t\t\tvalue = 0;\n\t\t}\n\t\treturn value;\n\n\t}", "@java.lang.Override\n public com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigmaOrBuilder\n getFeatureNoiseSigmaOrBuilder() {\n if ((gradientNoiseSigmaCase_ == 2) && (featureNoiseSigmaBuilder_ != null)) {\n return featureNoiseSigmaBuilder_.getMessageOrBuilder();\n } else {\n if (gradientNoiseSigmaCase_ == 2) {\n return (com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma) gradientNoiseSigma_;\n }\n return com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma.getDefaultInstance();\n }\n }", "public NoiseCalculator(double wavelength, double offset) {\n this(wavelength, offset, 1.0);\n }", "public void derivative3p2o(ImagePlus img, ImageStack stack, int width, int height, int slices, int mul){\r\n\t\t\r\n\t\tImageProcessor resIp = img.getProcessor();\r\n\r\n\t\tfloat f_[] = new float[slices+1];\r\n\t\tfloat out[] = new float[slices+1];\r\n\r\n\t\tfor(int x = 0; x < height; x++){\r\n\t\t\tfor(int y = 0 ; y < width; y++){\r\n\t\t\t\t\tfor(int z=1;z<slices+1;z++){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tresIp = stack.getProcessor(z);\r\n\t\t\t\t\t\tf_[z] = resIp.getf(x,y);\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\tfor(int w=2;w<slices;w++){\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tout[w] = mul * (f_[w+1]+f_[w-1] - (2*f_[w]));\r\n\t\t\t\t\t\tresIp = stack.getProcessor(w);\r\n\t\t\t\t\t\tresIp.setf(x,y,out[w]);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(1);\r\n\t\t\t\t\tout[1] = mul * (f_[1]-2*f_[1+1]+ f_[1+2]);\r\n\t\t\t\t\tresIp.setf(x,y,(out[1]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(slices);\r\n\t\t\t\t\tout[slices] = mul*(f_[slices-2]-2*f_[slices-1] + f_[slices]);\r\n\t\t\t\t\tresIp.setf(x,y,(out[slices]));\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public abstract float calculateFraction(Parallax parallax);", "public void makeNoise() {\n\t\tfor (Animal a : animals) {\n\t\t\ta.makeNoise();\n\t\t}\n\t}", "public final Image getNormal(final double intensity) {\n if (width * height < RESOLUTION_HIGH) {\n return null;\n }\n WritableImage img = new WritableImage(width, height);\n PixelWriter writer = img.getPixelWriter();\n normalLoop:\n for (int j = 0; j < height; j++) {\n for (int i = 0; i < width; i++) {\n if (Thread.interrupted()) {\n break normalLoop;\n }\n double tl = noiseBuffer[(height + j - 1) % height]\n [(width + i - 1) % width];\n double t = noiseBuffer[(height + j - 1) % height][i];\n double tr = noiseBuffer[(height + j - 1) % height]\n [(i + 1) % width];\n double r = noiseBuffer[j][(i + 1) % width];\n double br = noiseBuffer[(j + 1) % height][(i + 1) % width];\n double b = noiseBuffer[(j + 1) % height][i];\n double bl = noiseBuffer[(j + 1) % height]\n [(width + i - 1) % width];\n double l = noiseBuffer[j][(width + i - 1) % width];\n double dx = (tl + 2.0 * l + bl) - (tr + 2.0 * r + br);\n double dy = (tl + 2.0 * t + tr) - (bl + 2.0 * b + br);\n double dz = 1.0 / intensity;\n double mag = Math.sqrt(dx * dx + dy * dy + dz * dz);\n dx = (1 + dx / mag) / 2.0;\n dy = (1 + dy / mag) / 2.0;\n dz = (1 + dz / mag) / 2.0;\n writer.setColor(i, j, Color.color(dx, dy, dz));\n }\n }\n return img;\n }", "public com.google.protobuf.ByteString\n getNoiseBytes() {\n java.lang.Object ref = noise_;\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 noise_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public interface FunctionGradient {\n\n /**\n * Gradient vector at the given point.\n *\n * @param point where the gradient is evaluated\n * @return the calculated gradient\n */\n Gradient gradientAt(Point point);\n}", "private void gradientMagnitude3D(float[] img, float[] mag) {\r\n int slice, row, col, cIndex, sIndex;\r\n float lVal, rVal, tVal, bVal, zLowVal, zHighVal;\r\n int sliceSize = yDim*xDim;\r\n for (slice = 0; slice < zDim; slice++) {\r\n sIndex = slice * sliceSize;\r\n for (row = 0; row < yDim; row++) {\r\n cIndex = sIndex + row * xDim;\r\n for (col = 0, cIndex += col; col < xDim; cIndex++, col++) {\r\n\r\n rVal = getVal(img, col+1, row, slice);\r\n lVal = getVal(img, col-1, row, slice);\r\n tVal = getVal(img, col, row+1, slice);\r\n bVal = getVal(img, col, row-1, slice);\r\n zLowVal = getVal(img, col, row, slice-1);\r\n zHighVal = getVal(img, col, row, slice+1);\r\n\r\n mag[cIndex] = (float)Math.sqrt((rVal - lVal) * (rVal - lVal) +\r\n (tVal - bVal) * (tVal - bVal) +\r\n (zHighVal - zLowVal) * (zHighVal - zLowVal));\r\n } // for (col = 0; ...)\r\n } // for (row = 0; ...)\r\n } // for (slice = 0; ...)\r\n }", "public com.google.protobuf.ByteString\n getNoiseBytes() {\n java.lang.Object ref = noise_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n noise_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Test\n public void computeResult_addsNoiseToCount() {\n mockDoubleNoise(0);\n // Mock the noise mechanism so that it adds noise to the count == 2.\n mockLongNoise(2);\n\n variance =\n BoundedVariance.builder()\n .epsilon(EPSILON)\n .delta(DELTA)\n .noise(noise)\n .maxPartitionsContributed(1)\n .maxContributionsPerPartition(1)\n .lower(-100)\n .upper(100)\n .build();\n\n variance.addEntry(20);\n variance.addEntry(20);\n // midpoint = (lower + upper) / 2 = 0,\n // noised_normalized_sum_of_squares = (x1 - midpoint)^2 + (x2 - midpoint)^2 + noise = 20^2 +\n // 20^2 = 800,\n // noised_normalized_sum = (x1 + x2) - midpoint * count + noise = 20 + 20 - 0 + 0 = 40,\n // noised_count = count + noise = 2 + 2 = 4,\n // BoundedVariance.computeResult() = noised_normalized_sum_of_squares / noised_count -\n // (noised_normalized_sum / noised_count)^2 = 800 / 4 - (40 / 4)^2 = 100\n assertThat(variance.computeResult()).isEqualTo(100.0);\n }", "public abstract void newSpeechNoise(long ms, int n);" ]
[ "0.5701709", "0.5639278", "0.55561185", "0.5508133", "0.5481322", "0.54163206", "0.5415527", "0.54041696", "0.5373473", "0.53447914", "0.53416216", "0.5311047", "0.53067964", "0.52258825", "0.519752", "0.51733637", "0.5084402", "0.50369257", "0.50082314", "0.49711043", "0.4939767", "0.49222136", "0.4908743", "0.49082053", "0.4906513", "0.49014333", "0.4831417", "0.4784078", "0.4756275", "0.46841827", "0.46699828", "0.46604258", "0.4653599", "0.46504653", "0.46468294", "0.46397695", "0.4638741", "0.46348056", "0.46311903", "0.46263635", "0.46168163", "0.46120203", "0.4599538", "0.4591768", "0.458883", "0.45699695", "0.45614558", "0.454138", "0.45232064", "0.45213395", "0.45108286", "0.44951883", "0.44838893", "0.4481196", "0.44695947", "0.4466692", "0.44493008", "0.44260114", "0.4423559", "0.44219422", "0.43973917", "0.4391468", "0.4372769", "0.4361834", "0.43519628", "0.43316102", "0.4322497", "0.43223384", "0.43203726", "0.4307186", "0.43054903", "0.43019375", "0.42949805", "0.4288849", "0.42883265", "0.42879438", "0.42879105", "0.42873025", "0.42793608", "0.4276939", "0.42755502", "0.42676693", "0.42640388", "0.42527482", "0.42386264", "0.4226421", "0.42164633", "0.42138365", "0.4213666", "0.42015982", "0.4194732", "0.41798502", "0.41733593", "0.4166512", "0.4157497", "0.41506672", "0.41329074", "0.41278827", "0.4127077", "0.4126789" ]
0.66166806
0
Calcualte the noise estimate via the gradient method given a volume and slice/channel.
public float gradientMethod(Volume vol, int slice_num) { // // Get the right slice. // Slice slice = vol.getSlice(slice_num); return gradientMethod(slice); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float gradientMethod(MCVolume vol) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tfor(int jj=0; jj<vol.getNChannels(); jj++) {\n\t\t\t\tnes += gradientMethod( vol.getSlice(ii, jj) );\n\t\t\t}\n\t\t}\n\n\t\treturn (nes / ((float)vol.getNSlices()*(float)vol.getNChannels()) );\n\t}", "public float gradientMethod(Volume vol) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tnes += gradientMethod( vol.getSlice(ii) );\n\t\t}\n\n\t\treturn (nes / (float)vol.getNSlices());\n\t}", "public float gradientMethod(MCVolume vol, int channel_num) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tnes += gradientMethod( vol.getSlice(ii, channel_num) );\n\t\t}\n\n\t\treturn (nes / (float)vol.getNSlices());\n\t}", "public float gradientMethod(MCVolume vol, int slice_num, int channel_num) \n\t{\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tSlice slice = vol.getSlice(slice_num, channel_num);\n\n\t\treturn gradientMethod(slice);\n\t}", "private void compute() {\r\n int i, j, k;\r\n float gx, gy, gz;\r\n for (int q = 0; q < data.length; q++) {\r\n data[q] = new VoxelGradient();\r\n }\r\n\r\n\r\n // gradient at extremes, 0 and dim-1\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n gx = (volume.data[(i + 1) + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n gy = (volume.data[i + (dimX * ((j + 1) + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n gz = (volume.data[i + (dimX * (j + (dimY * (k + 1))))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n i = dimX - 1;\r\n j = dimY - 1;\r\n k = dimZ - 1;\r\n gx = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[(i - 1) + (dimX * (j + (dimY * k)))]) / 1;\r\n gy = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * ((j - 1) + (dimY * k)))]) / 1;\r\n gz = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * (k - 1))))]) / 1;\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n\r\n\r\n //gradient in non-extreme points\r\n for (i = 1; i < dimX - 1; i++) {\r\n for (j = 1; j < dimY - 1; j++) {\r\n for (k = 1; k < dimZ - 1; k++) {\r\n\r\n gx = (volume.data[(i + 1) + (dimX * (j + (dimY * k)))] - volume.data[(i - 1) + (dimX * (j + (dimY * k)))]) / 2;\r\n\r\n gy = (volume.data[i + (dimX * ((j + 1) + (dimY * k)))] - volume.data[i + (dimX * ((j - 1) + (dimY * k)))]) / 2;\r\n\r\n gz = (volume.data[i + (dimX * (j + (dimY * (k + 1))))] - volume.data[i + (dimX * (j + (dimY * (k - 1))))]) / 2;\r\n\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n\r\n\r\n }\r\n }\r\n }\r\n }", "private double noise(SpIterNoiseObs noise) {\n return 3.0 * 60.0;\n }", "public float gradientMethod(Slice slice) \n\t{\n\t\t//\n\t\t// Intialize variables.\n\t\t//\n\t\tint nrows = slice.getNRows();\n\t\tint ncols = slice.getNCols();\n\n\t\tfloat[] v = new float[nrows*ncols]; int v_numset = 0;\n\t\tfloat t = (float)0.0; \n\t\tfloat sig_y = (float)0.0;\n\t\tfloat sig_x = (float)0.0;\n\n\t\t//\n\t\t// Compute the column gradient\n\t\t//\n\t\tfor(int row=0; row<nrows; row++) {\n\t\t\tfor(int col=1; col<ncols-1; col++) {\n\t\t\t\tt = slice.getData(row,col+1) - (float)2.0 * slice.getData(row,col) + slice.getData(row,col-1);\n\n\t\t\t\tif( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) {\n\t\t\t\t\tv[v_numset] = t; v_numset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( v_numset <= 10 ) {\n\t\t\tsig_y = (float)0.0;\n\t\t}\n\t\telse {\n\t\t\tsig_y = vec_stdDevMod(v, v_numset);\n\t\t}\n\n\t\tv_numset = 0;\n\n\t\t//\n\t\t// Compute the row gradient\n\t\t//\n\t\tfor(int col=0; col<ncols; col++) {\n\t\t\tfor(int row=1; row<nrows-1; row++) {\n\t\t\t\tt = slice.getData(row+1,col) - (float)2.0 * slice.getData(row,col) + slice.getData(row-1,col);\n\n\t\t\t\tif( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) {\n\t\t\t\t\tv[v_numset] = t; v_numset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( v_numset <= 10 ) {\n\t\t\tsig_x = (float)0.0;\n\t\t}\n\t\telse {\n\t\t\tsig_x = vec_stdDevMod(v, v_numset);\n\t\t}\n\n\t\treturn (float)Math.sqrt( (double)(sig_x * sig_x + sig_y * sig_y) ) / (float)2.0;\n\t}", "public GradientVolume(Volume vol) {\r\n volume = vol;\r\n dimX = vol.getDimX();\r\n dimY = vol.getDimY();\r\n dimZ = vol.getDimZ();\r\n data = new VoxelGradient[dimX * dimY * dimZ];\r\n compute();\r\n maxmag = -1.0;\r\n }", "public int noise(int xin, int yin, int zin);", "void calcWave() {\n yoff += 0.01f;\n \n //For every x value, calculate a y value based on sine or cosine\n float x = yoff; //**OPTION #1****/\n //float x = 0.0f; //**OPTION #2****/\n for (int i = 0; i < yvalues.length; i++) {\n float n = 2*noise(x)-1.0f; //**OPTION #1****/ //scale noise to be between 1 and -1\n //float n = 2*noise(x,yoff)-1.0f; //**OPTION #2****/ //scale noise to be between 1 and -1\n yvalues[i] = n*amplitude;\n x+=dx;\n }\n }", "M generateNoise();", "public final double getEstimatedNoise() {\r\n return noise;\r\n }", "@java.lang.Override\n public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "public native MagickImage reduceNoiseImage(double radius)\n\t\t\tthrows MagickException;", "public double getYNoise(double x, double z)\n {\n double var11 = 0.5D * (square3 - 1.0D);\n double var13 = (x + z) * var11;\n int var15 = fastFloor(x + var13);\n int var16 = fastFloor(z + var13);\n double var17 = (3.0D - square3) / 6.0D;\n double var19 = (double)(var15 + var16) * var17;\n double var21 = (double)var15 - var19;\n double var23 = (double)var16 - var19;\n double var25 = x - var21;\n double var27 = z - var23;\n byte var29;\n byte var30;\n\n if (var25 > var27)\n {\n var29 = 1;\n var30 = 0;\n }\n else\n {\n var29 = 0;\n var30 = 1;\n }\n\n double var31 = var25 - (double)var29 + var17;\n double var33 = var27 - (double)var30 + var17;\n double var35 = var25 - 1.0D + 2.0D * var17;\n double var37 = var27 - 1.0D + 2.0D * var17;\n int var39 = var15 & 255;\n int var40 = var16 & 255;\n int var41 = this.permutationTable[var39 + this.permutationTable[var40]] % 12;\n int var42 = this.permutationTable[var39 + var29 + this.permutationTable[var40 + var30]] % 12;\n int var43 = this.permutationTable[var39 + 1 + this.permutationTable[var40 + 1]] % 12;\n double var44 = 0.5D - var25 * var25 - var27 * var27;\n double var5;\n\n if (var44 < 0.0D)\n {\n var5 = 0.0D;\n }\n else\n {\n var44 *= var44;\n var5 = var44 * var44 * dot(grad3[var41], var25, var27);\n }\n\n double var46 = 0.5D - var31 * var31 - var33 * var33;\n double var7;\n\n if (var46 < 0.0D)\n {\n var7 = 0.0D;\n }\n else\n {\n var46 *= var46;\n var7 = var46 * var46 * dot(grad3[var42], var31, var33);\n }\n\n double var48 = 0.5D - var35 * var35 - var37 * var37;\n double var9;\n\n if (var48 < 0.0D)\n {\n var9 = 0.0D;\n }\n else\n {\n var48 *= var48;\n var9 = var48 * var48 * dot(grad3[var43], var35, var37);\n }\n\n return 70.0D * (var5 + var7 + var9);\n }", "public abstract void makeNoise();", "@java.lang.Override\n public boolean hasNoiseSigma() {\n return gradientNoiseSigmaCase_ == 1;\n }", "public interface VoxelNoise {\n /*\n * This method returns the voxel type for a location\n */\n public int noise(int xin, int yin, int zin);\n}", "public static double noise(double x, double y, double z) {\n\n\t\tdouble s = (x+y+z)/3.0;\n\t\ti = fastfloor(x+s); j = fastfloor(y+s); k = fastfloor(z+s);\n\t\ts = (i+j+k)/6.0; u = x-i+s; v = y-j+s; w = z-k+s;\n\t\tA[0] = A[1] = A[2] = 0;\n\t\tint hi = (u>=w ? (u>=v ? 0 : 1) : (v>=w ? 1 : 2));\n\t\tint lo = (u< w ? (u< v ? 0 : 1) : (v< w ? 1 : 2));\n\t\treturn 4.0 * (K(hi) + K(3-hi-lo) + K(lo) + K(0));\n\t}", "private double noise(final double xin, final double yin, final double zin) {\n double n0, n1, n2, n3;\n double s = (xin + yin + zin) * F3;\n int i = fastfloor(xin + s);\n int j = fastfloor(yin + s);\n int k = fastfloor(zin + s);\n double t = (i + j + k) * G3;\n double x0 = xin - (i - t);\n double y0 = yin - (j - t);\n double z0 = zin - (k - t);\n int i1, j1, k1;\n int i2, j2, k2;\n if (x0 >= y0) {\n if (y0 >= z0) {\n i1 = 1;\n j1 = 0;\n k1 = 0;\n i2 = 1;\n j2 = 1;\n k2 = 0;\n } else if (x0 >= z0) {\n i1 = 1;\n j1 = 0;\n k1 = 0;\n i2 = 1;\n j2 = 0;\n k2 = 1;\n } else {\n i1 = 0;\n j1 = 0;\n k1 = 1;\n i2 = 1;\n j2 = 0;\n k2 = 1;\n }\n } else {\n if (y0 < z0) {\n i1 = 0;\n j1 = 0;\n k1 = 1;\n i2 = 0;\n j2 = 1;\n k2 = 1;\n } else if (x0 < z0) {\n i1 = 0;\n j1 = 1;\n k1 = 0;\n i2 = 0;\n j2 = 1;\n k2 = 1;\n } else {\n i1 = 0;\n j1 = 1;\n k1 = 0;\n i2 = 1;\n j2 = 1;\n k2 = 0;\n }\n }\n double x1 = x0 - i1 + G3;\n double y1 = y0 - j1 + G3;\n double z1 = z0 - k1 + G3;\n double x2 = x0 - i2 + 2.0 * G3;\n double y2 = y0 - j2 + 2.0 * G3;\n double z2 = z0 - k2 + 2.0 * G3;\n double x3 = x0 - 1.0 + 3.0 * G3;\n double y3 = y0 - 1.0 + 3.0 * G3;\n double z3 = z0 - 1.0 + 3.0 * G3;\n int ii = i & (SUPPLY_LENGTH - 1);\n int jj = j & (SUPPLY_LENGTH - 1);\n int kk = k & (SUPPLY_LENGTH - 1);\n int gi0 = permMod12[ii + perm[jj + perm[kk]]];\n int gi1 = permMod12[ii + i1 + perm[jj + j1 + perm[kk + k1]]];\n int gi2 = permMod12[ii + i2 + perm[jj + j2 + perm[kk + k2]]];\n int gi3 = permMod12[ii + 1 + perm[jj + 1 + perm[kk + 1]]];\n double t0 = CONTRIBUTION_FACTOR - x0 * x0 - y0 * y0 - z0 * z0;\n if (t0 < 0) {\n n0 = 0.0;\n } else {\n t0 *= t0;\n n0 = t0 * t0 * dot(GTAB[gi0], x0, y0, z0);\n }\n double t1 = CONTRIBUTION_FACTOR - x1 * x1 - y1 * y1 - z1 * z1;\n if (t1 < 0) {\n n1 = 0.0;\n } else {\n t1 *= t1;\n n1 = t1 * t1 * dot(GTAB[gi1], x1, y1, z1);\n }\n double t2 = CONTRIBUTION_FACTOR - x2 * x2 - y2 * y2 - z2 * z2;\n if (t2 < 0) {\n n2 = 0.0;\n } else {\n t2 *= t2;\n n2 = t2 * t2 * dot(GTAB[gi2], x2, y2, z2);\n }\n double t3 = CONTRIBUTION_FACTOR - x3 * x3 - y3 * y3 - z3 * z3;\n if (t3 < 0) {\n n3 = 0.0;\n } else {\n t3 *= t3;\n n3 = t3 * t3 * dot(GTAB[gi3], x3, y3, z3);\n }\n return NORMALIZE_FACTOR * (n0 + n1 + n2 + n3);\n }", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "private float noise(Vector2 point) {\n\t\tVector2 bottomLeft = randomGrid[(int) point.x][(int) point.y];\n\t\tVector2 topLeft = randomGrid[(int) point.x][(int) point.y + 1];\n\t\tVector2 bottomRight = randomGrid[(int) point.x + 1][(int) point.y];\n\t\tVector2 topRight = randomGrid[(int) point.x + 1][(int) point.y + 1];\n\n\t\tfloat bottomLeftValue = bottomLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y));\n\t\tfloat topLeftValue = topLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y + 1));\n\t\tfloat bottomRightValue = bottomRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y));\n\t\tfloat topRightValue = topRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y + 1));\n\n\t\tfloat bottomValue = bottomLeftValue * (1 - point.x % 1) + bottomRightValue * (point.x % 1);\n\t\tfloat topValue = topLeftValue * (1 - point.x % 1) + topRightValue * (point.x % 1);\n\t\tfloat value = bottomValue * (1 - point.y % 1) + topValue * (point.y % 1);\n\n\t\treturn value;\n\t}", "public abstract double gradient(double betaForDimension, int dimension);", "public void calculate() {\n float xoff = 0;\n for (int i = 0; i < cols; i++)\n { \n float yoff = 0;\n for (int j = 0; j < rows; j++)\n {\n z[i][j] = map(noise(xoff, yoff,zoff), 0, 1, -120, 120);\n yoff += 0.1f;\n }\n xoff += 0.1f;\n }\n zoff+=0.01f;\n }", "double volume(){\n return width*height*depth;\n }", "public float getNoise(int x, int y) {\n\t\treturn getRealNoise(x * .3f, y * .3f);\n\t}", "public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "double volume(){\n\n return widgh*height*depth;\n\n }", "Gradient gradientAt(Point point);", "public Builder clearNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n gradientNoiseSigmaCase_ = 0;\n gradientNoiseSigma_ = null;\n onChanged();\n }\n return this;\n }", "private double innerEnergy(int x, int y)\n {\n Color left = this.picture.get(x-1, y);\n Color right = this.picture.get(x+1, y);\n Color up = this.picture.get(x, y-1);\n Color down = this.picture.get(x, y+1);\n return gradient(left, right) + gradient(up, down);\n }", "public void populateNoiseArray(double[] p_76308_1_, double p_76308_2_, double p_76308_4_, double p_76308_6_, int p_76308_8_, int p_76308_9_, int p_76308_10_, double p_76308_11_, double p_76308_13_, double p_76308_15_, double p_76308_17_) {\n/* 81 */ if (p_76308_9_ == 1) {\n/* */ \n/* 83 */ boolean var64 = false;\n/* 84 */ boolean var65 = false;\n/* 85 */ boolean var21 = false;\n/* 86 */ boolean var68 = false;\n/* 87 */ double var70 = 0.0D;\n/* 88 */ double var73 = 0.0D;\n/* 89 */ int var75 = 0;\n/* 90 */ double var77 = 1.0D / p_76308_17_;\n/* */ \n/* 92 */ for (int var30 = 0; var30 < p_76308_8_; var30++) {\n/* */ \n/* 94 */ double var31 = p_76308_2_ + var30 * p_76308_11_ + this.xCoord;\n/* 95 */ int var78 = (int)var31;\n/* */ \n/* 97 */ if (var31 < var78)\n/* */ {\n/* 99 */ var78--;\n/* */ }\n/* */ \n/* 102 */ int var34 = var78 & 0xFF;\n/* 103 */ var31 -= var78;\n/* 104 */ double var35 = var31 * var31 * var31 * (var31 * (var31 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 106 */ for (int var37 = 0; var37 < p_76308_10_; var37++)\n/* */ {\n/* 108 */ double var38 = p_76308_6_ + var37 * p_76308_15_ + this.zCoord;\n/* 109 */ int var40 = (int)var38;\n/* */ \n/* 111 */ if (var38 < var40)\n/* */ {\n/* 113 */ var40--;\n/* */ }\n/* */ \n/* 116 */ int var41 = var40 & 0xFF;\n/* 117 */ var38 -= var40;\n/* 118 */ double var42 = var38 * var38 * var38 * (var38 * (var38 * 6.0D - 15.0D) + 10.0D);\n/* 119 */ int var19 = this.permutations[var34] + 0;\n/* 120 */ int var66 = this.permutations[var19] + var41;\n/* 121 */ int var67 = this.permutations[var34 + 1] + 0;\n/* 122 */ int var22 = this.permutations[var67] + var41;\n/* 123 */ var70 = lerp(var35, func_76309_a(this.permutations[var66], var31, var38), grad(this.permutations[var22], var31 - 1.0D, 0.0D, var38));\n/* 124 */ var73 = lerp(var35, grad(this.permutations[var66 + 1], var31, 0.0D, var38 - 1.0D), grad(this.permutations[var22 + 1], var31 - 1.0D, 0.0D, var38 - 1.0D));\n/* 125 */ double var79 = lerp(var42, var70, var73);\n/* 126 */ int var10001 = var75++;\n/* 127 */ p_76308_1_[var10001] = p_76308_1_[var10001] + var79 * var77;\n/* */ }\n/* */ \n/* */ } \n/* */ } else {\n/* */ \n/* 133 */ int var19 = 0;\n/* 134 */ double var20 = 1.0D / p_76308_17_;\n/* 135 */ int var22 = -1;\n/* 136 */ boolean var23 = false;\n/* 137 */ boolean var24 = false;\n/* 138 */ boolean var25 = false;\n/* 139 */ boolean var26 = false;\n/* 140 */ boolean var27 = false;\n/* 141 */ boolean var28 = false;\n/* 142 */ double var29 = 0.0D;\n/* 143 */ double var31 = 0.0D;\n/* 144 */ double var33 = 0.0D;\n/* 145 */ double var35 = 0.0D;\n/* */ \n/* 147 */ for (int var37 = 0; var37 < p_76308_8_; var37++) {\n/* */ \n/* 149 */ double var38 = p_76308_2_ + var37 * p_76308_11_ + this.xCoord;\n/* 150 */ int var40 = (int)var38;\n/* */ \n/* 152 */ if (var38 < var40)\n/* */ {\n/* 154 */ var40--;\n/* */ }\n/* */ \n/* 157 */ int var41 = var40 & 0xFF;\n/* 158 */ var38 -= var40;\n/* 159 */ double var42 = var38 * var38 * var38 * (var38 * (var38 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 161 */ for (int var44 = 0; var44 < p_76308_10_; var44++) {\n/* */ \n/* 163 */ double var45 = p_76308_6_ + var44 * p_76308_15_ + this.zCoord;\n/* 164 */ int var47 = (int)var45;\n/* */ \n/* 166 */ if (var45 < var47)\n/* */ {\n/* 168 */ var47--;\n/* */ }\n/* */ \n/* 171 */ int var48 = var47 & 0xFF;\n/* 172 */ var45 -= var47;\n/* 173 */ double var49 = var45 * var45 * var45 * (var45 * (var45 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 175 */ for (int var51 = 0; var51 < p_76308_9_; var51++) {\n/* */ \n/* 177 */ double var52 = p_76308_4_ + var51 * p_76308_13_ + this.yCoord;\n/* 178 */ int var54 = (int)var52;\n/* */ \n/* 180 */ if (var52 < var54)\n/* */ {\n/* 182 */ var54--;\n/* */ }\n/* */ \n/* 185 */ int var55 = var54 & 0xFF;\n/* 186 */ var52 -= var54;\n/* 187 */ double var56 = var52 * var52 * var52 * (var52 * (var52 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 189 */ if (var51 == 0 || var55 != var22) {\n/* */ \n/* 191 */ var22 = var55;\n/* 192 */ int var69 = this.permutations[var41] + var55;\n/* 193 */ int var71 = this.permutations[var69] + var48;\n/* 194 */ int var72 = this.permutations[var69 + 1] + var48;\n/* 195 */ int var74 = this.permutations[var41 + 1] + var55;\n/* 196 */ int var75 = this.permutations[var74] + var48;\n/* 197 */ int var76 = this.permutations[var74 + 1] + var48;\n/* 198 */ var29 = lerp(var42, grad(this.permutations[var71], var38, var52, var45), grad(this.permutations[var75], var38 - 1.0D, var52, var45));\n/* 199 */ var31 = lerp(var42, grad(this.permutations[var72], var38, var52 - 1.0D, var45), grad(this.permutations[var76], var38 - 1.0D, var52 - 1.0D, var45));\n/* 200 */ var33 = lerp(var42, grad(this.permutations[var71 + 1], var38, var52, var45 - 1.0D), grad(this.permutations[var75 + 1], var38 - 1.0D, var52, var45 - 1.0D));\n/* 201 */ var35 = lerp(var42, grad(this.permutations[var72 + 1], var38, var52 - 1.0D, var45 - 1.0D), grad(this.permutations[var76 + 1], var38 - 1.0D, var52 - 1.0D, var45 - 1.0D));\n/* */ } \n/* */ \n/* 204 */ double var58 = lerp(var56, var29, var31);\n/* 205 */ double var60 = lerp(var56, var33, var35);\n/* 206 */ double var62 = lerp(var49, var58, var60);\n/* 207 */ int var10001 = var19++;\n/* 208 */ p_76308_1_[var10001] = p_76308_1_[var10001] + var62 * var20;\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ }", "boolean hasNoise();", "double volume() {\n\treturn width*height*depth;\n}", "public void calcVolume() {\n this.vol = (0.6666666666666667 * Math.PI) * Math.pow(r, 3);\n }", "private static void vel_step ( int N, double[] u, double[] v, double[] u0, double[] v0,\r\n\t\tfloat visc, float dt )\r\n\t\t{\r\n\t\tadd_source ( N, u, u0, dt ); add_source ( N, v, v0, dt );\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\t\r\n\t\t//SWAP ( u0, u ); \r\n\t\t\r\n\t\tdouble[] temp;\r\n\t\ttemp=u0;\r\n\t\tu0=u;\r\n\t\tu=temp;\r\n\t\t//draw_dens ( N, u );\r\n\t\tdiffuse ( N, 1, u, u0, visc, dt );\r\n\t\t//draw_dens ( N, u );\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t//SWAP ( v0, v ); \r\n\t\t//double[] temp;\r\n\t\ttemp=v0;\r\n\t\tv0=v;\r\n\t\tv=temp;\r\n\t\t//draw_dens ( N, v );\r\n\t\t//draw_dens ( N, v0 );\r\n\t\tdiffuse ( N, 2, v, v0, visc, dt );\r\n\t\t//draw_dens ( N, v );\r\n\t\t//System.out.println(\"V\");\r\n\t\t//draw_dens ( N, v );\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\tproject ( N, u, v, u0, v0 );\r\n\t\t//SWAP ( u0, u ); \r\n\t\ttemp=u0;\r\n\t\tu0=u;\r\n\t\tu=temp;\r\n\t\t\r\n\t\t//SWAP ( v0, v );\r\n\t\ttemp=v0;\r\n\t\tv0=v;\r\n\t\tv=temp;\r\n\t\t//System.out.println(\"V\");\r\n\t\t//draw_dens ( N, v );\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\t\r\n\t\tadvect ( N, 1, u, u0, u0, v0, dt ); \r\n\t\tadvect ( N, 2, v, v0, u0, v0, dt );\r\n\t\tproject ( N, u, v, u0, v0 );\r\n\t\t}", "void computeGradient(GradientCalc calc);", "public void setNoise(double noiseCoefficient) {\n this.noiseCoefficient = noiseCoefficient;\n }", "public double getCyclinderVolume();", "java.lang.String getNoise();", "private void gradientMagnitude3D(float[] img, float[] mag) {\r\n int slice, row, col, cIndex, sIndex;\r\n float lVal, rVal, tVal, bVal, zLowVal, zHighVal;\r\n int sliceSize = yDim*xDim;\r\n for (slice = 0; slice < zDim; slice++) {\r\n sIndex = slice * sliceSize;\r\n for (row = 0; row < yDim; row++) {\r\n cIndex = sIndex + row * xDim;\r\n for (col = 0, cIndex += col; col < xDim; cIndex++, col++) {\r\n\r\n rVal = getVal(img, col+1, row, slice);\r\n lVal = getVal(img, col-1, row, slice);\r\n tVal = getVal(img, col, row+1, slice);\r\n bVal = getVal(img, col, row-1, slice);\r\n zLowVal = getVal(img, col, row, slice-1);\r\n zHighVal = getVal(img, col, row, slice+1);\r\n\r\n mag[cIndex] = (float)Math.sqrt((rVal - lVal) * (rVal - lVal) +\r\n (tVal - bVal) * (tVal - bVal) +\r\n (zHighVal - zLowVal) * (zHighVal - zLowVal));\r\n } // for (col = 0; ...)\r\n } // for (row = 0; ...)\r\n } // for (slice = 0; ...)\r\n }", "double volume()\n\t{\n\t\t\n\t\treturn width*height*depth;\n\t\t\n\t}", "@Override\r\n\t\tpublic double[] gradient(double x, double... parameters) {\n\t\t\tfinal double a = parameters[0];\r\n\t\t\tfinal double b = parameters[1];\r\n\t\t\tfinal double c = parameters[2];\r\n\t\t\tfinal double d = parameters[3];\r\n\t\t\tfinal double e = parameters[4];\r\n\t\t\t\r\n\t\t\tdouble[] gradients = new double[5];\r\n\t\t\t//double den = 1 + Math.pow((x+e)/c, b);\r\n\t\t\t//gradients[0] = 1 / den; // Yes a Derivation \r\n\t\t\t//gradients[1] = -((a - d) * Math.pow(x / c, b) * Math.log(x / c)) / (den * den); // Yes b Derivation \r\n\t\t\t//gradients[2] = (b * Math.pow(x / c, b - 1) * (x / (c * c)) * (a - d)) / (den * den); // Yes c Derivation \r\n\t\t\t//gradients[3] = 1 - (1 / den); // Yes d Derivation \r\n\t\t\t\r\n\t\t\t//Derivation\r\n\t\t\tfinal double c_b = Math.pow(c, b);\r\n\t\t\tfinal double c_b1 = Math.pow(c, b+1.);\r\n\t\t\tfinal double c_2b = Math.pow(c, 2.*b);\r\n\t\t\tfinal double c_2b1 = Math.pow(c, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tfinal double xe_b = Math.pow(x+e, b);\r\n\t\t\tfinal double xe_2b = Math.pow(x+e, 2.*b);\r\n\t\t\tfinal double xe_2b1 = Math.pow(x+e, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tgradients[0] = c_b/(xe_b+c_b);\r\n\t\t\tgradients[1] = ((c_b*d-a*c_b)*xe_b*Math.log(x+e)+(a*c_b*Math.log(c)-c_b*Math.log(c)*d)*xe_b)/(xe_2b+2*c_b*xe_b+c_2b);\r\n\t\t\tgradients[2] = -((b*c_b*d-a*b*c_b)*xe_b)/(c*xe_2b+2*c_b1*xe_b+c_2b1);\r\n\t\t\tgradients[3] = xe_b/(xe_b+c_b);\r\n\t\t\tgradients[4] = ((b*c_b*d-a*b*c_b)*xe_b)/(xe_2b1+xe_b*(2*c_b*x+2*c_b*e)+c_2b*x+c_2b*e);\r\n\t\t\treturn gradients;\r\n\t\t}", "@Test\n public void computeResult_addsNoiseToSum() {\n mockDoubleNoise(-10);\n // Mock the noise mechanism so that it adds noise to the count == 0.\n mockLongNoise(0);\n\n variance =\n BoundedVariance.builder()\n .epsilon(EPSILON)\n .delta(DELTA)\n .noise(noise)\n .maxPartitionsContributed(1)\n .maxContributionsPerPartition(1)\n .lower(-100)\n .upper(100)\n .build();\n\n variance.addEntry(10);\n variance.addEntry(10);\n // midpoint = (lower + upper) / 2 = 0,\n // noised_normalized_sum_of_squares = (x1 - midpoint)^2 + (x2 - midpoint)^2 + noise = 10^2 +\n // 10^2 - 10 = 190,\n // noised_normalized_sum = (x1 + x2) - midpoint * count + noise = 10 + 10 - 0 - 10 = 10,\n // noised_count = count + noise = 2 + 0 = 2,\n // BoundedVariance.computeResult() = noised_normalized_sum_of_squares / noised_count -\n // (noised_normalized_sum / noised_count)^2 = 190 / 2 - (10 / 2)^2 = 70\n assertThat(variance.computeResult()).isEqualTo(70.0);\n }", "public VoxelGradient getGradient(double[] coord) {\r\n\r\n //if improper coordinates given, return\r\n if (coord[0] < 0 || coord[0] > (dimX - 2) || coord[1] < 0 || coord[1] > (dimY - 2) || coord[2] < 0 || coord[2] > (dimZ - 2)) {\r\n return zero;\r\n }\r\n\r\n /* notice that in this framework we assume that the distance between neighbouring voxels is 1 in all directions*/\r\n float x = (float) coord[0];\r\n float y = (float) coord[1];\r\n float z = (float) coord[2];\r\n\r\n int x0 = (int) Math.floor(coord[0]);\r\n int y0 = (int) Math.floor(coord[1]);\r\n int z0 = (int) Math.floor(coord[2]);\r\n int x1 = (int) Math.ceil(coord[0]);\r\n int y1 = (int) Math.ceil(coord[1]);\r\n int z1 = (int) Math.ceil(coord[2]);\r\n\r\n float xfactor = (x - x0) / (x1 - x0);\r\n float yfactor = (y - y0) / (y1 - y0);\r\n float zfactor = (z - z0) / (z1 - z0);\r\n\r\n //defining 8 voxel gradiant data-points of a voxel\r\n VoxelGradient c000 = new VoxelGradient(x0, y0, z0);\r\n VoxelGradient c001 = new VoxelGradient(x0, y0, z1);\r\n VoxelGradient c010 = new VoxelGradient(x0, y1, z0);\r\n VoxelGradient c011 = new VoxelGradient(x0, y1, z1);\r\n VoxelGradient c100 = new VoxelGradient(x1, y0, z0);\r\n VoxelGradient c101 = new VoxelGradient(x1, y0, z1);\r\n VoxelGradient c110 = new VoxelGradient(x1, y1, z0);\r\n VoxelGradient c111 = new VoxelGradient(x1, y1, z1);\r\n\r\n //7 linear interpolations\r\n //4 in x direction\r\n VoxelGradient c00 = new VoxelGradient();\r\n VoxelGradient c01 = new VoxelGradient();\r\n VoxelGradient c10 = new VoxelGradient();\r\n VoxelGradient c11 = new VoxelGradient();\r\n interpolate(c000, c100, xfactor, c00);\r\n interpolate(c001, c101, xfactor, c01);\r\n interpolate(c010, c110, xfactor, c10);\r\n interpolate(c011, c111, xfactor, c11);\r\n //2 in y direction\r\n VoxelGradient c0 = new VoxelGradient();\r\n VoxelGradient c1 = new VoxelGradient();\r\n interpolate(c00, c10, yfactor, c0);\r\n interpolate(c01, c11, yfactor, c1);\r\n //1 in z direction\r\n VoxelGradient c = new VoxelGradient();\r\n interpolate(c0, c1, zfactor, c);\r\n\r\n return c;\r\n }", "public double calculateCurvatureGradient(int i){\n Node3D node = mesh.nodes.get(i);\n Set<Node3D> neighbors = getNeighbors(node);\n\n double[] k1 = calculateMeanCurvatureNormal(node, node_to_triangle.get(node));\n double kh = Vector3DOps.normalize(k1)/2;\n double[] k2 = new double[k1.length];\n double kneighbors = 0;\n for(Node3D neighbor: neighbors){\n double[] ki = calculateMeanCurvatureNormal(node, node_to_triangle.get(node));\n\n }\n\n return 0;\n }", "public Builder clearNoise() {\n bitField0_ = (bitField0_ & ~0x00010000);\n noise_ = getDefaultInstance().getNoise();\n onChanged();\n return this;\n }", "int computeGradient(\n int gx, int gy);", "public static double noise(double x, double y, double z, double w){\n\t\t\n\t\tdouble n0,n1,n2,n3,n4; // Noise contributions from the five corners\n\t\t// Skew the (x,y,z,w) space to determine which cell of 24 simplices we're in\n\t\tdouble s=(x+y+z+w)*F4; // Factor for 4D skewing\n\t\tint i=fastfloor(x+s);\n\t\tint j=fastfloor(y+s);\n\t\tint k=fastfloor(z+s);\n\t\tint l=fastfloor(w+s);\n\t\tdouble t=(i+j+k+l)*G4; // Factor for 4D unskewing\n\t\tdouble X0=i-t; // Unskew the cell origin back to (x,y,z,w) space\n\t\tdouble Y0=j-t;\n\t\tdouble Z0=k-t;\n\t\tdouble W0=l-t;\n\t\tdouble x0=x-X0; // The x,y,z,w distances from the cell origin\n\t\tdouble y0=y-Y0;\n\t\tdouble z0=z-Z0;\n\t\tdouble w0=w-W0;\n\t\t// For the 4D case, the simplex is a 4D shape I won't even try to describe.\n\t\t// To find out which of the 24 possible simplices we're in, we need to\n\t\t// determine the magnitude ordering of x0, y0, z0 and w0.\n\t\t// Six pair-wise comparisons are performed between each possible pair\n\t\t// of the four coordinates, and the results are used to rank the numbers.\n\t\tint rankx=0;\n\t\tint ranky=0;\n\t\tint rankz=0;\n\t\tint rankw=0;\n\t\tif(x0>y0) rankx++;\n\t\telse ranky++;\n\t\tif(x0>z0) rankx++;\n\t\telse rankz++;\n\t\tif(x0>w0) rankx++;\n\t\telse rankw++;\n\t\tif(y0>z0) ranky++;\n\t\telse rankz++;\n\t\tif(y0>w0) ranky++;\n\t\telse rankw++;\n\t\tif(z0>w0) rankz++;\n\t\telse rankw++;\n\t\tint i1,j1,k1,l1; // The integer offsets for the second simplex corner\n\t\tint i2,j2,k2,l2; // The integer offsets for the third simplex corner\n\t\tint i3,j3,k3,l3; // The integer offsets for the fourth simplex corner\n\t\t// [rankx, ranky, rankz, rankw] is a 4-vector with the numbers 0, 1, 2 and 3\n\t\t// in some order. We use a thresholding to set the coordinates in turn.\n\t\t// Rank 3 denotes the largest coordinate.\n\t\ti1=rankx>=3?1:0;\n\t\tj1=ranky>=3?1:0;\n\t\tk1=rankz>=3?1:0;\n\t\tl1=rankw>=3?1:0;\n\t\t// Rank 2 denotes the second largest coordinate.\n\t\ti2=rankx>=2?1:0;\n\t\tj2=ranky>=2?1:0;\n\t\tk2=rankz>=2?1:0;\n\t\tl2=rankw>=2?1:0;\n\t\t// Rank 1 denotes the second smallest coordinate.\n\t\ti3=rankx>=1?1:0;\n\t\tj3=ranky>=1?1:0;\n\t\tk3=rankz>=1?1:0;\n\t\tl3=rankw>=1?1:0;\n\t\t// The fifth corner has all coordinate offsets = 1, so no need to compute that.\n\t\tdouble x1=x0-i1+G4; // Offsets for second corner in (x,y,z,w) coords\n\t\tdouble y1=y0-j1+G4;\n\t\tdouble z1=z0-k1+G4;\n\t\tdouble w1=w0-l1+G4;\n\t\tdouble x2=x0-i2+2.0*G4; // Offsets for third corner in (x,y,z,w) coords\n\t\tdouble y2=y0-j2+2.0*G4;\n\t\tdouble z2=z0-k2+2.0*G4;\n\t\tdouble w2=w0-l2+2.0*G4;\n\t\tdouble x3=x0-i3+3.0*G4; // Offsets for fourth corner in (x,y,z,w) coords\n\t\tdouble y3=y0-j3+3.0*G4;\n\t\tdouble z3=z0-k3+3.0*G4;\n\t\tdouble w3=w0-l3+3.0*G4;\n\t\tdouble x4=x0-1.0+4.0*G4; // Offsets for last corner in (x,y,z,w) coords\n\t\tdouble y4=y0-1.0+4.0*G4;\n\t\tdouble z4=z0-1.0+4.0*G4;\n\t\tdouble w4=w0-1.0+4.0*G4;\n\t\t// Work out the hashed gradient indices of the five simplex corners\n\t\tint ii=i&255;\n\t\tint jj=j&255;\n\t\tint kk=k&255;\n\t\tint ll=l&255;\n\t\tint gi0=perm[ii+perm[jj+perm[kk+perm[ll]]]]%32;\n\t\tint gi1=perm[ii+i1+perm[jj+j1+perm[kk+k1+perm[ll+l1]]]]%32;\n\t\tint gi2=perm[ii+i2+perm[jj+j2+perm[kk+k2+perm[ll+l2]]]]%32;\n\t\tint gi3=perm[ii+i3+perm[jj+j3+perm[kk+k3+perm[ll+l3]]]]%32;\n\t\tint gi4=perm[ii+1+perm[jj+1+perm[kk+1+perm[ll+1]]]]%32;\n\t\t// Calculate the contribution from the five corners\n\t\tdouble t0=0.6-x0*x0-y0*y0-z0*z0-w0*w0;\n\t\tif(t0<0) n0=0.0;\n\t\telse{\n\t\t\tt0*=t0;\n\t\t\tn0=t0*t0*dot(grad4[gi0], x0, y0, z0, w0);\n\t\t}\n\t\tdouble t1=0.6-x1*x1-y1*y1-z1*z1-w1*w1;\n\t\tif(t1<0) n1=0.0;\n\t\telse{\n\t\t\tt1*=t1;\n\t\t\tn1=t1*t1*dot(grad4[gi1], x1, y1, z1, w1);\n\t\t}\n\t\tdouble t2=0.6-x2*x2-y2*y2-z2*z2-w2*w2;\n\t\tif(t2<0) n2=0.0;\n\t\telse{\n\t\t\tt2*=t2;\n\t\t\tn2=t2*t2*dot(grad4[gi2], x2, y2, z2, w2);\n\t\t}\n\t\tdouble t3=0.6-x3*x3-y3*y3-z3*z3-w3*w3;\n\t\tif(t3<0) n3=0.0;\n\t\telse{\n\t\t\tt3*=t3;\n\t\t\tn3=t3*t3*dot(grad4[gi3], x3, y3, z3, w3);\n\t\t}\n\t\tdouble t4=0.6-x4*x4-y4*y4-z4*z4-w4*w4;\n\t\tif(t4<0) n4=0.0;\n\t\telse{\n\t\t\tt4*=t4;\n\t\t\tn4=t4*t4*dot(grad4[gi4], x4, y4, z4, w4);\n\t\t}\n\t\t// Sum up and scale the result to cover the range [-1,1]\n\t\treturn 27.0*(n0+n1+n2+n3+n4);\n\t}", "@Override\n\tpublic void makeNoise() {\n\t\tSystem.out.println(\"Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink \");\n\t}", "public void gaussianSmooth(Img i, double sigma) {\n int half = (int) (sigma * Math.sqrt(6 * Math.log(10)));\n int size = 1 + 2 * half;\n System.out.printf(\"Size: %d\\n\", size);\n double[] mask = new double[size];\n double mask_sum = 0;\n for (int k = 0; k <= half; k++) {\n double value = Math.exp(-k * k / (2 * sigma * sigma)) / (sigma * Math.sqrt(2 * Math.PI));\n mask_sum += (k == 0) ? value : value * 2;\n mask[half + k] = value;\n mask[half - k] = value;\n }\n // normalize the mask\n for (int k = 0; k < size; k++) {\n mask[k] = mask[k] / mask_sum;\n }\n System.out.printf(\"Mask: %s\\n\", Arrays.toString(mask));\n\n // 2D convolution using 1D mask in x\n double[] i_temp = new double[i.img.length];\n for (int x = 0; x < i.img.length; x++) {\n i_temp[x] = (double) (i.img[x] & 0xFF);\n }\n for (int x = half; x < i.height - half; x++) {\n for (int y = half; y < i.width - half; y++) {\n i_temp[x * i.width + y] = 0;\n for (int s = -half; s <= half; s++) {\n i_temp[x * i.width + y] += (double) (i.img[(x + s) * i.width + y] & 0xFF) * mask[half - s];\n }\n }\n }\n\n // 2D convolution using 1D mask in y\n for (int x = half; x < i.height - half; x++) {\n for (int y = half; y < i.width - half; y++) {\n double f = 0;\n for (int s = -half; s <= half; s++) {\n f += i_temp[x * i.width + y + s] * mask[half - s];\n }\n i.img[x * i.width + y] = (byte) f;\n }\n }\n }", "@Override\n\tpublic Vector3d gradient(Particle p_j) {\n\t\treturn null;\n\t}", "private static void filterNoise(BufferedImage image) {\n\t\tfor (int x=0; x<image.getWidth(); x++) {\r\n\t\t\tfor (int y=0; y<image.getHeight(); y++) {\r\n\t\t\t\t\r\n\t\t\t\tint pixelVal = image.getRGB(x, y);\r\n\r\n\t\t\t\t// check how many pixels in a 2 x 2 rectangle with this point \r\n\t\t\t\t// in the center have the same color as this point; if not \r\n\t\t\t\t// many, flip this pixel's color\r\n\t\t\t\tint startX = Math.max(x-2, 0);\r\n\t\t\t\tint startY = Math.max(y-2, 0);\r\n\t\t\t\tint endX = Math.min(x+2, image.getWidth()-1);\r\n\t\t\t\tint endY = Math.min(y+2, image.getHeight()-1);\r\n\r\n\t\t\t\tint matchCount = 0;\r\n\t\t\t\tint totalCount = 0;\r\n\t\t\t\tfor (int i=startX; i<=endX; i++) {\r\n\t\t\t\t\tfor (int j=startY; j<=endY; j++) {\r\n\t\t\t\t\t\tif (image.getRGB(i,j) == pixelVal) {\r\n\t\t\t\t\t\t\tmatchCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttotalCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ((matchCount / (double) totalCount) < .2) {\r\n\t\t\t\t\tif (pixelVal == Color.YELLOW.getRGB()) {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.BLACK.getRGB());\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.YELLOW.getRGB());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (debug) {\r\n\t\t\ttry {\r\n\t\t\t\tImageIO.write(image, \"gif\", new File(\"noiseFiltered.gif\"));\r\n\t\t\t} catch (Exception e) {e.printStackTrace();}\r\n\t\t}\r\n\t}", "public abstract double calcVolume();", "public abstract double calcVolume();", "public static double[]getDataForVoxelGaussian(ImagePlus imgIn,int xCor,int yCor,int curT,int totalT,int curZ,int totalZ,int nEchoesExpected,int crossWidth,int crossThick,boolean gaussianWeighting){\n\t\tif(gaussianWeighting) {IJ.showMessage(\"Not applicable : gaussian weighting. Abort\");gaussianWeighting=false;}\n\t\tint xMax=imgIn.getWidth();\n\t\tint yMax=imgIn.getHeight();\n\t\tint zMax=imgIn.getNSlices();\n\t\tint zCor=curZ;\n\t\tint xm,ym,xM,yM,zm,zM;\n\t\txm=xCor-crossWidth;\n\t\txM=xCor+crossWidth;\n\t\tym=yCor-crossWidth;\n\t\tyM=yCor+crossWidth;\n\t\tzm=curZ-crossThick;\n\t\tzM=curZ+crossThick;\n\t\txm=Math.max(xm, 0);\n\t\txM=Math.min(xMax-1, xM);\n\t\tym=Math.max(ym, 0);\n\t\tyM=Math.min(yMax-1, yM);\n\t\tzm=Math.max(zm, 0);\n\t\tzM=Math.min(zMax-1, zM);\n\t\tdouble[]data= new double[nEchoesExpected];\n\t\tint nHits=(xM-xm+1)*(yM-ym+1)*(zM-zm+1);\n\t\tif( (xCor>xMax-1) || (yCor>yMax-1)) {IJ.log(\"Bad coordinates. Data set to 0\"); return data;}\n\t\tdouble[][][]weights=new double[xM-xm+1][yM-ym+1][zM-zm+1];\n\t\tdouble sigmaX=crossWidth;\n\t\tdouble sigmaY=crossWidth;\n\t\tdouble sigmaZ=crossThick;\n\t\t\n\t\t\n\t\tdouble sum=0;\n\t\tfor(int x=xm;x<=xM;x++) {\n\t\t\tfor(int y=ym;y<=yM;y++) {\n\t\t\t\tfor(int z=zm;z<=zM;z++) {\t\n\t\t\t\t\tif(!gaussianWeighting)weights[x-xm][y-ym][z-zm]=1.0/nHits;\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(sigmaX<=0 && sigmaZ<=0) {//One point\n\t\t\t\t\t\t\tweights[x-xm][y-ym][z-zm]=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(sigmaX<=0 && sigmaZ>0) {//Mono dimensional along z\n\t\t\t\t\t\t\tweights[x-xm][y-ym][z-zm]=1/(Math.pow(2*Math.PI,0.5)*sigmaZ) * Math.exp(- (z-zCor)*(z-zCor)/(sigmaZ*sigmaZ));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(sigmaX>0 && sigmaZ<=0) {//Two dimensional along x and y\n\t\t\t\t\t\t\tweights[x-xm][y-ym][z-zm]=1/(Math.pow(2*Math.PI,1)*sigmaX*sigmaY) * Math.exp(- (x-xCor)*(x-xCor)/(sigmaX*sigmaX) - (y-yCor)*(y-yCor)/(sigmaY*sigmaY));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {//Three dimensional gaussian\n\t\t\t\t\t\t\tweights[x-xm][y-ym][z-zm]=1/(Math.pow(2*Math.PI,1.5)*sigmaX*sigmaY*sigmaZ) * Math.exp(- (x-xCor)*(x-xCor)/(sigmaX*sigmaX) - (y-yCor)*(y-yCor)/(sigmaY*sigmaY) - (z-zCor)*(z-zCor)/(sigmaZ*sigmaZ));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsum+=weights[x-xm][y-ym][z-zm];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(gaussianWeighting) {\n\t\t\tfor(int x=xm;x<=xM;x++) {\n\t\t\t\tfor(int y=ym;y<=yM;y++) {\n\t\t\t\t\tfor(int z=zm;z<=zM;z++) {\t\n\t\t\t\t\t\tweights[x-xm][y-ym][z-zm]/=sum;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int ec=0;ec<nEchoesExpected;ec++) {\t\t\t\n\t\t\tfor(int z=zm;z<=zM;z++) {\n\t\t\t\tint indexZ=nEchoesExpected*totalZ*curT+nEchoesExpected*z+1+ec;\n\t\t\t\tfor(int x=xm;x<=xM;x++) {\n\t\t\t\t\tfor(int y=ym;y<=yM;y++) {\n\t\t\t\t\t\tdata[ec]+=weights[x-xm][y-ym][z-zm]*(double)((float[])(imgIn.getStack().getProcessor(indexZ).getPixels()))[x + xMax * y];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn data;\n\t\t\n\t}", "public VoxelGradient getGradient(int x, int y, int z) {\r\n return data[x + dimX * (y + dimY * z)];\r\n }", "public boolean hasNoiseSigma() {\n return gradientNoiseSigmaCase_ == 1;\n }", "public Builder setNoiseSigma(float value) {\n\n gradientNoiseSigmaCase_ = 1;\n gradientNoiseSigma_ = value;\n onChanged();\n return this;\n }", "@Override\r\n\tpublic String makeANoise() {\n\t\treturn \"deer noise\";\r\n\t}", "public void useUniformDeviates(){\n this.gaussianDeviates = false;\n }", "public static int numDimensions_infos_noise() {\n return 1;\n }", "@Override\r\n\tpublic FloatMat gradient() { return this.gradient; }", "private void run3D() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBuffer[];\r\n float resultBuffer[];\r\n float gaussianBuffer[];\r\n float gradientBuffer[];\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n sourceBuffer = new float[length];\r\n resultBuffer = new float[length];\r\n gaussianBuffer = new float[length];\r\n gradientBuffer = new float[length];\r\n } catch (OutOfMemoryError e){\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n srcImage.exportData(0, length, sourceBuffer);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n algoSepConvolver = new AlgorithmSeparableConvolver(gaussianBuffer, sourceBuffer,\r\n extents, xDataRound, yDataRound, zDataRound, srcImage.isColorImage());\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) / (numIterations - 1) * 100)), activeImage);\r\n }\r\n\r\n algoSepConvolver.run();\r\n gradientMagnitude3D(gaussianBuffer, gradientBuffer);\r\n upDateImage3D(resultBuffer, sourceBuffer, gradientBuffer);\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n for (int i = 0; i < length; i++) { sourceBuffer[i] = resultBuffer[i]; }\r\n }\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n algoSepConvolver.finalize();\r\n algoSepConvolver = null;\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n destImage.importData(0, resultBuffer, true);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "private static final void silk_PLC_energy(/*final int[] energy1, final int[] shift1, final int[] energy2, final int[] shift2,*/\r\n\t\t\tfinal Jenergy_struct_aux aux,// java\r\n\t\t\tfinal int[] exc_Q14, final int[] prevGain_Q10, final int subfr_length, final int nb_subfr)\r\n\t{\r\n\t\t// SAVE_STACK;\r\n\t\tfinal short[] exc_buf = new short[subfr_length << 1];\r\n\t\t/* Find random noise component */\r\n\t\t/* Scale previous excitation signal */\r\n\t\tint exc_buf_ptr = 0;// exc_buf[ exc_buf_ptr ]\r\n\t\tfor( int k = 0; k < 2; k++ ) {\r\n\t\t\tfor( int i = 0; i < subfr_length; i++ ) {\r\n\t\t\t\tfinal int v = ((int)(((long)exc_Q14[ i + ( k + nb_subfr - 2 ) * subfr_length ] * prevGain_Q10[ k ]) >> 16)) << 8;// java\r\n\t\t\t\texc_buf[ exc_buf_ptr + i ] = (short)(v > Short.MAX_VALUE ? Short.MAX_VALUE : (v < Short.MIN_VALUE ? Short.MIN_VALUE : v));\r\n\t\t\t}\r\n\t\t\texc_buf_ptr += subfr_length;\r\n\t\t}\r\n\t\t/* Find the subframe with lowest energy of the last two and use that as random noise generator */\r\n\t\tfinal long energy_shift1 = silk_sum_sqr_shift( /*energy1, shift1,*/ exc_buf, 0, subfr_length );\r\n\t\tfinal long energy_shift2 = silk_sum_sqr_shift( /*energy2, shift2,*/ exc_buf, subfr_length, subfr_length );\r\n\t\t// RESTORE_STACK;\r\n\t\taux.energy1 = (int)(energy_shift1 >>> 32);\r\n\t\taux.shift1 = (int)energy_shift1;\r\n\t\taux.energy2 = (int)(energy_shift2 >>> 32);\r\n\t\taux.shift2 = (int)energy_shift2;\r\n\t}", "@java.lang.Override\n public boolean hasFeatureNoiseSigma() {\n return gradientNoiseSigmaCase_ == 2;\n }", "public void calculateGradients(int dataIndex, double learningRate){\r\n for (int i = 0; i < outputLayer.length; i++) {\r\n for (int j = 0; j < outputLayer[i].weights.length; j++) {\r\n outputLayer[i].dw[j] = -2*((attribute[dataIndex] == i ? 1 : 0) - sigmoid(outputLayer[i].z))*sigmoidDeri(outputLayer[i].z)*outputLayer[i].data[j];\r\n }\r\n outputLayer[i].db = -2*((attribute[dataIndex] == i ? 1 : 0) - sigmoid(outputLayer[i].z))*sigmoidDeri(outputLayer[i].z);\r\n }\r\n\r\n adjust(learningRate, true);\r\n calculateDesireHiddenLayerActivation(dataIndex);\r\n\r\n for (int i = 0; i < hiddenLayer.length; i++) {\r\n for (int j = 0; j < hiddenLayer[i].weights.length; j++) {\r\n hiddenLayer[i].dw[j] = -2*(desireHiddenLayerActivation[i] - hiddenLayer[i].a)*sigmoidDeri(hiddenLayer[i].z)*hiddenLayer[i].data[j];\r\n }\r\n hiddenLayer[i].db = -2*(desireHiddenLayerActivation[i] - hiddenLayer[i].a)*sigmoidDeri(hiddenLayer[i].z);\r\n }\r\n\r\n adjust(learningRate, false);\r\n }", "public double volume () {return (4/3)*Math.PI*this.r*this.r*this.r;}", "public List<Peak> filterNoise(List<Peak> peaks, double threshold, double experimentalPrecursorMzRatio);", "public double getNoiseMean() {\n\t\t\treturn NOISE_MEAN;\n\t\t}", "public void derivative3p1o(ImagePlus img, ImageStack stack, int width, int height, int slices, int mul){\r\n\t\t\r\n\t\tImageProcessor resIp = img.getProcessor();\r\n\r\n\t\tfloat f_[] = new float[slices+1];\r\n\t\tfloat out[] = new float[slices+1];\r\n\r\n\t\tfor(int x = 0; x < height; x++){\r\n\t\t\tfor(int y = 0 ; y < width; y++){\r\n\t\t\t\t\tfor(int z=1;z<slices+1;z++){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tresIp = stack.getProcessor(z);\r\n\t\t\t\t\t\tf_[z] = resIp.getf(x,y);\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\tfor(int w=2;w<slices;w++){\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tout[w] = mul * ((-1*f_[w-1] + 0* f_[w] + f_[w+1])/2);\r\n\t\t\t\t\t\tresIp = stack.getProcessor(w);\r\n\t\t\t\t\t\tresIp.setf(x,y,out[w]);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(1);\r\n\t\t\t\t\tout[1] = mul * ((-3*f_[1]+4*f_[1+1]-1*f_[1+2])/2);\r\n\t\t\t\t\tresIp.setf(x,y,(out[1]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(slices);\r\n\t\t\t\t\tout[slices] = mul * ((f_[slices-2]-4*f_[slices-1] + 3*f_[slices])/2);\r\n\t\t\t\t\tresIp.setf(x,y,(out[slices]));\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public double costNEX() {\r\n double diff=0;\r\n double intensity=0;\r\n \r\n for(int x=Config.ptvXLow-0; x < Config.ptvXHigh+0; x++) {\r\n// for(int x=Solver.xBoundsTumor[0]; x < Solver.xBoundsTumor[1]; x+= Config.scaleFactor) {\r\n for(int y=Config.ptvYLow-0; y < Config.ptvYHigh+0; y++) {\r\n// for(int y=Solver.yBoundsTumor[0]; y < Solver.yBoundsTumor[1]; y+= Config.scaleFactor) {\r\n for(int z=Config.ptvZLow-0; z < Config.ptvZHigh+0; z++) {\r\n// for(int z=Solver.zBoundsTumor[0]; z < Solver.zBoundsTumor[1]; z+= Config.scaleFactor) {\r\n\r\n this.body2[x][y][z].setCurrentDosis(0.0); //Set currentPtvVoxel Dose to 0 \r\n for(int i=0; i<Config.numberOfSeeds;++i) { \r\n // Calculate intensity based based on current dwelltime\r\n intensity = this.body2[x][y][z].radiationIntensity(this.seeds2[i].getCoordinate(), New_state[i]);\r\n if (intensity>0) {\r\n// LogTool.print(\"Cost: Intensity :\" + intensity + \"@ \" + x + \" \" + y + \" \" + z,\"notification\");\r\n }\r\n this.body2[x][y][z].addCurrentDosis(intensity);\r\n } \r\n diff += Math.pow((this.body2[x][y][z].getGoalDosis()-this.body2[x][y][z].getCurrentDosis()),2);\r\n// LogTool.print(\" diffdose \" + (Looper.body2[x][y][z].getGoalDosis()-Looper.body2[x][y][z].getCurrentDosis()),\"notification\");\r\n } \r\n }\r\n }\r\n return Math.sqrt(diff);\r\n// return Math.random();\r\n }", "@java.lang.Override\n public boolean hasFeatureNoiseSigma() {\n return gradientNoiseSigmaCase_ == 2;\n }", "public double sampleVariance() {\n/* 262 */ Preconditions.checkState((this.count > 1L));\n/* 263 */ if (Double.isNaN(this.sumOfSquaresOfDeltas)) {\n/* 264 */ return Double.NaN;\n/* */ }\n/* 266 */ return DoubleUtils.ensureNonNegative(this.sumOfSquaresOfDeltas) / (this.count - 1L);\n/* */ }", "private void calcDilution() {\n \t\t\tdouble dilutionFactor = dilVol.getValue() / postBoilVol.getValue();\n \t\t\tdilIbu = ibu / dilutionFactor;\n \t\t\tdilAlc = alcohol / dilutionFactor;\n \t\t\tdilOG = ((estOg - 1) / dilutionFactor) + 1;\n \t\t\tdilSrm = srm / dilutionFactor;\n \n \t\t}", "public float work(float ds, float v);", "public native MagickImage addNoiseImage(int noiseType)\n\t\t\tthrows MagickException;", "public double energy(int x, int y) {\n Color upper = picture.get(x, (y - 1 + this.height()) % this.height());\n Color lower = picture.get(x, (y + 1 + this.height()) % this.height());\n Color left = picture.get((x - 1 + this.width()) % this.width(), y);\n Color right = picture.get((x + 1 + this.width()) % this.width(), y);\n return getGradient(upper, lower) + getGradient(left, right);\n }", "public double noise2D(double xin, double yin) {\n double n0, n1, n2;\n double s = (xin + yin) * F2;\n int i = fastfloor(xin + s);\n int j = fastfloor(yin + s);\n double t = (i + j) * G2;\n double X0 = i - t;\n double Y0 = j - t;\n double x0 = xin - X0;\n double y0 = yin - Y0;\n int i1, j1;\n if(x0 > y0) {\n i1 = 1;\n j1 = 0;\n } else {\n i1 = 0;\n j1 = 1;\n }\n double x1 = x0 - i1 + G2;\n double y1 = y0 - j1 + G2;\n double x2 = x0 - 1.0 + 2.0 * G2;\n double y2 = y0 - 1.0 + 2.0 * G2;\n int ii = i & (SUPPLY_LENGTH - 1);\n int jj = j & (SUPPLY_LENGTH - 1);\n int gi0 = permMod12[perm[ii + perm[jj]]];\n int gi1 = permMod12[perm[ii + i1 + perm[jj + j1]]];\n int gi2 = permMod12[perm[ii + 1 + perm[jj + 1]]];\n double t0 = CONTRIBUTION_FACTOR - x0 * x0 - y0 * y0;\n if(t0 < 0) {\n n0 = 0.0;\n } else {\n t0 *= t0;\n n0 = t0 * t0 * dot(GTAB[gi0], x0, y0, 0);\n }\n double t1 = CONTRIBUTION_FACTOR - x1 * x1 - y1 * y1;\n if(t1 < 0) {\n n1 = 0.0;\n } else {\n t1 *= t1;\n n1 = t1 * t1 * dot(GTAB[gi1], x1, y1, 0);\n }\n double t2 = CONTRIBUTION_FACTOR - x2 * x2 - y2 * y2;\n if(t2 < 0) {\n n2 = 0.0;\n } else {\n t2 *= t2;\n n2 = t2 * t2 * dot(GTAB[gi2], x2, y2, 0);\n }\n return NORMALIZE_FACTOR_2D * (n0 + n1 + n2);\n }", "private void run3DC() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int i;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBufferR[] = null;\r\n float sourceBufferG[] = null;\r\n float sourceBufferB[] = null;\r\n float resultBufferR[] = null;\r\n float resultBufferG[] = null;\r\n float resultBufferB[] = null;\r\n float gaussianBufferR[] = null;\r\n float gaussianBufferG[] = null;\r\n float gaussianBufferB[] = null;\r\n float gradientBuffer[];\r\n float gradientBufferR[] = null;\r\n float gradientBufferG[] = null;\r\n float gradientBufferB[] = null;\r\n\r\n boolean useRed = true;\r\n boolean useGreen = true;\r\n boolean useBlue = true;\r\n int colorsPresent = 3;\r\n srcImage.calcMinMax();\r\n if (srcImage.getMinR() == srcImage.getMaxR()) {\r\n useRed = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinG() == srcImage.getMaxG()) {\r\n useGreen = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinB() == srcImage.getMaxB()) {\r\n useBlue = false;\r\n colorsPresent--;\r\n }\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n if (useRed) {\r\n sourceBufferR = new float[length];\r\n resultBufferR = new float[length];\r\n gaussianBufferR = new float[length];\r\n gradientBufferR = new float[length];\r\n }\r\n if (useGreen) {\r\n sourceBufferG = new float[length];\r\n resultBufferG = new float[length];\r\n gaussianBufferG = new float[length];\r\n gradientBufferG = new float[length];\r\n }\r\n if (useBlue) {\r\n sourceBufferB = new float[length];\r\n resultBufferB = new float[length];\r\n gaussianBufferB = new float[length];\r\n gradientBufferB = new float[length];\r\n }\r\n gradientBuffer = new float[length];\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = 0.0f;\r\n }\r\n } catch (OutOfMemoryError e){\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n if (useRed) {\r\n srcImage.exportRGBData(1, 0, length, sourceBufferR);\r\n }\r\n if (useGreen) {\r\n srcImage.exportRGBData(2, 0, length, sourceBufferG);\r\n }\r\n if (useBlue) {\r\n srcImage.exportRGBData(3, 0, length, sourceBufferB);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n if (useRed) {\r\n algoSepConvolverR = new AlgorithmSeparableConvolver(gaussianBufferR, sourceBufferR,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG = new AlgorithmSeparableConvolver(gaussianBufferG, sourceBufferG,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB = new AlgorithmSeparableConvolver(gaussianBufferB, sourceBufferB,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) /\r\n (numIterations - 1) * 100)),\r\n activeImage);\r\n }\r\n\r\n if (useRed) {\r\n algoSepConvolverR.run();\r\n gradientMagnitude3D(gaussianBufferR, gradientBufferR);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = gradientBufferR[i];\r\n }\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.run();\r\n gradientMagnitude3D(gaussianBufferG, gradientBufferG);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferG[i];\r\n }\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.run();\r\n gradientMagnitude3D(gaussianBufferB, gradientBufferB);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferB[i];\r\n }\r\n }\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] /= colorsPresent;\r\n }\r\n if (useRed) {\r\n upDateImage3D(resultBufferR, sourceBufferR, gradientBuffer);\r\n }\r\n if (useGreen) {\r\n upDateImage3D(resultBufferG, sourceBufferG, gradientBuffer);\r\n }\r\n if (useBlue) {\r\n upDateImage3D(resultBufferB, sourceBufferB, gradientBuffer);\r\n }\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferR[i] = resultBufferR[i];\r\n }\r\n } // if (useRed)\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferG[i] = resultBufferG[i];\r\n }\r\n } // if (useGreen)\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferB[i] = resultBufferB[i];\r\n }\r\n } // if (useBlue)\r\n } // if (iterNum < (numIterations - 1))\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n if (useRed) {\r\n algoSepConvolverR.finalize();\r\n algoSepConvolverR = null;\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.finalize();\r\n algoSepConvolverG = null;\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.finalize();\r\n algoSepConvolverB = null;\r\n }\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferR[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferR[i] = 255.0f;\r\n }\r\n else if (resultBufferR[i] < 0.0f) {\r\n resultBufferR[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(1, 0, resultBufferR, false);\r\n }\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferG[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferG[i] = 255.0f;\r\n }\r\n else if (resultBufferG[i] < 0.0f) {\r\n resultBufferG[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(2, 0, resultBufferG, false);\r\n }\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferB[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferB[i] = 255.0f;\r\n }\r\n else if (resultBufferB[i] < 0.0f) {\r\n resultBufferB[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(3, 0, resultBufferB, false);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n destImage.calcMinMax();\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "public void injectSomeMoreNoise(double intensity) {\n//\t\taddBSCnoise(lambda,intensity);\n\t\t\n//\t\taddBSCnoise(posterior, intensity);\n//\t\tfor (int i=0; i<n; i++) lambda[i] = posterior[i];\n//\t\tcalc_q0 (posterior);\n//\n//\t\t// initialization of beta\n//\t\tfor (int i = 0; i <= m - 1; i++) {\n//\t\t\tfor (int j = 0; j <= row_weight[i] - 1; j++) {\n//\t\t\t\tbeta[i][j] = 0.0;\n//\t\t\t}\n//\t\t}\t\t\n\t\t\n\t}", "public void derivative3p2o(ImagePlus img, ImageStack stack, int width, int height, int slices, int mul){\r\n\t\t\r\n\t\tImageProcessor resIp = img.getProcessor();\r\n\r\n\t\tfloat f_[] = new float[slices+1];\r\n\t\tfloat out[] = new float[slices+1];\r\n\r\n\t\tfor(int x = 0; x < height; x++){\r\n\t\t\tfor(int y = 0 ; y < width; y++){\r\n\t\t\t\t\tfor(int z=1;z<slices+1;z++){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tresIp = stack.getProcessor(z);\r\n\t\t\t\t\t\tf_[z] = resIp.getf(x,y);\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\tfor(int w=2;w<slices;w++){\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tout[w] = mul * (f_[w+1]+f_[w-1] - (2*f_[w]));\r\n\t\t\t\t\t\tresIp = stack.getProcessor(w);\r\n\t\t\t\t\t\tresIp.setf(x,y,out[w]);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(1);\r\n\t\t\t\t\tout[1] = mul * (f_[1]-2*f_[1+1]+ f_[1+2]);\r\n\t\t\t\t\tresIp.setf(x,y,(out[1]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(slices);\r\n\t\t\t\t\tout[slices] = mul*(f_[slices-2]-2*f_[slices-1] + f_[slices]);\r\n\t\t\t\t\tresIp.setf(x,y,(out[slices]));\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public double calc_c() {\r\n \t\t\r\n \t\tdouble cij = 0;\r\n \t\tint sum_i = 0;\r\n \t\tint sum_j = 0;\r\n \t\tint diff = 0;\r\n \t\tint state = 0;\r\n \t\t\r\n \t\tdouble li, lri, lj, lrj;\r\n \t\t\r\n \t\tList<Integer> samestate_i = new ArrayList<>();\r\n \t\tList<Integer> samestate_j = new ArrayList<>();\r\n \t\t\r\n \t\tList<Double> gradient_i = new ArrayList<>();\r\n \t\tList<Double> gradient_j = new ArrayList<>();\r\n \t\t\r\n\t\t// if the time step is less than the window cij is initialized to zero.\r\n\t\tif(this.n <= this.w || this.w <2) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// else we determine the state of the region i and region j of which\r\n\t\t\t// we are calculating the cij for\r\n\t \t\tDeterminestate di = new Determinestate(this.i, this.n);\r\n\t\t\tDeterminestate dj = new Determinestate(this.j, this.n);\r\n\t\t\t\r\n\t\t\tProbability pi = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\tProbability pj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\r\n\t\t\tif(di.regionCurrentstate() == dj.regionCurrentstate()) {\r\n\t\t\t\tli = pi.getLsave().get(0);\r\n\t\t\t\tlj = pj.getLsave().get(0);\r\n\t\t\t\tstate = 0;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tli = pi.getLsave().get(1);\r\n\t\t\t\tlj = pj.getLsave().get(1);\r\n\t\t\t\tstate =1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// for the time window\r\n\t\t\tfor(int k=1; k<this.w; k++) {\r\n\t\t\t\t\r\n\t\t\t\t// determine the state of i and j in the in n-k time step\r\n\t \t\t\tDeterminestate dri = new Determinestate(this.i, this.n-k);\r\n\t \t\t\tDeterminestate drj = new Determinestate(this.j, this.n-k);\r\n\t \t\t\t\r\n\t \t\t\tProbability pri = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\tProbability prj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\t\r\n\t\t\t\tlri = pri.getLsave().get(state);\r\n\t\t\t\tlrj = prj.getLsave().get(state);\r\n\t \t\t\t\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for i make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == dri.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_i.add(k);\r\n\t \t\t\t\tgradient_i.add(li - lri);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for j make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == drj.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_j.add(k);\r\n\t \t\t\t\tgradient_j.add(lj - lrj);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t// if no match found return zero\r\n\t\tif(samestate_i.size() == 0 || samestate_j.size() == 0) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\t// else calculate cij\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// if both have same length \r\n\t\t\tif(samestate_i.size() == samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j) * Math.abs(diff/(double)this.w);\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//if i is smaller\r\n\t\t\telse if(samestate_i.size() < samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// if j is smaller \r\n\t\t\telse {\r\n\t\t\t\tfor(int i=0; i<samestate_j.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.isNaN(cij)) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn cij;\r\n\t\t}\r\n \t}", "public NoiseCalculator(double wavelength, double offset) {\n this(wavelength, offset, 1.0);\n }", "private double Volume() {\n\t\tdouble volume = (4f / 3f) * Math.PI * Math.pow(_radius, 3);\n\t\treturn volume;\n\t}", "public Double[] mvNextDouble(Random rng) {\n\t\t\n Double Y[] = new Double[nVar];\n Double X[] = new Double[nVar];\n\n for (int i = 0; i <= nVar - 1; i++){\n X[i] = super.inverseF(rng.nextDouble());\n Y[i] = meanArray[i];\n }\n\n if (NotPD) {\n \tfor (int i = 0; i <= nVar - 1; i++){\n \t\tY[i] += X[i];\n }\n }\n else{\n \tfor (int i = 0; i <= nVar - 1; i++){\n \tfor (int j = 0; j <= i; j++){\n Y[i] += H[i][j] * X[j];\n \t}\n }\n }\n\t\treturn Y;\n\t}", "protected double samplesOnePixelF() {\r\n\t\tif (getGraphWidth() > 1) {\r\n\t\t\t// avoid division by zero\r\n\t\t\treturn ((double) section.getLength()) / getGraphWidth();\r\n\t\t}\r\n\t\treturn 1.0;\r\n\t}", "private double noisyRt(double value) {\n\n\t\t// then add additive noise as well\n\t\tdouble additiveNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getRtStdev());\n\t\tvalue += additiveNoise;\n\t\t\n\t\t// value must always be >= 0\n\t\tif (value < 0) {\n\t\t\tvalue = 0;\n\t\t}\n\t\treturn value;\n\n\t}", "@Test\n public void computeResult_addsNoiseToCount() {\n mockDoubleNoise(0);\n // Mock the noise mechanism so that it adds noise to the count == 2.\n mockLongNoise(2);\n\n variance =\n BoundedVariance.builder()\n .epsilon(EPSILON)\n .delta(DELTA)\n .noise(noise)\n .maxPartitionsContributed(1)\n .maxContributionsPerPartition(1)\n .lower(-100)\n .upper(100)\n .build();\n\n variance.addEntry(20);\n variance.addEntry(20);\n // midpoint = (lower + upper) / 2 = 0,\n // noised_normalized_sum_of_squares = (x1 - midpoint)^2 + (x2 - midpoint)^2 + noise = 20^2 +\n // 20^2 = 800,\n // noised_normalized_sum = (x1 + x2) - midpoint * count + noise = 20 + 20 - 0 + 0 = 40,\n // noised_count = count + noise = 2 + 2 = 4,\n // BoundedVariance.computeResult() = noised_normalized_sum_of_squares / noised_count -\n // (noised_normalized_sum / noised_count)^2 = 800 / 4 - (40 / 4)^2 = 100\n assertThat(variance.computeResult()).isEqualTo(100.0);\n }", "com.google.protobuf.ByteString\n getNoiseBytes();", "public final Image getNormal(final double intensity) {\n if (width * height < RESOLUTION_HIGH) {\n return null;\n }\n WritableImage img = new WritableImage(width, height);\n PixelWriter writer = img.getPixelWriter();\n normalLoop:\n for (int j = 0; j < height; j++) {\n for (int i = 0; i < width; i++) {\n if (Thread.interrupted()) {\n break normalLoop;\n }\n double tl = noiseBuffer[(height + j - 1) % height]\n [(width + i - 1) % width];\n double t = noiseBuffer[(height + j - 1) % height][i];\n double tr = noiseBuffer[(height + j - 1) % height]\n [(i + 1) % width];\n double r = noiseBuffer[j][(i + 1) % width];\n double br = noiseBuffer[(j + 1) % height][(i + 1) % width];\n double b = noiseBuffer[(j + 1) % height][i];\n double bl = noiseBuffer[(j + 1) % height]\n [(width + i - 1) % width];\n double l = noiseBuffer[j][(width + i - 1) % width];\n double dx = (tl + 2.0 * l + bl) - (tr + 2.0 * r + br);\n double dy = (tl + 2.0 * t + tr) - (bl + 2.0 * b + br);\n double dz = 1.0 / intensity;\n double mag = Math.sqrt(dx * dx + dy * dy + dz * dz);\n dx = (1 + dx / mag) / 2.0;\n dy = (1 + dy / mag) / 2.0;\n dz = (1 + dz / mag) / 2.0;\n writer.setColor(i, j, Color.color(dx, dy, dz));\n }\n }\n return img;\n }", "protected double calc_virial_pressure() {\n\t\tint i,j,iTot;\n\t\tdouble dr2,fij,rij,TotFdotR;\n\t\tdouble vp;\n\t\t\n\t\t/* Calculate sum(f.r): */\n\t\tTotFdotR = 0.0; iTot = 0;\n\t\tfor(i=0; i<n; i++) {\n\t\t\tfor(j=0; j<n; j++) {\n\t\t\t\tif ( i != j ) {\n\t\t\t\t\tdr2 = ij_sep2(i,j,c_lat,CUR_POS);\n\t\t\t\t\trij = Math.sqrt(dr2);\n\t\t\t\t\tfij = -12.0*4.0*Math.pow(diameter,12.0)/Math.pow(rij,13.0)\n\t\t\t\t\t+6.0*4.0*Math.pow(diameter,6.0)/Math.pow(rij,7.0);\n\t\t\t\t\tTotFdotR += fij*rij;\n\t\t\t\t\tiTot++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//TotFdotR /= (double)iTot;\n\t\tTotFdotR /= -2.0;\n\t\t\n\t\t/* Calc total virial: */\n\t\tvp = Math.sqrt(2.0)*calc_sys_density()/beta +\n\t\tMath.pow(diameter,3.0)*TotFdotR/(3.0*box[c_lat].x*box[c_lat].y*box[c_lat].z);\n\t\t\n\t\t/* check line */\n\t\t//System.out.printf(\" VPi %f %f %f\\n\",calc_density()/beta, TotFdotR/(3.0*box.x*box.y*box.z),vp);\n\t\t\n\t\treturn(vp);\n\t}", "double volume() {\n\t\treturn 0;\n\t}", "void vng_interpolate()\n{\n}", "public NoiseCalculator(double wavelength, double offset, double amplitude) {\n this(wavelength, offset, amplitude, 0.0);\n }", "private static native void rollingGuidanceFilter_0(long src_nativeObj, long dst_nativeObj, int d, double sigmaColor, double sigmaSpace, int numOfIter, int borderType);", "private void resampleAbdomenVOI( int sliceIdx, VOIContour curve ) {\r\n \r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM(sliceIdx);\r\n int xcm = centerOfMass[0];\r\n int ycm = centerOfMass[1];\r\n// ViewUserInterface.getReference().getMessageFrame().append(\"Xcm: \" +xcm +\" Ycm: \" +ycm);\r\n \r\n\r\n ArrayList<Integer> xValsAbdomenVOI = new ArrayList<Integer>();\r\n ArrayList<Integer> yValsAbdomenVOI = new ArrayList<Integer>();\r\n\r\n // angle in radians\r\n double angleRad;\r\n \r\n for (int angle = 0; angle < 360; angle += angularResolution) {\r\n int x = xcm;\r\n int y = ycm;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n // increment x each step\r\n scaleFactor = Math.tan(angleRad);\r\n while (x < xDim && curve.contains(x, y)) {\r\n \r\n // walk out in x and compute the value of y for the given radial line\r\n x++;\r\n y = ycm - (int)((x - xcm) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n // decrement y each step\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n while (y > 0 && curve.contains(x, y)) {\r\n\r\n // walk to the top of the image and compute values of x for the given radial line\r\n y--;\r\n x = xcm + (int)((ycm - y) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n // decrement x each step\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n while (x > 0 && curve.contains(x, y)) {\r\n \r\n x--;\r\n y = ycm - (int)((xcm - x) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n\r\n } else if (angle > 225 && angle <= 315) {\r\n // increment y each step\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n while (y < yDim && curve.contains(x, y)) {\r\n \r\n y++;\r\n x = xcm - (int)((y - ycm) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n }\r\n } // end for (angle = 0; ...\r\n \r\n// ViewUserInterface.getReference().getMessageFrame().append(\"resample VOI number of points: \" +xValsAbdomenVOI.size());\r\n\r\n curve.clear();\r\n for(int idx = 0; idx < xValsAbdomenVOI.size(); idx++) {\r\n curve.add( new Vector3f( xValsAbdomenVOI.get(idx), yValsAbdomenVOI.get(idx), sliceIdx ) );\r\n }\r\n }", "@Override\n\tpublic void calcularVolume() {\n\t\t\n\t}", "public abstract void newSpeechNoise(long ms, int n);", "@Override\n\tpublic Number filteredReading() {\t\n\t// Check we have any readings.\n\tif (buffer.size() == 0) return new Double(0.0);\n\n\tSensorReading reading = null;\n\tdouble sum = 0.0;\n\tdouble avge = 0.0;\n\tint index = 0;\n\n\t// Loop over buffered samples.\n\tIterator it = buffer.iterator();\n\twhile (it.hasNext()) {\n\t reading = (SensorReading)it.next();\n\t avge = avge + reading.getContinuousReading();\n\t index++;\n\t}\n\tlogger.log(2, \"Av-Filter\", name, \"filteredReading\",\"Returned: \"+\n\t\t (avge/index)+\" using \"+index+\" samples.\");\n\treturn new Double(avge / index);\n }" ]
[ "0.66904235", "0.6660848", "0.65625876", "0.6471994", "0.63630366", "0.6269413", "0.60306334", "0.5876555", "0.5861091", "0.5634187", "0.5529186", "0.5503558", "0.5416258", "0.53797066", "0.5295568", "0.52127796", "0.5200569", "0.51628375", "0.5160337", "0.51559156", "0.5104758", "0.509766", "0.5065362", "0.5044726", "0.49803647", "0.49718794", "0.4966528", "0.49496144", "0.49265185", "0.49253032", "0.49251574", "0.48980993", "0.48825732", "0.48667246", "0.48436072", "0.4834641", "0.4822227", "0.48009822", "0.4764582", "0.47613317", "0.47586906", "0.47550544", "0.47543544", "0.47459167", "0.47286835", "0.47108012", "0.47070196", "0.47065493", "0.47015846", "0.46991763", "0.46991363", "0.46985355", "0.46950227", "0.46907675", "0.46907675", "0.46769723", "0.46680817", "0.46619448", "0.466107", "0.46387154", "0.46328628", "0.46251127", "0.46061555", "0.46011508", "0.45960438", "0.45935497", "0.45907417", "0.45857275", "0.458238", "0.45806947", "0.45730436", "0.45607743", "0.45291358", "0.45249507", "0.4513378", "0.450713", "0.45036817", "0.44919023", "0.44901222", "0.4485172", "0.44819856", "0.44793057", "0.44667867", "0.44644395", "0.44610587", "0.44512936", "0.44427207", "0.4428695", "0.44241774", "0.4420563", "0.44199935", "0.441713", "0.4411712", "0.4409921", "0.44060186", "0.44058427", "0.43852854", "0.43806565", "0.43718633", "0.43599007" ]
0.6193776
6
Calcualte the noise estimate via the gradient method given a volume and channel.
public float gradientMethod(Volume vol) { float nes = (float)0.0; // // Get the right slice. // for(int ii=0; ii<vol.getNSlices(); ii++) { nes += gradientMethod( vol.getSlice(ii) ); } return (nes / (float)vol.getNSlices()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float gradientMethod(MCVolume vol, int channel_num) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tnes += gradientMethod( vol.getSlice(ii, channel_num) );\n\t\t}\n\n\t\treturn (nes / (float)vol.getNSlices());\n\t}", "public float gradientMethod(MCVolume vol) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tfor(int jj=0; jj<vol.getNChannels(); jj++) {\n\t\t\t\tnes += gradientMethod( vol.getSlice(ii, jj) );\n\t\t\t}\n\t\t}\n\n\t\treturn (nes / ((float)vol.getNSlices()*(float)vol.getNChannels()) );\n\t}", "private double noise(SpIterNoiseObs noise) {\n return 3.0 * 60.0;\n }", "public float gradientMethod(MCVolume vol, int slice_num, int channel_num) \n\t{\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tSlice slice = vol.getSlice(slice_num, channel_num);\n\n\t\treturn gradientMethod(slice);\n\t}", "public int noise(int xin, int yin, int zin);", "private void compute() {\r\n int i, j, k;\r\n float gx, gy, gz;\r\n for (int q = 0; q < data.length; q++) {\r\n data[q] = new VoxelGradient();\r\n }\r\n\r\n\r\n // gradient at extremes, 0 and dim-1\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n gx = (volume.data[(i + 1) + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n gy = (volume.data[i + (dimX * ((j + 1) + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n gz = (volume.data[i + (dimX * (j + (dimY * (k + 1))))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n i = dimX - 1;\r\n j = dimY - 1;\r\n k = dimZ - 1;\r\n gx = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[(i - 1) + (dimX * (j + (dimY * k)))]) / 1;\r\n gy = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * ((j - 1) + (dimY * k)))]) / 1;\r\n gz = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * (k - 1))))]) / 1;\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n\r\n\r\n //gradient in non-extreme points\r\n for (i = 1; i < dimX - 1; i++) {\r\n for (j = 1; j < dimY - 1; j++) {\r\n for (k = 1; k < dimZ - 1; k++) {\r\n\r\n gx = (volume.data[(i + 1) + (dimX * (j + (dimY * k)))] - volume.data[(i - 1) + (dimX * (j + (dimY * k)))]) / 2;\r\n\r\n gy = (volume.data[i + (dimX * ((j + 1) + (dimY * k)))] - volume.data[i + (dimX * ((j - 1) + (dimY * k)))]) / 2;\r\n\r\n gz = (volume.data[i + (dimX * (j + (dimY * (k + 1))))] - volume.data[i + (dimX * (j + (dimY * (k - 1))))]) / 2;\r\n\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n\r\n\r\n }\r\n }\r\n }\r\n }", "M generateNoise();", "public GradientVolume(Volume vol) {\r\n volume = vol;\r\n dimX = vol.getDimX();\r\n dimY = vol.getDimY();\r\n dimZ = vol.getDimZ();\r\n data = new VoxelGradient[dimX * dimY * dimZ];\r\n compute();\r\n maxmag = -1.0;\r\n }", "void calcWave() {\n yoff += 0.01f;\n \n //For every x value, calculate a y value based on sine or cosine\n float x = yoff; //**OPTION #1****/\n //float x = 0.0f; //**OPTION #2****/\n for (int i = 0; i < yvalues.length; i++) {\n float n = 2*noise(x)-1.0f; //**OPTION #1****/ //scale noise to be between 1 and -1\n //float n = 2*noise(x,yoff)-1.0f; //**OPTION #2****/ //scale noise to be between 1 and -1\n yvalues[i] = n*amplitude;\n x+=dx;\n }\n }", "public final double getEstimatedNoise() {\r\n return noise;\r\n }", "@java.lang.Override\n public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "public double getYNoise(double x, double z)\n {\n double var11 = 0.5D * (square3 - 1.0D);\n double var13 = (x + z) * var11;\n int var15 = fastFloor(x + var13);\n int var16 = fastFloor(z + var13);\n double var17 = (3.0D - square3) / 6.0D;\n double var19 = (double)(var15 + var16) * var17;\n double var21 = (double)var15 - var19;\n double var23 = (double)var16 - var19;\n double var25 = x - var21;\n double var27 = z - var23;\n byte var29;\n byte var30;\n\n if (var25 > var27)\n {\n var29 = 1;\n var30 = 0;\n }\n else\n {\n var29 = 0;\n var30 = 1;\n }\n\n double var31 = var25 - (double)var29 + var17;\n double var33 = var27 - (double)var30 + var17;\n double var35 = var25 - 1.0D + 2.0D * var17;\n double var37 = var27 - 1.0D + 2.0D * var17;\n int var39 = var15 & 255;\n int var40 = var16 & 255;\n int var41 = this.permutationTable[var39 + this.permutationTable[var40]] % 12;\n int var42 = this.permutationTable[var39 + var29 + this.permutationTable[var40 + var30]] % 12;\n int var43 = this.permutationTable[var39 + 1 + this.permutationTable[var40 + 1]] % 12;\n double var44 = 0.5D - var25 * var25 - var27 * var27;\n double var5;\n\n if (var44 < 0.0D)\n {\n var5 = 0.0D;\n }\n else\n {\n var44 *= var44;\n var5 = var44 * var44 * dot(grad3[var41], var25, var27);\n }\n\n double var46 = 0.5D - var31 * var31 - var33 * var33;\n double var7;\n\n if (var46 < 0.0D)\n {\n var7 = 0.0D;\n }\n else\n {\n var46 *= var46;\n var7 = var46 * var46 * dot(grad3[var42], var31, var33);\n }\n\n double var48 = 0.5D - var35 * var35 - var37 * var37;\n double var9;\n\n if (var48 < 0.0D)\n {\n var9 = 0.0D;\n }\n else\n {\n var48 *= var48;\n var9 = var48 * var48 * dot(grad3[var43], var35, var37);\n }\n\n return 70.0D * (var5 + var7 + var9);\n }", "public float gradientMethod(Volume vol, int slice_num) \n\t{\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tSlice slice = vol.getSlice(slice_num);\n\n\t\treturn gradientMethod(slice);\n\t}", "private double innerEnergy(int x, int y)\n {\n Color left = this.picture.get(x-1, y);\n Color right = this.picture.get(x+1, y);\n Color up = this.picture.get(x, y-1);\n Color down = this.picture.get(x, y+1);\n return gradient(left, right) + gradient(up, down);\n }", "private double noise(final double xin, final double yin, final double zin) {\n double n0, n1, n2, n3;\n double s = (xin + yin + zin) * F3;\n int i = fastfloor(xin + s);\n int j = fastfloor(yin + s);\n int k = fastfloor(zin + s);\n double t = (i + j + k) * G3;\n double x0 = xin - (i - t);\n double y0 = yin - (j - t);\n double z0 = zin - (k - t);\n int i1, j1, k1;\n int i2, j2, k2;\n if (x0 >= y0) {\n if (y0 >= z0) {\n i1 = 1;\n j1 = 0;\n k1 = 0;\n i2 = 1;\n j2 = 1;\n k2 = 0;\n } else if (x0 >= z0) {\n i1 = 1;\n j1 = 0;\n k1 = 0;\n i2 = 1;\n j2 = 0;\n k2 = 1;\n } else {\n i1 = 0;\n j1 = 0;\n k1 = 1;\n i2 = 1;\n j2 = 0;\n k2 = 1;\n }\n } else {\n if (y0 < z0) {\n i1 = 0;\n j1 = 0;\n k1 = 1;\n i2 = 0;\n j2 = 1;\n k2 = 1;\n } else if (x0 < z0) {\n i1 = 0;\n j1 = 1;\n k1 = 0;\n i2 = 0;\n j2 = 1;\n k2 = 1;\n } else {\n i1 = 0;\n j1 = 1;\n k1 = 0;\n i2 = 1;\n j2 = 1;\n k2 = 0;\n }\n }\n double x1 = x0 - i1 + G3;\n double y1 = y0 - j1 + G3;\n double z1 = z0 - k1 + G3;\n double x2 = x0 - i2 + 2.0 * G3;\n double y2 = y0 - j2 + 2.0 * G3;\n double z2 = z0 - k2 + 2.0 * G3;\n double x3 = x0 - 1.0 + 3.0 * G3;\n double y3 = y0 - 1.0 + 3.0 * G3;\n double z3 = z0 - 1.0 + 3.0 * G3;\n int ii = i & (SUPPLY_LENGTH - 1);\n int jj = j & (SUPPLY_LENGTH - 1);\n int kk = k & (SUPPLY_LENGTH - 1);\n int gi0 = permMod12[ii + perm[jj + perm[kk]]];\n int gi1 = permMod12[ii + i1 + perm[jj + j1 + perm[kk + k1]]];\n int gi2 = permMod12[ii + i2 + perm[jj + j2 + perm[kk + k2]]];\n int gi3 = permMod12[ii + 1 + perm[jj + 1 + perm[kk + 1]]];\n double t0 = CONTRIBUTION_FACTOR - x0 * x0 - y0 * y0 - z0 * z0;\n if (t0 < 0) {\n n0 = 0.0;\n } else {\n t0 *= t0;\n n0 = t0 * t0 * dot(GTAB[gi0], x0, y0, z0);\n }\n double t1 = CONTRIBUTION_FACTOR - x1 * x1 - y1 * y1 - z1 * z1;\n if (t1 < 0) {\n n1 = 0.0;\n } else {\n t1 *= t1;\n n1 = t1 * t1 * dot(GTAB[gi1], x1, y1, z1);\n }\n double t2 = CONTRIBUTION_FACTOR - x2 * x2 - y2 * y2 - z2 * z2;\n if (t2 < 0) {\n n2 = 0.0;\n } else {\n t2 *= t2;\n n2 = t2 * t2 * dot(GTAB[gi2], x2, y2, z2);\n }\n double t3 = CONTRIBUTION_FACTOR - x3 * x3 - y3 * y3 - z3 * z3;\n if (t3 < 0) {\n n3 = 0.0;\n } else {\n t3 *= t3;\n n3 = t3 * t3 * dot(GTAB[gi3], x3, y3, z3);\n }\n return NORMALIZE_FACTOR * (n0 + n1 + n2 + n3);\n }", "public static double noise(double x, double y, double z) {\n\n\t\tdouble s = (x+y+z)/3.0;\n\t\ti = fastfloor(x+s); j = fastfloor(y+s); k = fastfloor(z+s);\n\t\ts = (i+j+k)/6.0; u = x-i+s; v = y-j+s; w = z-k+s;\n\t\tA[0] = A[1] = A[2] = 0;\n\t\tint hi = (u>=w ? (u>=v ? 0 : 1) : (v>=w ? 1 : 2));\n\t\tint lo = (u< w ? (u< v ? 0 : 1) : (v< w ? 1 : 2));\n\t\treturn 4.0 * (K(hi) + K(3-hi-lo) + K(lo) + K(0));\n\t}", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "private float noise(Vector2 point) {\n\t\tVector2 bottomLeft = randomGrid[(int) point.x][(int) point.y];\n\t\tVector2 topLeft = randomGrid[(int) point.x][(int) point.y + 1];\n\t\tVector2 bottomRight = randomGrid[(int) point.x + 1][(int) point.y];\n\t\tVector2 topRight = randomGrid[(int) point.x + 1][(int) point.y + 1];\n\n\t\tfloat bottomLeftValue = bottomLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y));\n\t\tfloat topLeftValue = topLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y + 1));\n\t\tfloat bottomRightValue = bottomRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y));\n\t\tfloat topRightValue = topRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y + 1));\n\n\t\tfloat bottomValue = bottomLeftValue * (1 - point.x % 1) + bottomRightValue * (point.x % 1);\n\t\tfloat topValue = topLeftValue * (1 - point.x % 1) + topRightValue * (point.x % 1);\n\t\tfloat value = bottomValue * (1 - point.y % 1) + topValue * (point.y % 1);\n\n\t\treturn value;\n\t}", "public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "public abstract double gradient(double betaForDimension, int dimension);", "public native MagickImage reduceNoiseImage(double radius)\n\t\t\tthrows MagickException;", "@java.lang.Override\n public boolean hasNoiseSigma() {\n return gradientNoiseSigmaCase_ == 1;\n }", "double volume(){\n return width*height*depth;\n }", "public interface VoxelNoise {\n /*\n * This method returns the voxel type for a location\n */\n public int noise(int xin, int yin, int zin);\n}", "public abstract void makeNoise();", "double volume(){\n\n return widgh*height*depth;\n\n }", "public float getNoise(int x, int y) {\n\t\treturn getRealNoise(x * .3f, y * .3f);\n\t}", "public float gradientMethod(Slice slice) \n\t{\n\t\t//\n\t\t// Intialize variables.\n\t\t//\n\t\tint nrows = slice.getNRows();\n\t\tint ncols = slice.getNCols();\n\n\t\tfloat[] v = new float[nrows*ncols]; int v_numset = 0;\n\t\tfloat t = (float)0.0; \n\t\tfloat sig_y = (float)0.0;\n\t\tfloat sig_x = (float)0.0;\n\n\t\t//\n\t\t// Compute the column gradient\n\t\t//\n\t\tfor(int row=0; row<nrows; row++) {\n\t\t\tfor(int col=1; col<ncols-1; col++) {\n\t\t\t\tt = slice.getData(row,col+1) - (float)2.0 * slice.getData(row,col) + slice.getData(row,col-1);\n\n\t\t\t\tif( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) {\n\t\t\t\t\tv[v_numset] = t; v_numset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( v_numset <= 10 ) {\n\t\t\tsig_y = (float)0.0;\n\t\t}\n\t\telse {\n\t\t\tsig_y = vec_stdDevMod(v, v_numset);\n\t\t}\n\n\t\tv_numset = 0;\n\n\t\t//\n\t\t// Compute the row gradient\n\t\t//\n\t\tfor(int col=0; col<ncols; col++) {\n\t\t\tfor(int row=1; row<nrows-1; row++) {\n\t\t\t\tt = slice.getData(row+1,col) - (float)2.0 * slice.getData(row,col) + slice.getData(row-1,col);\n\n\t\t\t\tif( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) {\n\t\t\t\t\tv[v_numset] = t; v_numset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( v_numset <= 10 ) {\n\t\t\tsig_x = (float)0.0;\n\t\t}\n\t\telse {\n\t\t\tsig_x = vec_stdDevMod(v, v_numset);\n\t\t}\n\n\t\treturn (float)Math.sqrt( (double)(sig_x * sig_x + sig_y * sig_y) ) / (float)2.0;\n\t}", "public void calculate() {\n float xoff = 0;\n for (int i = 0; i < cols; i++)\n { \n float yoff = 0;\n for (int j = 0; j < rows; j++)\n {\n z[i][j] = map(noise(xoff, yoff,zoff), 0, 1, -120, 120);\n yoff += 0.1f;\n }\n xoff += 0.1f;\n }\n zoff+=0.01f;\n }", "public void setNoise(double noiseCoefficient) {\n this.noiseCoefficient = noiseCoefficient;\n }", "double volume() {\n\treturn width*height*depth;\n}", "public double costNEX() {\r\n double diff=0;\r\n double intensity=0;\r\n \r\n for(int x=Config.ptvXLow-0; x < Config.ptvXHigh+0; x++) {\r\n// for(int x=Solver.xBoundsTumor[0]; x < Solver.xBoundsTumor[1]; x+= Config.scaleFactor) {\r\n for(int y=Config.ptvYLow-0; y < Config.ptvYHigh+0; y++) {\r\n// for(int y=Solver.yBoundsTumor[0]; y < Solver.yBoundsTumor[1]; y+= Config.scaleFactor) {\r\n for(int z=Config.ptvZLow-0; z < Config.ptvZHigh+0; z++) {\r\n// for(int z=Solver.zBoundsTumor[0]; z < Solver.zBoundsTumor[1]; z+= Config.scaleFactor) {\r\n\r\n this.body2[x][y][z].setCurrentDosis(0.0); //Set currentPtvVoxel Dose to 0 \r\n for(int i=0; i<Config.numberOfSeeds;++i) { \r\n // Calculate intensity based based on current dwelltime\r\n intensity = this.body2[x][y][z].radiationIntensity(this.seeds2[i].getCoordinate(), New_state[i]);\r\n if (intensity>0) {\r\n// LogTool.print(\"Cost: Intensity :\" + intensity + \"@ \" + x + \" \" + y + \" \" + z,\"notification\");\r\n }\r\n this.body2[x][y][z].addCurrentDosis(intensity);\r\n } \r\n diff += Math.pow((this.body2[x][y][z].getGoalDosis()-this.body2[x][y][z].getCurrentDosis()),2);\r\n// LogTool.print(\" diffdose \" + (Looper.body2[x][y][z].getGoalDosis()-Looper.body2[x][y][z].getCurrentDosis()),\"notification\");\r\n } \r\n }\r\n }\r\n return Math.sqrt(diff);\r\n// return Math.random();\r\n }", "public double getCyclinderVolume();", "public double energy(int x, int y) {\n Color upper = picture.get(x, (y - 1 + this.height()) % this.height());\n Color lower = picture.get(x, (y + 1 + this.height()) % this.height());\n Color left = picture.get((x - 1 + this.width()) % this.width(), y);\n Color right = picture.get((x + 1 + this.width()) % this.width(), y);\n return getGradient(upper, lower) + getGradient(left, right);\n }", "@Override\r\n\t\tpublic double[] gradient(double x, double... parameters) {\n\t\t\tfinal double a = parameters[0];\r\n\t\t\tfinal double b = parameters[1];\r\n\t\t\tfinal double c = parameters[2];\r\n\t\t\tfinal double d = parameters[3];\r\n\t\t\tfinal double e = parameters[4];\r\n\t\t\t\r\n\t\t\tdouble[] gradients = new double[5];\r\n\t\t\t//double den = 1 + Math.pow((x+e)/c, b);\r\n\t\t\t//gradients[0] = 1 / den; // Yes a Derivation \r\n\t\t\t//gradients[1] = -((a - d) * Math.pow(x / c, b) * Math.log(x / c)) / (den * den); // Yes b Derivation \r\n\t\t\t//gradients[2] = (b * Math.pow(x / c, b - 1) * (x / (c * c)) * (a - d)) / (den * den); // Yes c Derivation \r\n\t\t\t//gradients[3] = 1 - (1 / den); // Yes d Derivation \r\n\t\t\t\r\n\t\t\t//Derivation\r\n\t\t\tfinal double c_b = Math.pow(c, b);\r\n\t\t\tfinal double c_b1 = Math.pow(c, b+1.);\r\n\t\t\tfinal double c_2b = Math.pow(c, 2.*b);\r\n\t\t\tfinal double c_2b1 = Math.pow(c, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tfinal double xe_b = Math.pow(x+e, b);\r\n\t\t\tfinal double xe_2b = Math.pow(x+e, 2.*b);\r\n\t\t\tfinal double xe_2b1 = Math.pow(x+e, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tgradients[0] = c_b/(xe_b+c_b);\r\n\t\t\tgradients[1] = ((c_b*d-a*c_b)*xe_b*Math.log(x+e)+(a*c_b*Math.log(c)-c_b*Math.log(c)*d)*xe_b)/(xe_2b+2*c_b*xe_b+c_2b);\r\n\t\t\tgradients[2] = -((b*c_b*d-a*b*c_b)*xe_b)/(c*xe_2b+2*c_b1*xe_b+c_2b1);\r\n\t\t\tgradients[3] = xe_b/(xe_b+c_b);\r\n\t\t\tgradients[4] = ((b*c_b*d-a*b*c_b)*xe_b)/(xe_2b1+xe_b*(2*c_b*x+2*c_b*e)+c_2b*x+c_2b*e);\r\n\t\t\treturn gradients;\r\n\t\t}", "public void makeSilence(int channel) {\n\t\tmakeSilence(channel, 0, getSampleCount());\n\t}", "public Builder clearNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n gradientNoiseSigmaCase_ = 0;\n gradientNoiseSigma_ = null;\n onChanged();\n }\n return this;\n }", "boolean hasNoise();", "double volume()\n\t{\n\t\t\n\t\treturn width*height*depth;\n\t\t\n\t}", "protected abstract void getPotentiometerValue(int value, int channelNo);", "public double getNoiseMean() {\n\t\t\treturn NOISE_MEAN;\n\t\t}", "public double noise2D(double xin, double yin) {\n double n0, n1, n2;\n double s = (xin + yin) * F2;\n int i = fastfloor(xin + s);\n int j = fastfloor(yin + s);\n double t = (i + j) * G2;\n double X0 = i - t;\n double Y0 = j - t;\n double x0 = xin - X0;\n double y0 = yin - Y0;\n int i1, j1;\n if(x0 > y0) {\n i1 = 1;\n j1 = 0;\n } else {\n i1 = 0;\n j1 = 1;\n }\n double x1 = x0 - i1 + G2;\n double y1 = y0 - j1 + G2;\n double x2 = x0 - 1.0 + 2.0 * G2;\n double y2 = y0 - 1.0 + 2.0 * G2;\n int ii = i & (SUPPLY_LENGTH - 1);\n int jj = j & (SUPPLY_LENGTH - 1);\n int gi0 = permMod12[perm[ii + perm[jj]]];\n int gi1 = permMod12[perm[ii + i1 + perm[jj + j1]]];\n int gi2 = permMod12[perm[ii + 1 + perm[jj + 1]]];\n double t0 = CONTRIBUTION_FACTOR - x0 * x0 - y0 * y0;\n if(t0 < 0) {\n n0 = 0.0;\n } else {\n t0 *= t0;\n n0 = t0 * t0 * dot(GTAB[gi0], x0, y0, 0);\n }\n double t1 = CONTRIBUTION_FACTOR - x1 * x1 - y1 * y1;\n if(t1 < 0) {\n n1 = 0.0;\n } else {\n t1 *= t1;\n n1 = t1 * t1 * dot(GTAB[gi1], x1, y1, 0);\n }\n double t2 = CONTRIBUTION_FACTOR - x2 * x2 - y2 * y2;\n if(t2 < 0) {\n n2 = 0.0;\n } else {\n t2 *= t2;\n n2 = t2 * t2 * dot(GTAB[gi2], x2, y2, 0);\n }\n return NORMALIZE_FACTOR_2D * (n0 + n1 + n2);\n }", "public VoxelGradient getGradient(int x, int y, int z) {\r\n return data[x + dimX * (y + dimY * z)];\r\n }", "public void calcVolume() {\n this.vol = (0.6666666666666667 * Math.PI) * Math.pow(r, 3);\n }", "private static void filterNoise(BufferedImage image) {\n\t\tfor (int x=0; x<image.getWidth(); x++) {\r\n\t\t\tfor (int y=0; y<image.getHeight(); y++) {\r\n\t\t\t\t\r\n\t\t\t\tint pixelVal = image.getRGB(x, y);\r\n\r\n\t\t\t\t// check how many pixels in a 2 x 2 rectangle with this point \r\n\t\t\t\t// in the center have the same color as this point; if not \r\n\t\t\t\t// many, flip this pixel's color\r\n\t\t\t\tint startX = Math.max(x-2, 0);\r\n\t\t\t\tint startY = Math.max(y-2, 0);\r\n\t\t\t\tint endX = Math.min(x+2, image.getWidth()-1);\r\n\t\t\t\tint endY = Math.min(y+2, image.getHeight()-1);\r\n\r\n\t\t\t\tint matchCount = 0;\r\n\t\t\t\tint totalCount = 0;\r\n\t\t\t\tfor (int i=startX; i<=endX; i++) {\r\n\t\t\t\t\tfor (int j=startY; j<=endY; j++) {\r\n\t\t\t\t\t\tif (image.getRGB(i,j) == pixelVal) {\r\n\t\t\t\t\t\t\tmatchCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttotalCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ((matchCount / (double) totalCount) < .2) {\r\n\t\t\t\t\tif (pixelVal == Color.YELLOW.getRGB()) {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.BLACK.getRGB());\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.YELLOW.getRGB());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (debug) {\r\n\t\t\ttry {\r\n\t\t\t\tImageIO.write(image, \"gif\", new File(\"noiseFiltered.gif\"));\r\n\t\t\t} catch (Exception e) {e.printStackTrace();}\r\n\t\t}\r\n\t}", "public final Image getNormal(final double intensity) {\n if (width * height < RESOLUTION_HIGH) {\n return null;\n }\n WritableImage img = new WritableImage(width, height);\n PixelWriter writer = img.getPixelWriter();\n normalLoop:\n for (int j = 0; j < height; j++) {\n for (int i = 0; i < width; i++) {\n if (Thread.interrupted()) {\n break normalLoop;\n }\n double tl = noiseBuffer[(height + j - 1) % height]\n [(width + i - 1) % width];\n double t = noiseBuffer[(height + j - 1) % height][i];\n double tr = noiseBuffer[(height + j - 1) % height]\n [(i + 1) % width];\n double r = noiseBuffer[j][(i + 1) % width];\n double br = noiseBuffer[(j + 1) % height][(i + 1) % width];\n double b = noiseBuffer[(j + 1) % height][i];\n double bl = noiseBuffer[(j + 1) % height]\n [(width + i - 1) % width];\n double l = noiseBuffer[j][(width + i - 1) % width];\n double dx = (tl + 2.0 * l + bl) - (tr + 2.0 * r + br);\n double dy = (tl + 2.0 * t + tr) - (bl + 2.0 * b + br);\n double dz = 1.0 / intensity;\n double mag = Math.sqrt(dx * dx + dy * dy + dz * dz);\n dx = (1 + dx / mag) / 2.0;\n dy = (1 + dy / mag) / 2.0;\n dz = (1 + dz / mag) / 2.0;\n writer.setColor(i, j, Color.color(dx, dy, dz));\n }\n }\n return img;\n }", "public abstract void newSpeechNoise(long ms, int n);", "public static double noise(double x, double y, double z, double w){\n\t\t\n\t\tdouble n0,n1,n2,n3,n4; // Noise contributions from the five corners\n\t\t// Skew the (x,y,z,w) space to determine which cell of 24 simplices we're in\n\t\tdouble s=(x+y+z+w)*F4; // Factor for 4D skewing\n\t\tint i=fastfloor(x+s);\n\t\tint j=fastfloor(y+s);\n\t\tint k=fastfloor(z+s);\n\t\tint l=fastfloor(w+s);\n\t\tdouble t=(i+j+k+l)*G4; // Factor for 4D unskewing\n\t\tdouble X0=i-t; // Unskew the cell origin back to (x,y,z,w) space\n\t\tdouble Y0=j-t;\n\t\tdouble Z0=k-t;\n\t\tdouble W0=l-t;\n\t\tdouble x0=x-X0; // The x,y,z,w distances from the cell origin\n\t\tdouble y0=y-Y0;\n\t\tdouble z0=z-Z0;\n\t\tdouble w0=w-W0;\n\t\t// For the 4D case, the simplex is a 4D shape I won't even try to describe.\n\t\t// To find out which of the 24 possible simplices we're in, we need to\n\t\t// determine the magnitude ordering of x0, y0, z0 and w0.\n\t\t// Six pair-wise comparisons are performed between each possible pair\n\t\t// of the four coordinates, and the results are used to rank the numbers.\n\t\tint rankx=0;\n\t\tint ranky=0;\n\t\tint rankz=0;\n\t\tint rankw=0;\n\t\tif(x0>y0) rankx++;\n\t\telse ranky++;\n\t\tif(x0>z0) rankx++;\n\t\telse rankz++;\n\t\tif(x0>w0) rankx++;\n\t\telse rankw++;\n\t\tif(y0>z0) ranky++;\n\t\telse rankz++;\n\t\tif(y0>w0) ranky++;\n\t\telse rankw++;\n\t\tif(z0>w0) rankz++;\n\t\telse rankw++;\n\t\tint i1,j1,k1,l1; // The integer offsets for the second simplex corner\n\t\tint i2,j2,k2,l2; // The integer offsets for the third simplex corner\n\t\tint i3,j3,k3,l3; // The integer offsets for the fourth simplex corner\n\t\t// [rankx, ranky, rankz, rankw] is a 4-vector with the numbers 0, 1, 2 and 3\n\t\t// in some order. We use a thresholding to set the coordinates in turn.\n\t\t// Rank 3 denotes the largest coordinate.\n\t\ti1=rankx>=3?1:0;\n\t\tj1=ranky>=3?1:0;\n\t\tk1=rankz>=3?1:0;\n\t\tl1=rankw>=3?1:0;\n\t\t// Rank 2 denotes the second largest coordinate.\n\t\ti2=rankx>=2?1:0;\n\t\tj2=ranky>=2?1:0;\n\t\tk2=rankz>=2?1:0;\n\t\tl2=rankw>=2?1:0;\n\t\t// Rank 1 denotes the second smallest coordinate.\n\t\ti3=rankx>=1?1:0;\n\t\tj3=ranky>=1?1:0;\n\t\tk3=rankz>=1?1:0;\n\t\tl3=rankw>=1?1:0;\n\t\t// The fifth corner has all coordinate offsets = 1, so no need to compute that.\n\t\tdouble x1=x0-i1+G4; // Offsets for second corner in (x,y,z,w) coords\n\t\tdouble y1=y0-j1+G4;\n\t\tdouble z1=z0-k1+G4;\n\t\tdouble w1=w0-l1+G4;\n\t\tdouble x2=x0-i2+2.0*G4; // Offsets for third corner in (x,y,z,w) coords\n\t\tdouble y2=y0-j2+2.0*G4;\n\t\tdouble z2=z0-k2+2.0*G4;\n\t\tdouble w2=w0-l2+2.0*G4;\n\t\tdouble x3=x0-i3+3.0*G4; // Offsets for fourth corner in (x,y,z,w) coords\n\t\tdouble y3=y0-j3+3.0*G4;\n\t\tdouble z3=z0-k3+3.0*G4;\n\t\tdouble w3=w0-l3+3.0*G4;\n\t\tdouble x4=x0-1.0+4.0*G4; // Offsets for last corner in (x,y,z,w) coords\n\t\tdouble y4=y0-1.0+4.0*G4;\n\t\tdouble z4=z0-1.0+4.0*G4;\n\t\tdouble w4=w0-1.0+4.0*G4;\n\t\t// Work out the hashed gradient indices of the five simplex corners\n\t\tint ii=i&255;\n\t\tint jj=j&255;\n\t\tint kk=k&255;\n\t\tint ll=l&255;\n\t\tint gi0=perm[ii+perm[jj+perm[kk+perm[ll]]]]%32;\n\t\tint gi1=perm[ii+i1+perm[jj+j1+perm[kk+k1+perm[ll+l1]]]]%32;\n\t\tint gi2=perm[ii+i2+perm[jj+j2+perm[kk+k2+perm[ll+l2]]]]%32;\n\t\tint gi3=perm[ii+i3+perm[jj+j3+perm[kk+k3+perm[ll+l3]]]]%32;\n\t\tint gi4=perm[ii+1+perm[jj+1+perm[kk+1+perm[ll+1]]]]%32;\n\t\t// Calculate the contribution from the five corners\n\t\tdouble t0=0.6-x0*x0-y0*y0-z0*z0-w0*w0;\n\t\tif(t0<0) n0=0.0;\n\t\telse{\n\t\t\tt0*=t0;\n\t\t\tn0=t0*t0*dot(grad4[gi0], x0, y0, z0, w0);\n\t\t}\n\t\tdouble t1=0.6-x1*x1-y1*y1-z1*z1-w1*w1;\n\t\tif(t1<0) n1=0.0;\n\t\telse{\n\t\t\tt1*=t1;\n\t\t\tn1=t1*t1*dot(grad4[gi1], x1, y1, z1, w1);\n\t\t}\n\t\tdouble t2=0.6-x2*x2-y2*y2-z2*z2-w2*w2;\n\t\tif(t2<0) n2=0.0;\n\t\telse{\n\t\t\tt2*=t2;\n\t\t\tn2=t2*t2*dot(grad4[gi2], x2, y2, z2, w2);\n\t\t}\n\t\tdouble t3=0.6-x3*x3-y3*y3-z3*z3-w3*w3;\n\t\tif(t3<0) n3=0.0;\n\t\telse{\n\t\t\tt3*=t3;\n\t\t\tn3=t3*t3*dot(grad4[gi3], x3, y3, z3, w3);\n\t\t}\n\t\tdouble t4=0.6-x4*x4-y4*y4-z4*z4-w4*w4;\n\t\tif(t4<0) n4=0.0;\n\t\telse{\n\t\t\tt4*=t4;\n\t\t\tn4=t4*t4*dot(grad4[gi4], x4, y4, z4, w4);\n\t\t}\n\t\t// Sum up and scale the result to cover the range [-1,1]\n\t\treturn 27.0*(n0+n1+n2+n3+n4);\n\t}", "public void injectSomeMoreNoise(double intensity) {\n//\t\taddBSCnoise(lambda,intensity);\n\t\t\n//\t\taddBSCnoise(posterior, intensity);\n//\t\tfor (int i=0; i<n; i++) lambda[i] = posterior[i];\n//\t\tcalc_q0 (posterior);\n//\n//\t\t// initialization of beta\n//\t\tfor (int i = 0; i <= m - 1; i++) {\n//\t\t\tfor (int j = 0; j <= row_weight[i] - 1; j++) {\n//\t\t\t\tbeta[i][j] = 0.0;\n//\t\t\t}\n//\t\t}\t\t\n\t\t\n\t}", "Gradient gradientAt(Point point);", "int computeGradient(\n int gx, int gy);", "private static void vel_step ( int N, double[] u, double[] v, double[] u0, double[] v0,\r\n\t\tfloat visc, float dt )\r\n\t\t{\r\n\t\tadd_source ( N, u, u0, dt ); add_source ( N, v, v0, dt );\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\t\r\n\t\t//SWAP ( u0, u ); \r\n\t\t\r\n\t\tdouble[] temp;\r\n\t\ttemp=u0;\r\n\t\tu0=u;\r\n\t\tu=temp;\r\n\t\t//draw_dens ( N, u );\r\n\t\tdiffuse ( N, 1, u, u0, visc, dt );\r\n\t\t//draw_dens ( N, u );\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t//SWAP ( v0, v ); \r\n\t\t//double[] temp;\r\n\t\ttemp=v0;\r\n\t\tv0=v;\r\n\t\tv=temp;\r\n\t\t//draw_dens ( N, v );\r\n\t\t//draw_dens ( N, v0 );\r\n\t\tdiffuse ( N, 2, v, v0, visc, dt );\r\n\t\t//draw_dens ( N, v );\r\n\t\t//System.out.println(\"V\");\r\n\t\t//draw_dens ( N, v );\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\tproject ( N, u, v, u0, v0 );\r\n\t\t//SWAP ( u0, u ); \r\n\t\ttemp=u0;\r\n\t\tu0=u;\r\n\t\tu=temp;\r\n\t\t\r\n\t\t//SWAP ( v0, v );\r\n\t\ttemp=v0;\r\n\t\tv0=v;\r\n\t\tv=temp;\r\n\t\t//System.out.println(\"V\");\r\n\t\t//draw_dens ( N, v );\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\t\r\n\t\tadvect ( N, 1, u, u0, u0, v0, dt ); \r\n\t\tadvect ( N, 2, v, v0, u0, v0, dt );\r\n\t\tproject ( N, u, v, u0, v0 );\r\n\t\t}", "public void useUniformDeviates(){\n this.gaussianDeviates = false;\n }", "public void gaussianSmooth(Img i, double sigma) {\n int half = (int) (sigma * Math.sqrt(6 * Math.log(10)));\n int size = 1 + 2 * half;\n System.out.printf(\"Size: %d\\n\", size);\n double[] mask = new double[size];\n double mask_sum = 0;\n for (int k = 0; k <= half; k++) {\n double value = Math.exp(-k * k / (2 * sigma * sigma)) / (sigma * Math.sqrt(2 * Math.PI));\n mask_sum += (k == 0) ? value : value * 2;\n mask[half + k] = value;\n mask[half - k] = value;\n }\n // normalize the mask\n for (int k = 0; k < size; k++) {\n mask[k] = mask[k] / mask_sum;\n }\n System.out.printf(\"Mask: %s\\n\", Arrays.toString(mask));\n\n // 2D convolution using 1D mask in x\n double[] i_temp = new double[i.img.length];\n for (int x = 0; x < i.img.length; x++) {\n i_temp[x] = (double) (i.img[x] & 0xFF);\n }\n for (int x = half; x < i.height - half; x++) {\n for (int y = half; y < i.width - half; y++) {\n i_temp[x * i.width + y] = 0;\n for (int s = -half; s <= half; s++) {\n i_temp[x * i.width + y] += (double) (i.img[(x + s) * i.width + y] & 0xFF) * mask[half - s];\n }\n }\n }\n\n // 2D convolution using 1D mask in y\n for (int x = half; x < i.height - half; x++) {\n for (int y = half; y < i.width - half; y++) {\n double f = 0;\n for (int s = -half; s <= half; s++) {\n f += i_temp[x * i.width + y + s] * mask[half - s];\n }\n i.img[x * i.width + y] = (byte) f;\n }\n }\n }", "public double energy(int x, int y) {\n if (x >= current.width() || x < 0 || y >= current.height() || y < 0)\n throw new IndexOutOfBoundsException(String.format(\n \"Pixel (%d, %d) out of bounds\", x, y));\n if (x == 0 || y == 0 || x == current.width() - 1\n || y == current.height() - 1)\n return 195075;\n\n Color topPixel = current.get(x - 1, y);\n Color bottomPixel = current.get(x + 1, y);\n Color leftPixel = current.get(x, y - 1);\n Color rightPixel = current.get(x, y + 1);\n\n return dualGradientEnergy(topPixel, bottomPixel)\n + dualGradientEnergy(leftPixel, rightPixel);\n\n }", "java.lang.String getNoise();", "public float getDCM();", "protected abstract double evaluateChannel(final long channelId);", "public static int numDimensions_infos_noise() {\n return 1;\n }", "public boolean hasNoiseSigma() {\n return gradientNoiseSigmaCase_ == 1;\n }", "private double calcPixelEnergy(int col, int row) {\n\n /* Surrounding pixels used to calculate energy of given pixel. For border\n * pixels, use opposite column or row instead. */\n int right = (col == width - 1) ? 0 : col + 1;\n int left = (col == 0) ? width - 1 : col - 1;\n int up = (row == 0) ? height - 1 : row - 1;\n int down = (row == height - 1) ? 0 : row + 1;\n\n return Math.sqrt(\n Math.pow(getRGB(right, row, R) - getRGB(left, row, R), 2)\n + Math.pow(getRGB(right, row, G) - getRGB(left, row, G), 2)\n + Math.pow(getRGB(right, row, B) - getRGB(left, row, B), 2)\n + Math.pow(getRGB(col, up, R) - getRGB(col, down, R), 2)\n + Math.pow(getRGB(col, up, G) - getRGB(col, down, G), 2)\n + Math.pow(getRGB(col, up, B) - getRGB(col, down, B), 2));\n }", "private double noisyIntensity(double value) {\n\n\t\t// add multiplicative noise: log the value, add noise then take the exp\n\t\tdouble logValue = Math.log(value);\n\t\tdouble multiplicativeNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getIntensityStdev());\n\t\tlogValue += multiplicativeNoise;\n\t\tvalue = Math.exp(logValue);\n\n\t\t// then add additive noise as well\n\t\tdouble additiveNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getIntensityStdev());\n\t\tvalue += additiveNoise;\n\t\t\n\t\t// value must always be >= 0\n\t\tif (value < 0) {\n\t\t\tvalue = 0;\n\t\t}\n\t\treturn value;\n\n\t}", "private void gradientMagnitude3D(float[] img, float[] mag) {\r\n int slice, row, col, cIndex, sIndex;\r\n float lVal, rVal, tVal, bVal, zLowVal, zHighVal;\r\n int sliceSize = yDim*xDim;\r\n for (slice = 0; slice < zDim; slice++) {\r\n sIndex = slice * sliceSize;\r\n for (row = 0; row < yDim; row++) {\r\n cIndex = sIndex + row * xDim;\r\n for (col = 0, cIndex += col; col < xDim; cIndex++, col++) {\r\n\r\n rVal = getVal(img, col+1, row, slice);\r\n lVal = getVal(img, col-1, row, slice);\r\n tVal = getVal(img, col, row+1, slice);\r\n bVal = getVal(img, col, row-1, slice);\r\n zLowVal = getVal(img, col, row, slice-1);\r\n zHighVal = getVal(img, col, row, slice+1);\r\n\r\n mag[cIndex] = (float)Math.sqrt((rVal - lVal) * (rVal - lVal) +\r\n (tVal - bVal) * (tVal - bVal) +\r\n (zHighVal - zLowVal) * (zHighVal - zLowVal));\r\n } // for (col = 0; ...)\r\n } // for (row = 0; ...)\r\n } // for (slice = 0; ...)\r\n }", "@Override\n\tpublic void makeNoise() {\n\t\tSystem.out.println(\"Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink \");\n\t}", "private double noisyRt(double value) {\n\n\t\t// then add additive noise as well\n\t\tdouble additiveNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getRtStdev());\n\t\tvalue += additiveNoise;\n\t\t\n\t\t// value must always be >= 0\n\t\tif (value < 0) {\n\t\t\tvalue = 0;\n\t\t}\n\t\treturn value;\n\n\t}", "double cekStop(double x[][], double v0[],double v[][],double w0[],double w[][], double t[]){\n double akumY=0;\n //~ itung z_in dan z\n for(int h=0; h<jumlah_data; h++){\n for(int j=0; j<unit_hidden; j++){\n //itung sigma xi vij\n double jum_xv=0;\n for(int i=0; i<unit_input; i++){\n double cc=x[h][i]*v[i][j];\n jum_xv=jum_xv+cc;\n //System.out.println(x[h][j]);\n }\n z_in[j]=v0[j]+jum_xv;\n //itung z\n z[j]=1/(1+(double)Math.exp(-z_in[j]));\n //System.out.println(\" dan z= \"+z[j]);\n }\n \n //~ itung y_in dan y (output)\n double cxc=0;\n for(int k=0; k<unit_output; k++){\n double jum_zw=0;\n for(int j=0; j<unit_hidden; j++){\n double cc=z[j]*w[j][k];\n jum_zw=jum_zw+cc;\n }\n y_in[k]=w0[k]+jum_zw;\n y[k]=1/(1+(double)Math.exp(-y_in[k]));\n akumY = akumY + Math.pow((t[h]-y[k]),2);\n //System.out.println(t[h]+\"-\"+y[k]+\"=\"+(t[k]-y[k]));\n }\n }\n double E = 0.5 * akumY;\n //System.out.println(E);\n return E;\n }", "public void makeNoise(double climbSinkRate, long lastTime) {\n\t\tif(climbSinkRate>this.notificationClimbRate) {\n\t\t\tLog.d(\"reason\", \"climbSinkRate>this.notificationClimbRate: \"+ climbSinkRate);\n\t\t\t\n\t\t\tif(climbSinkRate-speedThreshold>=0) {\n\t\t\t\tmakeSingleNoise((int)Math.round((Math.min(climbSinkRate,speedThreshold+climbSteps)-speedThreshold)*(climbSoundWidth/climbSteps)+climbStart));\n\t\t\t}\n\t\t\tcontinuousNoiseCommunication.setFrequencyAndTime(0, SystemClock.elapsedRealtime());\n\t\t}\n\t\telse if(climbSinkRate<this.notificationSinkRate) {\n\t\t\tLog.d(\"reason\", \"climbSinkRate<this.notificationSinkRate: \"+ climbSinkRate+\" this.notificationSinkRate\"+this.notificationSinkRate );\n\t\t\tdouble sinkRate=climbSinkRate*-1;\n\t\t\tif(sinkRate-speedThreshold>=0) {\n\t\t\t\tint frequency=(int)Math.round((Math.min(sinkRate,speedThreshold+sinkSteps)-speedThreshold)*(sinkSoundWidth/sinkSteps)+sinkStart);\n\t\t\t\tcontinuousNoiseCommunication.setFrequencyAndTime(frequency, SystemClock.elapsedRealtime());\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tcontinuousNoiseCommunication.setFrequencyAndTime(0, SystemClock.elapsedRealtime());\n\t\t}\n\t\t\n\t}", "public void calculateGradients(int dataIndex, double learningRate){\r\n for (int i = 0; i < outputLayer.length; i++) {\r\n for (int j = 0; j < outputLayer[i].weights.length; j++) {\r\n outputLayer[i].dw[j] = -2*((attribute[dataIndex] == i ? 1 : 0) - sigmoid(outputLayer[i].z))*sigmoidDeri(outputLayer[i].z)*outputLayer[i].data[j];\r\n }\r\n outputLayer[i].db = -2*((attribute[dataIndex] == i ? 1 : 0) - sigmoid(outputLayer[i].z))*sigmoidDeri(outputLayer[i].z);\r\n }\r\n\r\n adjust(learningRate, true);\r\n calculateDesireHiddenLayerActivation(dataIndex);\r\n\r\n for (int i = 0; i < hiddenLayer.length; i++) {\r\n for (int j = 0; j < hiddenLayer[i].weights.length; j++) {\r\n hiddenLayer[i].dw[j] = -2*(desireHiddenLayerActivation[i] - hiddenLayer[i].a)*sigmoidDeri(hiddenLayer[i].z)*hiddenLayer[i].data[j];\r\n }\r\n hiddenLayer[i].db = -2*(desireHiddenLayerActivation[i] - hiddenLayer[i].a)*sigmoidDeri(hiddenLayer[i].z);\r\n }\r\n\r\n adjust(learningRate, false);\r\n }", "private static final void silk_PLC_energy(/*final int[] energy1, final int[] shift1, final int[] energy2, final int[] shift2,*/\r\n\t\t\tfinal Jenergy_struct_aux aux,// java\r\n\t\t\tfinal int[] exc_Q14, final int[] prevGain_Q10, final int subfr_length, final int nb_subfr)\r\n\t{\r\n\t\t// SAVE_STACK;\r\n\t\tfinal short[] exc_buf = new short[subfr_length << 1];\r\n\t\t/* Find random noise component */\r\n\t\t/* Scale previous excitation signal */\r\n\t\tint exc_buf_ptr = 0;// exc_buf[ exc_buf_ptr ]\r\n\t\tfor( int k = 0; k < 2; k++ ) {\r\n\t\t\tfor( int i = 0; i < subfr_length; i++ ) {\r\n\t\t\t\tfinal int v = ((int)(((long)exc_Q14[ i + ( k + nb_subfr - 2 ) * subfr_length ] * prevGain_Q10[ k ]) >> 16)) << 8;// java\r\n\t\t\t\texc_buf[ exc_buf_ptr + i ] = (short)(v > Short.MAX_VALUE ? Short.MAX_VALUE : (v < Short.MIN_VALUE ? Short.MIN_VALUE : v));\r\n\t\t\t}\r\n\t\t\texc_buf_ptr += subfr_length;\r\n\t\t}\r\n\t\t/* Find the subframe with lowest energy of the last two and use that as random noise generator */\r\n\t\tfinal long energy_shift1 = silk_sum_sqr_shift( /*energy1, shift1,*/ exc_buf, 0, subfr_length );\r\n\t\tfinal long energy_shift2 = silk_sum_sqr_shift( /*energy2, shift2,*/ exc_buf, subfr_length, subfr_length );\r\n\t\t// RESTORE_STACK;\r\n\t\taux.energy1 = (int)(energy_shift1 >>> 32);\r\n\t\taux.shift1 = (int)energy_shift1;\r\n\t\taux.energy2 = (int)(energy_shift2 >>> 32);\r\n\t\taux.shift2 = (int)energy_shift2;\r\n\t}", "float getPostGain();", "private void gradientDecent(double[][] X, double[] y){\n double[] h = matrix.sigmoid(matrix.multiply(X,Theta));\n double[] cp = costPrime(X,h,y);\n\n double scp = 0;\n for(double i: cp){\n scp = scp + i;\n }\n System.out.println(+ cost(h,y));\n // Average Cost\n scp = round(scp/h.length,5);\n System.out.println(scp);\n int j = 0;\n\n // while Average Cost is not 0\n while(scp > 0.00001){\n Theta = matrix.subtract(Theta,matrix.multiply(alpha,cp));\n h = matrix.sigmoid(matrix.multiply(X,Theta));\n cp = costPrime(X,h,y);\n double sum = 0;\n for(double i: cp){\n sum = sum + i;\n }\n scp = round(sum/h.length,5);\n System.out.println(scp);\n }\n }", "public Builder setNoiseSigma(float value) {\n\n gradientNoiseSigmaCase_ = 1;\n gradientNoiseSigma_ = value;\n onChanged();\n return this;\n }", "protected double compute(int sample) {\n\t\tdouble v = Math.sin((double) sample * 2.0 * Math.PI * (double) frequency\n\t\t\t\t/ (double) AudioSequence.SAMPLES_PER_SECOND);\n\t\treturn v;\n\t}", "public void highscorenoise()\n {\n if(!mute)\n {\n try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Darkmoon Caverns.wav\");\n double c = Math.random();\n if(c<=.25)\n url = this.getClass().getClassLoader().getResource(\"Mario Kart Win.wav\");\n else if(c<=.50)\n url = this.getClass().getClassLoader().getResource(\"Pirate Lagoon.wav\");\n else if(c<=.75)\n url = this.getClass().getClassLoader().getResource(\"Crescent Island.wav\"); \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n hclip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n hclip.open(audioIn); \n \n hclip.start();\n hclip.loop(Clip.LOOP_CONTINUOUSLY);\n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n }\n }", "public void populateNoiseArray(double[] p_76308_1_, double p_76308_2_, double p_76308_4_, double p_76308_6_, int p_76308_8_, int p_76308_9_, int p_76308_10_, double p_76308_11_, double p_76308_13_, double p_76308_15_, double p_76308_17_) {\n/* 81 */ if (p_76308_9_ == 1) {\n/* */ \n/* 83 */ boolean var64 = false;\n/* 84 */ boolean var65 = false;\n/* 85 */ boolean var21 = false;\n/* 86 */ boolean var68 = false;\n/* 87 */ double var70 = 0.0D;\n/* 88 */ double var73 = 0.0D;\n/* 89 */ int var75 = 0;\n/* 90 */ double var77 = 1.0D / p_76308_17_;\n/* */ \n/* 92 */ for (int var30 = 0; var30 < p_76308_8_; var30++) {\n/* */ \n/* 94 */ double var31 = p_76308_2_ + var30 * p_76308_11_ + this.xCoord;\n/* 95 */ int var78 = (int)var31;\n/* */ \n/* 97 */ if (var31 < var78)\n/* */ {\n/* 99 */ var78--;\n/* */ }\n/* */ \n/* 102 */ int var34 = var78 & 0xFF;\n/* 103 */ var31 -= var78;\n/* 104 */ double var35 = var31 * var31 * var31 * (var31 * (var31 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 106 */ for (int var37 = 0; var37 < p_76308_10_; var37++)\n/* */ {\n/* 108 */ double var38 = p_76308_6_ + var37 * p_76308_15_ + this.zCoord;\n/* 109 */ int var40 = (int)var38;\n/* */ \n/* 111 */ if (var38 < var40)\n/* */ {\n/* 113 */ var40--;\n/* */ }\n/* */ \n/* 116 */ int var41 = var40 & 0xFF;\n/* 117 */ var38 -= var40;\n/* 118 */ double var42 = var38 * var38 * var38 * (var38 * (var38 * 6.0D - 15.0D) + 10.0D);\n/* 119 */ int var19 = this.permutations[var34] + 0;\n/* 120 */ int var66 = this.permutations[var19] + var41;\n/* 121 */ int var67 = this.permutations[var34 + 1] + 0;\n/* 122 */ int var22 = this.permutations[var67] + var41;\n/* 123 */ var70 = lerp(var35, func_76309_a(this.permutations[var66], var31, var38), grad(this.permutations[var22], var31 - 1.0D, 0.0D, var38));\n/* 124 */ var73 = lerp(var35, grad(this.permutations[var66 + 1], var31, 0.0D, var38 - 1.0D), grad(this.permutations[var22 + 1], var31 - 1.0D, 0.0D, var38 - 1.0D));\n/* 125 */ double var79 = lerp(var42, var70, var73);\n/* 126 */ int var10001 = var75++;\n/* 127 */ p_76308_1_[var10001] = p_76308_1_[var10001] + var79 * var77;\n/* */ }\n/* */ \n/* */ } \n/* */ } else {\n/* */ \n/* 133 */ int var19 = 0;\n/* 134 */ double var20 = 1.0D / p_76308_17_;\n/* 135 */ int var22 = -1;\n/* 136 */ boolean var23 = false;\n/* 137 */ boolean var24 = false;\n/* 138 */ boolean var25 = false;\n/* 139 */ boolean var26 = false;\n/* 140 */ boolean var27 = false;\n/* 141 */ boolean var28 = false;\n/* 142 */ double var29 = 0.0D;\n/* 143 */ double var31 = 0.0D;\n/* 144 */ double var33 = 0.0D;\n/* 145 */ double var35 = 0.0D;\n/* */ \n/* 147 */ for (int var37 = 0; var37 < p_76308_8_; var37++) {\n/* */ \n/* 149 */ double var38 = p_76308_2_ + var37 * p_76308_11_ + this.xCoord;\n/* 150 */ int var40 = (int)var38;\n/* */ \n/* 152 */ if (var38 < var40)\n/* */ {\n/* 154 */ var40--;\n/* */ }\n/* */ \n/* 157 */ int var41 = var40 & 0xFF;\n/* 158 */ var38 -= var40;\n/* 159 */ double var42 = var38 * var38 * var38 * (var38 * (var38 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 161 */ for (int var44 = 0; var44 < p_76308_10_; var44++) {\n/* */ \n/* 163 */ double var45 = p_76308_6_ + var44 * p_76308_15_ + this.zCoord;\n/* 164 */ int var47 = (int)var45;\n/* */ \n/* 166 */ if (var45 < var47)\n/* */ {\n/* 168 */ var47--;\n/* */ }\n/* */ \n/* 171 */ int var48 = var47 & 0xFF;\n/* 172 */ var45 -= var47;\n/* 173 */ double var49 = var45 * var45 * var45 * (var45 * (var45 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 175 */ for (int var51 = 0; var51 < p_76308_9_; var51++) {\n/* */ \n/* 177 */ double var52 = p_76308_4_ + var51 * p_76308_13_ + this.yCoord;\n/* 178 */ int var54 = (int)var52;\n/* */ \n/* 180 */ if (var52 < var54)\n/* */ {\n/* 182 */ var54--;\n/* */ }\n/* */ \n/* 185 */ int var55 = var54 & 0xFF;\n/* 186 */ var52 -= var54;\n/* 187 */ double var56 = var52 * var52 * var52 * (var52 * (var52 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 189 */ if (var51 == 0 || var55 != var22) {\n/* */ \n/* 191 */ var22 = var55;\n/* 192 */ int var69 = this.permutations[var41] + var55;\n/* 193 */ int var71 = this.permutations[var69] + var48;\n/* 194 */ int var72 = this.permutations[var69 + 1] + var48;\n/* 195 */ int var74 = this.permutations[var41 + 1] + var55;\n/* 196 */ int var75 = this.permutations[var74] + var48;\n/* 197 */ int var76 = this.permutations[var74 + 1] + var48;\n/* 198 */ var29 = lerp(var42, grad(this.permutations[var71], var38, var52, var45), grad(this.permutations[var75], var38 - 1.0D, var52, var45));\n/* 199 */ var31 = lerp(var42, grad(this.permutations[var72], var38, var52 - 1.0D, var45), grad(this.permutations[var76], var38 - 1.0D, var52 - 1.0D, var45));\n/* 200 */ var33 = lerp(var42, grad(this.permutations[var71 + 1], var38, var52, var45 - 1.0D), grad(this.permutations[var75 + 1], var38 - 1.0D, var52, var45 - 1.0D));\n/* 201 */ var35 = lerp(var42, grad(this.permutations[var72 + 1], var38, var52 - 1.0D, var45 - 1.0D), grad(this.permutations[var76 + 1], var38 - 1.0D, var52 - 1.0D, var45 - 1.0D));\n/* */ } \n/* */ \n/* 204 */ double var58 = lerp(var56, var29, var31);\n/* 205 */ double var60 = lerp(var56, var33, var35);\n/* 206 */ double var62 = lerp(var49, var58, var60);\n/* 207 */ int var10001 = var19++;\n/* 208 */ p_76308_1_[var10001] = p_76308_1_[var10001] + var62 * var20;\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ }", "public Builder clearNoise() {\n bitField0_ = (bitField0_ & ~0x00010000);\n noise_ = getDefaultInstance().getNoise();\n onChanged();\n return this;\n }", "public double calc_c() {\r\n \t\t\r\n \t\tdouble cij = 0;\r\n \t\tint sum_i = 0;\r\n \t\tint sum_j = 0;\r\n \t\tint diff = 0;\r\n \t\tint state = 0;\r\n \t\t\r\n \t\tdouble li, lri, lj, lrj;\r\n \t\t\r\n \t\tList<Integer> samestate_i = new ArrayList<>();\r\n \t\tList<Integer> samestate_j = new ArrayList<>();\r\n \t\t\r\n \t\tList<Double> gradient_i = new ArrayList<>();\r\n \t\tList<Double> gradient_j = new ArrayList<>();\r\n \t\t\r\n\t\t// if the time step is less than the window cij is initialized to zero.\r\n\t\tif(this.n <= this.w || this.w <2) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// else we determine the state of the region i and region j of which\r\n\t\t\t// we are calculating the cij for\r\n\t \t\tDeterminestate di = new Determinestate(this.i, this.n);\r\n\t\t\tDeterminestate dj = new Determinestate(this.j, this.n);\r\n\t\t\t\r\n\t\t\tProbability pi = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\tProbability pj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\r\n\t\t\tif(di.regionCurrentstate() == dj.regionCurrentstate()) {\r\n\t\t\t\tli = pi.getLsave().get(0);\r\n\t\t\t\tlj = pj.getLsave().get(0);\r\n\t\t\t\tstate = 0;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tli = pi.getLsave().get(1);\r\n\t\t\t\tlj = pj.getLsave().get(1);\r\n\t\t\t\tstate =1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// for the time window\r\n\t\t\tfor(int k=1; k<this.w; k++) {\r\n\t\t\t\t\r\n\t\t\t\t// determine the state of i and j in the in n-k time step\r\n\t \t\t\tDeterminestate dri = new Determinestate(this.i, this.n-k);\r\n\t \t\t\tDeterminestate drj = new Determinestate(this.j, this.n-k);\r\n\t \t\t\t\r\n\t \t\t\tProbability pri = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\tProbability prj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\t\r\n\t\t\t\tlri = pri.getLsave().get(state);\r\n\t\t\t\tlrj = prj.getLsave().get(state);\r\n\t \t\t\t\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for i make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == dri.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_i.add(k);\r\n\t \t\t\t\tgradient_i.add(li - lri);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for j make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == drj.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_j.add(k);\r\n\t \t\t\t\tgradient_j.add(lj - lrj);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t// if no match found return zero\r\n\t\tif(samestate_i.size() == 0 || samestate_j.size() == 0) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\t// else calculate cij\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// if both have same length \r\n\t\t\tif(samestate_i.size() == samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j) * Math.abs(diff/(double)this.w);\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//if i is smaller\r\n\t\t\telse if(samestate_i.size() < samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// if j is smaller \r\n\t\t\telse {\r\n\t\t\t\tfor(int i=0; i<samestate_j.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.isNaN(cij)) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn cij;\r\n\t\t}\r\n \t}", "@Override\r\n\tpublic FloatMat gradient() { return this.gradient; }", "public NoiseCalculator(double wavelength) {\n this(wavelength, 0.0);\n }", "public abstract double calcVolume();", "public abstract double calcVolume();", "protected double samplesOnePixelF() {\r\n\t\tif (getGraphWidth() > 1) {\r\n\t\t\t// avoid division by zero\r\n\t\t\treturn ((double) section.getLength()) / getGraphWidth();\r\n\t\t}\r\n\t\treturn 1.0;\r\n\t}", "public native MagickImage addNoiseImage(int noiseType)\n\t\t\tthrows MagickException;", "void computeGradient(GradientCalc calc);", "@Override\r\n\tpublic String makeANoise() {\n\t\treturn \"deer noise\";\r\n\t}", "public double sampleDouble() {\n double x = sample01();\n if ( x < (b-a)/(c-a))\n x = Math.sqrt(x*(b-a)*(c-a)) + a;\n else\n x = c- Math.sqrt((1-x)*(c-a)*(c-b));\n return x;\n }", "@java.lang.Override\n public boolean hasFeatureNoiseSigma() {\n return gradientNoiseSigmaCase_ == 2;\n }", "com.google.protobuf.ByteString\n getNoiseBytes();", "@Override\n\tpublic Vector3d gradient(Particle p_j) {\n\t\treturn null;\n\t}", "public com.google.protobuf.ByteString\n getNoiseBytes() {\n java.lang.Object ref = noise_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n noise_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public double volume () {return (4/3)*Math.PI*this.r*this.r*this.r;}", "@java.lang.Override\n public boolean hasFeatureNoiseSigma() {\n return gradientNoiseSigmaCase_ == 2;\n }", "float getPreGain();", "public com.google.protobuf.ByteString\n getNoiseBytes() {\n java.lang.Object ref = noise_;\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 noise_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void sample_V() {\n\t\t//Note, sumV and sumVVT are update in the update function itself. Hence, when\n\t\t//sample_V is called after the 1 iteration of all vertices, we already have the sum.\n\t\t\n\t\t//meanV = (SUM V_j)/N\n\t\tRealVector meanV = params.sumV.mapMultiply(1.0/datasetDesc.getNumItems());\n\t\t//meanS = (SUM (V_j*V_j')/N)\n\t\tRealMatrix meanS = params.sumVVT.scalarMultiply(1.0/datasetDesc.getNumItems());\n\t\t\n\t\t//mu0 = (beta0*mu0 + meanV)/(beta0 + N)\n\t\tRealVector mu0_ = (params.mu0_V.mapMultiply(params.beta0_V).add(meanV)).mapDivide((params.beta0_V + datasetDesc.getNumItems()));\n\t\t\n\t\tdouble beta0_ = params.beta0_V + datasetDesc.getNumItems();\n\t\tint nu0_ = params.nu0_V + datasetDesc.getNumItems();\n\t\t\n\t\t//W0 = inv( inv(W0) + N*meanS + (beta0*N/(beta0 + N))(mu0 - meanU)*(mu0 - meanU)'\n\t\tRealVector tmp = params.mu0_V.subtract(meanV);\n\t\tRealMatrix mu0_d_meanV_T = tmp.outerProduct(tmp); \n\t\tmu0_d_meanV_T = mu0_d_meanV_T.scalarMultiply((params.beta0_V*datasetDesc.getNumItems()/(params.beta0_V + datasetDesc.getNumItems())));\n\t\tRealMatrix invW0_ = params.invW0_V.add(params.sumVVT).add(mu0_d_meanV_T);\n\n\t\t//Update all the values.\n\t\tparams.mu0_V = mu0_;\n\t\tparams.beta0_V = beta0_;\n\t\tparams.nu0_V = nu0_;\n\t\tparams.invW0_V = invW0_;\n\t\tparams.W0_V = (new LUDecompositionImpl(invW0_)).getSolver().getInverse();\n\t\t\n\t\t//Sample lambda_V and mu_V from the Gaussian Wishart distribution\n\t\t// http://en.wikipedia.org/wiki/Normal-Wishart_distribution#Generating_normal-Wishart_random_variates\n\t\t//Draw lambda_V from Wishart distribution with scale matrix w0_U.\n\t\tparams.lambda_V = sampleWishart(params.invW0_V, params.nu0_V);\n\t\t//Compute cov = inv(beta0*lambda) \n\t\tRealMatrix cov = (new LUDecompositionImpl(params.lambda_V.scalarMultiply(params.beta0_V))).getSolver().getInverse();\n\t\t//Draw mu_V from multivariate normal dist with mean mu0_V and covariance inv(beta0_V*lambda)\n\t\tMultivariateNormalDistribution dist = new MultivariateNormalDistribution(params.mu0_V.toArray(), \n\t\t\t\tcov.getData());\n\t\tparams.mu_V = new ArrayRealVector(dist.sample());\n\t\t\n\t\t//Reset the sum of latent factors.\n\t\tparams.sumV.mapMultiply(0);\n\t\tparams.sumVVT.scalarMultiply(0);\n\t}", "public native MagickImage blurImageChannel(int channel, double raduis,\n\t\t\tdouble sigma) throws MagickException;", "private void calc_e_v_dens() {\n\t\tint i,il,max_steps = 10;\n\t\tdouble[] lel = new double[2], onel = new double[2];\n\t\tdouble store_dens;\n\t\t\n\t\tstore_dens = density;\n\t\t\n\t\ttry {\n\t\t\tPrintStream out = new PrintStream(new FileOutputStream(\"Ediff.v.dens.out\"));\n\t\t\tout.println(\"# density Elhcp Elfcc Ehcp Efcc dEl dE\");\n\t\t\t\n\t\t\tfor (i=0; i<max_steps; i++) {\n\t\t\t\tdensity= 2.0*(double)(i+1)/(double)max_steps;\n\t\t\t\tdiameter = Math.pow(density,1.0/3.0);\n\t\t\t\tdiameter2 = diameter*diameter;\n\t\t\t\tout.println(density+\" \");\n\t\t\t\tfor (il=0; il<2; il++) {\n\t\t\t\t\tlel[il] = calc_local_energy(0,il,CUR_POS);\n\t\t\t\t\tonel[il] = calc_e_order_n(il);\n\t\t\t\t}\n\t\t\t\tout.println(lel[0]+\" \"+lel[1]+\" \"+onel[0]+\" \"+onel[1]+\" \"+(lel[1]-lel[0])+\" \"+(onel[1]-onel[0]));\n\t\t\t}\n\t\t\tout.close();\n\t\t} catch( Exception e ) {\n\t\t\tSystem.err.println(\"calc_e_v_dens failed while writing file with exception: \"+e);\n\t\t}\n\t\t\n\t\tdensity= store_dens;\n\t\tdiameter = Math.pow(density,1.0/3.0);\n\t\tdiameter2 = diameter*diameter;\n\t}", "@Override\n\tprotected void uGenerate(float[] channels) \n\t{\n\t\tif (!isActivated)\n\t\t{\n\t\t\tArrays.fill( channels, begAmp );\n\t\t} \n\t\telse if (lineNow >= lineTime)\n\t\t{\n\t\t\tArrays.fill( channels, endAmp );\n\t\t} \n\t\telse \n\t\t{\n\t\t\tamp += ( endAmp - amp )*timeStepSize/( lineTime - lineNow );\n\t\t\t//Minim.debug(\" dampTime = \" + dampTime + \" begAmp = \" + begAmp + \" amp = \" + amp + \" dampNow = \" + dampNow);\n\t\t\tArrays.fill( channels, amp );\n\t\t\tlineNow += timeStepSize;\n\t\t}\n\t}", "public double calculateCurvatureGradient(int i){\n Node3D node = mesh.nodes.get(i);\n Set<Node3D> neighbors = getNeighbors(node);\n\n double[] k1 = calculateMeanCurvatureNormal(node, node_to_triangle.get(node));\n double kh = Vector3DOps.normalize(k1)/2;\n double[] k2 = new double[k1.length];\n double kneighbors = 0;\n for(Node3D neighbor: neighbors){\n double[] ki = calculateMeanCurvatureNormal(node, node_to_triangle.get(node));\n\n }\n\n return 0;\n }", "double luminance(C config);" ]
[ "0.664265", "0.6227805", "0.62220764", "0.6184292", "0.6067105", "0.5925538", "0.558267", "0.55378747", "0.5509455", "0.5469896", "0.5457351", "0.5394972", "0.5284596", "0.52455485", "0.5206637", "0.52013385", "0.51918536", "0.5109562", "0.5071591", "0.5064096", "0.50619334", "0.50420725", "0.4977189", "0.4967093", "0.49550083", "0.49336815", "0.49109986", "0.48979655", "0.4884575", "0.4846059", "0.48380286", "0.48024353", "0.4799106", "0.47843185", "0.47754514", "0.47646064", "0.47561893", "0.47286606", "0.47135735", "0.471175", "0.46947703", "0.46761468", "0.46759656", "0.4640755", "0.46405295", "0.46343574", "0.46318898", "0.4628654", "0.46216294", "0.46138057", "0.46122062", "0.46022153", "0.4598062", "0.4597197", "0.45957866", "0.4582437", "0.45791593", "0.4577681", "0.45690596", "0.45575315", "0.45483258", "0.4547046", "0.4546771", "0.45311788", "0.45274928", "0.45162386", "0.45150378", "0.45115697", "0.45099586", "0.45078436", "0.44991902", "0.44941136", "0.4490567", "0.4488264", "0.44871986", "0.4487135", "0.44852507", "0.44796994", "0.446838", "0.446327", "0.446327", "0.44602436", "0.44580877", "0.44414148", "0.4438258", "0.4434868", "0.44347888", "0.4430907", "0.4398587", "0.4380705", "0.437628", "0.43718755", "0.43621692", "0.43546548", "0.4354483", "0.43519494", "0.43489364", "0.43473572", "0.434472", "0.4335397" ]
0.59953386
5
Calcualte the noise estimate via the gradient method given a volume and slice/channel.
public float gradientMethod(MCVolume vol, int slice_num, int channel_num) { // // Get the right slice. // Slice slice = vol.getSlice(slice_num, channel_num); return gradientMethod(slice); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float gradientMethod(MCVolume vol) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tfor(int jj=0; jj<vol.getNChannels(); jj++) {\n\t\t\t\tnes += gradientMethod( vol.getSlice(ii, jj) );\n\t\t\t}\n\t\t}\n\n\t\treturn (nes / ((float)vol.getNSlices()*(float)vol.getNChannels()) );\n\t}", "public float gradientMethod(Volume vol) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tnes += gradientMethod( vol.getSlice(ii) );\n\t\t}\n\n\t\treturn (nes / (float)vol.getNSlices());\n\t}", "public float gradientMethod(MCVolume vol, int channel_num) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tnes += gradientMethod( vol.getSlice(ii, channel_num) );\n\t\t}\n\n\t\treturn (nes / (float)vol.getNSlices());\n\t}", "private void compute() {\r\n int i, j, k;\r\n float gx, gy, gz;\r\n for (int q = 0; q < data.length; q++) {\r\n data[q] = new VoxelGradient();\r\n }\r\n\r\n\r\n // gradient at extremes, 0 and dim-1\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n gx = (volume.data[(i + 1) + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n gy = (volume.data[i + (dimX * ((j + 1) + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n gz = (volume.data[i + (dimX * (j + (dimY * (k + 1))))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n i = dimX - 1;\r\n j = dimY - 1;\r\n k = dimZ - 1;\r\n gx = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[(i - 1) + (dimX * (j + (dimY * k)))]) / 1;\r\n gy = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * ((j - 1) + (dimY * k)))]) / 1;\r\n gz = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * (k - 1))))]) / 1;\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n\r\n\r\n //gradient in non-extreme points\r\n for (i = 1; i < dimX - 1; i++) {\r\n for (j = 1; j < dimY - 1; j++) {\r\n for (k = 1; k < dimZ - 1; k++) {\r\n\r\n gx = (volume.data[(i + 1) + (dimX * (j + (dimY * k)))] - volume.data[(i - 1) + (dimX * (j + (dimY * k)))]) / 2;\r\n\r\n gy = (volume.data[i + (dimX * ((j + 1) + (dimY * k)))] - volume.data[i + (dimX * ((j - 1) + (dimY * k)))]) / 2;\r\n\r\n gz = (volume.data[i + (dimX * (j + (dimY * (k + 1))))] - volume.data[i + (dimX * (j + (dimY * (k - 1))))]) / 2;\r\n\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n\r\n\r\n }\r\n }\r\n }\r\n }", "private double noise(SpIterNoiseObs noise) {\n return 3.0 * 60.0;\n }", "public float gradientMethod(Volume vol, int slice_num) \n\t{\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tSlice slice = vol.getSlice(slice_num);\n\n\t\treturn gradientMethod(slice);\n\t}", "public float gradientMethod(Slice slice) \n\t{\n\t\t//\n\t\t// Intialize variables.\n\t\t//\n\t\tint nrows = slice.getNRows();\n\t\tint ncols = slice.getNCols();\n\n\t\tfloat[] v = new float[nrows*ncols]; int v_numset = 0;\n\t\tfloat t = (float)0.0; \n\t\tfloat sig_y = (float)0.0;\n\t\tfloat sig_x = (float)0.0;\n\n\t\t//\n\t\t// Compute the column gradient\n\t\t//\n\t\tfor(int row=0; row<nrows; row++) {\n\t\t\tfor(int col=1; col<ncols-1; col++) {\n\t\t\t\tt = slice.getData(row,col+1) - (float)2.0 * slice.getData(row,col) + slice.getData(row,col-1);\n\n\t\t\t\tif( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) {\n\t\t\t\t\tv[v_numset] = t; v_numset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( v_numset <= 10 ) {\n\t\t\tsig_y = (float)0.0;\n\t\t}\n\t\telse {\n\t\t\tsig_y = vec_stdDevMod(v, v_numset);\n\t\t}\n\n\t\tv_numset = 0;\n\n\t\t//\n\t\t// Compute the row gradient\n\t\t//\n\t\tfor(int col=0; col<ncols; col++) {\n\t\t\tfor(int row=1; row<nrows-1; row++) {\n\t\t\t\tt = slice.getData(row+1,col) - (float)2.0 * slice.getData(row,col) + slice.getData(row-1,col);\n\n\t\t\t\tif( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) {\n\t\t\t\t\tv[v_numset] = t; v_numset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( v_numset <= 10 ) {\n\t\t\tsig_x = (float)0.0;\n\t\t}\n\t\telse {\n\t\t\tsig_x = vec_stdDevMod(v, v_numset);\n\t\t}\n\n\t\treturn (float)Math.sqrt( (double)(sig_x * sig_x + sig_y * sig_y) ) / (float)2.0;\n\t}", "public GradientVolume(Volume vol) {\r\n volume = vol;\r\n dimX = vol.getDimX();\r\n dimY = vol.getDimY();\r\n dimZ = vol.getDimZ();\r\n data = new VoxelGradient[dimX * dimY * dimZ];\r\n compute();\r\n maxmag = -1.0;\r\n }", "public int noise(int xin, int yin, int zin);", "void calcWave() {\n yoff += 0.01f;\n \n //For every x value, calculate a y value based on sine or cosine\n float x = yoff; //**OPTION #1****/\n //float x = 0.0f; //**OPTION #2****/\n for (int i = 0; i < yvalues.length; i++) {\n float n = 2*noise(x)-1.0f; //**OPTION #1****/ //scale noise to be between 1 and -1\n //float n = 2*noise(x,yoff)-1.0f; //**OPTION #2****/ //scale noise to be between 1 and -1\n yvalues[i] = n*amplitude;\n x+=dx;\n }\n }", "M generateNoise();", "public final double getEstimatedNoise() {\r\n return noise;\r\n }", "@java.lang.Override\n public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "public native MagickImage reduceNoiseImage(double radius)\n\t\t\tthrows MagickException;", "public double getYNoise(double x, double z)\n {\n double var11 = 0.5D * (square3 - 1.0D);\n double var13 = (x + z) * var11;\n int var15 = fastFloor(x + var13);\n int var16 = fastFloor(z + var13);\n double var17 = (3.0D - square3) / 6.0D;\n double var19 = (double)(var15 + var16) * var17;\n double var21 = (double)var15 - var19;\n double var23 = (double)var16 - var19;\n double var25 = x - var21;\n double var27 = z - var23;\n byte var29;\n byte var30;\n\n if (var25 > var27)\n {\n var29 = 1;\n var30 = 0;\n }\n else\n {\n var29 = 0;\n var30 = 1;\n }\n\n double var31 = var25 - (double)var29 + var17;\n double var33 = var27 - (double)var30 + var17;\n double var35 = var25 - 1.0D + 2.0D * var17;\n double var37 = var27 - 1.0D + 2.0D * var17;\n int var39 = var15 & 255;\n int var40 = var16 & 255;\n int var41 = this.permutationTable[var39 + this.permutationTable[var40]] % 12;\n int var42 = this.permutationTable[var39 + var29 + this.permutationTable[var40 + var30]] % 12;\n int var43 = this.permutationTable[var39 + 1 + this.permutationTable[var40 + 1]] % 12;\n double var44 = 0.5D - var25 * var25 - var27 * var27;\n double var5;\n\n if (var44 < 0.0D)\n {\n var5 = 0.0D;\n }\n else\n {\n var44 *= var44;\n var5 = var44 * var44 * dot(grad3[var41], var25, var27);\n }\n\n double var46 = 0.5D - var31 * var31 - var33 * var33;\n double var7;\n\n if (var46 < 0.0D)\n {\n var7 = 0.0D;\n }\n else\n {\n var46 *= var46;\n var7 = var46 * var46 * dot(grad3[var42], var31, var33);\n }\n\n double var48 = 0.5D - var35 * var35 - var37 * var37;\n double var9;\n\n if (var48 < 0.0D)\n {\n var9 = 0.0D;\n }\n else\n {\n var48 *= var48;\n var9 = var48 * var48 * dot(grad3[var43], var35, var37);\n }\n\n return 70.0D * (var5 + var7 + var9);\n }", "public abstract void makeNoise();", "@java.lang.Override\n public boolean hasNoiseSigma() {\n return gradientNoiseSigmaCase_ == 1;\n }", "public interface VoxelNoise {\n /*\n * This method returns the voxel type for a location\n */\n public int noise(int xin, int yin, int zin);\n}", "public static double noise(double x, double y, double z) {\n\n\t\tdouble s = (x+y+z)/3.0;\n\t\ti = fastfloor(x+s); j = fastfloor(y+s); k = fastfloor(z+s);\n\t\ts = (i+j+k)/6.0; u = x-i+s; v = y-j+s; w = z-k+s;\n\t\tA[0] = A[1] = A[2] = 0;\n\t\tint hi = (u>=w ? (u>=v ? 0 : 1) : (v>=w ? 1 : 2));\n\t\tint lo = (u< w ? (u< v ? 0 : 1) : (v< w ? 1 : 2));\n\t\treturn 4.0 * (K(hi) + K(3-hi-lo) + K(lo) + K(0));\n\t}", "private double noise(final double xin, final double yin, final double zin) {\n double n0, n1, n2, n3;\n double s = (xin + yin + zin) * F3;\n int i = fastfloor(xin + s);\n int j = fastfloor(yin + s);\n int k = fastfloor(zin + s);\n double t = (i + j + k) * G3;\n double x0 = xin - (i - t);\n double y0 = yin - (j - t);\n double z0 = zin - (k - t);\n int i1, j1, k1;\n int i2, j2, k2;\n if (x0 >= y0) {\n if (y0 >= z0) {\n i1 = 1;\n j1 = 0;\n k1 = 0;\n i2 = 1;\n j2 = 1;\n k2 = 0;\n } else if (x0 >= z0) {\n i1 = 1;\n j1 = 0;\n k1 = 0;\n i2 = 1;\n j2 = 0;\n k2 = 1;\n } else {\n i1 = 0;\n j1 = 0;\n k1 = 1;\n i2 = 1;\n j2 = 0;\n k2 = 1;\n }\n } else {\n if (y0 < z0) {\n i1 = 0;\n j1 = 0;\n k1 = 1;\n i2 = 0;\n j2 = 1;\n k2 = 1;\n } else if (x0 < z0) {\n i1 = 0;\n j1 = 1;\n k1 = 0;\n i2 = 0;\n j2 = 1;\n k2 = 1;\n } else {\n i1 = 0;\n j1 = 1;\n k1 = 0;\n i2 = 1;\n j2 = 1;\n k2 = 0;\n }\n }\n double x1 = x0 - i1 + G3;\n double y1 = y0 - j1 + G3;\n double z1 = z0 - k1 + G3;\n double x2 = x0 - i2 + 2.0 * G3;\n double y2 = y0 - j2 + 2.0 * G3;\n double z2 = z0 - k2 + 2.0 * G3;\n double x3 = x0 - 1.0 + 3.0 * G3;\n double y3 = y0 - 1.0 + 3.0 * G3;\n double z3 = z0 - 1.0 + 3.0 * G3;\n int ii = i & (SUPPLY_LENGTH - 1);\n int jj = j & (SUPPLY_LENGTH - 1);\n int kk = k & (SUPPLY_LENGTH - 1);\n int gi0 = permMod12[ii + perm[jj + perm[kk]]];\n int gi1 = permMod12[ii + i1 + perm[jj + j1 + perm[kk + k1]]];\n int gi2 = permMod12[ii + i2 + perm[jj + j2 + perm[kk + k2]]];\n int gi3 = permMod12[ii + 1 + perm[jj + 1 + perm[kk + 1]]];\n double t0 = CONTRIBUTION_FACTOR - x0 * x0 - y0 * y0 - z0 * z0;\n if (t0 < 0) {\n n0 = 0.0;\n } else {\n t0 *= t0;\n n0 = t0 * t0 * dot(GTAB[gi0], x0, y0, z0);\n }\n double t1 = CONTRIBUTION_FACTOR - x1 * x1 - y1 * y1 - z1 * z1;\n if (t1 < 0) {\n n1 = 0.0;\n } else {\n t1 *= t1;\n n1 = t1 * t1 * dot(GTAB[gi1], x1, y1, z1);\n }\n double t2 = CONTRIBUTION_FACTOR - x2 * x2 - y2 * y2 - z2 * z2;\n if (t2 < 0) {\n n2 = 0.0;\n } else {\n t2 *= t2;\n n2 = t2 * t2 * dot(GTAB[gi2], x2, y2, z2);\n }\n double t3 = CONTRIBUTION_FACTOR - x3 * x3 - y3 * y3 - z3 * z3;\n if (t3 < 0) {\n n3 = 0.0;\n } else {\n t3 *= t3;\n n3 = t3 * t3 * dot(GTAB[gi3], x3, y3, z3);\n }\n return NORMALIZE_FACTOR * (n0 + n1 + n2 + n3);\n }", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "private float noise(Vector2 point) {\n\t\tVector2 bottomLeft = randomGrid[(int) point.x][(int) point.y];\n\t\tVector2 topLeft = randomGrid[(int) point.x][(int) point.y + 1];\n\t\tVector2 bottomRight = randomGrid[(int) point.x + 1][(int) point.y];\n\t\tVector2 topRight = randomGrid[(int) point.x + 1][(int) point.y + 1];\n\n\t\tfloat bottomLeftValue = bottomLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y));\n\t\tfloat topLeftValue = topLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y + 1));\n\t\tfloat bottomRightValue = bottomRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y));\n\t\tfloat topRightValue = topRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y + 1));\n\n\t\tfloat bottomValue = bottomLeftValue * (1 - point.x % 1) + bottomRightValue * (point.x % 1);\n\t\tfloat topValue = topLeftValue * (1 - point.x % 1) + topRightValue * (point.x % 1);\n\t\tfloat value = bottomValue * (1 - point.y % 1) + topValue * (point.y % 1);\n\n\t\treturn value;\n\t}", "public abstract double gradient(double betaForDimension, int dimension);", "public void calculate() {\n float xoff = 0;\n for (int i = 0; i < cols; i++)\n { \n float yoff = 0;\n for (int j = 0; j < rows; j++)\n {\n z[i][j] = map(noise(xoff, yoff,zoff), 0, 1, -120, 120);\n yoff += 0.1f;\n }\n xoff += 0.1f;\n }\n zoff+=0.01f;\n }", "double volume(){\n return width*height*depth;\n }", "public float getNoise(int x, int y) {\n\t\treturn getRealNoise(x * .3f, y * .3f);\n\t}", "public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "double volume(){\n\n return widgh*height*depth;\n\n }", "private double innerEnergy(int x, int y)\n {\n Color left = this.picture.get(x-1, y);\n Color right = this.picture.get(x+1, y);\n Color up = this.picture.get(x, y-1);\n Color down = this.picture.get(x, y+1);\n return gradient(left, right) + gradient(up, down);\n }", "Gradient gradientAt(Point point);", "public Builder clearNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n gradientNoiseSigmaCase_ = 0;\n gradientNoiseSigma_ = null;\n onChanged();\n }\n return this;\n }", "public void populateNoiseArray(double[] p_76308_1_, double p_76308_2_, double p_76308_4_, double p_76308_6_, int p_76308_8_, int p_76308_9_, int p_76308_10_, double p_76308_11_, double p_76308_13_, double p_76308_15_, double p_76308_17_) {\n/* 81 */ if (p_76308_9_ == 1) {\n/* */ \n/* 83 */ boolean var64 = false;\n/* 84 */ boolean var65 = false;\n/* 85 */ boolean var21 = false;\n/* 86 */ boolean var68 = false;\n/* 87 */ double var70 = 0.0D;\n/* 88 */ double var73 = 0.0D;\n/* 89 */ int var75 = 0;\n/* 90 */ double var77 = 1.0D / p_76308_17_;\n/* */ \n/* 92 */ for (int var30 = 0; var30 < p_76308_8_; var30++) {\n/* */ \n/* 94 */ double var31 = p_76308_2_ + var30 * p_76308_11_ + this.xCoord;\n/* 95 */ int var78 = (int)var31;\n/* */ \n/* 97 */ if (var31 < var78)\n/* */ {\n/* 99 */ var78--;\n/* */ }\n/* */ \n/* 102 */ int var34 = var78 & 0xFF;\n/* 103 */ var31 -= var78;\n/* 104 */ double var35 = var31 * var31 * var31 * (var31 * (var31 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 106 */ for (int var37 = 0; var37 < p_76308_10_; var37++)\n/* */ {\n/* 108 */ double var38 = p_76308_6_ + var37 * p_76308_15_ + this.zCoord;\n/* 109 */ int var40 = (int)var38;\n/* */ \n/* 111 */ if (var38 < var40)\n/* */ {\n/* 113 */ var40--;\n/* */ }\n/* */ \n/* 116 */ int var41 = var40 & 0xFF;\n/* 117 */ var38 -= var40;\n/* 118 */ double var42 = var38 * var38 * var38 * (var38 * (var38 * 6.0D - 15.0D) + 10.0D);\n/* 119 */ int var19 = this.permutations[var34] + 0;\n/* 120 */ int var66 = this.permutations[var19] + var41;\n/* 121 */ int var67 = this.permutations[var34 + 1] + 0;\n/* 122 */ int var22 = this.permutations[var67] + var41;\n/* 123 */ var70 = lerp(var35, func_76309_a(this.permutations[var66], var31, var38), grad(this.permutations[var22], var31 - 1.0D, 0.0D, var38));\n/* 124 */ var73 = lerp(var35, grad(this.permutations[var66 + 1], var31, 0.0D, var38 - 1.0D), grad(this.permutations[var22 + 1], var31 - 1.0D, 0.0D, var38 - 1.0D));\n/* 125 */ double var79 = lerp(var42, var70, var73);\n/* 126 */ int var10001 = var75++;\n/* 127 */ p_76308_1_[var10001] = p_76308_1_[var10001] + var79 * var77;\n/* */ }\n/* */ \n/* */ } \n/* */ } else {\n/* */ \n/* 133 */ int var19 = 0;\n/* 134 */ double var20 = 1.0D / p_76308_17_;\n/* 135 */ int var22 = -1;\n/* 136 */ boolean var23 = false;\n/* 137 */ boolean var24 = false;\n/* 138 */ boolean var25 = false;\n/* 139 */ boolean var26 = false;\n/* 140 */ boolean var27 = false;\n/* 141 */ boolean var28 = false;\n/* 142 */ double var29 = 0.0D;\n/* 143 */ double var31 = 0.0D;\n/* 144 */ double var33 = 0.0D;\n/* 145 */ double var35 = 0.0D;\n/* */ \n/* 147 */ for (int var37 = 0; var37 < p_76308_8_; var37++) {\n/* */ \n/* 149 */ double var38 = p_76308_2_ + var37 * p_76308_11_ + this.xCoord;\n/* 150 */ int var40 = (int)var38;\n/* */ \n/* 152 */ if (var38 < var40)\n/* */ {\n/* 154 */ var40--;\n/* */ }\n/* */ \n/* 157 */ int var41 = var40 & 0xFF;\n/* 158 */ var38 -= var40;\n/* 159 */ double var42 = var38 * var38 * var38 * (var38 * (var38 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 161 */ for (int var44 = 0; var44 < p_76308_10_; var44++) {\n/* */ \n/* 163 */ double var45 = p_76308_6_ + var44 * p_76308_15_ + this.zCoord;\n/* 164 */ int var47 = (int)var45;\n/* */ \n/* 166 */ if (var45 < var47)\n/* */ {\n/* 168 */ var47--;\n/* */ }\n/* */ \n/* 171 */ int var48 = var47 & 0xFF;\n/* 172 */ var45 -= var47;\n/* 173 */ double var49 = var45 * var45 * var45 * (var45 * (var45 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 175 */ for (int var51 = 0; var51 < p_76308_9_; var51++) {\n/* */ \n/* 177 */ double var52 = p_76308_4_ + var51 * p_76308_13_ + this.yCoord;\n/* 178 */ int var54 = (int)var52;\n/* */ \n/* 180 */ if (var52 < var54)\n/* */ {\n/* 182 */ var54--;\n/* */ }\n/* */ \n/* 185 */ int var55 = var54 & 0xFF;\n/* 186 */ var52 -= var54;\n/* 187 */ double var56 = var52 * var52 * var52 * (var52 * (var52 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 189 */ if (var51 == 0 || var55 != var22) {\n/* */ \n/* 191 */ var22 = var55;\n/* 192 */ int var69 = this.permutations[var41] + var55;\n/* 193 */ int var71 = this.permutations[var69] + var48;\n/* 194 */ int var72 = this.permutations[var69 + 1] + var48;\n/* 195 */ int var74 = this.permutations[var41 + 1] + var55;\n/* 196 */ int var75 = this.permutations[var74] + var48;\n/* 197 */ int var76 = this.permutations[var74 + 1] + var48;\n/* 198 */ var29 = lerp(var42, grad(this.permutations[var71], var38, var52, var45), grad(this.permutations[var75], var38 - 1.0D, var52, var45));\n/* 199 */ var31 = lerp(var42, grad(this.permutations[var72], var38, var52 - 1.0D, var45), grad(this.permutations[var76], var38 - 1.0D, var52 - 1.0D, var45));\n/* 200 */ var33 = lerp(var42, grad(this.permutations[var71 + 1], var38, var52, var45 - 1.0D), grad(this.permutations[var75 + 1], var38 - 1.0D, var52, var45 - 1.0D));\n/* 201 */ var35 = lerp(var42, grad(this.permutations[var72 + 1], var38, var52 - 1.0D, var45 - 1.0D), grad(this.permutations[var76 + 1], var38 - 1.0D, var52 - 1.0D, var45 - 1.0D));\n/* */ } \n/* */ \n/* 204 */ double var58 = lerp(var56, var29, var31);\n/* 205 */ double var60 = lerp(var56, var33, var35);\n/* 206 */ double var62 = lerp(var49, var58, var60);\n/* 207 */ int var10001 = var19++;\n/* 208 */ p_76308_1_[var10001] = p_76308_1_[var10001] + var62 * var20;\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ }", "boolean hasNoise();", "double volume() {\n\treturn width*height*depth;\n}", "public void calcVolume() {\n this.vol = (0.6666666666666667 * Math.PI) * Math.pow(r, 3);\n }", "private static void vel_step ( int N, double[] u, double[] v, double[] u0, double[] v0,\r\n\t\tfloat visc, float dt )\r\n\t\t{\r\n\t\tadd_source ( N, u, u0, dt ); add_source ( N, v, v0, dt );\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\t\r\n\t\t//SWAP ( u0, u ); \r\n\t\t\r\n\t\tdouble[] temp;\r\n\t\ttemp=u0;\r\n\t\tu0=u;\r\n\t\tu=temp;\r\n\t\t//draw_dens ( N, u );\r\n\t\tdiffuse ( N, 1, u, u0, visc, dt );\r\n\t\t//draw_dens ( N, u );\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t//SWAP ( v0, v ); \r\n\t\t//double[] temp;\r\n\t\ttemp=v0;\r\n\t\tv0=v;\r\n\t\tv=temp;\r\n\t\t//draw_dens ( N, v );\r\n\t\t//draw_dens ( N, v0 );\r\n\t\tdiffuse ( N, 2, v, v0, visc, dt );\r\n\t\t//draw_dens ( N, v );\r\n\t\t//System.out.println(\"V\");\r\n\t\t//draw_dens ( N, v );\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\tproject ( N, u, v, u0, v0 );\r\n\t\t//SWAP ( u0, u ); \r\n\t\ttemp=u0;\r\n\t\tu0=u;\r\n\t\tu=temp;\r\n\t\t\r\n\t\t//SWAP ( v0, v );\r\n\t\ttemp=v0;\r\n\t\tv0=v;\r\n\t\tv=temp;\r\n\t\t//System.out.println(\"V\");\r\n\t\t//draw_dens ( N, v );\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\t\r\n\t\tadvect ( N, 1, u, u0, u0, v0, dt ); \r\n\t\tadvect ( N, 2, v, v0, u0, v0, dt );\r\n\t\tproject ( N, u, v, u0, v0 );\r\n\t\t}", "void computeGradient(GradientCalc calc);", "public void setNoise(double noiseCoefficient) {\n this.noiseCoefficient = noiseCoefficient;\n }", "public double getCyclinderVolume();", "java.lang.String getNoise();", "private void gradientMagnitude3D(float[] img, float[] mag) {\r\n int slice, row, col, cIndex, sIndex;\r\n float lVal, rVal, tVal, bVal, zLowVal, zHighVal;\r\n int sliceSize = yDim*xDim;\r\n for (slice = 0; slice < zDim; slice++) {\r\n sIndex = slice * sliceSize;\r\n for (row = 0; row < yDim; row++) {\r\n cIndex = sIndex + row * xDim;\r\n for (col = 0, cIndex += col; col < xDim; cIndex++, col++) {\r\n\r\n rVal = getVal(img, col+1, row, slice);\r\n lVal = getVal(img, col-1, row, slice);\r\n tVal = getVal(img, col, row+1, slice);\r\n bVal = getVal(img, col, row-1, slice);\r\n zLowVal = getVal(img, col, row, slice-1);\r\n zHighVal = getVal(img, col, row, slice+1);\r\n\r\n mag[cIndex] = (float)Math.sqrt((rVal - lVal) * (rVal - lVal) +\r\n (tVal - bVal) * (tVal - bVal) +\r\n (zHighVal - zLowVal) * (zHighVal - zLowVal));\r\n } // for (col = 0; ...)\r\n } // for (row = 0; ...)\r\n } // for (slice = 0; ...)\r\n }", "double volume()\n\t{\n\t\t\n\t\treturn width*height*depth;\n\t\t\n\t}", "@Override\r\n\t\tpublic double[] gradient(double x, double... parameters) {\n\t\t\tfinal double a = parameters[0];\r\n\t\t\tfinal double b = parameters[1];\r\n\t\t\tfinal double c = parameters[2];\r\n\t\t\tfinal double d = parameters[3];\r\n\t\t\tfinal double e = parameters[4];\r\n\t\t\t\r\n\t\t\tdouble[] gradients = new double[5];\r\n\t\t\t//double den = 1 + Math.pow((x+e)/c, b);\r\n\t\t\t//gradients[0] = 1 / den; // Yes a Derivation \r\n\t\t\t//gradients[1] = -((a - d) * Math.pow(x / c, b) * Math.log(x / c)) / (den * den); // Yes b Derivation \r\n\t\t\t//gradients[2] = (b * Math.pow(x / c, b - 1) * (x / (c * c)) * (a - d)) / (den * den); // Yes c Derivation \r\n\t\t\t//gradients[3] = 1 - (1 / den); // Yes d Derivation \r\n\t\t\t\r\n\t\t\t//Derivation\r\n\t\t\tfinal double c_b = Math.pow(c, b);\r\n\t\t\tfinal double c_b1 = Math.pow(c, b+1.);\r\n\t\t\tfinal double c_2b = Math.pow(c, 2.*b);\r\n\t\t\tfinal double c_2b1 = Math.pow(c, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tfinal double xe_b = Math.pow(x+e, b);\r\n\t\t\tfinal double xe_2b = Math.pow(x+e, 2.*b);\r\n\t\t\tfinal double xe_2b1 = Math.pow(x+e, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tgradients[0] = c_b/(xe_b+c_b);\r\n\t\t\tgradients[1] = ((c_b*d-a*c_b)*xe_b*Math.log(x+e)+(a*c_b*Math.log(c)-c_b*Math.log(c)*d)*xe_b)/(xe_2b+2*c_b*xe_b+c_2b);\r\n\t\t\tgradients[2] = -((b*c_b*d-a*b*c_b)*xe_b)/(c*xe_2b+2*c_b1*xe_b+c_2b1);\r\n\t\t\tgradients[3] = xe_b/(xe_b+c_b);\r\n\t\t\tgradients[4] = ((b*c_b*d-a*b*c_b)*xe_b)/(xe_2b1+xe_b*(2*c_b*x+2*c_b*e)+c_2b*x+c_2b*e);\r\n\t\t\treturn gradients;\r\n\t\t}", "@Test\n public void computeResult_addsNoiseToSum() {\n mockDoubleNoise(-10);\n // Mock the noise mechanism so that it adds noise to the count == 0.\n mockLongNoise(0);\n\n variance =\n BoundedVariance.builder()\n .epsilon(EPSILON)\n .delta(DELTA)\n .noise(noise)\n .maxPartitionsContributed(1)\n .maxContributionsPerPartition(1)\n .lower(-100)\n .upper(100)\n .build();\n\n variance.addEntry(10);\n variance.addEntry(10);\n // midpoint = (lower + upper) / 2 = 0,\n // noised_normalized_sum_of_squares = (x1 - midpoint)^2 + (x2 - midpoint)^2 + noise = 10^2 +\n // 10^2 - 10 = 190,\n // noised_normalized_sum = (x1 + x2) - midpoint * count + noise = 10 + 10 - 0 - 10 = 10,\n // noised_count = count + noise = 2 + 0 = 2,\n // BoundedVariance.computeResult() = noised_normalized_sum_of_squares / noised_count -\n // (noised_normalized_sum / noised_count)^2 = 190 / 2 - (10 / 2)^2 = 70\n assertThat(variance.computeResult()).isEqualTo(70.0);\n }", "public VoxelGradient getGradient(double[] coord) {\r\n\r\n //if improper coordinates given, return\r\n if (coord[0] < 0 || coord[0] > (dimX - 2) || coord[1] < 0 || coord[1] > (dimY - 2) || coord[2] < 0 || coord[2] > (dimZ - 2)) {\r\n return zero;\r\n }\r\n\r\n /* notice that in this framework we assume that the distance between neighbouring voxels is 1 in all directions*/\r\n float x = (float) coord[0];\r\n float y = (float) coord[1];\r\n float z = (float) coord[2];\r\n\r\n int x0 = (int) Math.floor(coord[0]);\r\n int y0 = (int) Math.floor(coord[1]);\r\n int z0 = (int) Math.floor(coord[2]);\r\n int x1 = (int) Math.ceil(coord[0]);\r\n int y1 = (int) Math.ceil(coord[1]);\r\n int z1 = (int) Math.ceil(coord[2]);\r\n\r\n float xfactor = (x - x0) / (x1 - x0);\r\n float yfactor = (y - y0) / (y1 - y0);\r\n float zfactor = (z - z0) / (z1 - z0);\r\n\r\n //defining 8 voxel gradiant data-points of a voxel\r\n VoxelGradient c000 = new VoxelGradient(x0, y0, z0);\r\n VoxelGradient c001 = new VoxelGradient(x0, y0, z1);\r\n VoxelGradient c010 = new VoxelGradient(x0, y1, z0);\r\n VoxelGradient c011 = new VoxelGradient(x0, y1, z1);\r\n VoxelGradient c100 = new VoxelGradient(x1, y0, z0);\r\n VoxelGradient c101 = new VoxelGradient(x1, y0, z1);\r\n VoxelGradient c110 = new VoxelGradient(x1, y1, z0);\r\n VoxelGradient c111 = new VoxelGradient(x1, y1, z1);\r\n\r\n //7 linear interpolations\r\n //4 in x direction\r\n VoxelGradient c00 = new VoxelGradient();\r\n VoxelGradient c01 = new VoxelGradient();\r\n VoxelGradient c10 = new VoxelGradient();\r\n VoxelGradient c11 = new VoxelGradient();\r\n interpolate(c000, c100, xfactor, c00);\r\n interpolate(c001, c101, xfactor, c01);\r\n interpolate(c010, c110, xfactor, c10);\r\n interpolate(c011, c111, xfactor, c11);\r\n //2 in y direction\r\n VoxelGradient c0 = new VoxelGradient();\r\n VoxelGradient c1 = new VoxelGradient();\r\n interpolate(c00, c10, yfactor, c0);\r\n interpolate(c01, c11, yfactor, c1);\r\n //1 in z direction\r\n VoxelGradient c = new VoxelGradient();\r\n interpolate(c0, c1, zfactor, c);\r\n\r\n return c;\r\n }", "public double calculateCurvatureGradient(int i){\n Node3D node = mesh.nodes.get(i);\n Set<Node3D> neighbors = getNeighbors(node);\n\n double[] k1 = calculateMeanCurvatureNormal(node, node_to_triangle.get(node));\n double kh = Vector3DOps.normalize(k1)/2;\n double[] k2 = new double[k1.length];\n double kneighbors = 0;\n for(Node3D neighbor: neighbors){\n double[] ki = calculateMeanCurvatureNormal(node, node_to_triangle.get(node));\n\n }\n\n return 0;\n }", "public Builder clearNoise() {\n bitField0_ = (bitField0_ & ~0x00010000);\n noise_ = getDefaultInstance().getNoise();\n onChanged();\n return this;\n }", "int computeGradient(\n int gx, int gy);", "public static double noise(double x, double y, double z, double w){\n\t\t\n\t\tdouble n0,n1,n2,n3,n4; // Noise contributions from the five corners\n\t\t// Skew the (x,y,z,w) space to determine which cell of 24 simplices we're in\n\t\tdouble s=(x+y+z+w)*F4; // Factor for 4D skewing\n\t\tint i=fastfloor(x+s);\n\t\tint j=fastfloor(y+s);\n\t\tint k=fastfloor(z+s);\n\t\tint l=fastfloor(w+s);\n\t\tdouble t=(i+j+k+l)*G4; // Factor for 4D unskewing\n\t\tdouble X0=i-t; // Unskew the cell origin back to (x,y,z,w) space\n\t\tdouble Y0=j-t;\n\t\tdouble Z0=k-t;\n\t\tdouble W0=l-t;\n\t\tdouble x0=x-X0; // The x,y,z,w distances from the cell origin\n\t\tdouble y0=y-Y0;\n\t\tdouble z0=z-Z0;\n\t\tdouble w0=w-W0;\n\t\t// For the 4D case, the simplex is a 4D shape I won't even try to describe.\n\t\t// To find out which of the 24 possible simplices we're in, we need to\n\t\t// determine the magnitude ordering of x0, y0, z0 and w0.\n\t\t// Six pair-wise comparisons are performed between each possible pair\n\t\t// of the four coordinates, and the results are used to rank the numbers.\n\t\tint rankx=0;\n\t\tint ranky=0;\n\t\tint rankz=0;\n\t\tint rankw=0;\n\t\tif(x0>y0) rankx++;\n\t\telse ranky++;\n\t\tif(x0>z0) rankx++;\n\t\telse rankz++;\n\t\tif(x0>w0) rankx++;\n\t\telse rankw++;\n\t\tif(y0>z0) ranky++;\n\t\telse rankz++;\n\t\tif(y0>w0) ranky++;\n\t\telse rankw++;\n\t\tif(z0>w0) rankz++;\n\t\telse rankw++;\n\t\tint i1,j1,k1,l1; // The integer offsets for the second simplex corner\n\t\tint i2,j2,k2,l2; // The integer offsets for the third simplex corner\n\t\tint i3,j3,k3,l3; // The integer offsets for the fourth simplex corner\n\t\t// [rankx, ranky, rankz, rankw] is a 4-vector with the numbers 0, 1, 2 and 3\n\t\t// in some order. We use a thresholding to set the coordinates in turn.\n\t\t// Rank 3 denotes the largest coordinate.\n\t\ti1=rankx>=3?1:0;\n\t\tj1=ranky>=3?1:0;\n\t\tk1=rankz>=3?1:0;\n\t\tl1=rankw>=3?1:0;\n\t\t// Rank 2 denotes the second largest coordinate.\n\t\ti2=rankx>=2?1:0;\n\t\tj2=ranky>=2?1:0;\n\t\tk2=rankz>=2?1:0;\n\t\tl2=rankw>=2?1:0;\n\t\t// Rank 1 denotes the second smallest coordinate.\n\t\ti3=rankx>=1?1:0;\n\t\tj3=ranky>=1?1:0;\n\t\tk3=rankz>=1?1:0;\n\t\tl3=rankw>=1?1:0;\n\t\t// The fifth corner has all coordinate offsets = 1, so no need to compute that.\n\t\tdouble x1=x0-i1+G4; // Offsets for second corner in (x,y,z,w) coords\n\t\tdouble y1=y0-j1+G4;\n\t\tdouble z1=z0-k1+G4;\n\t\tdouble w1=w0-l1+G4;\n\t\tdouble x2=x0-i2+2.0*G4; // Offsets for third corner in (x,y,z,w) coords\n\t\tdouble y2=y0-j2+2.0*G4;\n\t\tdouble z2=z0-k2+2.0*G4;\n\t\tdouble w2=w0-l2+2.0*G4;\n\t\tdouble x3=x0-i3+3.0*G4; // Offsets for fourth corner in (x,y,z,w) coords\n\t\tdouble y3=y0-j3+3.0*G4;\n\t\tdouble z3=z0-k3+3.0*G4;\n\t\tdouble w3=w0-l3+3.0*G4;\n\t\tdouble x4=x0-1.0+4.0*G4; // Offsets for last corner in (x,y,z,w) coords\n\t\tdouble y4=y0-1.0+4.0*G4;\n\t\tdouble z4=z0-1.0+4.0*G4;\n\t\tdouble w4=w0-1.0+4.0*G4;\n\t\t// Work out the hashed gradient indices of the five simplex corners\n\t\tint ii=i&255;\n\t\tint jj=j&255;\n\t\tint kk=k&255;\n\t\tint ll=l&255;\n\t\tint gi0=perm[ii+perm[jj+perm[kk+perm[ll]]]]%32;\n\t\tint gi1=perm[ii+i1+perm[jj+j1+perm[kk+k1+perm[ll+l1]]]]%32;\n\t\tint gi2=perm[ii+i2+perm[jj+j2+perm[kk+k2+perm[ll+l2]]]]%32;\n\t\tint gi3=perm[ii+i3+perm[jj+j3+perm[kk+k3+perm[ll+l3]]]]%32;\n\t\tint gi4=perm[ii+1+perm[jj+1+perm[kk+1+perm[ll+1]]]]%32;\n\t\t// Calculate the contribution from the five corners\n\t\tdouble t0=0.6-x0*x0-y0*y0-z0*z0-w0*w0;\n\t\tif(t0<0) n0=0.0;\n\t\telse{\n\t\t\tt0*=t0;\n\t\t\tn0=t0*t0*dot(grad4[gi0], x0, y0, z0, w0);\n\t\t}\n\t\tdouble t1=0.6-x1*x1-y1*y1-z1*z1-w1*w1;\n\t\tif(t1<0) n1=0.0;\n\t\telse{\n\t\t\tt1*=t1;\n\t\t\tn1=t1*t1*dot(grad4[gi1], x1, y1, z1, w1);\n\t\t}\n\t\tdouble t2=0.6-x2*x2-y2*y2-z2*z2-w2*w2;\n\t\tif(t2<0) n2=0.0;\n\t\telse{\n\t\t\tt2*=t2;\n\t\t\tn2=t2*t2*dot(grad4[gi2], x2, y2, z2, w2);\n\t\t}\n\t\tdouble t3=0.6-x3*x3-y3*y3-z3*z3-w3*w3;\n\t\tif(t3<0) n3=0.0;\n\t\telse{\n\t\t\tt3*=t3;\n\t\t\tn3=t3*t3*dot(grad4[gi3], x3, y3, z3, w3);\n\t\t}\n\t\tdouble t4=0.6-x4*x4-y4*y4-z4*z4-w4*w4;\n\t\tif(t4<0) n4=0.0;\n\t\telse{\n\t\t\tt4*=t4;\n\t\t\tn4=t4*t4*dot(grad4[gi4], x4, y4, z4, w4);\n\t\t}\n\t\t// Sum up and scale the result to cover the range [-1,1]\n\t\treturn 27.0*(n0+n1+n2+n3+n4);\n\t}", "@Override\n\tpublic void makeNoise() {\n\t\tSystem.out.println(\"Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink \");\n\t}", "@Override\n\tpublic Vector3d gradient(Particle p_j) {\n\t\treturn null;\n\t}", "public void gaussianSmooth(Img i, double sigma) {\n int half = (int) (sigma * Math.sqrt(6 * Math.log(10)));\n int size = 1 + 2 * half;\n System.out.printf(\"Size: %d\\n\", size);\n double[] mask = new double[size];\n double mask_sum = 0;\n for (int k = 0; k <= half; k++) {\n double value = Math.exp(-k * k / (2 * sigma * sigma)) / (sigma * Math.sqrt(2 * Math.PI));\n mask_sum += (k == 0) ? value : value * 2;\n mask[half + k] = value;\n mask[half - k] = value;\n }\n // normalize the mask\n for (int k = 0; k < size; k++) {\n mask[k] = mask[k] / mask_sum;\n }\n System.out.printf(\"Mask: %s\\n\", Arrays.toString(mask));\n\n // 2D convolution using 1D mask in x\n double[] i_temp = new double[i.img.length];\n for (int x = 0; x < i.img.length; x++) {\n i_temp[x] = (double) (i.img[x] & 0xFF);\n }\n for (int x = half; x < i.height - half; x++) {\n for (int y = half; y < i.width - half; y++) {\n i_temp[x * i.width + y] = 0;\n for (int s = -half; s <= half; s++) {\n i_temp[x * i.width + y] += (double) (i.img[(x + s) * i.width + y] & 0xFF) * mask[half - s];\n }\n }\n }\n\n // 2D convolution using 1D mask in y\n for (int x = half; x < i.height - half; x++) {\n for (int y = half; y < i.width - half; y++) {\n double f = 0;\n for (int s = -half; s <= half; s++) {\n f += i_temp[x * i.width + y + s] * mask[half - s];\n }\n i.img[x * i.width + y] = (byte) f;\n }\n }\n }", "private static void filterNoise(BufferedImage image) {\n\t\tfor (int x=0; x<image.getWidth(); x++) {\r\n\t\t\tfor (int y=0; y<image.getHeight(); y++) {\r\n\t\t\t\t\r\n\t\t\t\tint pixelVal = image.getRGB(x, y);\r\n\r\n\t\t\t\t// check how many pixels in a 2 x 2 rectangle with this point \r\n\t\t\t\t// in the center have the same color as this point; if not \r\n\t\t\t\t// many, flip this pixel's color\r\n\t\t\t\tint startX = Math.max(x-2, 0);\r\n\t\t\t\tint startY = Math.max(y-2, 0);\r\n\t\t\t\tint endX = Math.min(x+2, image.getWidth()-1);\r\n\t\t\t\tint endY = Math.min(y+2, image.getHeight()-1);\r\n\r\n\t\t\t\tint matchCount = 0;\r\n\t\t\t\tint totalCount = 0;\r\n\t\t\t\tfor (int i=startX; i<=endX; i++) {\r\n\t\t\t\t\tfor (int j=startY; j<=endY; j++) {\r\n\t\t\t\t\t\tif (image.getRGB(i,j) == pixelVal) {\r\n\t\t\t\t\t\t\tmatchCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttotalCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ((matchCount / (double) totalCount) < .2) {\r\n\t\t\t\t\tif (pixelVal == Color.YELLOW.getRGB()) {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.BLACK.getRGB());\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.YELLOW.getRGB());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (debug) {\r\n\t\t\ttry {\r\n\t\t\t\tImageIO.write(image, \"gif\", new File(\"noiseFiltered.gif\"));\r\n\t\t\t} catch (Exception e) {e.printStackTrace();}\r\n\t\t}\r\n\t}", "public abstract double calcVolume();", "public abstract double calcVolume();", "public static double[]getDataForVoxelGaussian(ImagePlus imgIn,int xCor,int yCor,int curT,int totalT,int curZ,int totalZ,int nEchoesExpected,int crossWidth,int crossThick,boolean gaussianWeighting){\n\t\tif(gaussianWeighting) {IJ.showMessage(\"Not applicable : gaussian weighting. Abort\");gaussianWeighting=false;}\n\t\tint xMax=imgIn.getWidth();\n\t\tint yMax=imgIn.getHeight();\n\t\tint zMax=imgIn.getNSlices();\n\t\tint zCor=curZ;\n\t\tint xm,ym,xM,yM,zm,zM;\n\t\txm=xCor-crossWidth;\n\t\txM=xCor+crossWidth;\n\t\tym=yCor-crossWidth;\n\t\tyM=yCor+crossWidth;\n\t\tzm=curZ-crossThick;\n\t\tzM=curZ+crossThick;\n\t\txm=Math.max(xm, 0);\n\t\txM=Math.min(xMax-1, xM);\n\t\tym=Math.max(ym, 0);\n\t\tyM=Math.min(yMax-1, yM);\n\t\tzm=Math.max(zm, 0);\n\t\tzM=Math.min(zMax-1, zM);\n\t\tdouble[]data= new double[nEchoesExpected];\n\t\tint nHits=(xM-xm+1)*(yM-ym+1)*(zM-zm+1);\n\t\tif( (xCor>xMax-1) || (yCor>yMax-1)) {IJ.log(\"Bad coordinates. Data set to 0\"); return data;}\n\t\tdouble[][][]weights=new double[xM-xm+1][yM-ym+1][zM-zm+1];\n\t\tdouble sigmaX=crossWidth;\n\t\tdouble sigmaY=crossWidth;\n\t\tdouble sigmaZ=crossThick;\n\t\t\n\t\t\n\t\tdouble sum=0;\n\t\tfor(int x=xm;x<=xM;x++) {\n\t\t\tfor(int y=ym;y<=yM;y++) {\n\t\t\t\tfor(int z=zm;z<=zM;z++) {\t\n\t\t\t\t\tif(!gaussianWeighting)weights[x-xm][y-ym][z-zm]=1.0/nHits;\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(sigmaX<=0 && sigmaZ<=0) {//One point\n\t\t\t\t\t\t\tweights[x-xm][y-ym][z-zm]=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(sigmaX<=0 && sigmaZ>0) {//Mono dimensional along z\n\t\t\t\t\t\t\tweights[x-xm][y-ym][z-zm]=1/(Math.pow(2*Math.PI,0.5)*sigmaZ) * Math.exp(- (z-zCor)*(z-zCor)/(sigmaZ*sigmaZ));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(sigmaX>0 && sigmaZ<=0) {//Two dimensional along x and y\n\t\t\t\t\t\t\tweights[x-xm][y-ym][z-zm]=1/(Math.pow(2*Math.PI,1)*sigmaX*sigmaY) * Math.exp(- (x-xCor)*(x-xCor)/(sigmaX*sigmaX) - (y-yCor)*(y-yCor)/(sigmaY*sigmaY));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {//Three dimensional gaussian\n\t\t\t\t\t\t\tweights[x-xm][y-ym][z-zm]=1/(Math.pow(2*Math.PI,1.5)*sigmaX*sigmaY*sigmaZ) * Math.exp(- (x-xCor)*(x-xCor)/(sigmaX*sigmaX) - (y-yCor)*(y-yCor)/(sigmaY*sigmaY) - (z-zCor)*(z-zCor)/(sigmaZ*sigmaZ));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsum+=weights[x-xm][y-ym][z-zm];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(gaussianWeighting) {\n\t\t\tfor(int x=xm;x<=xM;x++) {\n\t\t\t\tfor(int y=ym;y<=yM;y++) {\n\t\t\t\t\tfor(int z=zm;z<=zM;z++) {\t\n\t\t\t\t\t\tweights[x-xm][y-ym][z-zm]/=sum;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int ec=0;ec<nEchoesExpected;ec++) {\t\t\t\n\t\t\tfor(int z=zm;z<=zM;z++) {\n\t\t\t\tint indexZ=nEchoesExpected*totalZ*curT+nEchoesExpected*z+1+ec;\n\t\t\t\tfor(int x=xm;x<=xM;x++) {\n\t\t\t\t\tfor(int y=ym;y<=yM;y++) {\n\t\t\t\t\t\tdata[ec]+=weights[x-xm][y-ym][z-zm]*(double)((float[])(imgIn.getStack().getProcessor(indexZ).getPixels()))[x + xMax * y];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn data;\n\t\t\n\t}", "public VoxelGradient getGradient(int x, int y, int z) {\r\n return data[x + dimX * (y + dimY * z)];\r\n }", "public boolean hasNoiseSigma() {\n return gradientNoiseSigmaCase_ == 1;\n }", "public Builder setNoiseSigma(float value) {\n\n gradientNoiseSigmaCase_ = 1;\n gradientNoiseSigma_ = value;\n onChanged();\n return this;\n }", "@Override\r\n\tpublic String makeANoise() {\n\t\treturn \"deer noise\";\r\n\t}", "public void useUniformDeviates(){\n this.gaussianDeviates = false;\n }", "public static int numDimensions_infos_noise() {\n return 1;\n }", "@Override\r\n\tpublic FloatMat gradient() { return this.gradient; }", "private void run3D() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBuffer[];\r\n float resultBuffer[];\r\n float gaussianBuffer[];\r\n float gradientBuffer[];\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n sourceBuffer = new float[length];\r\n resultBuffer = new float[length];\r\n gaussianBuffer = new float[length];\r\n gradientBuffer = new float[length];\r\n } catch (OutOfMemoryError e){\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n srcImage.exportData(0, length, sourceBuffer);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n algoSepConvolver = new AlgorithmSeparableConvolver(gaussianBuffer, sourceBuffer,\r\n extents, xDataRound, yDataRound, zDataRound, srcImage.isColorImage());\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) / (numIterations - 1) * 100)), activeImage);\r\n }\r\n\r\n algoSepConvolver.run();\r\n gradientMagnitude3D(gaussianBuffer, gradientBuffer);\r\n upDateImage3D(resultBuffer, sourceBuffer, gradientBuffer);\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n for (int i = 0; i < length; i++) { sourceBuffer[i] = resultBuffer[i]; }\r\n }\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n algoSepConvolver.finalize();\r\n algoSepConvolver = null;\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n destImage.importData(0, resultBuffer, true);\r\n } catch (IOException error) {\r\n sourceBuffer = resultBuffer = gaussianBuffer = gradientBuffer = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "private static final void silk_PLC_energy(/*final int[] energy1, final int[] shift1, final int[] energy2, final int[] shift2,*/\r\n\t\t\tfinal Jenergy_struct_aux aux,// java\r\n\t\t\tfinal int[] exc_Q14, final int[] prevGain_Q10, final int subfr_length, final int nb_subfr)\r\n\t{\r\n\t\t// SAVE_STACK;\r\n\t\tfinal short[] exc_buf = new short[subfr_length << 1];\r\n\t\t/* Find random noise component */\r\n\t\t/* Scale previous excitation signal */\r\n\t\tint exc_buf_ptr = 0;// exc_buf[ exc_buf_ptr ]\r\n\t\tfor( int k = 0; k < 2; k++ ) {\r\n\t\t\tfor( int i = 0; i < subfr_length; i++ ) {\r\n\t\t\t\tfinal int v = ((int)(((long)exc_Q14[ i + ( k + nb_subfr - 2 ) * subfr_length ] * prevGain_Q10[ k ]) >> 16)) << 8;// java\r\n\t\t\t\texc_buf[ exc_buf_ptr + i ] = (short)(v > Short.MAX_VALUE ? Short.MAX_VALUE : (v < Short.MIN_VALUE ? Short.MIN_VALUE : v));\r\n\t\t\t}\r\n\t\t\texc_buf_ptr += subfr_length;\r\n\t\t}\r\n\t\t/* Find the subframe with lowest energy of the last two and use that as random noise generator */\r\n\t\tfinal long energy_shift1 = silk_sum_sqr_shift( /*energy1, shift1,*/ exc_buf, 0, subfr_length );\r\n\t\tfinal long energy_shift2 = silk_sum_sqr_shift( /*energy2, shift2,*/ exc_buf, subfr_length, subfr_length );\r\n\t\t// RESTORE_STACK;\r\n\t\taux.energy1 = (int)(energy_shift1 >>> 32);\r\n\t\taux.shift1 = (int)energy_shift1;\r\n\t\taux.energy2 = (int)(energy_shift2 >>> 32);\r\n\t\taux.shift2 = (int)energy_shift2;\r\n\t}", "@java.lang.Override\n public boolean hasFeatureNoiseSigma() {\n return gradientNoiseSigmaCase_ == 2;\n }", "public void calculateGradients(int dataIndex, double learningRate){\r\n for (int i = 0; i < outputLayer.length; i++) {\r\n for (int j = 0; j < outputLayer[i].weights.length; j++) {\r\n outputLayer[i].dw[j] = -2*((attribute[dataIndex] == i ? 1 : 0) - sigmoid(outputLayer[i].z))*sigmoidDeri(outputLayer[i].z)*outputLayer[i].data[j];\r\n }\r\n outputLayer[i].db = -2*((attribute[dataIndex] == i ? 1 : 0) - sigmoid(outputLayer[i].z))*sigmoidDeri(outputLayer[i].z);\r\n }\r\n\r\n adjust(learningRate, true);\r\n calculateDesireHiddenLayerActivation(dataIndex);\r\n\r\n for (int i = 0; i < hiddenLayer.length; i++) {\r\n for (int j = 0; j < hiddenLayer[i].weights.length; j++) {\r\n hiddenLayer[i].dw[j] = -2*(desireHiddenLayerActivation[i] - hiddenLayer[i].a)*sigmoidDeri(hiddenLayer[i].z)*hiddenLayer[i].data[j];\r\n }\r\n hiddenLayer[i].db = -2*(desireHiddenLayerActivation[i] - hiddenLayer[i].a)*sigmoidDeri(hiddenLayer[i].z);\r\n }\r\n\r\n adjust(learningRate, false);\r\n }", "public double volume () {return (4/3)*Math.PI*this.r*this.r*this.r;}", "public List<Peak> filterNoise(List<Peak> peaks, double threshold, double experimentalPrecursorMzRatio);", "public double getNoiseMean() {\n\t\t\treturn NOISE_MEAN;\n\t\t}", "public void derivative3p1o(ImagePlus img, ImageStack stack, int width, int height, int slices, int mul){\r\n\t\t\r\n\t\tImageProcessor resIp = img.getProcessor();\r\n\r\n\t\tfloat f_[] = new float[slices+1];\r\n\t\tfloat out[] = new float[slices+1];\r\n\r\n\t\tfor(int x = 0; x < height; x++){\r\n\t\t\tfor(int y = 0 ; y < width; y++){\r\n\t\t\t\t\tfor(int z=1;z<slices+1;z++){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tresIp = stack.getProcessor(z);\r\n\t\t\t\t\t\tf_[z] = resIp.getf(x,y);\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\tfor(int w=2;w<slices;w++){\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tout[w] = mul * ((-1*f_[w-1] + 0* f_[w] + f_[w+1])/2);\r\n\t\t\t\t\t\tresIp = stack.getProcessor(w);\r\n\t\t\t\t\t\tresIp.setf(x,y,out[w]);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(1);\r\n\t\t\t\t\tout[1] = mul * ((-3*f_[1]+4*f_[1+1]-1*f_[1+2])/2);\r\n\t\t\t\t\tresIp.setf(x,y,(out[1]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(slices);\r\n\t\t\t\t\tout[slices] = mul * ((f_[slices-2]-4*f_[slices-1] + 3*f_[slices])/2);\r\n\t\t\t\t\tresIp.setf(x,y,(out[slices]));\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public double costNEX() {\r\n double diff=0;\r\n double intensity=0;\r\n \r\n for(int x=Config.ptvXLow-0; x < Config.ptvXHigh+0; x++) {\r\n// for(int x=Solver.xBoundsTumor[0]; x < Solver.xBoundsTumor[1]; x+= Config.scaleFactor) {\r\n for(int y=Config.ptvYLow-0; y < Config.ptvYHigh+0; y++) {\r\n// for(int y=Solver.yBoundsTumor[0]; y < Solver.yBoundsTumor[1]; y+= Config.scaleFactor) {\r\n for(int z=Config.ptvZLow-0; z < Config.ptvZHigh+0; z++) {\r\n// for(int z=Solver.zBoundsTumor[0]; z < Solver.zBoundsTumor[1]; z+= Config.scaleFactor) {\r\n\r\n this.body2[x][y][z].setCurrentDosis(0.0); //Set currentPtvVoxel Dose to 0 \r\n for(int i=0; i<Config.numberOfSeeds;++i) { \r\n // Calculate intensity based based on current dwelltime\r\n intensity = this.body2[x][y][z].radiationIntensity(this.seeds2[i].getCoordinate(), New_state[i]);\r\n if (intensity>0) {\r\n// LogTool.print(\"Cost: Intensity :\" + intensity + \"@ \" + x + \" \" + y + \" \" + z,\"notification\");\r\n }\r\n this.body2[x][y][z].addCurrentDosis(intensity);\r\n } \r\n diff += Math.pow((this.body2[x][y][z].getGoalDosis()-this.body2[x][y][z].getCurrentDosis()),2);\r\n// LogTool.print(\" diffdose \" + (Looper.body2[x][y][z].getGoalDosis()-Looper.body2[x][y][z].getCurrentDosis()),\"notification\");\r\n } \r\n }\r\n }\r\n return Math.sqrt(diff);\r\n// return Math.random();\r\n }", "@java.lang.Override\n public boolean hasFeatureNoiseSigma() {\n return gradientNoiseSigmaCase_ == 2;\n }", "public double sampleVariance() {\n/* 262 */ Preconditions.checkState((this.count > 1L));\n/* 263 */ if (Double.isNaN(this.sumOfSquaresOfDeltas)) {\n/* 264 */ return Double.NaN;\n/* */ }\n/* 266 */ return DoubleUtils.ensureNonNegative(this.sumOfSquaresOfDeltas) / (this.count - 1L);\n/* */ }", "private void calcDilution() {\n \t\t\tdouble dilutionFactor = dilVol.getValue() / postBoilVol.getValue();\n \t\t\tdilIbu = ibu / dilutionFactor;\n \t\t\tdilAlc = alcohol / dilutionFactor;\n \t\t\tdilOG = ((estOg - 1) / dilutionFactor) + 1;\n \t\t\tdilSrm = srm / dilutionFactor;\n \n \t\t}", "public float work(float ds, float v);", "public native MagickImage addNoiseImage(int noiseType)\n\t\t\tthrows MagickException;", "public double energy(int x, int y) {\n Color upper = picture.get(x, (y - 1 + this.height()) % this.height());\n Color lower = picture.get(x, (y + 1 + this.height()) % this.height());\n Color left = picture.get((x - 1 + this.width()) % this.width(), y);\n Color right = picture.get((x + 1 + this.width()) % this.width(), y);\n return getGradient(upper, lower) + getGradient(left, right);\n }", "public double noise2D(double xin, double yin) {\n double n0, n1, n2;\n double s = (xin + yin) * F2;\n int i = fastfloor(xin + s);\n int j = fastfloor(yin + s);\n double t = (i + j) * G2;\n double X0 = i - t;\n double Y0 = j - t;\n double x0 = xin - X0;\n double y0 = yin - Y0;\n int i1, j1;\n if(x0 > y0) {\n i1 = 1;\n j1 = 0;\n } else {\n i1 = 0;\n j1 = 1;\n }\n double x1 = x0 - i1 + G2;\n double y1 = y0 - j1 + G2;\n double x2 = x0 - 1.0 + 2.0 * G2;\n double y2 = y0 - 1.0 + 2.0 * G2;\n int ii = i & (SUPPLY_LENGTH - 1);\n int jj = j & (SUPPLY_LENGTH - 1);\n int gi0 = permMod12[perm[ii + perm[jj]]];\n int gi1 = permMod12[perm[ii + i1 + perm[jj + j1]]];\n int gi2 = permMod12[perm[ii + 1 + perm[jj + 1]]];\n double t0 = CONTRIBUTION_FACTOR - x0 * x0 - y0 * y0;\n if(t0 < 0) {\n n0 = 0.0;\n } else {\n t0 *= t0;\n n0 = t0 * t0 * dot(GTAB[gi0], x0, y0, 0);\n }\n double t1 = CONTRIBUTION_FACTOR - x1 * x1 - y1 * y1;\n if(t1 < 0) {\n n1 = 0.0;\n } else {\n t1 *= t1;\n n1 = t1 * t1 * dot(GTAB[gi1], x1, y1, 0);\n }\n double t2 = CONTRIBUTION_FACTOR - x2 * x2 - y2 * y2;\n if(t2 < 0) {\n n2 = 0.0;\n } else {\n t2 *= t2;\n n2 = t2 * t2 * dot(GTAB[gi2], x2, y2, 0);\n }\n return NORMALIZE_FACTOR_2D * (n0 + n1 + n2);\n }", "private void run3DC() {\r\n\r\n this.buildProgressBar();\r\n\r\n // OK, here is where the meat of the algorithm goes\r\n\r\n int length;\r\n int i;\r\n int extents[] = srcImage.getExtents();\r\n xDim = extents[0];\r\n yDim = extents[1];\r\n zDim = extents[2];\r\n length = xDim * yDim * zDim;\r\n\r\n // buffers for the image data\r\n float sourceBufferR[] = null;\r\n float sourceBufferG[] = null;\r\n float sourceBufferB[] = null;\r\n float resultBufferR[] = null;\r\n float resultBufferG[] = null;\r\n float resultBufferB[] = null;\r\n float gaussianBufferR[] = null;\r\n float gaussianBufferG[] = null;\r\n float gaussianBufferB[] = null;\r\n float gradientBuffer[];\r\n float gradientBufferR[] = null;\r\n float gradientBufferG[] = null;\r\n float gradientBufferB[] = null;\r\n\r\n boolean useRed = true;\r\n boolean useGreen = true;\r\n boolean useBlue = true;\r\n int colorsPresent = 3;\r\n srcImage.calcMinMax();\r\n if (srcImage.getMinR() == srcImage.getMaxR()) {\r\n useRed = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinG() == srcImage.getMaxG()) {\r\n useGreen = false;\r\n colorsPresent--;\r\n }\r\n if (srcImage.getMinB() == srcImage.getMaxB()) {\r\n useBlue = false;\r\n colorsPresent--;\r\n }\r\n\r\n // copy the image data into the sourceBuffer so we can access it\r\n try {\r\n if (useRed) {\r\n sourceBufferR = new float[length];\r\n resultBufferR = new float[length];\r\n gaussianBufferR = new float[length];\r\n gradientBufferR = new float[length];\r\n }\r\n if (useGreen) {\r\n sourceBufferG = new float[length];\r\n resultBufferG = new float[length];\r\n gaussianBufferG = new float[length];\r\n gradientBufferG = new float[length];\r\n }\r\n if (useBlue) {\r\n sourceBufferB = new float[length];\r\n resultBufferB = new float[length];\r\n gaussianBufferB = new float[length];\r\n gradientBufferB = new float[length];\r\n }\r\n gradientBuffer = new float[length];\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = 0.0f;\r\n }\r\n } catch (OutOfMemoryError e){\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Out of memory when creating image buffer\", true);\r\n return;\r\n } // catch{}\r\n\r\n // Gaussian blur the input image as a 3D image\r\n sigmas = new float[3];\r\n sigmas[0] = sigmas[1] = sigmas[2] = stdDev;\r\n\r\n makeKernels1D(true);\r\n\r\n // source image is in sourceBuffer, gaussian smoothed image is in gaussianBuffer\r\n\r\n\r\n try {\r\n if (useRed) {\r\n srcImage.exportRGBData(1, 0, length, sourceBufferR);\r\n }\r\n if (useGreen) {\r\n srcImage.exportRGBData(2, 0, length, sourceBufferG);\r\n }\r\n if (useBlue) {\r\n srcImage.exportRGBData(3, 0, length, sourceBufferB);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: could NOT export source image\", true);\r\n return;\r\n } // catch()\r\n // make the magnitude of the gradient image of the gaussian smoothed source image\r\n if (useRed) {\r\n algoSepConvolverR = new AlgorithmSeparableConvolver(gaussianBufferR, sourceBufferR,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG = new AlgorithmSeparableConvolver(gaussianBufferG, sourceBufferG,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB = new AlgorithmSeparableConvolver(gaussianBufferB, sourceBufferB,\r\n extents, xDataRound, yDataRound, zDataRound, false);\r\n }\r\n\r\n for(int iterNum = 0; iterNum < numIterations; iterNum++) {\r\n if (isProgressBarVisible()) {\r\n progressBar.updateValue(Math.round( ( (float) (iterNum) /\r\n (numIterations - 1) * 100)),\r\n activeImage);\r\n }\r\n\r\n if (useRed) {\r\n algoSepConvolverR.run();\r\n gradientMagnitude3D(gaussianBufferR, gradientBufferR);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] = gradientBufferR[i];\r\n }\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.run();\r\n gradientMagnitude3D(gaussianBufferG, gradientBufferG);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferG[i];\r\n }\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.run();\r\n gradientMagnitude3D(gaussianBufferB, gradientBufferB);\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] += gradientBufferB[i];\r\n }\r\n }\r\n for (i = 0; i < length; i++) {\r\n gradientBuffer[i] /= colorsPresent;\r\n }\r\n if (useRed) {\r\n upDateImage3D(resultBufferR, sourceBufferR, gradientBuffer);\r\n }\r\n if (useGreen) {\r\n upDateImage3D(resultBufferG, sourceBufferG, gradientBuffer);\r\n }\r\n if (useBlue) {\r\n upDateImage3D(resultBufferB, sourceBufferB, gradientBuffer);\r\n }\r\n\r\n // copy resultBuffer to sourceBuffer for the next iteration\r\n if (iterNum < (numIterations - 1)) {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferR[i] = resultBufferR[i];\r\n }\r\n } // if (useRed)\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferG[i] = resultBufferG[i];\r\n }\r\n } // if (useGreen)\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n sourceBufferB[i] = resultBufferB[i];\r\n }\r\n } // if (useBlue)\r\n } // if (iterNum < (numIterations - 1))\r\n\r\n } // end for (int iterNum = 0; ...)\r\n\r\n if (useRed) {\r\n algoSepConvolverR.finalize();\r\n algoSepConvolverR = null;\r\n }\r\n if (useGreen) {\r\n algoSepConvolverG.finalize();\r\n algoSepConvolverG = null;\r\n }\r\n if (useBlue) {\r\n algoSepConvolverB.finalize();\r\n algoSepConvolverB = null;\r\n }\r\n\r\n // OK, the resultBuffer is filled with the results of the algorithm,\r\n // put this data into the destination image so it will be displayed in\r\n // in the ViewJFrameWizard\r\n try {\r\n if (useRed) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferR[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferR[i] = 255.0f;\r\n }\r\n else if (resultBufferR[i] < 0.0f) {\r\n resultBufferR[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(1, 0, resultBufferR, false);\r\n }\r\n if (useGreen) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferG[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferG[i] = 255.0f;\r\n }\r\n else if (resultBufferG[i] < 0.0f) {\r\n resultBufferG[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(2, 0, resultBufferG, false);\r\n }\r\n if (useBlue) {\r\n for (i = 0; i < length; i++) {\r\n if ((resultBufferB[i] > 255.0f) &&\r\n (destImage.getType() == ModelStorageBase.ARGB)) {\r\n resultBufferB[i] = 255.0f;\r\n }\r\n else if (resultBufferB[i] < 0.0f) {\r\n resultBufferB[i] = 0.0f;\r\n }\r\n }\r\n destImage.importRGBData(3, 0, resultBufferB, false);\r\n }\r\n } catch (IOException error) {\r\n sourceBufferR = sourceBufferG = sourceBufferB = null;\r\n resultBufferR = resultBufferG = resultBufferB = null;\r\n gaussianBufferR = gaussianBufferG = gaussianBufferB = null;\r\n gradientBuffer = gradientBufferR = gradientBufferG = gradientBufferB = null;\r\n errorCleanUp(\"AlgorithmRegularizedIsotropicDiffusion: Could NOT import resultBuffer to the image\", true);\r\n return;\r\n } // end try{}-catch{}\r\n\r\n destImage.calcMinMax();\r\n disposeProgressBar();\r\n if (threadStopped) { finalize(); return; }\r\n\r\n setCompleted(true);\r\n }", "public void injectSomeMoreNoise(double intensity) {\n//\t\taddBSCnoise(lambda,intensity);\n\t\t\n//\t\taddBSCnoise(posterior, intensity);\n//\t\tfor (int i=0; i<n; i++) lambda[i] = posterior[i];\n//\t\tcalc_q0 (posterior);\n//\n//\t\t// initialization of beta\n//\t\tfor (int i = 0; i <= m - 1; i++) {\n//\t\t\tfor (int j = 0; j <= row_weight[i] - 1; j++) {\n//\t\t\t\tbeta[i][j] = 0.0;\n//\t\t\t}\n//\t\t}\t\t\n\t\t\n\t}", "public void derivative3p2o(ImagePlus img, ImageStack stack, int width, int height, int slices, int mul){\r\n\t\t\r\n\t\tImageProcessor resIp = img.getProcessor();\r\n\r\n\t\tfloat f_[] = new float[slices+1];\r\n\t\tfloat out[] = new float[slices+1];\r\n\r\n\t\tfor(int x = 0; x < height; x++){\r\n\t\t\tfor(int y = 0 ; y < width; y++){\r\n\t\t\t\t\tfor(int z=1;z<slices+1;z++){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tresIp = stack.getProcessor(z);\r\n\t\t\t\t\t\tf_[z] = resIp.getf(x,y);\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\tfor(int w=2;w<slices;w++){\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tout[w] = mul * (f_[w+1]+f_[w-1] - (2*f_[w]));\r\n\t\t\t\t\t\tresIp = stack.getProcessor(w);\r\n\t\t\t\t\t\tresIp.setf(x,y,out[w]);\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(1);\r\n\t\t\t\t\tout[1] = mul * (f_[1]-2*f_[1+1]+ f_[1+2]);\r\n\t\t\t\t\tresIp.setf(x,y,(out[1]));\r\n\t\t\t\t\t\r\n\t\t\t\t\tresIp = stack.getProcessor(slices);\r\n\t\t\t\t\tout[slices] = mul*(f_[slices-2]-2*f_[slices-1] + f_[slices]);\r\n\t\t\t\t\tresIp.setf(x,y,(out[slices]));\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public double calc_c() {\r\n \t\t\r\n \t\tdouble cij = 0;\r\n \t\tint sum_i = 0;\r\n \t\tint sum_j = 0;\r\n \t\tint diff = 0;\r\n \t\tint state = 0;\r\n \t\t\r\n \t\tdouble li, lri, lj, lrj;\r\n \t\t\r\n \t\tList<Integer> samestate_i = new ArrayList<>();\r\n \t\tList<Integer> samestate_j = new ArrayList<>();\r\n \t\t\r\n \t\tList<Double> gradient_i = new ArrayList<>();\r\n \t\tList<Double> gradient_j = new ArrayList<>();\r\n \t\t\r\n\t\t// if the time step is less than the window cij is initialized to zero.\r\n\t\tif(this.n <= this.w || this.w <2) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// else we determine the state of the region i and region j of which\r\n\t\t\t// we are calculating the cij for\r\n\t \t\tDeterminestate di = new Determinestate(this.i, this.n);\r\n\t\t\tDeterminestate dj = new Determinestate(this.j, this.n);\r\n\t\t\t\r\n\t\t\tProbability pi = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\tProbability pj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\r\n\t\t\tif(di.regionCurrentstate() == dj.regionCurrentstate()) {\r\n\t\t\t\tli = pi.getLsave().get(0);\r\n\t\t\t\tlj = pj.getLsave().get(0);\r\n\t\t\t\tstate = 0;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tli = pi.getLsave().get(1);\r\n\t\t\t\tlj = pj.getLsave().get(1);\r\n\t\t\t\tstate =1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// for the time window\r\n\t\t\tfor(int k=1; k<this.w; k++) {\r\n\t\t\t\t\r\n\t\t\t\t// determine the state of i and j in the in n-k time step\r\n\t \t\t\tDeterminestate dri = new Determinestate(this.i, this.n-k);\r\n\t \t\t\tDeterminestate drj = new Determinestate(this.j, this.n-k);\r\n\t \t\t\t\r\n\t \t\t\tProbability pri = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\tProbability prj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\t\r\n\t\t\t\tlri = pri.getLsave().get(state);\r\n\t\t\t\tlrj = prj.getLsave().get(state);\r\n\t \t\t\t\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for i make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == dri.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_i.add(k);\r\n\t \t\t\t\tgradient_i.add(li - lri);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for j make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == drj.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_j.add(k);\r\n\t \t\t\t\tgradient_j.add(lj - lrj);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t// if no match found return zero\r\n\t\tif(samestate_i.size() == 0 || samestate_j.size() == 0) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\t// else calculate cij\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// if both have same length \r\n\t\t\tif(samestate_i.size() == samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j) * Math.abs(diff/(double)this.w);\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//if i is smaller\r\n\t\t\telse if(samestate_i.size() < samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// if j is smaller \r\n\t\t\telse {\r\n\t\t\t\tfor(int i=0; i<samestate_j.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.isNaN(cij)) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn cij;\r\n\t\t}\r\n \t}", "public NoiseCalculator(double wavelength, double offset) {\n this(wavelength, offset, 1.0);\n }", "private double Volume() {\n\t\tdouble volume = (4f / 3f) * Math.PI * Math.pow(_radius, 3);\n\t\treturn volume;\n\t}", "public Double[] mvNextDouble(Random rng) {\n\t\t\n Double Y[] = new Double[nVar];\n Double X[] = new Double[nVar];\n\n for (int i = 0; i <= nVar - 1; i++){\n X[i] = super.inverseF(rng.nextDouble());\n Y[i] = meanArray[i];\n }\n\n if (NotPD) {\n \tfor (int i = 0; i <= nVar - 1; i++){\n \t\tY[i] += X[i];\n }\n }\n else{\n \tfor (int i = 0; i <= nVar - 1; i++){\n \tfor (int j = 0; j <= i; j++){\n Y[i] += H[i][j] * X[j];\n \t}\n }\n }\n\t\treturn Y;\n\t}", "protected double samplesOnePixelF() {\r\n\t\tif (getGraphWidth() > 1) {\r\n\t\t\t// avoid division by zero\r\n\t\t\treturn ((double) section.getLength()) / getGraphWidth();\r\n\t\t}\r\n\t\treturn 1.0;\r\n\t}", "private double noisyRt(double value) {\n\n\t\t// then add additive noise as well\n\t\tdouble additiveNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getRtStdev());\n\t\tvalue += additiveNoise;\n\t\t\n\t\t// value must always be >= 0\n\t\tif (value < 0) {\n\t\t\tvalue = 0;\n\t\t}\n\t\treturn value;\n\n\t}", "@Test\n public void computeResult_addsNoiseToCount() {\n mockDoubleNoise(0);\n // Mock the noise mechanism so that it adds noise to the count == 2.\n mockLongNoise(2);\n\n variance =\n BoundedVariance.builder()\n .epsilon(EPSILON)\n .delta(DELTA)\n .noise(noise)\n .maxPartitionsContributed(1)\n .maxContributionsPerPartition(1)\n .lower(-100)\n .upper(100)\n .build();\n\n variance.addEntry(20);\n variance.addEntry(20);\n // midpoint = (lower + upper) / 2 = 0,\n // noised_normalized_sum_of_squares = (x1 - midpoint)^2 + (x2 - midpoint)^2 + noise = 20^2 +\n // 20^2 = 800,\n // noised_normalized_sum = (x1 + x2) - midpoint * count + noise = 20 + 20 - 0 + 0 = 40,\n // noised_count = count + noise = 2 + 2 = 4,\n // BoundedVariance.computeResult() = noised_normalized_sum_of_squares / noised_count -\n // (noised_normalized_sum / noised_count)^2 = 800 / 4 - (40 / 4)^2 = 100\n assertThat(variance.computeResult()).isEqualTo(100.0);\n }", "com.google.protobuf.ByteString\n getNoiseBytes();", "public final Image getNormal(final double intensity) {\n if (width * height < RESOLUTION_HIGH) {\n return null;\n }\n WritableImage img = new WritableImage(width, height);\n PixelWriter writer = img.getPixelWriter();\n normalLoop:\n for (int j = 0; j < height; j++) {\n for (int i = 0; i < width; i++) {\n if (Thread.interrupted()) {\n break normalLoop;\n }\n double tl = noiseBuffer[(height + j - 1) % height]\n [(width + i - 1) % width];\n double t = noiseBuffer[(height + j - 1) % height][i];\n double tr = noiseBuffer[(height + j - 1) % height]\n [(i + 1) % width];\n double r = noiseBuffer[j][(i + 1) % width];\n double br = noiseBuffer[(j + 1) % height][(i + 1) % width];\n double b = noiseBuffer[(j + 1) % height][i];\n double bl = noiseBuffer[(j + 1) % height]\n [(width + i - 1) % width];\n double l = noiseBuffer[j][(width + i - 1) % width];\n double dx = (tl + 2.0 * l + bl) - (tr + 2.0 * r + br);\n double dy = (tl + 2.0 * t + tr) - (bl + 2.0 * b + br);\n double dz = 1.0 / intensity;\n double mag = Math.sqrt(dx * dx + dy * dy + dz * dz);\n dx = (1 + dx / mag) / 2.0;\n dy = (1 + dy / mag) / 2.0;\n dz = (1 + dz / mag) / 2.0;\n writer.setColor(i, j, Color.color(dx, dy, dz));\n }\n }\n return img;\n }", "protected double calc_virial_pressure() {\n\t\tint i,j,iTot;\n\t\tdouble dr2,fij,rij,TotFdotR;\n\t\tdouble vp;\n\t\t\n\t\t/* Calculate sum(f.r): */\n\t\tTotFdotR = 0.0; iTot = 0;\n\t\tfor(i=0; i<n; i++) {\n\t\t\tfor(j=0; j<n; j++) {\n\t\t\t\tif ( i != j ) {\n\t\t\t\t\tdr2 = ij_sep2(i,j,c_lat,CUR_POS);\n\t\t\t\t\trij = Math.sqrt(dr2);\n\t\t\t\t\tfij = -12.0*4.0*Math.pow(diameter,12.0)/Math.pow(rij,13.0)\n\t\t\t\t\t+6.0*4.0*Math.pow(diameter,6.0)/Math.pow(rij,7.0);\n\t\t\t\t\tTotFdotR += fij*rij;\n\t\t\t\t\tiTot++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//TotFdotR /= (double)iTot;\n\t\tTotFdotR /= -2.0;\n\t\t\n\t\t/* Calc total virial: */\n\t\tvp = Math.sqrt(2.0)*calc_sys_density()/beta +\n\t\tMath.pow(diameter,3.0)*TotFdotR/(3.0*box[c_lat].x*box[c_lat].y*box[c_lat].z);\n\t\t\n\t\t/* check line */\n\t\t//System.out.printf(\" VPi %f %f %f\\n\",calc_density()/beta, TotFdotR/(3.0*box.x*box.y*box.z),vp);\n\t\t\n\t\treturn(vp);\n\t}", "double volume() {\n\t\treturn 0;\n\t}", "void vng_interpolate()\n{\n}", "private static native void rollingGuidanceFilter_0(long src_nativeObj, long dst_nativeObj, int d, double sigmaColor, double sigmaSpace, int numOfIter, int borderType);", "public NoiseCalculator(double wavelength, double offset, double amplitude) {\n this(wavelength, offset, amplitude, 0.0);\n }", "private void resampleAbdomenVOI( int sliceIdx, VOIContour curve ) {\r\n \r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM(sliceIdx);\r\n int xcm = centerOfMass[0];\r\n int ycm = centerOfMass[1];\r\n// ViewUserInterface.getReference().getMessageFrame().append(\"Xcm: \" +xcm +\" Ycm: \" +ycm);\r\n \r\n\r\n ArrayList<Integer> xValsAbdomenVOI = new ArrayList<Integer>();\r\n ArrayList<Integer> yValsAbdomenVOI = new ArrayList<Integer>();\r\n\r\n // angle in radians\r\n double angleRad;\r\n \r\n for (int angle = 0; angle < 360; angle += angularResolution) {\r\n int x = xcm;\r\n int y = ycm;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n // increment x each step\r\n scaleFactor = Math.tan(angleRad);\r\n while (x < xDim && curve.contains(x, y)) {\r\n \r\n // walk out in x and compute the value of y for the given radial line\r\n x++;\r\n y = ycm - (int)((x - xcm) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n // decrement y each step\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n while (y > 0 && curve.contains(x, y)) {\r\n\r\n // walk to the top of the image and compute values of x for the given radial line\r\n y--;\r\n x = xcm + (int)((ycm - y) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n // decrement x each step\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n while (x > 0 && curve.contains(x, y)) {\r\n \r\n x--;\r\n y = ycm - (int)((xcm - x) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n\r\n } else if (angle > 225 && angle <= 315) {\r\n // increment y each step\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n while (y < yDim && curve.contains(x, y)) {\r\n \r\n y++;\r\n x = xcm - (int)((y - ycm) * scaleFactor);\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n }\r\n } // end for (angle = 0; ...\r\n \r\n// ViewUserInterface.getReference().getMessageFrame().append(\"resample VOI number of points: \" +xValsAbdomenVOI.size());\r\n\r\n curve.clear();\r\n for(int idx = 0; idx < xValsAbdomenVOI.size(); idx++) {\r\n curve.add( new Vector3f( xValsAbdomenVOI.get(idx), yValsAbdomenVOI.get(idx), sliceIdx ) );\r\n }\r\n }", "@Override\n\tpublic void calcularVolume() {\n\t\t\n\t}", "public abstract void newSpeechNoise(long ms, int n);", "@Override\n\tpublic Number filteredReading() {\t\n\t// Check we have any readings.\n\tif (buffer.size() == 0) return new Double(0.0);\n\n\tSensorReading reading = null;\n\tdouble sum = 0.0;\n\tdouble avge = 0.0;\n\tint index = 0;\n\n\t// Loop over buffered samples.\n\tIterator it = buffer.iterator();\n\twhile (it.hasNext()) {\n\t reading = (SensorReading)it.next();\n\t avge = avge + reading.getContinuousReading();\n\t index++;\n\t}\n\tlogger.log(2, \"Av-Filter\", name, \"filteredReading\",\"Returned: \"+\n\t\t (avge/index)+\" using \"+index+\" samples.\");\n\treturn new Double(avge / index);\n }" ]
[ "0.6688722", "0.66591996", "0.65599036", "0.6361639", "0.6270701", "0.6191183", "0.60307413", "0.58733875", "0.58620393", "0.5634777", "0.5529838", "0.5504936", "0.5415665", "0.53809327", "0.5297336", "0.5213811", "0.519959", "0.51642454", "0.5162355", "0.5157464", "0.51048183", "0.5098684", "0.5062972", "0.5045859", "0.4980516", "0.4974154", "0.49662673", "0.49495417", "0.4925178", "0.49248654", "0.49242824", "0.48990086", "0.48836386", "0.48669508", "0.48441443", "0.4833371", "0.48216924", "0.4800842", "0.47650406", "0.476301", "0.4757621", "0.47552457", "0.47533736", "0.4746947", "0.47274172", "0.470967", "0.47070134", "0.47048673", "0.47042164", "0.47011128", "0.46973237", "0.46971706", "0.46959773", "0.46908325", "0.46908325", "0.4674962", "0.46678331", "0.46614417", "0.4659313", "0.4640487", "0.4630109", "0.46259046", "0.46052343", "0.46006176", "0.45982018", "0.4592354", "0.45894578", "0.4586204", "0.4582629", "0.4580043", "0.45736176", "0.4559291", "0.452795", "0.45256236", "0.45138088", "0.45068178", "0.4505252", "0.44916803", "0.44913703", "0.44843748", "0.44819996", "0.4479533", "0.44673976", "0.446393", "0.446076", "0.44495726", "0.44433", "0.44288474", "0.44249767", "0.44209653", "0.4418564", "0.44175768", "0.4411722", "0.44083717", "0.44062173", "0.44049013", "0.43860587", "0.43810079", "0.43729532", "0.4360405" ]
0.6469654
3
Calcualte the noise estimate via the gradient method given a volume and channel.
public float gradientMethod(MCVolume vol, int channel_num) { float nes = (float)0.0; // // Get the right slice. // for(int ii=0; ii<vol.getNSlices(); ii++) { nes += gradientMethod( vol.getSlice(ii, channel_num) ); } return (nes / (float)vol.getNSlices()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float gradientMethod(MCVolume vol) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tfor(int jj=0; jj<vol.getNChannels(); jj++) {\n\t\t\t\tnes += gradientMethod( vol.getSlice(ii, jj) );\n\t\t\t}\n\t\t}\n\n\t\treturn (nes / ((float)vol.getNSlices()*(float)vol.getNChannels()) );\n\t}", "private double noise(SpIterNoiseObs noise) {\n return 3.0 * 60.0;\n }", "public float gradientMethod(MCVolume vol, int slice_num, int channel_num) \n\t{\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tSlice slice = vol.getSlice(slice_num, channel_num);\n\n\t\treturn gradientMethod(slice);\n\t}", "public int noise(int xin, int yin, int zin);", "public float gradientMethod(Volume vol) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tnes += gradientMethod( vol.getSlice(ii) );\n\t\t}\n\n\t\treturn (nes / (float)vol.getNSlices());\n\t}", "private void compute() {\r\n int i, j, k;\r\n float gx, gy, gz;\r\n for (int q = 0; q < data.length; q++) {\r\n data[q] = new VoxelGradient();\r\n }\r\n\r\n\r\n // gradient at extremes, 0 and dim-1\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n gx = (volume.data[(i + 1) + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n gy = (volume.data[i + (dimX * ((j + 1) + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n gz = (volume.data[i + (dimX * (j + (dimY * (k + 1))))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n i = dimX - 1;\r\n j = dimY - 1;\r\n k = dimZ - 1;\r\n gx = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[(i - 1) + (dimX * (j + (dimY * k)))]) / 1;\r\n gy = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * ((j - 1) + (dimY * k)))]) / 1;\r\n gz = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * (k - 1))))]) / 1;\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n\r\n\r\n //gradient in non-extreme points\r\n for (i = 1; i < dimX - 1; i++) {\r\n for (j = 1; j < dimY - 1; j++) {\r\n for (k = 1; k < dimZ - 1; k++) {\r\n\r\n gx = (volume.data[(i + 1) + (dimX * (j + (dimY * k)))] - volume.data[(i - 1) + (dimX * (j + (dimY * k)))]) / 2;\r\n\r\n gy = (volume.data[i + (dimX * ((j + 1) + (dimY * k)))] - volume.data[i + (dimX * ((j - 1) + (dimY * k)))]) / 2;\r\n\r\n gz = (volume.data[i + (dimX * (j + (dimY * (k + 1))))] - volume.data[i + (dimX * (j + (dimY * (k - 1))))]) / 2;\r\n\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n\r\n\r\n }\r\n }\r\n }\r\n }", "M generateNoise();", "public GradientVolume(Volume vol) {\r\n volume = vol;\r\n dimX = vol.getDimX();\r\n dimY = vol.getDimY();\r\n dimZ = vol.getDimZ();\r\n data = new VoxelGradient[dimX * dimY * dimZ];\r\n compute();\r\n maxmag = -1.0;\r\n }", "void calcWave() {\n yoff += 0.01f;\n \n //For every x value, calculate a y value based on sine or cosine\n float x = yoff; //**OPTION #1****/\n //float x = 0.0f; //**OPTION #2****/\n for (int i = 0; i < yvalues.length; i++) {\n float n = 2*noise(x)-1.0f; //**OPTION #1****/ //scale noise to be between 1 and -1\n //float n = 2*noise(x,yoff)-1.0f; //**OPTION #2****/ //scale noise to be between 1 and -1\n yvalues[i] = n*amplitude;\n x+=dx;\n }\n }", "public final double getEstimatedNoise() {\r\n return noise;\r\n }", "@java.lang.Override\n public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "public double getYNoise(double x, double z)\n {\n double var11 = 0.5D * (square3 - 1.0D);\n double var13 = (x + z) * var11;\n int var15 = fastFloor(x + var13);\n int var16 = fastFloor(z + var13);\n double var17 = (3.0D - square3) / 6.0D;\n double var19 = (double)(var15 + var16) * var17;\n double var21 = (double)var15 - var19;\n double var23 = (double)var16 - var19;\n double var25 = x - var21;\n double var27 = z - var23;\n byte var29;\n byte var30;\n\n if (var25 > var27)\n {\n var29 = 1;\n var30 = 0;\n }\n else\n {\n var29 = 0;\n var30 = 1;\n }\n\n double var31 = var25 - (double)var29 + var17;\n double var33 = var27 - (double)var30 + var17;\n double var35 = var25 - 1.0D + 2.0D * var17;\n double var37 = var27 - 1.0D + 2.0D * var17;\n int var39 = var15 & 255;\n int var40 = var16 & 255;\n int var41 = this.permutationTable[var39 + this.permutationTable[var40]] % 12;\n int var42 = this.permutationTable[var39 + var29 + this.permutationTable[var40 + var30]] % 12;\n int var43 = this.permutationTable[var39 + 1 + this.permutationTable[var40 + 1]] % 12;\n double var44 = 0.5D - var25 * var25 - var27 * var27;\n double var5;\n\n if (var44 < 0.0D)\n {\n var5 = 0.0D;\n }\n else\n {\n var44 *= var44;\n var5 = var44 * var44 * dot(grad3[var41], var25, var27);\n }\n\n double var46 = 0.5D - var31 * var31 - var33 * var33;\n double var7;\n\n if (var46 < 0.0D)\n {\n var7 = 0.0D;\n }\n else\n {\n var46 *= var46;\n var7 = var46 * var46 * dot(grad3[var42], var31, var33);\n }\n\n double var48 = 0.5D - var35 * var35 - var37 * var37;\n double var9;\n\n if (var48 < 0.0D)\n {\n var9 = 0.0D;\n }\n else\n {\n var48 *= var48;\n var9 = var48 * var48 * dot(grad3[var43], var35, var37);\n }\n\n return 70.0D * (var5 + var7 + var9);\n }", "public float gradientMethod(Volume vol, int slice_num) \n\t{\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tSlice slice = vol.getSlice(slice_num);\n\n\t\treturn gradientMethod(slice);\n\t}", "private double innerEnergy(int x, int y)\n {\n Color left = this.picture.get(x-1, y);\n Color right = this.picture.get(x+1, y);\n Color up = this.picture.get(x, y-1);\n Color down = this.picture.get(x, y+1);\n return gradient(left, right) + gradient(up, down);\n }", "private double noise(final double xin, final double yin, final double zin) {\n double n0, n1, n2, n3;\n double s = (xin + yin + zin) * F3;\n int i = fastfloor(xin + s);\n int j = fastfloor(yin + s);\n int k = fastfloor(zin + s);\n double t = (i + j + k) * G3;\n double x0 = xin - (i - t);\n double y0 = yin - (j - t);\n double z0 = zin - (k - t);\n int i1, j1, k1;\n int i2, j2, k2;\n if (x0 >= y0) {\n if (y0 >= z0) {\n i1 = 1;\n j1 = 0;\n k1 = 0;\n i2 = 1;\n j2 = 1;\n k2 = 0;\n } else if (x0 >= z0) {\n i1 = 1;\n j1 = 0;\n k1 = 0;\n i2 = 1;\n j2 = 0;\n k2 = 1;\n } else {\n i1 = 0;\n j1 = 0;\n k1 = 1;\n i2 = 1;\n j2 = 0;\n k2 = 1;\n }\n } else {\n if (y0 < z0) {\n i1 = 0;\n j1 = 0;\n k1 = 1;\n i2 = 0;\n j2 = 1;\n k2 = 1;\n } else if (x0 < z0) {\n i1 = 0;\n j1 = 1;\n k1 = 0;\n i2 = 0;\n j2 = 1;\n k2 = 1;\n } else {\n i1 = 0;\n j1 = 1;\n k1 = 0;\n i2 = 1;\n j2 = 1;\n k2 = 0;\n }\n }\n double x1 = x0 - i1 + G3;\n double y1 = y0 - j1 + G3;\n double z1 = z0 - k1 + G3;\n double x2 = x0 - i2 + 2.0 * G3;\n double y2 = y0 - j2 + 2.0 * G3;\n double z2 = z0 - k2 + 2.0 * G3;\n double x3 = x0 - 1.0 + 3.0 * G3;\n double y3 = y0 - 1.0 + 3.0 * G3;\n double z3 = z0 - 1.0 + 3.0 * G3;\n int ii = i & (SUPPLY_LENGTH - 1);\n int jj = j & (SUPPLY_LENGTH - 1);\n int kk = k & (SUPPLY_LENGTH - 1);\n int gi0 = permMod12[ii + perm[jj + perm[kk]]];\n int gi1 = permMod12[ii + i1 + perm[jj + j1 + perm[kk + k1]]];\n int gi2 = permMod12[ii + i2 + perm[jj + j2 + perm[kk + k2]]];\n int gi3 = permMod12[ii + 1 + perm[jj + 1 + perm[kk + 1]]];\n double t0 = CONTRIBUTION_FACTOR - x0 * x0 - y0 * y0 - z0 * z0;\n if (t0 < 0) {\n n0 = 0.0;\n } else {\n t0 *= t0;\n n0 = t0 * t0 * dot(GTAB[gi0], x0, y0, z0);\n }\n double t1 = CONTRIBUTION_FACTOR - x1 * x1 - y1 * y1 - z1 * z1;\n if (t1 < 0) {\n n1 = 0.0;\n } else {\n t1 *= t1;\n n1 = t1 * t1 * dot(GTAB[gi1], x1, y1, z1);\n }\n double t2 = CONTRIBUTION_FACTOR - x2 * x2 - y2 * y2 - z2 * z2;\n if (t2 < 0) {\n n2 = 0.0;\n } else {\n t2 *= t2;\n n2 = t2 * t2 * dot(GTAB[gi2], x2, y2, z2);\n }\n double t3 = CONTRIBUTION_FACTOR - x3 * x3 - y3 * y3 - z3 * z3;\n if (t3 < 0) {\n n3 = 0.0;\n } else {\n t3 *= t3;\n n3 = t3 * t3 * dot(GTAB[gi3], x3, y3, z3);\n }\n return NORMALIZE_FACTOR * (n0 + n1 + n2 + n3);\n }", "public static double noise(double x, double y, double z) {\n\n\t\tdouble s = (x+y+z)/3.0;\n\t\ti = fastfloor(x+s); j = fastfloor(y+s); k = fastfloor(z+s);\n\t\ts = (i+j+k)/6.0; u = x-i+s; v = y-j+s; w = z-k+s;\n\t\tA[0] = A[1] = A[2] = 0;\n\t\tint hi = (u>=w ? (u>=v ? 0 : 1) : (v>=w ? 1 : 2));\n\t\tint lo = (u< w ? (u< v ? 0 : 1) : (v< w ? 1 : 2));\n\t\treturn 4.0 * (K(hi) + K(3-hi-lo) + K(lo) + K(0));\n\t}", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "private float noise(Vector2 point) {\n\t\tVector2 bottomLeft = randomGrid[(int) point.x][(int) point.y];\n\t\tVector2 topLeft = randomGrid[(int) point.x][(int) point.y + 1];\n\t\tVector2 bottomRight = randomGrid[(int) point.x + 1][(int) point.y];\n\t\tVector2 topRight = randomGrid[(int) point.x + 1][(int) point.y + 1];\n\n\t\tfloat bottomLeftValue = bottomLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y));\n\t\tfloat topLeftValue = topLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y + 1));\n\t\tfloat bottomRightValue = bottomRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y));\n\t\tfloat topRightValue = topRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y + 1));\n\n\t\tfloat bottomValue = bottomLeftValue * (1 - point.x % 1) + bottomRightValue * (point.x % 1);\n\t\tfloat topValue = topLeftValue * (1 - point.x % 1) + topRightValue * (point.x % 1);\n\t\tfloat value = bottomValue * (1 - point.y % 1) + topValue * (point.y % 1);\n\n\t\treturn value;\n\t}", "public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "public abstract double gradient(double betaForDimension, int dimension);", "public native MagickImage reduceNoiseImage(double radius)\n\t\t\tthrows MagickException;", "@java.lang.Override\n public boolean hasNoiseSigma() {\n return gradientNoiseSigmaCase_ == 1;\n }", "double volume(){\n return width*height*depth;\n }", "public interface VoxelNoise {\n /*\n * This method returns the voxel type for a location\n */\n public int noise(int xin, int yin, int zin);\n}", "public abstract void makeNoise();", "double volume(){\n\n return widgh*height*depth;\n\n }", "public float getNoise(int x, int y) {\n\t\treturn getRealNoise(x * .3f, y * .3f);\n\t}", "public float gradientMethod(Slice slice) \n\t{\n\t\t//\n\t\t// Intialize variables.\n\t\t//\n\t\tint nrows = slice.getNRows();\n\t\tint ncols = slice.getNCols();\n\n\t\tfloat[] v = new float[nrows*ncols]; int v_numset = 0;\n\t\tfloat t = (float)0.0; \n\t\tfloat sig_y = (float)0.0;\n\t\tfloat sig_x = (float)0.0;\n\n\t\t//\n\t\t// Compute the column gradient\n\t\t//\n\t\tfor(int row=0; row<nrows; row++) {\n\t\t\tfor(int col=1; col<ncols-1; col++) {\n\t\t\t\tt = slice.getData(row,col+1) - (float)2.0 * slice.getData(row,col) + slice.getData(row,col-1);\n\n\t\t\t\tif( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) {\n\t\t\t\t\tv[v_numset] = t; v_numset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( v_numset <= 10 ) {\n\t\t\tsig_y = (float)0.0;\n\t\t}\n\t\telse {\n\t\t\tsig_y = vec_stdDevMod(v, v_numset);\n\t\t}\n\n\t\tv_numset = 0;\n\n\t\t//\n\t\t// Compute the row gradient\n\t\t//\n\t\tfor(int col=0; col<ncols; col++) {\n\t\t\tfor(int row=1; row<nrows-1; row++) {\n\t\t\t\tt = slice.getData(row+1,col) - (float)2.0 * slice.getData(row,col) + slice.getData(row-1,col);\n\n\t\t\t\tif( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) {\n\t\t\t\t\tv[v_numset] = t; v_numset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( v_numset <= 10 ) {\n\t\t\tsig_x = (float)0.0;\n\t\t}\n\t\telse {\n\t\t\tsig_x = vec_stdDevMod(v, v_numset);\n\t\t}\n\n\t\treturn (float)Math.sqrt( (double)(sig_x * sig_x + sig_y * sig_y) ) / (float)2.0;\n\t}", "public void calculate() {\n float xoff = 0;\n for (int i = 0; i < cols; i++)\n { \n float yoff = 0;\n for (int j = 0; j < rows; j++)\n {\n z[i][j] = map(noise(xoff, yoff,zoff), 0, 1, -120, 120);\n yoff += 0.1f;\n }\n xoff += 0.1f;\n }\n zoff+=0.01f;\n }", "public void setNoise(double noiseCoefficient) {\n this.noiseCoefficient = noiseCoefficient;\n }", "double volume() {\n\treturn width*height*depth;\n}", "public double costNEX() {\r\n double diff=0;\r\n double intensity=0;\r\n \r\n for(int x=Config.ptvXLow-0; x < Config.ptvXHigh+0; x++) {\r\n// for(int x=Solver.xBoundsTumor[0]; x < Solver.xBoundsTumor[1]; x+= Config.scaleFactor) {\r\n for(int y=Config.ptvYLow-0; y < Config.ptvYHigh+0; y++) {\r\n// for(int y=Solver.yBoundsTumor[0]; y < Solver.yBoundsTumor[1]; y+= Config.scaleFactor) {\r\n for(int z=Config.ptvZLow-0; z < Config.ptvZHigh+0; z++) {\r\n// for(int z=Solver.zBoundsTumor[0]; z < Solver.zBoundsTumor[1]; z+= Config.scaleFactor) {\r\n\r\n this.body2[x][y][z].setCurrentDosis(0.0); //Set currentPtvVoxel Dose to 0 \r\n for(int i=0; i<Config.numberOfSeeds;++i) { \r\n // Calculate intensity based based on current dwelltime\r\n intensity = this.body2[x][y][z].radiationIntensity(this.seeds2[i].getCoordinate(), New_state[i]);\r\n if (intensity>0) {\r\n// LogTool.print(\"Cost: Intensity :\" + intensity + \"@ \" + x + \" \" + y + \" \" + z,\"notification\");\r\n }\r\n this.body2[x][y][z].addCurrentDosis(intensity);\r\n } \r\n diff += Math.pow((this.body2[x][y][z].getGoalDosis()-this.body2[x][y][z].getCurrentDosis()),2);\r\n// LogTool.print(\" diffdose \" + (Looper.body2[x][y][z].getGoalDosis()-Looper.body2[x][y][z].getCurrentDosis()),\"notification\");\r\n } \r\n }\r\n }\r\n return Math.sqrt(diff);\r\n// return Math.random();\r\n }", "public double getCyclinderVolume();", "public double energy(int x, int y) {\n Color upper = picture.get(x, (y - 1 + this.height()) % this.height());\n Color lower = picture.get(x, (y + 1 + this.height()) % this.height());\n Color left = picture.get((x - 1 + this.width()) % this.width(), y);\n Color right = picture.get((x + 1 + this.width()) % this.width(), y);\n return getGradient(upper, lower) + getGradient(left, right);\n }", "@Override\r\n\t\tpublic double[] gradient(double x, double... parameters) {\n\t\t\tfinal double a = parameters[0];\r\n\t\t\tfinal double b = parameters[1];\r\n\t\t\tfinal double c = parameters[2];\r\n\t\t\tfinal double d = parameters[3];\r\n\t\t\tfinal double e = parameters[4];\r\n\t\t\t\r\n\t\t\tdouble[] gradients = new double[5];\r\n\t\t\t//double den = 1 + Math.pow((x+e)/c, b);\r\n\t\t\t//gradients[0] = 1 / den; // Yes a Derivation \r\n\t\t\t//gradients[1] = -((a - d) * Math.pow(x / c, b) * Math.log(x / c)) / (den * den); // Yes b Derivation \r\n\t\t\t//gradients[2] = (b * Math.pow(x / c, b - 1) * (x / (c * c)) * (a - d)) / (den * den); // Yes c Derivation \r\n\t\t\t//gradients[3] = 1 - (1 / den); // Yes d Derivation \r\n\t\t\t\r\n\t\t\t//Derivation\r\n\t\t\tfinal double c_b = Math.pow(c, b);\r\n\t\t\tfinal double c_b1 = Math.pow(c, b+1.);\r\n\t\t\tfinal double c_2b = Math.pow(c, 2.*b);\r\n\t\t\tfinal double c_2b1 = Math.pow(c, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tfinal double xe_b = Math.pow(x+e, b);\r\n\t\t\tfinal double xe_2b = Math.pow(x+e, 2.*b);\r\n\t\t\tfinal double xe_2b1 = Math.pow(x+e, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tgradients[0] = c_b/(xe_b+c_b);\r\n\t\t\tgradients[1] = ((c_b*d-a*c_b)*xe_b*Math.log(x+e)+(a*c_b*Math.log(c)-c_b*Math.log(c)*d)*xe_b)/(xe_2b+2*c_b*xe_b+c_2b);\r\n\t\t\tgradients[2] = -((b*c_b*d-a*b*c_b)*xe_b)/(c*xe_2b+2*c_b1*xe_b+c_2b1);\r\n\t\t\tgradients[3] = xe_b/(xe_b+c_b);\r\n\t\t\tgradients[4] = ((b*c_b*d-a*b*c_b)*xe_b)/(xe_2b1+xe_b*(2*c_b*x+2*c_b*e)+c_2b*x+c_2b*e);\r\n\t\t\treturn gradients;\r\n\t\t}", "public void makeSilence(int channel) {\n\t\tmakeSilence(channel, 0, getSampleCount());\n\t}", "public Builder clearNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n gradientNoiseSigmaCase_ = 0;\n gradientNoiseSigma_ = null;\n onChanged();\n }\n return this;\n }", "boolean hasNoise();", "double volume()\n\t{\n\t\t\n\t\treturn width*height*depth;\n\t\t\n\t}", "protected abstract void getPotentiometerValue(int value, int channelNo);", "public double getNoiseMean() {\n\t\t\treturn NOISE_MEAN;\n\t\t}", "public VoxelGradient getGradient(int x, int y, int z) {\r\n return data[x + dimX * (y + dimY * z)];\r\n }", "public double noise2D(double xin, double yin) {\n double n0, n1, n2;\n double s = (xin + yin) * F2;\n int i = fastfloor(xin + s);\n int j = fastfloor(yin + s);\n double t = (i + j) * G2;\n double X0 = i - t;\n double Y0 = j - t;\n double x0 = xin - X0;\n double y0 = yin - Y0;\n int i1, j1;\n if(x0 > y0) {\n i1 = 1;\n j1 = 0;\n } else {\n i1 = 0;\n j1 = 1;\n }\n double x1 = x0 - i1 + G2;\n double y1 = y0 - j1 + G2;\n double x2 = x0 - 1.0 + 2.0 * G2;\n double y2 = y0 - 1.0 + 2.0 * G2;\n int ii = i & (SUPPLY_LENGTH - 1);\n int jj = j & (SUPPLY_LENGTH - 1);\n int gi0 = permMod12[perm[ii + perm[jj]]];\n int gi1 = permMod12[perm[ii + i1 + perm[jj + j1]]];\n int gi2 = permMod12[perm[ii + 1 + perm[jj + 1]]];\n double t0 = CONTRIBUTION_FACTOR - x0 * x0 - y0 * y0;\n if(t0 < 0) {\n n0 = 0.0;\n } else {\n t0 *= t0;\n n0 = t0 * t0 * dot(GTAB[gi0], x0, y0, 0);\n }\n double t1 = CONTRIBUTION_FACTOR - x1 * x1 - y1 * y1;\n if(t1 < 0) {\n n1 = 0.0;\n } else {\n t1 *= t1;\n n1 = t1 * t1 * dot(GTAB[gi1], x1, y1, 0);\n }\n double t2 = CONTRIBUTION_FACTOR - x2 * x2 - y2 * y2;\n if(t2 < 0) {\n n2 = 0.0;\n } else {\n t2 *= t2;\n n2 = t2 * t2 * dot(GTAB[gi2], x2, y2, 0);\n }\n return NORMALIZE_FACTOR_2D * (n0 + n1 + n2);\n }", "public void calcVolume() {\n this.vol = (0.6666666666666667 * Math.PI) * Math.pow(r, 3);\n }", "private static void filterNoise(BufferedImage image) {\n\t\tfor (int x=0; x<image.getWidth(); x++) {\r\n\t\t\tfor (int y=0; y<image.getHeight(); y++) {\r\n\t\t\t\t\r\n\t\t\t\tint pixelVal = image.getRGB(x, y);\r\n\r\n\t\t\t\t// check how many pixels in a 2 x 2 rectangle with this point \r\n\t\t\t\t// in the center have the same color as this point; if not \r\n\t\t\t\t// many, flip this pixel's color\r\n\t\t\t\tint startX = Math.max(x-2, 0);\r\n\t\t\t\tint startY = Math.max(y-2, 0);\r\n\t\t\t\tint endX = Math.min(x+2, image.getWidth()-1);\r\n\t\t\t\tint endY = Math.min(y+2, image.getHeight()-1);\r\n\r\n\t\t\t\tint matchCount = 0;\r\n\t\t\t\tint totalCount = 0;\r\n\t\t\t\tfor (int i=startX; i<=endX; i++) {\r\n\t\t\t\t\tfor (int j=startY; j<=endY; j++) {\r\n\t\t\t\t\t\tif (image.getRGB(i,j) == pixelVal) {\r\n\t\t\t\t\t\t\tmatchCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttotalCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ((matchCount / (double) totalCount) < .2) {\r\n\t\t\t\t\tif (pixelVal == Color.YELLOW.getRGB()) {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.BLACK.getRGB());\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.YELLOW.getRGB());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (debug) {\r\n\t\t\ttry {\r\n\t\t\t\tImageIO.write(image, \"gif\", new File(\"noiseFiltered.gif\"));\r\n\t\t\t} catch (Exception e) {e.printStackTrace();}\r\n\t\t}\r\n\t}", "public final Image getNormal(final double intensity) {\n if (width * height < RESOLUTION_HIGH) {\n return null;\n }\n WritableImage img = new WritableImage(width, height);\n PixelWriter writer = img.getPixelWriter();\n normalLoop:\n for (int j = 0; j < height; j++) {\n for (int i = 0; i < width; i++) {\n if (Thread.interrupted()) {\n break normalLoop;\n }\n double tl = noiseBuffer[(height + j - 1) % height]\n [(width + i - 1) % width];\n double t = noiseBuffer[(height + j - 1) % height][i];\n double tr = noiseBuffer[(height + j - 1) % height]\n [(i + 1) % width];\n double r = noiseBuffer[j][(i + 1) % width];\n double br = noiseBuffer[(j + 1) % height][(i + 1) % width];\n double b = noiseBuffer[(j + 1) % height][i];\n double bl = noiseBuffer[(j + 1) % height]\n [(width + i - 1) % width];\n double l = noiseBuffer[j][(width + i - 1) % width];\n double dx = (tl + 2.0 * l + bl) - (tr + 2.0 * r + br);\n double dy = (tl + 2.0 * t + tr) - (bl + 2.0 * b + br);\n double dz = 1.0 / intensity;\n double mag = Math.sqrt(dx * dx + dy * dy + dz * dz);\n dx = (1 + dx / mag) / 2.0;\n dy = (1 + dy / mag) / 2.0;\n dz = (1 + dz / mag) / 2.0;\n writer.setColor(i, j, Color.color(dx, dy, dz));\n }\n }\n return img;\n }", "public abstract void newSpeechNoise(long ms, int n);", "public static double noise(double x, double y, double z, double w){\n\t\t\n\t\tdouble n0,n1,n2,n3,n4; // Noise contributions from the five corners\n\t\t// Skew the (x,y,z,w) space to determine which cell of 24 simplices we're in\n\t\tdouble s=(x+y+z+w)*F4; // Factor for 4D skewing\n\t\tint i=fastfloor(x+s);\n\t\tint j=fastfloor(y+s);\n\t\tint k=fastfloor(z+s);\n\t\tint l=fastfloor(w+s);\n\t\tdouble t=(i+j+k+l)*G4; // Factor for 4D unskewing\n\t\tdouble X0=i-t; // Unskew the cell origin back to (x,y,z,w) space\n\t\tdouble Y0=j-t;\n\t\tdouble Z0=k-t;\n\t\tdouble W0=l-t;\n\t\tdouble x0=x-X0; // The x,y,z,w distances from the cell origin\n\t\tdouble y0=y-Y0;\n\t\tdouble z0=z-Z0;\n\t\tdouble w0=w-W0;\n\t\t// For the 4D case, the simplex is a 4D shape I won't even try to describe.\n\t\t// To find out which of the 24 possible simplices we're in, we need to\n\t\t// determine the magnitude ordering of x0, y0, z0 and w0.\n\t\t// Six pair-wise comparisons are performed between each possible pair\n\t\t// of the four coordinates, and the results are used to rank the numbers.\n\t\tint rankx=0;\n\t\tint ranky=0;\n\t\tint rankz=0;\n\t\tint rankw=0;\n\t\tif(x0>y0) rankx++;\n\t\telse ranky++;\n\t\tif(x0>z0) rankx++;\n\t\telse rankz++;\n\t\tif(x0>w0) rankx++;\n\t\telse rankw++;\n\t\tif(y0>z0) ranky++;\n\t\telse rankz++;\n\t\tif(y0>w0) ranky++;\n\t\telse rankw++;\n\t\tif(z0>w0) rankz++;\n\t\telse rankw++;\n\t\tint i1,j1,k1,l1; // The integer offsets for the second simplex corner\n\t\tint i2,j2,k2,l2; // The integer offsets for the third simplex corner\n\t\tint i3,j3,k3,l3; // The integer offsets for the fourth simplex corner\n\t\t// [rankx, ranky, rankz, rankw] is a 4-vector with the numbers 0, 1, 2 and 3\n\t\t// in some order. We use a thresholding to set the coordinates in turn.\n\t\t// Rank 3 denotes the largest coordinate.\n\t\ti1=rankx>=3?1:0;\n\t\tj1=ranky>=3?1:0;\n\t\tk1=rankz>=3?1:0;\n\t\tl1=rankw>=3?1:0;\n\t\t// Rank 2 denotes the second largest coordinate.\n\t\ti2=rankx>=2?1:0;\n\t\tj2=ranky>=2?1:0;\n\t\tk2=rankz>=2?1:0;\n\t\tl2=rankw>=2?1:0;\n\t\t// Rank 1 denotes the second smallest coordinate.\n\t\ti3=rankx>=1?1:0;\n\t\tj3=ranky>=1?1:0;\n\t\tk3=rankz>=1?1:0;\n\t\tl3=rankw>=1?1:0;\n\t\t// The fifth corner has all coordinate offsets = 1, so no need to compute that.\n\t\tdouble x1=x0-i1+G4; // Offsets for second corner in (x,y,z,w) coords\n\t\tdouble y1=y0-j1+G4;\n\t\tdouble z1=z0-k1+G4;\n\t\tdouble w1=w0-l1+G4;\n\t\tdouble x2=x0-i2+2.0*G4; // Offsets for third corner in (x,y,z,w) coords\n\t\tdouble y2=y0-j2+2.0*G4;\n\t\tdouble z2=z0-k2+2.0*G4;\n\t\tdouble w2=w0-l2+2.0*G4;\n\t\tdouble x3=x0-i3+3.0*G4; // Offsets for fourth corner in (x,y,z,w) coords\n\t\tdouble y3=y0-j3+3.0*G4;\n\t\tdouble z3=z0-k3+3.0*G4;\n\t\tdouble w3=w0-l3+3.0*G4;\n\t\tdouble x4=x0-1.0+4.0*G4; // Offsets for last corner in (x,y,z,w) coords\n\t\tdouble y4=y0-1.0+4.0*G4;\n\t\tdouble z4=z0-1.0+4.0*G4;\n\t\tdouble w4=w0-1.0+4.0*G4;\n\t\t// Work out the hashed gradient indices of the five simplex corners\n\t\tint ii=i&255;\n\t\tint jj=j&255;\n\t\tint kk=k&255;\n\t\tint ll=l&255;\n\t\tint gi0=perm[ii+perm[jj+perm[kk+perm[ll]]]]%32;\n\t\tint gi1=perm[ii+i1+perm[jj+j1+perm[kk+k1+perm[ll+l1]]]]%32;\n\t\tint gi2=perm[ii+i2+perm[jj+j2+perm[kk+k2+perm[ll+l2]]]]%32;\n\t\tint gi3=perm[ii+i3+perm[jj+j3+perm[kk+k3+perm[ll+l3]]]]%32;\n\t\tint gi4=perm[ii+1+perm[jj+1+perm[kk+1+perm[ll+1]]]]%32;\n\t\t// Calculate the contribution from the five corners\n\t\tdouble t0=0.6-x0*x0-y0*y0-z0*z0-w0*w0;\n\t\tif(t0<0) n0=0.0;\n\t\telse{\n\t\t\tt0*=t0;\n\t\t\tn0=t0*t0*dot(grad4[gi0], x0, y0, z0, w0);\n\t\t}\n\t\tdouble t1=0.6-x1*x1-y1*y1-z1*z1-w1*w1;\n\t\tif(t1<0) n1=0.0;\n\t\telse{\n\t\t\tt1*=t1;\n\t\t\tn1=t1*t1*dot(grad4[gi1], x1, y1, z1, w1);\n\t\t}\n\t\tdouble t2=0.6-x2*x2-y2*y2-z2*z2-w2*w2;\n\t\tif(t2<0) n2=0.0;\n\t\telse{\n\t\t\tt2*=t2;\n\t\t\tn2=t2*t2*dot(grad4[gi2], x2, y2, z2, w2);\n\t\t}\n\t\tdouble t3=0.6-x3*x3-y3*y3-z3*z3-w3*w3;\n\t\tif(t3<0) n3=0.0;\n\t\telse{\n\t\t\tt3*=t3;\n\t\t\tn3=t3*t3*dot(grad4[gi3], x3, y3, z3, w3);\n\t\t}\n\t\tdouble t4=0.6-x4*x4-y4*y4-z4*z4-w4*w4;\n\t\tif(t4<0) n4=0.0;\n\t\telse{\n\t\t\tt4*=t4;\n\t\t\tn4=t4*t4*dot(grad4[gi4], x4, y4, z4, w4);\n\t\t}\n\t\t// Sum up and scale the result to cover the range [-1,1]\n\t\treturn 27.0*(n0+n1+n2+n3+n4);\n\t}", "public void injectSomeMoreNoise(double intensity) {\n//\t\taddBSCnoise(lambda,intensity);\n\t\t\n//\t\taddBSCnoise(posterior, intensity);\n//\t\tfor (int i=0; i<n; i++) lambda[i] = posterior[i];\n//\t\tcalc_q0 (posterior);\n//\n//\t\t// initialization of beta\n//\t\tfor (int i = 0; i <= m - 1; i++) {\n//\t\t\tfor (int j = 0; j <= row_weight[i] - 1; j++) {\n//\t\t\t\tbeta[i][j] = 0.0;\n//\t\t\t}\n//\t\t}\t\t\n\t\t\n\t}", "Gradient gradientAt(Point point);", "int computeGradient(\n int gx, int gy);", "private static void vel_step ( int N, double[] u, double[] v, double[] u0, double[] v0,\r\n\t\tfloat visc, float dt )\r\n\t\t{\r\n\t\tadd_source ( N, u, u0, dt ); add_source ( N, v, v0, dt );\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\t\r\n\t\t//SWAP ( u0, u ); \r\n\t\t\r\n\t\tdouble[] temp;\r\n\t\ttemp=u0;\r\n\t\tu0=u;\r\n\t\tu=temp;\r\n\t\t//draw_dens ( N, u );\r\n\t\tdiffuse ( N, 1, u, u0, visc, dt );\r\n\t\t//draw_dens ( N, u );\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t//SWAP ( v0, v ); \r\n\t\t//double[] temp;\r\n\t\ttemp=v0;\r\n\t\tv0=v;\r\n\t\tv=temp;\r\n\t\t//draw_dens ( N, v );\r\n\t\t//draw_dens ( N, v0 );\r\n\t\tdiffuse ( N, 2, v, v0, visc, dt );\r\n\t\t//draw_dens ( N, v );\r\n\t\t//System.out.println(\"V\");\r\n\t\t//draw_dens ( N, v );\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\tproject ( N, u, v, u0, v0 );\r\n\t\t//SWAP ( u0, u ); \r\n\t\ttemp=u0;\r\n\t\tu0=u;\r\n\t\tu=temp;\r\n\t\t\r\n\t\t//SWAP ( v0, v );\r\n\t\ttemp=v0;\r\n\t\tv0=v;\r\n\t\tv=temp;\r\n\t\t//System.out.println(\"V\");\r\n\t\t//draw_dens ( N, v );\r\n\t\t\r\n\t\t/*\r\n\t\tdraw_dens ( N, v );\r\n\t\tdraw_dens ( N, v0 );\r\n\t\t*/\r\n\t\t\r\n\t\tadvect ( N, 1, u, u0, u0, v0, dt ); \r\n\t\tadvect ( N, 2, v, v0, u0, v0, dt );\r\n\t\tproject ( N, u, v, u0, v0 );\r\n\t\t}", "public void gaussianSmooth(Img i, double sigma) {\n int half = (int) (sigma * Math.sqrt(6 * Math.log(10)));\n int size = 1 + 2 * half;\n System.out.printf(\"Size: %d\\n\", size);\n double[] mask = new double[size];\n double mask_sum = 0;\n for (int k = 0; k <= half; k++) {\n double value = Math.exp(-k * k / (2 * sigma * sigma)) / (sigma * Math.sqrt(2 * Math.PI));\n mask_sum += (k == 0) ? value : value * 2;\n mask[half + k] = value;\n mask[half - k] = value;\n }\n // normalize the mask\n for (int k = 0; k < size; k++) {\n mask[k] = mask[k] / mask_sum;\n }\n System.out.printf(\"Mask: %s\\n\", Arrays.toString(mask));\n\n // 2D convolution using 1D mask in x\n double[] i_temp = new double[i.img.length];\n for (int x = 0; x < i.img.length; x++) {\n i_temp[x] = (double) (i.img[x] & 0xFF);\n }\n for (int x = half; x < i.height - half; x++) {\n for (int y = half; y < i.width - half; y++) {\n i_temp[x * i.width + y] = 0;\n for (int s = -half; s <= half; s++) {\n i_temp[x * i.width + y] += (double) (i.img[(x + s) * i.width + y] & 0xFF) * mask[half - s];\n }\n }\n }\n\n // 2D convolution using 1D mask in y\n for (int x = half; x < i.height - half; x++) {\n for (int y = half; y < i.width - half; y++) {\n double f = 0;\n for (int s = -half; s <= half; s++) {\n f += i_temp[x * i.width + y + s] * mask[half - s];\n }\n i.img[x * i.width + y] = (byte) f;\n }\n }\n }", "public void useUniformDeviates(){\n this.gaussianDeviates = false;\n }", "public double energy(int x, int y) {\n if (x >= current.width() || x < 0 || y >= current.height() || y < 0)\n throw new IndexOutOfBoundsException(String.format(\n \"Pixel (%d, %d) out of bounds\", x, y));\n if (x == 0 || y == 0 || x == current.width() - 1\n || y == current.height() - 1)\n return 195075;\n\n Color topPixel = current.get(x - 1, y);\n Color bottomPixel = current.get(x + 1, y);\n Color leftPixel = current.get(x, y - 1);\n Color rightPixel = current.get(x, y + 1);\n\n return dualGradientEnergy(topPixel, bottomPixel)\n + dualGradientEnergy(leftPixel, rightPixel);\n\n }", "java.lang.String getNoise();", "public float getDCM();", "protected abstract double evaluateChannel(final long channelId);", "public static int numDimensions_infos_noise() {\n return 1;\n }", "public boolean hasNoiseSigma() {\n return gradientNoiseSigmaCase_ == 1;\n }", "private void gradientMagnitude3D(float[] img, float[] mag) {\r\n int slice, row, col, cIndex, sIndex;\r\n float lVal, rVal, tVal, bVal, zLowVal, zHighVal;\r\n int sliceSize = yDim*xDim;\r\n for (slice = 0; slice < zDim; slice++) {\r\n sIndex = slice * sliceSize;\r\n for (row = 0; row < yDim; row++) {\r\n cIndex = sIndex + row * xDim;\r\n for (col = 0, cIndex += col; col < xDim; cIndex++, col++) {\r\n\r\n rVal = getVal(img, col+1, row, slice);\r\n lVal = getVal(img, col-1, row, slice);\r\n tVal = getVal(img, col, row+1, slice);\r\n bVal = getVal(img, col, row-1, slice);\r\n zLowVal = getVal(img, col, row, slice-1);\r\n zHighVal = getVal(img, col, row, slice+1);\r\n\r\n mag[cIndex] = (float)Math.sqrt((rVal - lVal) * (rVal - lVal) +\r\n (tVal - bVal) * (tVal - bVal) +\r\n (zHighVal - zLowVal) * (zHighVal - zLowVal));\r\n } // for (col = 0; ...)\r\n } // for (row = 0; ...)\r\n } // for (slice = 0; ...)\r\n }", "private double calcPixelEnergy(int col, int row) {\n\n /* Surrounding pixels used to calculate energy of given pixel. For border\n * pixels, use opposite column or row instead. */\n int right = (col == width - 1) ? 0 : col + 1;\n int left = (col == 0) ? width - 1 : col - 1;\n int up = (row == 0) ? height - 1 : row - 1;\n int down = (row == height - 1) ? 0 : row + 1;\n\n return Math.sqrt(\n Math.pow(getRGB(right, row, R) - getRGB(left, row, R), 2)\n + Math.pow(getRGB(right, row, G) - getRGB(left, row, G), 2)\n + Math.pow(getRGB(right, row, B) - getRGB(left, row, B), 2)\n + Math.pow(getRGB(col, up, R) - getRGB(col, down, R), 2)\n + Math.pow(getRGB(col, up, G) - getRGB(col, down, G), 2)\n + Math.pow(getRGB(col, up, B) - getRGB(col, down, B), 2));\n }", "private double noisyIntensity(double value) {\n\n\t\t// add multiplicative noise: log the value, add noise then take the exp\n\t\tdouble logValue = Math.log(value);\n\t\tdouble multiplicativeNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getIntensityStdev());\n\t\tlogValue += multiplicativeNoise;\n\t\tvalue = Math.exp(logValue);\n\n\t\t// then add additive noise as well\n\t\tdouble additiveNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getIntensityStdev());\n\t\tvalue += additiveNoise;\n\t\t\n\t\t// value must always be >= 0\n\t\tif (value < 0) {\n\t\t\tvalue = 0;\n\t\t}\n\t\treturn value;\n\n\t}", "@Override\n\tpublic void makeNoise() {\n\t\tSystem.out.println(\"Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink \");\n\t}", "private double noisyRt(double value) {\n\n\t\t// then add additive noise as well\n\t\tdouble additiveNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getRtStdev());\n\t\tvalue += additiveNoise;\n\t\t\n\t\t// value must always be >= 0\n\t\tif (value < 0) {\n\t\t\tvalue = 0;\n\t\t}\n\t\treturn value;\n\n\t}", "double cekStop(double x[][], double v0[],double v[][],double w0[],double w[][], double t[]){\n double akumY=0;\n //~ itung z_in dan z\n for(int h=0; h<jumlah_data; h++){\n for(int j=0; j<unit_hidden; j++){\n //itung sigma xi vij\n double jum_xv=0;\n for(int i=0; i<unit_input; i++){\n double cc=x[h][i]*v[i][j];\n jum_xv=jum_xv+cc;\n //System.out.println(x[h][j]);\n }\n z_in[j]=v0[j]+jum_xv;\n //itung z\n z[j]=1/(1+(double)Math.exp(-z_in[j]));\n //System.out.println(\" dan z= \"+z[j]);\n }\n \n //~ itung y_in dan y (output)\n double cxc=0;\n for(int k=0; k<unit_output; k++){\n double jum_zw=0;\n for(int j=0; j<unit_hidden; j++){\n double cc=z[j]*w[j][k];\n jum_zw=jum_zw+cc;\n }\n y_in[k]=w0[k]+jum_zw;\n y[k]=1/(1+(double)Math.exp(-y_in[k]));\n akumY = akumY + Math.pow((t[h]-y[k]),2);\n //System.out.println(t[h]+\"-\"+y[k]+\"=\"+(t[k]-y[k]));\n }\n }\n double E = 0.5 * akumY;\n //System.out.println(E);\n return E;\n }", "public void makeNoise(double climbSinkRate, long lastTime) {\n\t\tif(climbSinkRate>this.notificationClimbRate) {\n\t\t\tLog.d(\"reason\", \"climbSinkRate>this.notificationClimbRate: \"+ climbSinkRate);\n\t\t\t\n\t\t\tif(climbSinkRate-speedThreshold>=0) {\n\t\t\t\tmakeSingleNoise((int)Math.round((Math.min(climbSinkRate,speedThreshold+climbSteps)-speedThreshold)*(climbSoundWidth/climbSteps)+climbStart));\n\t\t\t}\n\t\t\tcontinuousNoiseCommunication.setFrequencyAndTime(0, SystemClock.elapsedRealtime());\n\t\t}\n\t\telse if(climbSinkRate<this.notificationSinkRate) {\n\t\t\tLog.d(\"reason\", \"climbSinkRate<this.notificationSinkRate: \"+ climbSinkRate+\" this.notificationSinkRate\"+this.notificationSinkRate );\n\t\t\tdouble sinkRate=climbSinkRate*-1;\n\t\t\tif(sinkRate-speedThreshold>=0) {\n\t\t\t\tint frequency=(int)Math.round((Math.min(sinkRate,speedThreshold+sinkSteps)-speedThreshold)*(sinkSoundWidth/sinkSteps)+sinkStart);\n\t\t\t\tcontinuousNoiseCommunication.setFrequencyAndTime(frequency, SystemClock.elapsedRealtime());\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tcontinuousNoiseCommunication.setFrequencyAndTime(0, SystemClock.elapsedRealtime());\n\t\t}\n\t\t\n\t}", "public void calculateGradients(int dataIndex, double learningRate){\r\n for (int i = 0; i < outputLayer.length; i++) {\r\n for (int j = 0; j < outputLayer[i].weights.length; j++) {\r\n outputLayer[i].dw[j] = -2*((attribute[dataIndex] == i ? 1 : 0) - sigmoid(outputLayer[i].z))*sigmoidDeri(outputLayer[i].z)*outputLayer[i].data[j];\r\n }\r\n outputLayer[i].db = -2*((attribute[dataIndex] == i ? 1 : 0) - sigmoid(outputLayer[i].z))*sigmoidDeri(outputLayer[i].z);\r\n }\r\n\r\n adjust(learningRate, true);\r\n calculateDesireHiddenLayerActivation(dataIndex);\r\n\r\n for (int i = 0; i < hiddenLayer.length; i++) {\r\n for (int j = 0; j < hiddenLayer[i].weights.length; j++) {\r\n hiddenLayer[i].dw[j] = -2*(desireHiddenLayerActivation[i] - hiddenLayer[i].a)*sigmoidDeri(hiddenLayer[i].z)*hiddenLayer[i].data[j];\r\n }\r\n hiddenLayer[i].db = -2*(desireHiddenLayerActivation[i] - hiddenLayer[i].a)*sigmoidDeri(hiddenLayer[i].z);\r\n }\r\n\r\n adjust(learningRate, false);\r\n }", "float getPostGain();", "private static final void silk_PLC_energy(/*final int[] energy1, final int[] shift1, final int[] energy2, final int[] shift2,*/\r\n\t\t\tfinal Jenergy_struct_aux aux,// java\r\n\t\t\tfinal int[] exc_Q14, final int[] prevGain_Q10, final int subfr_length, final int nb_subfr)\r\n\t{\r\n\t\t// SAVE_STACK;\r\n\t\tfinal short[] exc_buf = new short[subfr_length << 1];\r\n\t\t/* Find random noise component */\r\n\t\t/* Scale previous excitation signal */\r\n\t\tint exc_buf_ptr = 0;// exc_buf[ exc_buf_ptr ]\r\n\t\tfor( int k = 0; k < 2; k++ ) {\r\n\t\t\tfor( int i = 0; i < subfr_length; i++ ) {\r\n\t\t\t\tfinal int v = ((int)(((long)exc_Q14[ i + ( k + nb_subfr - 2 ) * subfr_length ] * prevGain_Q10[ k ]) >> 16)) << 8;// java\r\n\t\t\t\texc_buf[ exc_buf_ptr + i ] = (short)(v > Short.MAX_VALUE ? Short.MAX_VALUE : (v < Short.MIN_VALUE ? Short.MIN_VALUE : v));\r\n\t\t\t}\r\n\t\t\texc_buf_ptr += subfr_length;\r\n\t\t}\r\n\t\t/* Find the subframe with lowest energy of the last two and use that as random noise generator */\r\n\t\tfinal long energy_shift1 = silk_sum_sqr_shift( /*energy1, shift1,*/ exc_buf, 0, subfr_length );\r\n\t\tfinal long energy_shift2 = silk_sum_sqr_shift( /*energy2, shift2,*/ exc_buf, subfr_length, subfr_length );\r\n\t\t// RESTORE_STACK;\r\n\t\taux.energy1 = (int)(energy_shift1 >>> 32);\r\n\t\taux.shift1 = (int)energy_shift1;\r\n\t\taux.energy2 = (int)(energy_shift2 >>> 32);\r\n\t\taux.shift2 = (int)energy_shift2;\r\n\t}", "private void gradientDecent(double[][] X, double[] y){\n double[] h = matrix.sigmoid(matrix.multiply(X,Theta));\n double[] cp = costPrime(X,h,y);\n\n double scp = 0;\n for(double i: cp){\n scp = scp + i;\n }\n System.out.println(+ cost(h,y));\n // Average Cost\n scp = round(scp/h.length,5);\n System.out.println(scp);\n int j = 0;\n\n // while Average Cost is not 0\n while(scp > 0.00001){\n Theta = matrix.subtract(Theta,matrix.multiply(alpha,cp));\n h = matrix.sigmoid(matrix.multiply(X,Theta));\n cp = costPrime(X,h,y);\n double sum = 0;\n for(double i: cp){\n sum = sum + i;\n }\n scp = round(sum/h.length,5);\n System.out.println(scp);\n }\n }", "public Builder setNoiseSigma(float value) {\n\n gradientNoiseSigmaCase_ = 1;\n gradientNoiseSigma_ = value;\n onChanged();\n return this;\n }", "protected double compute(int sample) {\n\t\tdouble v = Math.sin((double) sample * 2.0 * Math.PI * (double) frequency\n\t\t\t\t/ (double) AudioSequence.SAMPLES_PER_SECOND);\n\t\treturn v;\n\t}", "public void populateNoiseArray(double[] p_76308_1_, double p_76308_2_, double p_76308_4_, double p_76308_6_, int p_76308_8_, int p_76308_9_, int p_76308_10_, double p_76308_11_, double p_76308_13_, double p_76308_15_, double p_76308_17_) {\n/* 81 */ if (p_76308_9_ == 1) {\n/* */ \n/* 83 */ boolean var64 = false;\n/* 84 */ boolean var65 = false;\n/* 85 */ boolean var21 = false;\n/* 86 */ boolean var68 = false;\n/* 87 */ double var70 = 0.0D;\n/* 88 */ double var73 = 0.0D;\n/* 89 */ int var75 = 0;\n/* 90 */ double var77 = 1.0D / p_76308_17_;\n/* */ \n/* 92 */ for (int var30 = 0; var30 < p_76308_8_; var30++) {\n/* */ \n/* 94 */ double var31 = p_76308_2_ + var30 * p_76308_11_ + this.xCoord;\n/* 95 */ int var78 = (int)var31;\n/* */ \n/* 97 */ if (var31 < var78)\n/* */ {\n/* 99 */ var78--;\n/* */ }\n/* */ \n/* 102 */ int var34 = var78 & 0xFF;\n/* 103 */ var31 -= var78;\n/* 104 */ double var35 = var31 * var31 * var31 * (var31 * (var31 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 106 */ for (int var37 = 0; var37 < p_76308_10_; var37++)\n/* */ {\n/* 108 */ double var38 = p_76308_6_ + var37 * p_76308_15_ + this.zCoord;\n/* 109 */ int var40 = (int)var38;\n/* */ \n/* 111 */ if (var38 < var40)\n/* */ {\n/* 113 */ var40--;\n/* */ }\n/* */ \n/* 116 */ int var41 = var40 & 0xFF;\n/* 117 */ var38 -= var40;\n/* 118 */ double var42 = var38 * var38 * var38 * (var38 * (var38 * 6.0D - 15.0D) + 10.0D);\n/* 119 */ int var19 = this.permutations[var34] + 0;\n/* 120 */ int var66 = this.permutations[var19] + var41;\n/* 121 */ int var67 = this.permutations[var34 + 1] + 0;\n/* 122 */ int var22 = this.permutations[var67] + var41;\n/* 123 */ var70 = lerp(var35, func_76309_a(this.permutations[var66], var31, var38), grad(this.permutations[var22], var31 - 1.0D, 0.0D, var38));\n/* 124 */ var73 = lerp(var35, grad(this.permutations[var66 + 1], var31, 0.0D, var38 - 1.0D), grad(this.permutations[var22 + 1], var31 - 1.0D, 0.0D, var38 - 1.0D));\n/* 125 */ double var79 = lerp(var42, var70, var73);\n/* 126 */ int var10001 = var75++;\n/* 127 */ p_76308_1_[var10001] = p_76308_1_[var10001] + var79 * var77;\n/* */ }\n/* */ \n/* */ } \n/* */ } else {\n/* */ \n/* 133 */ int var19 = 0;\n/* 134 */ double var20 = 1.0D / p_76308_17_;\n/* 135 */ int var22 = -1;\n/* 136 */ boolean var23 = false;\n/* 137 */ boolean var24 = false;\n/* 138 */ boolean var25 = false;\n/* 139 */ boolean var26 = false;\n/* 140 */ boolean var27 = false;\n/* 141 */ boolean var28 = false;\n/* 142 */ double var29 = 0.0D;\n/* 143 */ double var31 = 0.0D;\n/* 144 */ double var33 = 0.0D;\n/* 145 */ double var35 = 0.0D;\n/* */ \n/* 147 */ for (int var37 = 0; var37 < p_76308_8_; var37++) {\n/* */ \n/* 149 */ double var38 = p_76308_2_ + var37 * p_76308_11_ + this.xCoord;\n/* 150 */ int var40 = (int)var38;\n/* */ \n/* 152 */ if (var38 < var40)\n/* */ {\n/* 154 */ var40--;\n/* */ }\n/* */ \n/* 157 */ int var41 = var40 & 0xFF;\n/* 158 */ var38 -= var40;\n/* 159 */ double var42 = var38 * var38 * var38 * (var38 * (var38 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 161 */ for (int var44 = 0; var44 < p_76308_10_; var44++) {\n/* */ \n/* 163 */ double var45 = p_76308_6_ + var44 * p_76308_15_ + this.zCoord;\n/* 164 */ int var47 = (int)var45;\n/* */ \n/* 166 */ if (var45 < var47)\n/* */ {\n/* 168 */ var47--;\n/* */ }\n/* */ \n/* 171 */ int var48 = var47 & 0xFF;\n/* 172 */ var45 -= var47;\n/* 173 */ double var49 = var45 * var45 * var45 * (var45 * (var45 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 175 */ for (int var51 = 0; var51 < p_76308_9_; var51++) {\n/* */ \n/* 177 */ double var52 = p_76308_4_ + var51 * p_76308_13_ + this.yCoord;\n/* 178 */ int var54 = (int)var52;\n/* */ \n/* 180 */ if (var52 < var54)\n/* */ {\n/* 182 */ var54--;\n/* */ }\n/* */ \n/* 185 */ int var55 = var54 & 0xFF;\n/* 186 */ var52 -= var54;\n/* 187 */ double var56 = var52 * var52 * var52 * (var52 * (var52 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 189 */ if (var51 == 0 || var55 != var22) {\n/* */ \n/* 191 */ var22 = var55;\n/* 192 */ int var69 = this.permutations[var41] + var55;\n/* 193 */ int var71 = this.permutations[var69] + var48;\n/* 194 */ int var72 = this.permutations[var69 + 1] + var48;\n/* 195 */ int var74 = this.permutations[var41 + 1] + var55;\n/* 196 */ int var75 = this.permutations[var74] + var48;\n/* 197 */ int var76 = this.permutations[var74 + 1] + var48;\n/* 198 */ var29 = lerp(var42, grad(this.permutations[var71], var38, var52, var45), grad(this.permutations[var75], var38 - 1.0D, var52, var45));\n/* 199 */ var31 = lerp(var42, grad(this.permutations[var72], var38, var52 - 1.0D, var45), grad(this.permutations[var76], var38 - 1.0D, var52 - 1.0D, var45));\n/* 200 */ var33 = lerp(var42, grad(this.permutations[var71 + 1], var38, var52, var45 - 1.0D), grad(this.permutations[var75 + 1], var38 - 1.0D, var52, var45 - 1.0D));\n/* 201 */ var35 = lerp(var42, grad(this.permutations[var72 + 1], var38, var52 - 1.0D, var45 - 1.0D), grad(this.permutations[var76 + 1], var38 - 1.0D, var52 - 1.0D, var45 - 1.0D));\n/* */ } \n/* */ \n/* 204 */ double var58 = lerp(var56, var29, var31);\n/* 205 */ double var60 = lerp(var56, var33, var35);\n/* 206 */ double var62 = lerp(var49, var58, var60);\n/* 207 */ int var10001 = var19++;\n/* 208 */ p_76308_1_[var10001] = p_76308_1_[var10001] + var62 * var20;\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ }", "public void highscorenoise()\n {\n if(!mute)\n {\n try\n { \n URL url = this.getClass().getClassLoader().getResource(\"Darkmoon Caverns.wav\");\n double c = Math.random();\n if(c<=.25)\n url = this.getClass().getClassLoader().getResource(\"Mario Kart Win.wav\");\n else if(c<=.50)\n url = this.getClass().getClassLoader().getResource(\"Pirate Lagoon.wav\");\n else if(c<=.75)\n url = this.getClass().getClassLoader().getResource(\"Crescent Island.wav\"); \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n hclip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n hclip.open(audioIn); \n \n hclip.start();\n hclip.loop(Clip.LOOP_CONTINUOUSLY);\n \n } \n catch (UnsupportedAudioFileException e)\n {\n e.printStackTrace();\n } \n catch (IOException e) \n {\n e.printStackTrace();\n } \n catch (LineUnavailableException e) \n {\n e.printStackTrace();\n } \n }\n }", "public double calc_c() {\r\n \t\t\r\n \t\tdouble cij = 0;\r\n \t\tint sum_i = 0;\r\n \t\tint sum_j = 0;\r\n \t\tint diff = 0;\r\n \t\tint state = 0;\r\n \t\t\r\n \t\tdouble li, lri, lj, lrj;\r\n \t\t\r\n \t\tList<Integer> samestate_i = new ArrayList<>();\r\n \t\tList<Integer> samestate_j = new ArrayList<>();\r\n \t\t\r\n \t\tList<Double> gradient_i = new ArrayList<>();\r\n \t\tList<Double> gradient_j = new ArrayList<>();\r\n \t\t\r\n\t\t// if the time step is less than the window cij is initialized to zero.\r\n\t\tif(this.n <= this.w || this.w <2) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// else we determine the state of the region i and region j of which\r\n\t\t\t// we are calculating the cij for\r\n\t \t\tDeterminestate di = new Determinestate(this.i, this.n);\r\n\t\t\tDeterminestate dj = new Determinestate(this.j, this.n);\r\n\t\t\t\r\n\t\t\tProbability pi = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\tProbability pj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\r\n\t\t\tif(di.regionCurrentstate() == dj.regionCurrentstate()) {\r\n\t\t\t\tli = pi.getLsave().get(0);\r\n\t\t\t\tlj = pj.getLsave().get(0);\r\n\t\t\t\tstate = 0;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tli = pi.getLsave().get(1);\r\n\t\t\t\tlj = pj.getLsave().get(1);\r\n\t\t\t\tstate =1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// for the time window\r\n\t\t\tfor(int k=1; k<this.w; k++) {\r\n\t\t\t\t\r\n\t\t\t\t// determine the state of i and j in the in n-k time step\r\n\t \t\t\tDeterminestate dri = new Determinestate(this.i, this.n-k);\r\n\t \t\t\tDeterminestate drj = new Determinestate(this.j, this.n-k);\r\n\t \t\t\t\r\n\t \t\t\tProbability pri = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\tProbability prj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\t\r\n\t\t\t\tlri = pri.getLsave().get(state);\r\n\t\t\t\tlrj = prj.getLsave().get(state);\r\n\t \t\t\t\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for i make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == dri.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_i.add(k);\r\n\t \t\t\t\tgradient_i.add(li - lri);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for j make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == drj.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_j.add(k);\r\n\t \t\t\t\tgradient_j.add(lj - lrj);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t// if no match found return zero\r\n\t\tif(samestate_i.size() == 0 || samestate_j.size() == 0) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\t// else calculate cij\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// if both have same length \r\n\t\t\tif(samestate_i.size() == samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j) * Math.abs(diff/(double)this.w);\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//if i is smaller\r\n\t\t\telse if(samestate_i.size() < samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// if j is smaller \r\n\t\t\telse {\r\n\t\t\t\tfor(int i=0; i<samestate_j.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.isNaN(cij)) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn cij;\r\n\t\t}\r\n \t}", "public Builder clearNoise() {\n bitField0_ = (bitField0_ & ~0x00010000);\n noise_ = getDefaultInstance().getNoise();\n onChanged();\n return this;\n }", "@Override\r\n\tpublic FloatMat gradient() { return this.gradient; }", "public NoiseCalculator(double wavelength) {\n this(wavelength, 0.0);\n }", "public abstract double calcVolume();", "public abstract double calcVolume();", "protected double samplesOnePixelF() {\r\n\t\tif (getGraphWidth() > 1) {\r\n\t\t\t// avoid division by zero\r\n\t\t\treturn ((double) section.getLength()) / getGraphWidth();\r\n\t\t}\r\n\t\treturn 1.0;\r\n\t}", "public native MagickImage addNoiseImage(int noiseType)\n\t\t\tthrows MagickException;", "void computeGradient(GradientCalc calc);", "@Override\r\n\tpublic String makeANoise() {\n\t\treturn \"deer noise\";\r\n\t}", "@java.lang.Override\n public boolean hasFeatureNoiseSigma() {\n return gradientNoiseSigmaCase_ == 2;\n }", "public double sampleDouble() {\n double x = sample01();\n if ( x < (b-a)/(c-a))\n x = Math.sqrt(x*(b-a)*(c-a)) + a;\n else\n x = c- Math.sqrt((1-x)*(c-a)*(c-b));\n return x;\n }", "com.google.protobuf.ByteString\n getNoiseBytes();", "@Override\n\tpublic Vector3d gradient(Particle p_j) {\n\t\treturn null;\n\t}", "public double volume () {return (4/3)*Math.PI*this.r*this.r*this.r;}", "public com.google.protobuf.ByteString\n getNoiseBytes() {\n java.lang.Object ref = noise_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n noise_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@java.lang.Override\n public boolean hasFeatureNoiseSigma() {\n return gradientNoiseSigmaCase_ == 2;\n }", "float getPreGain();", "public void sample_V() {\n\t\t//Note, sumV and sumVVT are update in the update function itself. Hence, when\n\t\t//sample_V is called after the 1 iteration of all vertices, we already have the sum.\n\t\t\n\t\t//meanV = (SUM V_j)/N\n\t\tRealVector meanV = params.sumV.mapMultiply(1.0/datasetDesc.getNumItems());\n\t\t//meanS = (SUM (V_j*V_j')/N)\n\t\tRealMatrix meanS = params.sumVVT.scalarMultiply(1.0/datasetDesc.getNumItems());\n\t\t\n\t\t//mu0 = (beta0*mu0 + meanV)/(beta0 + N)\n\t\tRealVector mu0_ = (params.mu0_V.mapMultiply(params.beta0_V).add(meanV)).mapDivide((params.beta0_V + datasetDesc.getNumItems()));\n\t\t\n\t\tdouble beta0_ = params.beta0_V + datasetDesc.getNumItems();\n\t\tint nu0_ = params.nu0_V + datasetDesc.getNumItems();\n\t\t\n\t\t//W0 = inv( inv(W0) + N*meanS + (beta0*N/(beta0 + N))(mu0 - meanU)*(mu0 - meanU)'\n\t\tRealVector tmp = params.mu0_V.subtract(meanV);\n\t\tRealMatrix mu0_d_meanV_T = tmp.outerProduct(tmp); \n\t\tmu0_d_meanV_T = mu0_d_meanV_T.scalarMultiply((params.beta0_V*datasetDesc.getNumItems()/(params.beta0_V + datasetDesc.getNumItems())));\n\t\tRealMatrix invW0_ = params.invW0_V.add(params.sumVVT).add(mu0_d_meanV_T);\n\n\t\t//Update all the values.\n\t\tparams.mu0_V = mu0_;\n\t\tparams.beta0_V = beta0_;\n\t\tparams.nu0_V = nu0_;\n\t\tparams.invW0_V = invW0_;\n\t\tparams.W0_V = (new LUDecompositionImpl(invW0_)).getSolver().getInverse();\n\t\t\n\t\t//Sample lambda_V and mu_V from the Gaussian Wishart distribution\n\t\t// http://en.wikipedia.org/wiki/Normal-Wishart_distribution#Generating_normal-Wishart_random_variates\n\t\t//Draw lambda_V from Wishart distribution with scale matrix w0_U.\n\t\tparams.lambda_V = sampleWishart(params.invW0_V, params.nu0_V);\n\t\t//Compute cov = inv(beta0*lambda) \n\t\tRealMatrix cov = (new LUDecompositionImpl(params.lambda_V.scalarMultiply(params.beta0_V))).getSolver().getInverse();\n\t\t//Draw mu_V from multivariate normal dist with mean mu0_V and covariance inv(beta0_V*lambda)\n\t\tMultivariateNormalDistribution dist = new MultivariateNormalDistribution(params.mu0_V.toArray(), \n\t\t\t\tcov.getData());\n\t\tparams.mu_V = new ArrayRealVector(dist.sample());\n\t\t\n\t\t//Reset the sum of latent factors.\n\t\tparams.sumV.mapMultiply(0);\n\t\tparams.sumVVT.scalarMultiply(0);\n\t}", "public com.google.protobuf.ByteString\n getNoiseBytes() {\n java.lang.Object ref = noise_;\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 noise_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private void calc_e_v_dens() {\n\t\tint i,il,max_steps = 10;\n\t\tdouble[] lel = new double[2], onel = new double[2];\n\t\tdouble store_dens;\n\t\t\n\t\tstore_dens = density;\n\t\t\n\t\ttry {\n\t\t\tPrintStream out = new PrintStream(new FileOutputStream(\"Ediff.v.dens.out\"));\n\t\t\tout.println(\"# density Elhcp Elfcc Ehcp Efcc dEl dE\");\n\t\t\t\n\t\t\tfor (i=0; i<max_steps; i++) {\n\t\t\t\tdensity= 2.0*(double)(i+1)/(double)max_steps;\n\t\t\t\tdiameter = Math.pow(density,1.0/3.0);\n\t\t\t\tdiameter2 = diameter*diameter;\n\t\t\t\tout.println(density+\" \");\n\t\t\t\tfor (il=0; il<2; il++) {\n\t\t\t\t\tlel[il] = calc_local_energy(0,il,CUR_POS);\n\t\t\t\t\tonel[il] = calc_e_order_n(il);\n\t\t\t\t}\n\t\t\t\tout.println(lel[0]+\" \"+lel[1]+\" \"+onel[0]+\" \"+onel[1]+\" \"+(lel[1]-lel[0])+\" \"+(onel[1]-onel[0]));\n\t\t\t}\n\t\t\tout.close();\n\t\t} catch( Exception e ) {\n\t\t\tSystem.err.println(\"calc_e_v_dens failed while writing file with exception: \"+e);\n\t\t}\n\t\t\n\t\tdensity= store_dens;\n\t\tdiameter = Math.pow(density,1.0/3.0);\n\t\tdiameter2 = diameter*diameter;\n\t}", "public native MagickImage blurImageChannel(int channel, double raduis,\n\t\t\tdouble sigma) throws MagickException;", "public double calculateCurvatureGradient(int i){\n Node3D node = mesh.nodes.get(i);\n Set<Node3D> neighbors = getNeighbors(node);\n\n double[] k1 = calculateMeanCurvatureNormal(node, node_to_triangle.get(node));\n double kh = Vector3DOps.normalize(k1)/2;\n double[] k2 = new double[k1.length];\n double kneighbors = 0;\n for(Node3D neighbor: neighbors){\n double[] ki = calculateMeanCurvatureNormal(node, node_to_triangle.get(node));\n\n }\n\n return 0;\n }", "@Override\n\tprotected void uGenerate(float[] channels) \n\t{\n\t\tif (!isActivated)\n\t\t{\n\t\t\tArrays.fill( channels, begAmp );\n\t\t} \n\t\telse if (lineNow >= lineTime)\n\t\t{\n\t\t\tArrays.fill( channels, endAmp );\n\t\t} \n\t\telse \n\t\t{\n\t\t\tamp += ( endAmp - amp )*timeStepSize/( lineTime - lineNow );\n\t\t\t//Minim.debug(\" dampTime = \" + dampTime + \" begAmp = \" + begAmp + \" amp = \" + amp + \" dampNow = \" + dampNow);\n\t\t\tArrays.fill( channels, amp );\n\t\t\tlineNow += timeStepSize;\n\t\t}\n\t}", "double luminance(C config);" ]
[ "0.6230959", "0.6220713", "0.6186033", "0.60663766", "0.5998711", "0.59297854", "0.5581063", "0.55408424", "0.5508698", "0.54693997", "0.5458318", "0.53941756", "0.5287344", "0.52460694", "0.52065295", "0.52006453", "0.5193437", "0.5108384", "0.507268", "0.5064589", "0.5062377", "0.50420713", "0.49789795", "0.4966067", "0.49532968", "0.4935334", "0.49091056", "0.48979", "0.48858058", "0.48444027", "0.48399395", "0.48054045", "0.4800168", "0.47842282", "0.47765565", "0.47602046", "0.47561765", "0.47264504", "0.47154817", "0.47100672", "0.46959755", "0.46765372", "0.46728522", "0.46433735", "0.46393606", "0.46365792", "0.46289226", "0.46275687", "0.46192038", "0.4613406", "0.46127307", "0.46035838", "0.4599378", "0.4598029", "0.45961365", "0.45805216", "0.45780414", "0.4576746", "0.4567843", "0.45576736", "0.4550184", "0.4548173", "0.45456028", "0.452914", "0.45267925", "0.45179564", "0.45131075", "0.45128858", "0.45073465", "0.45069852", "0.44999656", "0.44944924", "0.4490519", "0.44871432", "0.44867033", "0.44862795", "0.44858524", "0.448021", "0.44678506", "0.44655755", "0.44655755", "0.44605458", "0.44559503", "0.444243", "0.4436015", "0.44349214", "0.44342735", "0.4429615", "0.4398831", "0.43788493", "0.43786064", "0.4372043", "0.43612683", "0.4356338", "0.43526775", "0.43509552", "0.43509072", "0.43483552", "0.43456575", "0.43351653" ]
0.66452545
0
Calcualte the noise estimate via the gradient method.
public float gradientMethod(MCVolume vol) { float nes = (float)0.0; // // Get the right slice. // for(int ii=0; ii<vol.getNSlices(); ii++) { for(int jj=0; jj<vol.getNChannels(); jj++) { nes += gradientMethod( vol.getSlice(ii, jj) ); } } return (nes / ((float)vol.getNSlices()*(float)vol.getNChannels()) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double noise(SpIterNoiseObs noise) {\n return 3.0 * 60.0;\n }", "public final double getEstimatedNoise() {\r\n return noise;\r\n }", "@java.lang.Override\n public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "void calcWave() {\n yoff += 0.01f;\n \n //For every x value, calculate a y value based on sine or cosine\n float x = yoff; //**OPTION #1****/\n //float x = 0.0f; //**OPTION #2****/\n for (int i = 0; i < yvalues.length; i++) {\n float n = 2*noise(x)-1.0f; //**OPTION #1****/ //scale noise to be between 1 and -1\n //float n = 2*noise(x,yoff)-1.0f; //**OPTION #2****/ //scale noise to be between 1 and -1\n yvalues[i] = n*amplitude;\n x+=dx;\n }\n }", "M generateNoise();", "public int noise(int xin, int yin, int zin);", "public float getNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n return (java.lang.Float) gradientNoiseSigma_;\n }\n return 0F;\n }", "private void gradientDecent(double[][] X, double[] y){\n double[] h = matrix.sigmoid(matrix.multiply(X,Theta));\n double[] cp = costPrime(X,h,y);\n\n double scp = 0;\n for(double i: cp){\n scp = scp + i;\n }\n System.out.println(+ cost(h,y));\n // Average Cost\n scp = round(scp/h.length,5);\n System.out.println(scp);\n int j = 0;\n\n // while Average Cost is not 0\n while(scp > 0.00001){\n Theta = matrix.subtract(Theta,matrix.multiply(alpha,cp));\n h = matrix.sigmoid(matrix.multiply(X,Theta));\n cp = costPrime(X,h,y);\n double sum = 0;\n for(double i: cp){\n sum = sum + i;\n }\n scp = round(sum/h.length,5);\n System.out.println(scp);\n }\n }", "@java.lang.Override\n public boolean hasNoiseSigma() {\n return gradientNoiseSigmaCase_ == 1;\n }", "public double costNEX() {\r\n double diff=0;\r\n double intensity=0;\r\n \r\n for(int x=Config.ptvXLow-0; x < Config.ptvXHigh+0; x++) {\r\n// for(int x=Solver.xBoundsTumor[0]; x < Solver.xBoundsTumor[1]; x+= Config.scaleFactor) {\r\n for(int y=Config.ptvYLow-0; y < Config.ptvYHigh+0; y++) {\r\n// for(int y=Solver.yBoundsTumor[0]; y < Solver.yBoundsTumor[1]; y+= Config.scaleFactor) {\r\n for(int z=Config.ptvZLow-0; z < Config.ptvZHigh+0; z++) {\r\n// for(int z=Solver.zBoundsTumor[0]; z < Solver.zBoundsTumor[1]; z+= Config.scaleFactor) {\r\n\r\n this.body2[x][y][z].setCurrentDosis(0.0); //Set currentPtvVoxel Dose to 0 \r\n for(int i=0; i<Config.numberOfSeeds;++i) { \r\n // Calculate intensity based based on current dwelltime\r\n intensity = this.body2[x][y][z].radiationIntensity(this.seeds2[i].getCoordinate(), New_state[i]);\r\n if (intensity>0) {\r\n// LogTool.print(\"Cost: Intensity :\" + intensity + \"@ \" + x + \" \" + y + \" \" + z,\"notification\");\r\n }\r\n this.body2[x][y][z].addCurrentDosis(intensity);\r\n } \r\n diff += Math.pow((this.body2[x][y][z].getGoalDosis()-this.body2[x][y][z].getCurrentDosis()),2);\r\n// LogTool.print(\" diffdose \" + (Looper.body2[x][y][z].getGoalDosis()-Looper.body2[x][y][z].getCurrentDosis()),\"notification\");\r\n } \r\n }\r\n }\r\n return Math.sqrt(diff);\r\n// return Math.random();\r\n }", "int computeGradient(\n int gx, int gy);", "public double getNoiseMean() {\n\t\t\treturn NOISE_MEAN;\n\t\t}", "public void calculateGradients(int dataIndex, double learningRate){\r\n for (int i = 0; i < outputLayer.length; i++) {\r\n for (int j = 0; j < outputLayer[i].weights.length; j++) {\r\n outputLayer[i].dw[j] = -2*((attribute[dataIndex] == i ? 1 : 0) - sigmoid(outputLayer[i].z))*sigmoidDeri(outputLayer[i].z)*outputLayer[i].data[j];\r\n }\r\n outputLayer[i].db = -2*((attribute[dataIndex] == i ? 1 : 0) - sigmoid(outputLayer[i].z))*sigmoidDeri(outputLayer[i].z);\r\n }\r\n\r\n adjust(learningRate, true);\r\n calculateDesireHiddenLayerActivation(dataIndex);\r\n\r\n for (int i = 0; i < hiddenLayer.length; i++) {\r\n for (int j = 0; j < hiddenLayer[i].weights.length; j++) {\r\n hiddenLayer[i].dw[j] = -2*(desireHiddenLayerActivation[i] - hiddenLayer[i].a)*sigmoidDeri(hiddenLayer[i].z)*hiddenLayer[i].data[j];\r\n }\r\n hiddenLayer[i].db = -2*(desireHiddenLayerActivation[i] - hiddenLayer[i].a)*sigmoidDeri(hiddenLayer[i].z);\r\n }\r\n\r\n adjust(learningRate, false);\r\n }", "public abstract double gradient(double betaForDimension, int dimension);", "public void calculate() {\n float xoff = 0;\n for (int i = 0; i < cols; i++)\n { \n float yoff = 0;\n for (int j = 0; j < rows; j++)\n {\n z[i][j] = map(noise(xoff, yoff,zoff), 0, 1, -120, 120);\n yoff += 0.1f;\n }\n xoff += 0.1f;\n }\n zoff+=0.01f;\n }", "void computeGradient(GradientCalc calc);", "@Override\r\n public void getValueGradient(double[] gradient) {\n double[] llhGrad = new double[N];\r\n for (int n = 0; n < N; n++) {\r\n llhGrad[n] = ZTy[n];\r\n for (int m = 0; m < N; m++) {\r\n llhGrad[n] -= ZTZ[n][m] * parameters[m];\r\n }\r\n llhGrad[n] /= (rhoSquare);\r\n }\r\n\r\n // gradient of the log prior\r\n double[] lprior = new double[N];\r\n for (int n = 0; n < N; n++) {\r\n // uplink\r\n double uplinkPrior = 0.0;\r\n int parentIndex = upwardLink.get(n);\r\n if (parentIndex == -1) {\r\n uplinkPrior += parameters[n] - mu;\r\n } else {\r\n uplinkPrior += parameters[n] - parameters[parentIndex];\r\n }\r\n uplinkPrior /= (-sigmaSquares[n]);\r\n\r\n // downlinks\r\n double downlinkPrior = 0.0;\r\n for (int child : downwardLinks.get(n)) {\r\n downlinkPrior += (parameters[n] - parameters[child]) / (-sigmaSquares[child]);\r\n }\r\n\r\n lprior[n] = uplinkPrior + downlinkPrior;\r\n }\r\n// for(int n=0; n<N; n++)\r\n// lprior[n] = - (parameters[n] - mus[n]) / sigmaSquares[n];\r\n\r\n // combine\r\n for (int n = 0; n < N; n++) {\r\n gradient[n] = llhGrad[n] + lprior[n];\r\n }\r\n }", "public abstract void makeNoise();", "private double noisyRt(double value) {\n\n\t\t// then add additive noise as well\n\t\tdouble additiveNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getRtStdev());\n\t\tvalue += additiveNoise;\n\t\t\n\t\t// value must always be >= 0\n\t\tif (value < 0) {\n\t\t\tvalue = 0;\n\t\t}\n\t\treturn value;\n\n\t}", "private float noise(Vector2 point) {\n\t\tVector2 bottomLeft = randomGrid[(int) point.x][(int) point.y];\n\t\tVector2 topLeft = randomGrid[(int) point.x][(int) point.y + 1];\n\t\tVector2 bottomRight = randomGrid[(int) point.x + 1][(int) point.y];\n\t\tVector2 topRight = randomGrid[(int) point.x + 1][(int) point.y + 1];\n\n\t\tfloat bottomLeftValue = bottomLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y));\n\t\tfloat topLeftValue = topLeft.dot(point.cpy().scl(-1).add((int) point.x, (int) point.y + 1));\n\t\tfloat bottomRightValue = bottomRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y));\n\t\tfloat topRightValue = topRight.dot(point.cpy().scl(-1).add((int) point.x + 1, (int) point.y + 1));\n\n\t\tfloat bottomValue = bottomLeftValue * (1 - point.x % 1) + bottomRightValue * (point.x % 1);\n\t\tfloat topValue = topLeftValue * (1 - point.x % 1) + topRightValue * (point.x % 1);\n\t\tfloat value = bottomValue * (1 - point.y % 1) + topValue * (point.y % 1);\n\n\t\treturn value;\n\t}", "public Builder clearNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 1) {\n gradientNoiseSigmaCase_ = 0;\n gradientNoiseSigma_ = null;\n onChanged();\n }\n return this;\n }", "@Override\r\n\t\tpublic double[] gradient(double x, double... parameters) {\n\t\t\tfinal double a = parameters[0];\r\n\t\t\tfinal double b = parameters[1];\r\n\t\t\tfinal double c = parameters[2];\r\n\t\t\tfinal double d = parameters[3];\r\n\t\t\tfinal double e = parameters[4];\r\n\t\t\t\r\n\t\t\tdouble[] gradients = new double[5];\r\n\t\t\t//double den = 1 + Math.pow((x+e)/c, b);\r\n\t\t\t//gradients[0] = 1 / den; // Yes a Derivation \r\n\t\t\t//gradients[1] = -((a - d) * Math.pow(x / c, b) * Math.log(x / c)) / (den * den); // Yes b Derivation \r\n\t\t\t//gradients[2] = (b * Math.pow(x / c, b - 1) * (x / (c * c)) * (a - d)) / (den * den); // Yes c Derivation \r\n\t\t\t//gradients[3] = 1 - (1 / den); // Yes d Derivation \r\n\t\t\t\r\n\t\t\t//Derivation\r\n\t\t\tfinal double c_b = Math.pow(c, b);\r\n\t\t\tfinal double c_b1 = Math.pow(c, b+1.);\r\n\t\t\tfinal double c_2b = Math.pow(c, 2.*b);\r\n\t\t\tfinal double c_2b1 = Math.pow(c, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tfinal double xe_b = Math.pow(x+e, b);\r\n\t\t\tfinal double xe_2b = Math.pow(x+e, 2.*b);\r\n\t\t\tfinal double xe_2b1 = Math.pow(x+e, 2.*b+1.);\r\n\t\t\t\r\n\t\t\tgradients[0] = c_b/(xe_b+c_b);\r\n\t\t\tgradients[1] = ((c_b*d-a*c_b)*xe_b*Math.log(x+e)+(a*c_b*Math.log(c)-c_b*Math.log(c)*d)*xe_b)/(xe_2b+2*c_b*xe_b+c_2b);\r\n\t\t\tgradients[2] = -((b*c_b*d-a*b*c_b)*xe_b)/(c*xe_2b+2*c_b1*xe_b+c_2b1);\r\n\t\t\tgradients[3] = xe_b/(xe_b+c_b);\r\n\t\t\tgradients[4] = ((b*c_b*d-a*b*c_b)*xe_b)/(xe_2b1+xe_b*(2*c_b*x+2*c_b*e)+c_2b*x+c_2b*e);\r\n\t\t\treturn gradients;\r\n\t\t}", "public boolean hasNoiseSigma() {\n return gradientNoiseSigmaCase_ == 1;\n }", "@Override\r\n\tpublic FloatMat gradient() { return this.gradient; }", "public double getYNoise(double x, double z)\n {\n double var11 = 0.5D * (square3 - 1.0D);\n double var13 = (x + z) * var11;\n int var15 = fastFloor(x + var13);\n int var16 = fastFloor(z + var13);\n double var17 = (3.0D - square3) / 6.0D;\n double var19 = (double)(var15 + var16) * var17;\n double var21 = (double)var15 - var19;\n double var23 = (double)var16 - var19;\n double var25 = x - var21;\n double var27 = z - var23;\n byte var29;\n byte var30;\n\n if (var25 > var27)\n {\n var29 = 1;\n var30 = 0;\n }\n else\n {\n var29 = 0;\n var30 = 1;\n }\n\n double var31 = var25 - (double)var29 + var17;\n double var33 = var27 - (double)var30 + var17;\n double var35 = var25 - 1.0D + 2.0D * var17;\n double var37 = var27 - 1.0D + 2.0D * var17;\n int var39 = var15 & 255;\n int var40 = var16 & 255;\n int var41 = this.permutationTable[var39 + this.permutationTable[var40]] % 12;\n int var42 = this.permutationTable[var39 + var29 + this.permutationTable[var40 + var30]] % 12;\n int var43 = this.permutationTable[var39 + 1 + this.permutationTable[var40 + 1]] % 12;\n double var44 = 0.5D - var25 * var25 - var27 * var27;\n double var5;\n\n if (var44 < 0.0D)\n {\n var5 = 0.0D;\n }\n else\n {\n var44 *= var44;\n var5 = var44 * var44 * dot(grad3[var41], var25, var27);\n }\n\n double var46 = 0.5D - var31 * var31 - var33 * var33;\n double var7;\n\n if (var46 < 0.0D)\n {\n var7 = 0.0D;\n }\n else\n {\n var46 *= var46;\n var7 = var46 * var46 * dot(grad3[var42], var31, var33);\n }\n\n double var48 = 0.5D - var35 * var35 - var37 * var37;\n double var9;\n\n if (var48 < 0.0D)\n {\n var9 = 0.0D;\n }\n else\n {\n var48 *= var48;\n var9 = var48 * var48 * dot(grad3[var43], var35, var37);\n }\n\n return 70.0D * (var5 + var7 + var9);\n }", "public float getNoise(int x, int y) {\n\t\treturn getRealNoise(x * .3f, y * .3f);\n\t}", "@Override\n public Vector2d gradient(Vector2d p) {\n\n return null;\n }", "private double noisyIntensity(double value) {\n\n\t\t// add multiplicative noise: log the value, add noise then take the exp\n\t\tdouble logValue = Math.log(value);\n\t\tdouble multiplicativeNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getIntensityStdev());\n\t\tlogValue += multiplicativeNoise;\n\t\tvalue = Math.exp(logValue);\n\n\t\t// then add additive noise as well\n\t\tdouble additiveNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getIntensityStdev());\n\t\tvalue += additiveNoise;\n\t\t\n\t\t// value must always be >= 0\n\t\tif (value < 0) {\n\t\t\tvalue = 0;\n\t\t}\n\t\treturn value;\n\n\t}", "public double noise2D(double xin, double yin) {\n double n0, n1, n2;\n double s = (xin + yin) * F2;\n int i = fastfloor(xin + s);\n int j = fastfloor(yin + s);\n double t = (i + j) * G2;\n double X0 = i - t;\n double Y0 = j - t;\n double x0 = xin - X0;\n double y0 = yin - Y0;\n int i1, j1;\n if(x0 > y0) {\n i1 = 1;\n j1 = 0;\n } else {\n i1 = 0;\n j1 = 1;\n }\n double x1 = x0 - i1 + G2;\n double y1 = y0 - j1 + G2;\n double x2 = x0 - 1.0 + 2.0 * G2;\n double y2 = y0 - 1.0 + 2.0 * G2;\n int ii = i & (SUPPLY_LENGTH - 1);\n int jj = j & (SUPPLY_LENGTH - 1);\n int gi0 = permMod12[perm[ii + perm[jj]]];\n int gi1 = permMod12[perm[ii + i1 + perm[jj + j1]]];\n int gi2 = permMod12[perm[ii + 1 + perm[jj + 1]]];\n double t0 = CONTRIBUTION_FACTOR - x0 * x0 - y0 * y0;\n if(t0 < 0) {\n n0 = 0.0;\n } else {\n t0 *= t0;\n n0 = t0 * t0 * dot(GTAB[gi0], x0, y0, 0);\n }\n double t1 = CONTRIBUTION_FACTOR - x1 * x1 - y1 * y1;\n if(t1 < 0) {\n n1 = 0.0;\n } else {\n t1 *= t1;\n n1 = t1 * t1 * dot(GTAB[gi1], x1, y1, 0);\n }\n double t2 = CONTRIBUTION_FACTOR - x2 * x2 - y2 * y2;\n if(t2 < 0) {\n n2 = 0.0;\n } else {\n t2 *= t2;\n n2 = t2 * t2 * dot(GTAB[gi2], x2, y2, 0);\n }\n return NORMALIZE_FACTOR_2D * (n0 + n1 + n2);\n }", "private double noise(final double xin, final double yin, final double zin) {\n double n0, n1, n2, n3;\n double s = (xin + yin + zin) * F3;\n int i = fastfloor(xin + s);\n int j = fastfloor(yin + s);\n int k = fastfloor(zin + s);\n double t = (i + j + k) * G3;\n double x0 = xin - (i - t);\n double y0 = yin - (j - t);\n double z0 = zin - (k - t);\n int i1, j1, k1;\n int i2, j2, k2;\n if (x0 >= y0) {\n if (y0 >= z0) {\n i1 = 1;\n j1 = 0;\n k1 = 0;\n i2 = 1;\n j2 = 1;\n k2 = 0;\n } else if (x0 >= z0) {\n i1 = 1;\n j1 = 0;\n k1 = 0;\n i2 = 1;\n j2 = 0;\n k2 = 1;\n } else {\n i1 = 0;\n j1 = 0;\n k1 = 1;\n i2 = 1;\n j2 = 0;\n k2 = 1;\n }\n } else {\n if (y0 < z0) {\n i1 = 0;\n j1 = 0;\n k1 = 1;\n i2 = 0;\n j2 = 1;\n k2 = 1;\n } else if (x0 < z0) {\n i1 = 0;\n j1 = 1;\n k1 = 0;\n i2 = 0;\n j2 = 1;\n k2 = 1;\n } else {\n i1 = 0;\n j1 = 1;\n k1 = 0;\n i2 = 1;\n j2 = 1;\n k2 = 0;\n }\n }\n double x1 = x0 - i1 + G3;\n double y1 = y0 - j1 + G3;\n double z1 = z0 - k1 + G3;\n double x2 = x0 - i2 + 2.0 * G3;\n double y2 = y0 - j2 + 2.0 * G3;\n double z2 = z0 - k2 + 2.0 * G3;\n double x3 = x0 - 1.0 + 3.0 * G3;\n double y3 = y0 - 1.0 + 3.0 * G3;\n double z3 = z0 - 1.0 + 3.0 * G3;\n int ii = i & (SUPPLY_LENGTH - 1);\n int jj = j & (SUPPLY_LENGTH - 1);\n int kk = k & (SUPPLY_LENGTH - 1);\n int gi0 = permMod12[ii + perm[jj + perm[kk]]];\n int gi1 = permMod12[ii + i1 + perm[jj + j1 + perm[kk + k1]]];\n int gi2 = permMod12[ii + i2 + perm[jj + j2 + perm[kk + k2]]];\n int gi3 = permMod12[ii + 1 + perm[jj + 1 + perm[kk + 1]]];\n double t0 = CONTRIBUTION_FACTOR - x0 * x0 - y0 * y0 - z0 * z0;\n if (t0 < 0) {\n n0 = 0.0;\n } else {\n t0 *= t0;\n n0 = t0 * t0 * dot(GTAB[gi0], x0, y0, z0);\n }\n double t1 = CONTRIBUTION_FACTOR - x1 * x1 - y1 * y1 - z1 * z1;\n if (t1 < 0) {\n n1 = 0.0;\n } else {\n t1 *= t1;\n n1 = t1 * t1 * dot(GTAB[gi1], x1, y1, z1);\n }\n double t2 = CONTRIBUTION_FACTOR - x2 * x2 - y2 * y2 - z2 * z2;\n if (t2 < 0) {\n n2 = 0.0;\n } else {\n t2 *= t2;\n n2 = t2 * t2 * dot(GTAB[gi2], x2, y2, z2);\n }\n double t3 = CONTRIBUTION_FACTOR - x3 * x3 - y3 * y3 - z3 * z3;\n if (t3 < 0) {\n n3 = 0.0;\n } else {\n t3 *= t3;\n n3 = t3 * t3 * dot(GTAB[gi3], x3, y3, z3);\n }\n return NORMALIZE_FACTOR * (n0 + n1 + n2 + n3);\n }", "private void compute() {\r\n int i, j, k;\r\n float gx, gy, gz;\r\n for (int q = 0; q < data.length; q++) {\r\n data[q] = new VoxelGradient();\r\n }\r\n\r\n\r\n // gradient at extremes, 0 and dim-1\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n gx = (volume.data[(i + 1) + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n gy = (volume.data[i + (dimX * ((j + 1) + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n gz = (volume.data[i + (dimX * (j + (dimY * (k + 1))))] - volume.data[i + (dimX * (j + (dimY * k)))]) / 1;\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n i = dimX - 1;\r\n j = dimY - 1;\r\n k = dimZ - 1;\r\n gx = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[(i - 1) + (dimX * (j + (dimY * k)))]) / 1;\r\n gy = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * ((j - 1) + (dimY * k)))]) / 1;\r\n gz = (volume.data[i + (dimX * (j + (dimY * k)))] - volume.data[i + (dimX * (j + (dimY * (k - 1))))]) / 1;\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n\r\n\r\n //gradient in non-extreme points\r\n for (i = 1; i < dimX - 1; i++) {\r\n for (j = 1; j < dimY - 1; j++) {\r\n for (k = 1; k < dimZ - 1; k++) {\r\n\r\n gx = (volume.data[(i + 1) + (dimX * (j + (dimY * k)))] - volume.data[(i - 1) + (dimX * (j + (dimY * k)))]) / 2;\r\n\r\n gy = (volume.data[i + (dimX * ((j + 1) + (dimY * k)))] - volume.data[i + (dimX * ((j - 1) + (dimY * k)))]) / 2;\r\n\r\n gz = (volume.data[i + (dimX * (j + (dimY * (k + 1))))] - volume.data[i + (dimX * (j + (dimY * (k - 1))))]) / 2;\r\n\r\n data[i + dimX * (j + dimY * k)] = new VoxelGradient(gx, gy, gz);\r\n\r\n\r\n }\r\n }\r\n }\r\n }", "public float getGradPoint() { return gradientPoint; }", "@java.lang.Override\n public boolean hasFeatureNoiseSigma() {\n return gradientNoiseSigmaCase_ == 2;\n }", "boolean hasNoise();", "public void setNoise(double noiseCoefficient) {\n this.noiseCoefficient = noiseCoefficient;\n }", "public static double noise(double x, double y, double z) {\n\n\t\tdouble s = (x+y+z)/3.0;\n\t\ti = fastfloor(x+s); j = fastfloor(y+s); k = fastfloor(z+s);\n\t\ts = (i+j+k)/6.0; u = x-i+s; v = y-j+s; w = z-k+s;\n\t\tA[0] = A[1] = A[2] = 0;\n\t\tint hi = (u>=w ? (u>=v ? 0 : 1) : (v>=w ? 1 : 2));\n\t\tint lo = (u< w ? (u< v ? 0 : 1) : (v< w ? 1 : 2));\n\t\treturn 4.0 * (K(hi) + K(3-hi-lo) + K(lo) + K(0));\n\t}", "private double sumWeights(int index, Image image){\n double sum = 0;\n for(int i= 0; i<400 ; i++){\n sum+=perceptrons.get(i).getWeight(index)\n *normalizeImageValue(image.getImage()[i]);\n }\n return sum;\n }", "public static void gradientCheck(){\n\t\tList<Integer> context = Arrays.asList(1, 2, 3);\n\t\tInteger nextWord = 5;\n\t\tNetwork network = new Network(4, 20, 30, 40);\n\t\t\n\t\tdouble epsilon = 0.0001;\n\t\tdouble alpha = 0.1;\n\t\t\n\t\tint i = 1, j = 12;\n\t\tdouble originalValue = network.E.get(i).get(j, 0);\n\t\t\n\t\tnetwork.E.get(i).put(j, 0, originalValue + epsilon);\n\t\tnetwork.feedForward(context, nextWord);\n\t\tdouble loss1 = -1.0 * Math.log(network.output.get(nextWord, 0));\n\t\t\n\t\tnetwork.E.get(i).put(j, 0, originalValue - epsilon);\n\t\tnetwork.feedForward(context, nextWord);\n\t\tdouble loss2 = -1.0 * Math.log(network.output.get(nextWord, 0));\n\t\t\n\t\tdouble derivative1 = (loss1 - loss2)/(2.0 * epsilon);\n\t\tSystem.out.println(\"Derivative1: \" + derivative1);\n\t\t\n\t\tnetwork.E.get(i).put(j, 0, originalValue);\n\t\tnetwork.feedForward(context, nextWord);\n\t\tnetwork.backProp(context, nextWord, alpha);\n\t\tdouble derivative2 = (network.E.get(i).get(j, 0) - originalValue) / (-1.0 * alpha);\n\t\tSystem.out.println(\"Derivative2: \" + derivative2);\n\t\t\n\t\tif(Math.abs(derivative1 - derivative2) < 0.00001)\n\t\t\tSystem.out.println(\"Gradient check: PASS\");\n\t\telse\n\t\t\tSystem.out.println(\"Gradient check: FAIL\");\n\t}", "public float gradientMethod(Volume vol) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tnes += gradientMethod( vol.getSlice(ii) );\n\t\t}\n\n\t\treturn (nes / (float)vol.getNSlices());\n\t}", "@java.lang.Override\n public boolean hasFeatureNoiseSigma() {\n return gradientNoiseSigmaCase_ == 2;\n }", "private double innerEnergy(int x, int y)\n {\n Color left = this.picture.get(x-1, y);\n Color right = this.picture.get(x+1, y);\n Color up = this.picture.get(x, y-1);\n Color down = this.picture.get(x, y+1);\n return gradient(left, right) + gradient(up, down);\n }", "Gradient gradientAt(Point point);", "public Builder clearNoise() {\n bitField0_ = (bitField0_ & ~0x00010000);\n noise_ = getDefaultInstance().getNoise();\n onChanged();\n return this;\n }", "@Override\n\tpublic Vector3d gradient(Particle p_j) {\n\t\treturn null;\n\t}", "public void gradientDescent(double[][] gradient, double eps) {\n for (int i = 0; i < _weights.length; i++) {\n for (int j = 0; j < _weights[0].length; j++) {\n _weights[i][j] -= eps * gradient[i][j];\n }\n }\n }", "@Override\r\n\tpublic String makeANoise() {\n\t\treturn \"deer noise\";\r\n\t}", "private void SGDForNegativeInstance(Instance instance) {\n\t\tint lengthOfDocument = 0;\r\n\t\tfor (int frequency : instance.mpFeatureToFrequency.values()) {\r\n\t\t\tlengthOfDocument += frequency;\r\n\t\t}\r\n\t\t// double gValue = getGFunctionValue(lengthOfDocument);\r\n\t\t// double gGradientWithPositiveClass =\r\n\t\t// getGFunctionGradientWithPositiveClass(lengthOfDocument);\r\n\t\t// double gGradientWithNegativeClass =\r\n\t\t// getGFunctionGradientWithNegativeClass(lengthOfDocument);\r\n\r\n\t\tdouble positiveClassSum = (param.smoothingPriorForFeatureInNaiveBayes\r\n\t\t\t\t* V + sum_x[0]);\r\n\t\tdouble negativeClassSum = (param.smoothingPriorForFeatureInNaiveBayes\r\n\t\t\t\t* V + sum_x[1]);\r\n\t\tdouble ratioOfClasses = positiveClassSum / negativeClassSum;\r\n\r\n\t\t// Compute R.\r\n\t\tBigDecimal R = BigDecimal.ONE;\r\n\t\t// Pr(-) / Pr(+).\r\n\t\tR = R.multiply(BigDecimal\r\n\t\t\t\t.valueOf(getProbOfClass(1) / getProbOfClass(0)));\r\n\t\t// ratioOfClasses ^ |d|.\r\n\t\tR = R.multiply(BigDecimal.valueOf(ratioOfClasses).pow(lengthOfDocument));\r\n\t\tfor (Map.Entry<Integer, Integer> entry : instance.mpFeatureToFrequency\r\n\t\t\t\t.entrySet()) {\r\n\t\t\tint featureId = entry.getKey();\r\n\t\t\tint frequency = entry.getValue();\r\n\t\t\tdouble ratio = (param.smoothingPriorForFeatureInNaiveBayes + x[featureId][1])\r\n\t\t\t\t\t/ (param.smoothingPriorForFeatureInNaiveBayes + x[featureId][0]);\r\n\t\t\tR = R.multiply(BigDecimal.valueOf(ratio).pow(frequency));\r\n\t\t}\r\n\r\n\t\t// Compute the gradient of each feature for the positive class.\r\n\t\tMap<Integer, Double> gradientOfFeatureWithPositiveClass = new HashMap<Integer, Double>();\r\n\t\tfor (Map.Entry<Integer, Integer> entry : instance.mpFeatureToFrequency\r\n\t\t\t\t.entrySet()) {\r\n\t\t\tint featureId = entry.getKey();\r\n\t\t\tint frequency = entry.getValue();\r\n\r\n\t\t\tBigDecimal numerator1 = BigDecimal\r\n\t\t\t\t\t.valueOf(frequency\r\n\t\t\t\t\t\t\t/ (param.smoothingPriorForFeatureInNaiveBayes + x[featureId][0]));\r\n\t\t\tBigDecimal numerator2 = R.multiply(BigDecimal\r\n\t\t\t\t\t.valueOf(lengthOfDocument / positiveClassSum));\r\n\t\t\tBigDecimal numerator = numerator1.add(numerator2);\r\n\t\t\tBigDecimal denominator = R.add(BigDecimal.ONE);\r\n\t\t\tdouble gradient = numerator.divide(denominator, 30,\r\n\t\t\t\t\tRoundingMode.HALF_UP).doubleValue()\r\n\t\t\t\t\t- lengthOfDocument / positiveClassSum;\r\n\t\t\tif (Double.isNaN(gradient)) {\r\n\t\t\t\tSystem.out.println(\"Nan\");\r\n\t\t\t}\r\n\t\t\tgradientOfFeatureWithPositiveClass.put(featureId, gradient);\r\n\t\t}\r\n\r\n\t\t// Compute the gradient of each feature for the negative class.\r\n\t\tMap<Integer, Double> gradientOfFeatureWithNegativeClass = new HashMap<Integer, Double>();\r\n\t\tfor (Map.Entry<Integer, Integer> entry : instance.mpFeatureToFrequency\r\n\t\t\t\t.entrySet()) {\r\n\t\t\tint featureId = entry.getKey();\r\n\t\t\tint frequency = entry.getValue();\r\n\r\n\t\t\tBigDecimal numerator = BigDecimal\r\n\t\t\t\t\t.valueOf(frequency\r\n\t\t\t\t\t\t\t/ (param.smoothingPriorForFeatureInNaiveBayes + x[featureId][1])\r\n\t\t\t\t\t\t\t- lengthOfDocument / negativeClassSum);\r\n\t\t\tBigDecimal denominator = BigDecimal.ONE.divide(R, 30,\r\n\t\t\t\t\tRoundingMode.HALF_UP).add(BigDecimal.ONE);\r\n\t\t\tdouble gradient = numerator\r\n\t\t\t\t\t.divide(denominator, 30, RoundingMode.HALF_UP)\r\n\t\t\t\t\t.subtract(numerator).doubleValue();\r\n\t\t\tif (Double.isNaN(gradient)) {\r\n\t\t\t\tSystem.out.println(\"Nan\");\r\n\t\t\t}\r\n\t\t\tgradientOfFeatureWithNegativeClass.put(featureId, gradient);\r\n\t\t}\r\n\r\n\t\t// Note that we need to compute all of the gradients first and then\r\n\t\t// update the counts.\r\n\t\t// Update the count of each feature in this document for positive class.\r\n\t\tupdateXs(instance, gradientOfFeatureWithPositiveClass,\r\n\t\t\t\tgradientOfFeatureWithNegativeClass);\r\n\t}", "public float gradientMethod(MCVolume vol, int channel_num) \n\t{\n\t\tfloat nes = (float)0.0;\n\n\t\t//\n\t\t// Get the right slice.\n\t\t//\n\t\tfor(int ii=0; ii<vol.getNSlices(); ii++) {\n\t\t\tnes += gradientMethod( vol.getSlice(ii, channel_num) );\n\t\t}\n\n\t\treturn (nes / (float)vol.getNSlices());\n\t}", "@Override\n\tpublic void makeNoise() {\n\t\tSystem.out.println(\"Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink Oink oink \");\n\t}", "public Double[] mvNextDouble(Random rng) {\n\t\t\n Double Y[] = new Double[nVar];\n Double X[] = new Double[nVar];\n\n for (int i = 0; i <= nVar - 1; i++){\n X[i] = super.inverseF(rng.nextDouble());\n Y[i] = meanArray[i];\n }\n\n if (NotPD) {\n \tfor (int i = 0; i <= nVar - 1; i++){\n \t\tY[i] += X[i];\n }\n }\n else{\n \tfor (int i = 0; i <= nVar - 1; i++){\n \tfor (int j = 0; j <= i; j++){\n Y[i] += H[i][j] * X[j];\n \t}\n }\n }\n\t\treturn Y;\n\t}", "public void injectSomeMoreNoise(double intensity) {\n//\t\taddBSCnoise(lambda,intensity);\n\t\t\n//\t\taddBSCnoise(posterior, intensity);\n//\t\tfor (int i=0; i<n; i++) lambda[i] = posterior[i];\n//\t\tcalc_q0 (posterior);\n//\n//\t\t// initialization of beta\n//\t\tfor (int i = 0; i <= m - 1; i++) {\n//\t\t\tfor (int j = 0; j <= row_weight[i] - 1; j++) {\n//\t\t\t\tbeta[i][j] = 0.0;\n//\t\t\t}\n//\t\t}\t\t\n\t\t\n\t}", "public float gradientMethod(Slice slice) \n\t{\n\t\t//\n\t\t// Intialize variables.\n\t\t//\n\t\tint nrows = slice.getNRows();\n\t\tint ncols = slice.getNCols();\n\n\t\tfloat[] v = new float[nrows*ncols]; int v_numset = 0;\n\t\tfloat t = (float)0.0; \n\t\tfloat sig_y = (float)0.0;\n\t\tfloat sig_x = (float)0.0;\n\n\t\t//\n\t\t// Compute the column gradient\n\t\t//\n\t\tfor(int row=0; row<nrows; row++) {\n\t\t\tfor(int col=1; col<ncols-1; col++) {\n\t\t\t\tt = slice.getData(row,col+1) - (float)2.0 * slice.getData(row,col) + slice.getData(row,col-1);\n\n\t\t\t\tif( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) {\n\t\t\t\t\tv[v_numset] = t; v_numset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( v_numset <= 10 ) {\n\t\t\tsig_y = (float)0.0;\n\t\t}\n\t\telse {\n\t\t\tsig_y = vec_stdDevMod(v, v_numset);\n\t\t}\n\n\t\tv_numset = 0;\n\n\t\t//\n\t\t// Compute the row gradient\n\t\t//\n\t\tfor(int col=0; col<ncols; col++) {\n\t\t\tfor(int row=1; row<nrows-1; row++) {\n\t\t\t\tt = slice.getData(row+1,col) - (float)2.0 * slice.getData(row,col) + slice.getData(row-1,col);\n\n\t\t\t\tif( t != (float)0.0 || slice.getData(row,col) != (float)0.0 ) {\n\t\t\t\t\tv[v_numset] = t; v_numset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif( v_numset <= 10 ) {\n\t\t\tsig_x = (float)0.0;\n\t\t}\n\t\telse {\n\t\t\tsig_x = vec_stdDevMod(v, v_numset);\n\t\t}\n\n\t\treturn (float)Math.sqrt( (double)(sig_x * sig_x + sig_y * sig_y) ) / (float)2.0;\n\t}", "public void useUniformDeviates(){\n this.gaussianDeviates = false;\n }", "private double noisyMass(double value) {\n\n\t\t// then add additive noise as well\n\t\tdouble additiveNoise = randomData.nextGaussian(noiseLevel.getNoiseMean(), \n\t\t\t\tnoiseLevel.getMassStdev());\n\t\tvalue += additiveNoise;\n\t\t\n\t\t// value must always be >= 0\n\t\tif (value < 0) {\n\t\t\tvalue = 0;\n\t\t}\n\t\treturn value;\n\n\t}", "private double randn(){\r\n\t\t//* http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.html\r\n\t\t//RandomNumber rnd = new RandomNumber(System.currentTimeMillis());\r\n\t\t//return rnd.normal();\r\n\t\treturn rnd.nextGaussian();\r\n\t\t//return 0;\r\n\t}", "java.lang.String getNoise();", "public PVector NoiseMove()\n {\n PVector noise = new PVector(random(2) - 1, random(2) -1);\n noise.setMag(maxSpeed);\n noise.sub(velocity);\n noise.limit(maxForce);\n return noise;\n }", "public native MagickImage reduceNoiseImage(double radius)\n\t\t\tthrows MagickException;", "void addGradient(Vector gradientVector, double gradient);", "public double energy(int x, int y) {\n Color upper = picture.get(x, (y - 1 + this.height()) % this.height());\n Color lower = picture.get(x, (y + 1 + this.height()) % this.height());\n Color left = picture.get((x - 1 + this.width()) % this.width(), y);\n Color right = picture.get((x + 1 + this.width()) % this.width(), y);\n return getGradient(upper, lower) + getGradient(left, right);\n }", "public Builder setNoiseSigma(float value) {\n\n gradientNoiseSigmaCase_ = 1;\n gradientNoiseSigma_ = value;\n onChanged();\n return this;\n }", "@java.lang.Override\n public com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma getFeatureNoiseSigma() {\n if (gradientNoiseSigmaCase_ == 2) {\n return (com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma) gradientNoiseSigma_;\n }\n return com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma.getDefaultInstance();\n }", "@Override\n /**\n * @param X The input vector. An array of doubles.\n * @return The value returned by th LUT or NN for this input vector\n */\n\n public double outputFor(double[] X) {\n int i = 0, j = 0;\n for(i=0;i<argNumInputs;i++){\n S[0][i] = X[i];\n NeuronCell[0][i] = X[i];\n }\n //then add the bias term\n S[0][argNumInputs] = 1;\n NeuronCell[0][argNumInputs] = customSigmoid(S[0][argNumInputs]);\n S[1][argNumHidden] = 1;\n NeuronCell[1][argNumHidden] = customSigmoid(S[1][argNumInputs]);\n\n for(i=0;i<argNumHidden;i++){\n for(j=0;j<=argNumInputs;j++){\n //Wji : weigth from j to i\n WeightSum+=NeuronCell[0][j]*Weight[0][j][i];\n }\n //Sj = sigma(Wji * Xi)\n S[1][i]=WeightSum;\n NeuronCell[1][i]=(customSigmoid(WeightSum));\n //reset weigthsum\n WeightSum=0;\n }\n\n for(i = 0; i < argNumOutputs; i++){\n for(j = 0;j <= argNumHidden;j++){\n WeightSum += NeuronCell[1][j] * Weight[1][j][i];\n }\n NeuronCell[2][i]=customSigmoid(WeightSum);\n S[2][i]=WeightSum;\n WeightSum=0;\n }\n //if we only return 1 double, it means we only have one output, so actually we can write return NeuronCell[2][0]\n return NeuronCell[2][0];\n }", "public Point getFinalPoint(int maxX, int maxY, double noise, double percentOfExcess, int x, int y) {\n Point alteredPoint = new Point();\n //Alter coords\n double maxXRange = maxX * noise; //Now we have the max number that could be added to the actual x coord. The range will be composed of 0 - maxRange\n double maxYRange = maxY * noise; //Getting the X and Y value according to the noise percent.\n\n //Lets get the formula for determine which value between 0 and RANGE would be added acording to the level\n //Cero for 0% of excess, maxRange for 100% of excess\n //Solve y=ax^2\n\n double a_x = maxXRange / (100 * 100);\n double a_y = maxYRange / (100 * 100);\n\n //Then, lets look for a random number with the help of the number that the formula throw in this kind of range: -6 form < form < + 6 form\n //By this way, we could ensure that the directions will probably not be the same in a short time\n\n\n double noiseX = getNoiseAccordingExcessPercent(a_x, percentOfExcess); //This noise is direclty proportional to the percentOfExcess on breathing rate\n double noiseY = getNoiseAccordingExcessPercent(a_y, percentOfExcess);\n\n //If you want to be more accurate, you can use different values for different levels\n int minimum = 10;//< If you want to change in what excess the user will note a bigger change in the robot control, change this.\n\n noiseX += minimum;\n noiseY += minimum; //By this way, we ensure that also in low levels, we will get a minimum noise of 25. for example at 1% of excess\n\n int adjust = 6;//For make the range\n\n alteredPoint.x = getAlteredPointOfCoord(x, (int) noiseX, adjust);\n alteredPoint.y = getAlteredPointOfCoord(y, (int) noiseY, adjust);\n\n //Just to stay in bounds\n if (alteredPoint.x >= maxX) { //Because if we reach the max, it's like start again\n alteredPoint.x = maxX - 1;\n } else if (alteredPoint.y >= maxY) {\n alteredPoint.y = maxY - 1;\n }\n return alteredPoint;\n }", "public void populateNoiseArray(double[] p_76308_1_, double p_76308_2_, double p_76308_4_, double p_76308_6_, int p_76308_8_, int p_76308_9_, int p_76308_10_, double p_76308_11_, double p_76308_13_, double p_76308_15_, double p_76308_17_) {\n/* 81 */ if (p_76308_9_ == 1) {\n/* */ \n/* 83 */ boolean var64 = false;\n/* 84 */ boolean var65 = false;\n/* 85 */ boolean var21 = false;\n/* 86 */ boolean var68 = false;\n/* 87 */ double var70 = 0.0D;\n/* 88 */ double var73 = 0.0D;\n/* 89 */ int var75 = 0;\n/* 90 */ double var77 = 1.0D / p_76308_17_;\n/* */ \n/* 92 */ for (int var30 = 0; var30 < p_76308_8_; var30++) {\n/* */ \n/* 94 */ double var31 = p_76308_2_ + var30 * p_76308_11_ + this.xCoord;\n/* 95 */ int var78 = (int)var31;\n/* */ \n/* 97 */ if (var31 < var78)\n/* */ {\n/* 99 */ var78--;\n/* */ }\n/* */ \n/* 102 */ int var34 = var78 & 0xFF;\n/* 103 */ var31 -= var78;\n/* 104 */ double var35 = var31 * var31 * var31 * (var31 * (var31 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 106 */ for (int var37 = 0; var37 < p_76308_10_; var37++)\n/* */ {\n/* 108 */ double var38 = p_76308_6_ + var37 * p_76308_15_ + this.zCoord;\n/* 109 */ int var40 = (int)var38;\n/* */ \n/* 111 */ if (var38 < var40)\n/* */ {\n/* 113 */ var40--;\n/* */ }\n/* */ \n/* 116 */ int var41 = var40 & 0xFF;\n/* 117 */ var38 -= var40;\n/* 118 */ double var42 = var38 * var38 * var38 * (var38 * (var38 * 6.0D - 15.0D) + 10.0D);\n/* 119 */ int var19 = this.permutations[var34] + 0;\n/* 120 */ int var66 = this.permutations[var19] + var41;\n/* 121 */ int var67 = this.permutations[var34 + 1] + 0;\n/* 122 */ int var22 = this.permutations[var67] + var41;\n/* 123 */ var70 = lerp(var35, func_76309_a(this.permutations[var66], var31, var38), grad(this.permutations[var22], var31 - 1.0D, 0.0D, var38));\n/* 124 */ var73 = lerp(var35, grad(this.permutations[var66 + 1], var31, 0.0D, var38 - 1.0D), grad(this.permutations[var22 + 1], var31 - 1.0D, 0.0D, var38 - 1.0D));\n/* 125 */ double var79 = lerp(var42, var70, var73);\n/* 126 */ int var10001 = var75++;\n/* 127 */ p_76308_1_[var10001] = p_76308_1_[var10001] + var79 * var77;\n/* */ }\n/* */ \n/* */ } \n/* */ } else {\n/* */ \n/* 133 */ int var19 = 0;\n/* 134 */ double var20 = 1.0D / p_76308_17_;\n/* 135 */ int var22 = -1;\n/* 136 */ boolean var23 = false;\n/* 137 */ boolean var24 = false;\n/* 138 */ boolean var25 = false;\n/* 139 */ boolean var26 = false;\n/* 140 */ boolean var27 = false;\n/* 141 */ boolean var28 = false;\n/* 142 */ double var29 = 0.0D;\n/* 143 */ double var31 = 0.0D;\n/* 144 */ double var33 = 0.0D;\n/* 145 */ double var35 = 0.0D;\n/* */ \n/* 147 */ for (int var37 = 0; var37 < p_76308_8_; var37++) {\n/* */ \n/* 149 */ double var38 = p_76308_2_ + var37 * p_76308_11_ + this.xCoord;\n/* 150 */ int var40 = (int)var38;\n/* */ \n/* 152 */ if (var38 < var40)\n/* */ {\n/* 154 */ var40--;\n/* */ }\n/* */ \n/* 157 */ int var41 = var40 & 0xFF;\n/* 158 */ var38 -= var40;\n/* 159 */ double var42 = var38 * var38 * var38 * (var38 * (var38 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 161 */ for (int var44 = 0; var44 < p_76308_10_; var44++) {\n/* */ \n/* 163 */ double var45 = p_76308_6_ + var44 * p_76308_15_ + this.zCoord;\n/* 164 */ int var47 = (int)var45;\n/* */ \n/* 166 */ if (var45 < var47)\n/* */ {\n/* 168 */ var47--;\n/* */ }\n/* */ \n/* 171 */ int var48 = var47 & 0xFF;\n/* 172 */ var45 -= var47;\n/* 173 */ double var49 = var45 * var45 * var45 * (var45 * (var45 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 175 */ for (int var51 = 0; var51 < p_76308_9_; var51++) {\n/* */ \n/* 177 */ double var52 = p_76308_4_ + var51 * p_76308_13_ + this.yCoord;\n/* 178 */ int var54 = (int)var52;\n/* */ \n/* 180 */ if (var52 < var54)\n/* */ {\n/* 182 */ var54--;\n/* */ }\n/* */ \n/* 185 */ int var55 = var54 & 0xFF;\n/* 186 */ var52 -= var54;\n/* 187 */ double var56 = var52 * var52 * var52 * (var52 * (var52 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 189 */ if (var51 == 0 || var55 != var22) {\n/* */ \n/* 191 */ var22 = var55;\n/* 192 */ int var69 = this.permutations[var41] + var55;\n/* 193 */ int var71 = this.permutations[var69] + var48;\n/* 194 */ int var72 = this.permutations[var69 + 1] + var48;\n/* 195 */ int var74 = this.permutations[var41 + 1] + var55;\n/* 196 */ int var75 = this.permutations[var74] + var48;\n/* 197 */ int var76 = this.permutations[var74 + 1] + var48;\n/* 198 */ var29 = lerp(var42, grad(this.permutations[var71], var38, var52, var45), grad(this.permutations[var75], var38 - 1.0D, var52, var45));\n/* 199 */ var31 = lerp(var42, grad(this.permutations[var72], var38, var52 - 1.0D, var45), grad(this.permutations[var76], var38 - 1.0D, var52 - 1.0D, var45));\n/* 200 */ var33 = lerp(var42, grad(this.permutations[var71 + 1], var38, var52, var45 - 1.0D), grad(this.permutations[var75 + 1], var38 - 1.0D, var52, var45 - 1.0D));\n/* 201 */ var35 = lerp(var42, grad(this.permutations[var72 + 1], var38, var52 - 1.0D, var45 - 1.0D), grad(this.permutations[var76 + 1], var38 - 1.0D, var52 - 1.0D, var45 - 1.0D));\n/* */ } \n/* */ \n/* 204 */ double var58 = lerp(var56, var29, var31);\n/* 205 */ double var60 = lerp(var56, var33, var35);\n/* 206 */ double var62 = lerp(var49, var58, var60);\n/* 207 */ int var10001 = var19++;\n/* 208 */ p_76308_1_[var10001] = p_76308_1_[var10001] + var62 * var20;\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ }", "public double calculateCurvatureGradient(int i){\n Node3D node = mesh.nodes.get(i);\n Set<Node3D> neighbors = getNeighbors(node);\n\n double[] k1 = calculateMeanCurvatureNormal(node, node_to_triangle.get(node));\n double kh = Vector3DOps.normalize(k1)/2;\n double[] k2 = new double[k1.length];\n double kneighbors = 0;\n for(Node3D neighbor: neighbors){\n double[] ki = calculateMeanCurvatureNormal(node, node_to_triangle.get(node));\n\n }\n\n return 0;\n }", "public double calc_c() {\r\n \t\t\r\n \t\tdouble cij = 0;\r\n \t\tint sum_i = 0;\r\n \t\tint sum_j = 0;\r\n \t\tint diff = 0;\r\n \t\tint state = 0;\r\n \t\t\r\n \t\tdouble li, lri, lj, lrj;\r\n \t\t\r\n \t\tList<Integer> samestate_i = new ArrayList<>();\r\n \t\tList<Integer> samestate_j = new ArrayList<>();\r\n \t\t\r\n \t\tList<Double> gradient_i = new ArrayList<>();\r\n \t\tList<Double> gradient_j = new ArrayList<>();\r\n \t\t\r\n\t\t// if the time step is less than the window cij is initialized to zero.\r\n\t\tif(this.n <= this.w || this.w <2) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// else we determine the state of the region i and region j of which\r\n\t\t\t// we are calculating the cij for\r\n\t \t\tDeterminestate di = new Determinestate(this.i, this.n);\r\n\t\t\tDeterminestate dj = new Determinestate(this.j, this.n);\r\n\t\t\t\r\n\t\t\tProbability pi = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\tProbability pj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\r\n\t\t\tif(di.regionCurrentstate() == dj.regionCurrentstate()) {\r\n\t\t\t\tli = pi.getLsave().get(0);\r\n\t\t\t\tlj = pj.getLsave().get(0);\r\n\t\t\t\tstate = 0;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tli = pi.getLsave().get(1);\r\n\t\t\t\tlj = pj.getLsave().get(1);\r\n\t\t\t\tstate =1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// for the time window\r\n\t\t\tfor(int k=1; k<this.w; k++) {\r\n\t\t\t\t\r\n\t\t\t\t// determine the state of i and j in the in n-k time step\r\n\t \t\t\tDeterminestate dri = new Determinestate(this.i, this.n-k);\r\n\t \t\t\tDeterminestate drj = new Determinestate(this.j, this.n-k);\r\n\t \t\t\t\r\n\t \t\t\tProbability pri = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\tProbability prj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\t\r\n\t\t\t\tlri = pri.getLsave().get(state);\r\n\t\t\t\tlrj = prj.getLsave().get(state);\r\n\t \t\t\t\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for i make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == dri.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_i.add(k);\r\n\t \t\t\t\tgradient_i.add(li - lri);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for j make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == drj.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_j.add(k);\r\n\t \t\t\t\tgradient_j.add(lj - lrj);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t// if no match found return zero\r\n\t\tif(samestate_i.size() == 0 || samestate_j.size() == 0) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\t// else calculate cij\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// if both have same length \r\n\t\t\tif(samestate_i.size() == samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j) * Math.abs(diff/(double)this.w);\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//if i is smaller\r\n\t\t\telse if(samestate_i.size() < samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// if j is smaller \r\n\t\t\telse {\r\n\t\t\t\tfor(int i=0; i<samestate_j.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.isNaN(cij)) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn cij;\r\n\t\t}\r\n \t}", "@java.lang.Override\n public com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma getFeatureNoiseSigma() {\n if (featureNoiseSigmaBuilder_ == null) {\n if (gradientNoiseSigmaCase_ == 2) {\n return (com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma) gradientNoiseSigma_;\n }\n return com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma.getDefaultInstance();\n } else {\n if (gradientNoiseSigmaCase_ == 2) {\n return featureNoiseSigmaBuilder_.getMessage();\n }\n return com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma.getDefaultInstance();\n }\n }", "public void ResetColorGradient_ds2() {\r\n\t\tdouble min;\r\n\t\tdouble max;\r\n\t\tdouble median;\r\n\r\n\t\tswitch(transformation) {\r\n\t\t\tcase ROWNORM:\r\n\t\t\t\tmin = minExpression_rownorm_ds2;\r\n\t\t\t\tmax = maxExpression_rownorm_ds2;\r\n\r\n\t\t\t\t//if both row normalization values are zero, can't perform row normalization\r\n\t\t\t\t//issue warning\r\n\t\t\t\t//This happens when there is only one data column in the dataset (or if it is rank file)\r\n\t\t\t\tif((min == 0) && (max == 0)) {\r\n\t\t\t\t\t//JOptionPane.showMessageDialog(Cytoscape.getDesktop(),\"Row normalization does not work with only one data column per dataset.\",\"Row normalization error\",JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t\tmax = Math.max(Math.abs(min), max);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase LOGTRANSFORM:\r\n\r\n\t\t\t\t//can't take a log of a negative number\r\n\t\t\t\t//if both the max and min are negative then log tranform won't work.\r\n\t\t\t\t//issue a warning.\r\n\t\t\t\tif((minExpression_ds2 <= 0) && (maxExpression_ds2 <= 0)) {\r\n\t\t\t\t\t//both the max and min are probably negative values\r\n\t\t\t\t\t//JOptionPane.showMessageDialog(Cytoscape.getDesktop(),\"Both the max and min expression are negative, log of negative numbers is not valid\", \"log normalization error\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\tmin = 0;\r\n\t\t\t\t\tmax = 0;\r\n\t\t\t\t}\r\n\t\t\t\t//if min expression is negative then use the max expression as the max\r\n\t\t\t\telse if(minExpression_ds2 <= 0) {\r\n\t\t\t\t\tmin = Math.min(Math.log(closestToZeroExpression_ds2), Math.log1p(maxExpression_ds2));\r\n\t\t\t\t\tmax = Math.max(Math.log(closestToZeroExpression_ds2), Math.log1p(maxExpression_ds2));\r\n\t\t\t\t}\r\n\t\t\t\t//if the max expression is negative then use the min expression as the max (should never happen!)\r\n\t\t\t\telse if(maxExpression_ds2 <= 0) {\r\n\t\t\t\t\tmin = 0;\r\n\t\t\t\t\tmax = Math.log1p(minExpression_ds2);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmin = Math.log1p(minExpression_ds2);\r\n\t\t\t\t\tmax = Math.log1p(maxExpression_ds2);\r\n\t\t\t\t\tmax = Math.max(Math.abs(min), max);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase ASIS:\r\n\t\t\tdefault:\r\n\t\t\t\tmin = minExpression_ds2;\r\n\t\t\t\tmax = Math.max(Math.abs(minExpression_ds2), maxExpression_ds2);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tmedian = max / 2;\r\n\t\tif(min >= 0) {\r\n\t\t\tmedian = max / 2;\r\n\t\t\trange_ds2 = ColorGradientRange.getInstance(0, median, median, max, 0, median, median, max);\r\n\t\t\ttheme_ds2 = ColorGradientTheme.GREEN_ONECOLOR_GRADIENT_THEME;\r\n\t\t} else {\r\n\t\t\tmedian = 0;\r\n\t\t\trange_ds2 = ColorGradientRange.getInstance(-max, 0, 0, max, -max, 0, 0, max);\r\n\t\t\ttheme_ds2 = ColorGradientTheme.GREEN_MAGENTA_GRADIENT_THEME;\r\n\t\t}\r\n\r\n\t}", "public float[] sense() {\r\n float[] ret = new float[landmarks.length];\r\n \r\n for(int i=0;i<landmarks.length;i++){\r\n float dist = (float) MathX.distance(x, y, landmarks[i].x, landmarks[i].y);\r\n ret[i] = dist + (float)random.nextGaussian() * senseNoise;\r\n } \r\n return ret;\r\n }", "public double calculateNetWage(){\r\n\t return (getGrossWage()-fines);\r\n }", "public static int numDimensions_infos_noise() {\n return 1;\n }", "public void reset(float x,float y,float noiseZ, float dx, float dy) {\n stepSize = random(MIN_STEP, MAX_STEP);\n\n location.x = prevLocation.x = x;\n location.y = prevLocation.y = y;\n acceleration.x = dx;//-2;\n acceleration.y = dy;\n life = 0;\n \n zNoise = noiseZ;\n }", "private static void reduceNoise(Mat image) {\n\n\t\t// create structuring element that will be used to \"dilate\" and \"erode\"\n\t\t// image. the element chosen here is a 3px by 3px rectangle\n\t\tMat erodeElement = Imgproc.getStructuringElement(Imgproc.MORPH_RECT,\n\t\t\t\tnew Size(1, 1));\n\n\t\t// dilate with larger element so make sure object is nicely visible\n\t\tMat dilateElement = Imgproc.getStructuringElement(Imgproc.MORPH_RECT,\n\t\t\t\tnew Size(12, 12));\n\n\t\t// Erode will shrink the grouping of pixels\n\t\tImgproc.erode(image, image, erodeElement);\n\t\tImgproc.erode(image, image, erodeElement);\n\t\tImgproc.erode(image, image, erodeElement);\n\n\t\t// // Dilate will expand the grouping of pixels\n\t\tImgproc.dilate(image, image, dilateElement);\n\t\tImgproc.dilate(image, image, dilateElement);\n\t\t// Imgproc.dilate(image, image, dilateElement);\n\n\t}", "public static double generateDensity() {\n double lower = config.getDensityLowerBound();\n double upper = config.getDensityUpperBound();\n\n Random random = new Random();\n return lower + (upper - lower) * random.nextDouble();\n }", "public ModelParams optimize() throws Exception {\n\t\tint iterCount = 0;\n\t\tdivergence = KLDivergenceCalculator.calculate(cState, tState);\n\t\tSystem.out.println(\"KL Divergence : \" + divergence);\n\t\t// ((DivergenceChart) BeanFinder\n\t\t// .findBean(MetaConstants.BEAN_DIVERGENCE_CHART)).update(\n\t\t// iterCount, divergence);\n\t\tdouble delta[] = null;\n\t\tdouble theta[] = data.getParams().getParams();\n\t\tdouble newDivergence = 0.0d;\n\t\tdouble initialStep = data.getInitialStepSize();\n\t\tboolean optimized = false;\n\t\tdo {\n\t\t\tdelta = computeGradient(theta);\n\t\t\tfor (double step = initialStep; iterCount < data.getMaxIterations(); step /= 10) {\n\t\t\t\tSystem.out.println(\"Step size : \" + step);\n\t\t\t\tSystem.out.println(\"KL divergence before taking a step : \"\n\t\t\t\t\t\t+ KLDivergenceCalculator.calculate(cState, tState));\n\t\t\t\tfor (int i = 0; i < delta.length; i++) {\n\t\t\t\t\tif (Double.isNaN(delta[i]))\n\t\t\t\t\t\tSystem.out.print(\"delta is NAN!!\" + delta[i] + \", \");\n\t\t\t\t\ttheta[i] -= step * delta[i];\n\t\t\t\t\tSystem.out.print((theta[i]) + \", \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\tgetNewState(theta);\n\t\t\t\titerCount++;\n\t\t\t\tnewDivergence = KLDivergenceCalculator\n\t\t\t\t\t\t.calculate(cState, tState);\n\t\t\t\tSystem.out.println(\"KL Divergence : \" + newDivergence);\n\t\t\t\t// ((DivergenceChart) BeanFinder\n\t\t\t\t// .findBean(MetaConstants.BEAN_DIVERGENCE_CHART)).update(\n\t\t\t\t// iterCount, newDivergence);\n\t\t\t\tif (newDivergence < divergence) {\n\t\t\t\t\tdivergence = newDivergence;\n\t\t\t\t\tinitialStep = step;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// before taking the next step size, reset theta to what it was\n\t\t\t\tfor (int i = 0; i < delta.length; i++)\n\t\t\t\t\ttheta[i] += step * delta[i];\n\t\t\t\tgetNewState(theta); // Added for checking. Not required.\n\t\t\t}\n\t\t\toptimized = optimized(theta);\n\t\t} while (!optimized && iterCount < data.getMaxIterations());\n\t\tModelParams optimParams = null;\n\t\tif (optimized) {\n\t\t\toptimParams = new ModelParams();\n\t\t\toptimParams.setParams(theta);\n\t\t}\n\t\treturn optimParams;\n\t}", "@java.lang.Override\n public com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigmaOrBuilder\n getFeatureNoiseSigmaOrBuilder() {\n if (gradientNoiseSigmaCase_ == 2) {\n return (com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma) gradientNoiseSigma_;\n }\n return com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma.getDefaultInstance();\n }", "private void SGDForPositiveInstance(Instance instance) {\n\t\tint lengthOfDocument = 0; // |d|.\r\n\t\tfor (int frequency : instance.mpFeatureToFrequency.values()) {\r\n\t\t\tlengthOfDocument += frequency;\r\n\t\t}\r\n\t\t// double gValue = getGFunctionValue(lengthOfDocument);\r\n\t\t// double gGradientWithPositiveClass =\r\n\t\t// getGFunctionGradientWithPositiveClass(lengthOfDocument);\r\n\t\t// double gGradientWithNegativeClass =\r\n\t\t// getGFunctionGradientWithNegativeClass(lengthOfDocument);\r\n\r\n\t\tdouble positiveClassSum = (param.smoothingPriorForFeatureInNaiveBayes\r\n\t\t\t\t* V + sum_x[0]);\r\n\t\tdouble negativeClassSum = (param.smoothingPriorForFeatureInNaiveBayes\r\n\t\t\t\t* V + sum_x[1]);\r\n\t\tdouble ratioOfClasses = positiveClassSum / negativeClassSum;\r\n\r\n\t\t// Compute R.\r\n\t\tBigDecimal R = BigDecimal.ONE;\r\n\t\t// Pr(-) / Pr(+).\r\n\t\tR = R.multiply(BigDecimal\r\n\t\t\t\t.valueOf(getProbOfClass(1) / getProbOfClass(0)));\r\n\t\t// ratioOfClasses ^ |d|.\r\n\t\tR = R.multiply(BigDecimal.valueOf(ratioOfClasses).pow(lengthOfDocument));\r\n\t\tfor (Map.Entry<Integer, Integer> entry : instance.mpFeatureToFrequency\r\n\t\t\t\t.entrySet()) {\r\n\t\t\tint featureId = entry.getKey();\r\n\t\t\tint frequency = entry.getValue();\r\n\t\t\tdouble ratio = (param.smoothingPriorForFeatureInNaiveBayes + x[featureId][1])\r\n\t\t\t\t\t/ (param.smoothingPriorForFeatureInNaiveBayes + x[featureId][0]);\r\n\t\t\tR = R.multiply(BigDecimal.valueOf(ratio).pow(frequency));\r\n\t\t}\r\n\r\n\t\t// Compute the gradient of each feature for the positive class.\r\n\t\tMap<Integer, Double> gradientOfFeatureWithPositiveClass = new HashMap<Integer, Double>();\r\n\t\tfor (Map.Entry<Integer, Integer> entry : instance.mpFeatureToFrequency\r\n\t\t\t\t.entrySet()) {\r\n\t\t\tint featureId = entry.getKey();\r\n\t\t\tint frequency = entry.getValue();\r\n\r\n\t\t\tBigDecimal numerator1 = BigDecimal\r\n\t\t\t\t\t.valueOf(frequency\r\n\t\t\t\t\t\t\t/ (param.smoothingPriorForFeatureInNaiveBayes + x[featureId][0]));\r\n\t\t\tBigDecimal numerator2 = R.multiply(BigDecimal\r\n\t\t\t\t\t.valueOf(lengthOfDocument / positiveClassSum));\r\n\t\t\tBigDecimal numerator = numerator1.add(numerator2);\r\n\t\t\tBigDecimal denominator = R.add(BigDecimal.ONE);\r\n\t\t\tdouble gradient = numerator.divide(denominator, 30,\r\n\t\t\t\t\tRoundingMode.HALF_UP).doubleValue()\r\n\t\t\t\t\t- frequency\r\n\t\t\t\t\t/ (param.smoothingPriorForFeatureInNaiveBayes + x[featureId][0]);\r\n\t\t\tif (Double.isNaN(gradient)) {\r\n\t\t\t\tSystem.out.println(\"Nan\");\r\n\t\t\t}\r\n\t\t\tgradientOfFeatureWithPositiveClass.put(featureId, gradient);\r\n\t\t}\r\n\r\n\t\t// Compute the gradient of each feature for the negative class.\r\n\t\tMap<Integer, Double> gradientOfFeatureWithNegativeClass = new HashMap<Integer, Double>();\r\n\t\tfor (Map.Entry<Integer, Integer> entry : instance.mpFeatureToFrequency\r\n\t\t\t\t.entrySet()) {\r\n\t\t\tint featureId = entry.getKey();\r\n\t\t\tint frequency = entry.getValue();\r\n\r\n\t\t\tBigDecimal numerator = BigDecimal\r\n\t\t\t\t\t.valueOf(frequency\r\n\t\t\t\t\t\t\t/ (param.smoothingPriorForFeatureInNaiveBayes + x[featureId][1])\r\n\t\t\t\t\t\t\t- lengthOfDocument / negativeClassSum);\r\n\t\t\tBigDecimal denominator = BigDecimal.ONE.divide(R, 30,\r\n\t\t\t\t\tRoundingMode.HALF_UP).add(BigDecimal.ONE);\r\n\t\t\tdouble gradient = numerator.divide(denominator, 30,\r\n\t\t\t\t\tRoundingMode.HALF_UP).doubleValue();\r\n\t\t\tif (Double.isNaN(gradient)) {\r\n\t\t\t\tSystem.out.println(\"Nan\");\r\n\t\t\t}\r\n\t\t\tgradientOfFeatureWithNegativeClass.put(featureId, gradient);\r\n\t\t}\r\n\r\n\t\t// Note that we need to compute all of the gradients first and then\r\n\t\t// update\r\n\t\t// the counts.\r\n\t\t// Update the count of each feature in this document for positive class.\r\n\t\tupdateXs(instance, gradientOfFeatureWithPositiveClass,\r\n\t\t\t\tgradientOfFeatureWithNegativeClass);\r\n\t}", "@java.lang.Override\n public com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigmaOrBuilder\n getFeatureNoiseSigmaOrBuilder() {\n if ((gradientNoiseSigmaCase_ == 2) && (featureNoiseSigmaBuilder_ != null)) {\n return featureNoiseSigmaBuilder_.getMessageOrBuilder();\n } else {\n if (gradientNoiseSigmaCase_ == 2) {\n return (com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma) gradientNoiseSigma_;\n }\n return com.google.cloud.aiplatform.v1beta1.FeatureNoiseSigma.getDefaultInstance();\n }\n }", "@Test\n public void computeResult_addsNoiseToSum() {\n mockDoubleNoise(-10);\n // Mock the noise mechanism so that it adds noise to the count == 0.\n mockLongNoise(0);\n\n variance =\n BoundedVariance.builder()\n .epsilon(EPSILON)\n .delta(DELTA)\n .noise(noise)\n .maxPartitionsContributed(1)\n .maxContributionsPerPartition(1)\n .lower(-100)\n .upper(100)\n .build();\n\n variance.addEntry(10);\n variance.addEntry(10);\n // midpoint = (lower + upper) / 2 = 0,\n // noised_normalized_sum_of_squares = (x1 - midpoint)^2 + (x2 - midpoint)^2 + noise = 10^2 +\n // 10^2 - 10 = 190,\n // noised_normalized_sum = (x1 + x2) - midpoint * count + noise = 10 + 10 - 0 - 10 = 10,\n // noised_count = count + noise = 2 + 0 = 2,\n // BoundedVariance.computeResult() = noised_normalized_sum_of_squares / noised_count -\n // (noised_normalized_sum / noised_count)^2 = 190 / 2 - (10 / 2)^2 = 70\n assertThat(variance.computeResult()).isEqualTo(70.0);\n }", "public com.google.protobuf.ByteString\n getNoiseBytes() {\n java.lang.Object ref = noise_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n noise_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void ResetColorGradient_ds1() {\r\n\t\tdouble min;\r\n\t\tdouble max;\r\n\t\tdouble median;\r\n\r\n\t\tswitch(transformation) {\r\n\t\t\tcase ROWNORM:\r\n\t\t\t\tmin = minExpression_rownorm_ds1;\r\n\t\t\t\tmax = maxExpression_rownorm_ds1;\r\n\r\n\t\t\t\t//if both row normalization values are zero, can't perform row normalization\r\n\t\t\t\t//issue warning\r\n\t\t\t\t//This happens when there is only one data column in the dataset (or if it is rank file)\r\n\t\t\t\tif((min == 0) && (max == 0)) {\r\n\t\t\t\t\t//JOptionPane.showMessageDialog(Cytoscape.getDesktop(),\"Row normalization does not work with only one data column per dataset.\",\"Row normalization error\",JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t\tmax = Math.max(Math.abs(min), max);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase LOGTRANSFORM:\r\n\r\n\t\t\t\t//can't take a log of a negative number\r\n\t\t\t\t//if both the max and min are negative then log tranform won't work.\r\n\t\t\t\t//issue a warning.\r\n\t\t\t\tif((minExpression_ds1 <= 0) && (maxExpression_ds1 <= 0)) {\r\n\t\t\t\t\t//both the max and min are probably negative values\r\n\t\t\t\t\t//JOptionPane.showMessageDialog(Cytoscape.getDesktop(),\"Both the max and min expression are negative, log of negative numbers is not valid\", \"log normalization error\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\tmin = 0;\r\n\t\t\t\t\tmax = 0;\r\n\t\t\t\t}\r\n\t\t\t\t//if min expression is negative then use the max expression as the max\r\n\t\t\t\telse if(minExpression_ds1 <= 0) {\r\n\t\t\t\t\tmin = Math.min(Math.log(closestToZeroExpression_ds1), Math.log1p(maxExpression_ds1));\r\n\t\t\t\t\tmax = Math.max(Math.log(closestToZeroExpression_ds1), Math.log1p(maxExpression_ds1));\r\n\t\t\t\t}\r\n\t\t\t\t//if the max expression is negative then use the min expression as the max (should never happen!)\r\n\t\t\t\telse if(maxExpression_ds1 <= 0) {\r\n\t\t\t\t\tmin = 0;\r\n\t\t\t\t\tmax = Math.log1p(minExpression_ds1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmin = Math.log1p(minExpression_ds1);\r\n\t\t\t\t\tmax = Math.log1p(maxExpression_ds1);\r\n\t\t\t\t\tmax = Math.max(Math.abs(min), max);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase ASIS:\r\n\t\t\tdefault:\r\n\t\t\t\tmin = minExpression_ds1;\r\n\t\t\t\tmax = Math.max(Math.abs(minExpression_ds1), maxExpression_ds1);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tmedian = max / 2;\r\n\t\tif(min >= 0) {\r\n\t\t\tmedian = max / 2;\r\n\t\t\trange_ds1 = ColorGradientRange.getInstance(0, median, median, max, 0, median, median, max);\r\n\t\t\ttheme_ds1 = ColorGradientTheme.GREEN_ONECOLOR_GRADIENT_THEME;\r\n\t\t} else {\r\n\t\t\tmedian = 0;\r\n\t\t\trange_ds1 = ColorGradientRange.getInstance(-max, 0, 0, max, -max, 0, 0, max);\r\n\t\t\ttheme_ds1 = ColorGradientTheme.GREEN_MAGENTA_GRADIENT_THEME;\r\n\t\t}\r\n\r\n\t}", "public com.google.protobuf.ByteString\n getNoiseBytes() {\n java.lang.Object ref = noise_;\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 noise_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public abstract void newSpeechNoise(long ms, int n);", "public Builder clearFeatureNoiseSigma() {\n if (featureNoiseSigmaBuilder_ == null) {\n if (gradientNoiseSigmaCase_ == 2) {\n gradientNoiseSigmaCase_ = 0;\n gradientNoiseSigma_ = null;\n onChanged();\n }\n } else {\n if (gradientNoiseSigmaCase_ == 2) {\n gradientNoiseSigmaCase_ = 0;\n gradientNoiseSigma_ = null;\n }\n featureNoiseSigmaBuilder_.clear();\n }\n return this;\n }", "@Test\n public void testAccumulateGradients() {\n // TODO: MXNet support for accumulating gradients does not currently work\n TestUtils.requiresNotEngine(\"MXNet\");\n try (NDManager manager = NDManager.newBaseManager(TestUtils.getEngine())) {\n NDArray a = manager.create(0.0f);\n a.setRequiresGradient(true);\n\n Engine engine = Engine.getEngine(TestUtils.getEngine());\n try (GradientCollector gc = engine.newGradientCollector()) {\n for (int i = 1; i <= 3; i++) {\n NDArray b = a.mul(2);\n gc.backward(b);\n Assert.assertEquals(a.getGradient().getFloat(), 2.0f * i);\n }\n }\n }\n }", "public void makeNoise() {\n\t\tfor (Animal a : animals) {\n\t\t\ta.makeNoise();\n\t\t}\n\t}", "public float gaussianRandom() {\n\t\treturn (CCMath.constrain((float)nextGaussian() / 4,-1 ,1 ) + 1) / 2;\n\t}", "private static void filterNoise(BufferedImage image) {\n\t\tfor (int x=0; x<image.getWidth(); x++) {\r\n\t\t\tfor (int y=0; y<image.getHeight(); y++) {\r\n\t\t\t\t\r\n\t\t\t\tint pixelVal = image.getRGB(x, y);\r\n\r\n\t\t\t\t// check how many pixels in a 2 x 2 rectangle with this point \r\n\t\t\t\t// in the center have the same color as this point; if not \r\n\t\t\t\t// many, flip this pixel's color\r\n\t\t\t\tint startX = Math.max(x-2, 0);\r\n\t\t\t\tint startY = Math.max(y-2, 0);\r\n\t\t\t\tint endX = Math.min(x+2, image.getWidth()-1);\r\n\t\t\t\tint endY = Math.min(y+2, image.getHeight()-1);\r\n\r\n\t\t\t\tint matchCount = 0;\r\n\t\t\t\tint totalCount = 0;\r\n\t\t\t\tfor (int i=startX; i<=endX; i++) {\r\n\t\t\t\t\tfor (int j=startY; j<=endY; j++) {\r\n\t\t\t\t\t\tif (image.getRGB(i,j) == pixelVal) {\r\n\t\t\t\t\t\t\tmatchCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttotalCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ((matchCount / (double) totalCount) < .2) {\r\n\t\t\t\t\tif (pixelVal == Color.YELLOW.getRGB()) {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.BLACK.getRGB());\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\timage.setRGB(x, y, Color.YELLOW.getRGB());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (debug) {\r\n\t\t\ttry {\r\n\t\t\t\tImageIO.write(image, \"gif\", new File(\"noiseFiltered.gif\"));\r\n\t\t\t} catch (Exception e) {e.printStackTrace();}\r\n\t\t}\r\n\t}", "public double calculateLoss(int dataIndex){\r\n double ans = 0;\r\n for (int i = 0; i < outputLayer.length; i++) {\r\n ans += Math.pow((attribute[dataIndex] == i ? 1 : 0) - sigmoid(outputLayer[i].z), 2);\r\n }\r\n return ans / outputLayer.length;\r\n }", "public void useGaussianDeviates(){\n this.gaussianDeviates = true;\n }", "public void generateGradient(int startX, int startY, int endX, int endY, int startSat, int endSat, int hueSat, int brightnessSat) {\n colorMode(HSB,360,100,100);\n int dX = Math.abs(endX-startX);\n int dY = Math.abs(endY-startY);\n double changePerPixel = (endSat-startSat)/(double)dY;\n strokeWeight(2);\n int changePerFrameY = endY > startY ? 1 : -1;\n for(int i=0;i<Math.abs(dY);i++){\n stroke((int)(startSat+changePerPixel*i),hueSat,brightnessSat);\n line(startX, i*changePerFrameY+startY, endX, i*changePerFrameY+startY);\n }\n}", "public static double noise(double x, double y, double z, double w){\n\t\t\n\t\tdouble n0,n1,n2,n3,n4; // Noise contributions from the five corners\n\t\t// Skew the (x,y,z,w) space to determine which cell of 24 simplices we're in\n\t\tdouble s=(x+y+z+w)*F4; // Factor for 4D skewing\n\t\tint i=fastfloor(x+s);\n\t\tint j=fastfloor(y+s);\n\t\tint k=fastfloor(z+s);\n\t\tint l=fastfloor(w+s);\n\t\tdouble t=(i+j+k+l)*G4; // Factor for 4D unskewing\n\t\tdouble X0=i-t; // Unskew the cell origin back to (x,y,z,w) space\n\t\tdouble Y0=j-t;\n\t\tdouble Z0=k-t;\n\t\tdouble W0=l-t;\n\t\tdouble x0=x-X0; // The x,y,z,w distances from the cell origin\n\t\tdouble y0=y-Y0;\n\t\tdouble z0=z-Z0;\n\t\tdouble w0=w-W0;\n\t\t// For the 4D case, the simplex is a 4D shape I won't even try to describe.\n\t\t// To find out which of the 24 possible simplices we're in, we need to\n\t\t// determine the magnitude ordering of x0, y0, z0 and w0.\n\t\t// Six pair-wise comparisons are performed between each possible pair\n\t\t// of the four coordinates, and the results are used to rank the numbers.\n\t\tint rankx=0;\n\t\tint ranky=0;\n\t\tint rankz=0;\n\t\tint rankw=0;\n\t\tif(x0>y0) rankx++;\n\t\telse ranky++;\n\t\tif(x0>z0) rankx++;\n\t\telse rankz++;\n\t\tif(x0>w0) rankx++;\n\t\telse rankw++;\n\t\tif(y0>z0) ranky++;\n\t\telse rankz++;\n\t\tif(y0>w0) ranky++;\n\t\telse rankw++;\n\t\tif(z0>w0) rankz++;\n\t\telse rankw++;\n\t\tint i1,j1,k1,l1; // The integer offsets for the second simplex corner\n\t\tint i2,j2,k2,l2; // The integer offsets for the third simplex corner\n\t\tint i3,j3,k3,l3; // The integer offsets for the fourth simplex corner\n\t\t// [rankx, ranky, rankz, rankw] is a 4-vector with the numbers 0, 1, 2 and 3\n\t\t// in some order. We use a thresholding to set the coordinates in turn.\n\t\t// Rank 3 denotes the largest coordinate.\n\t\ti1=rankx>=3?1:0;\n\t\tj1=ranky>=3?1:0;\n\t\tk1=rankz>=3?1:0;\n\t\tl1=rankw>=3?1:0;\n\t\t// Rank 2 denotes the second largest coordinate.\n\t\ti2=rankx>=2?1:0;\n\t\tj2=ranky>=2?1:0;\n\t\tk2=rankz>=2?1:0;\n\t\tl2=rankw>=2?1:0;\n\t\t// Rank 1 denotes the second smallest coordinate.\n\t\ti3=rankx>=1?1:0;\n\t\tj3=ranky>=1?1:0;\n\t\tk3=rankz>=1?1:0;\n\t\tl3=rankw>=1?1:0;\n\t\t// The fifth corner has all coordinate offsets = 1, so no need to compute that.\n\t\tdouble x1=x0-i1+G4; // Offsets for second corner in (x,y,z,w) coords\n\t\tdouble y1=y0-j1+G4;\n\t\tdouble z1=z0-k1+G4;\n\t\tdouble w1=w0-l1+G4;\n\t\tdouble x2=x0-i2+2.0*G4; // Offsets for third corner in (x,y,z,w) coords\n\t\tdouble y2=y0-j2+2.0*G4;\n\t\tdouble z2=z0-k2+2.0*G4;\n\t\tdouble w2=w0-l2+2.0*G4;\n\t\tdouble x3=x0-i3+3.0*G4; // Offsets for fourth corner in (x,y,z,w) coords\n\t\tdouble y3=y0-j3+3.0*G4;\n\t\tdouble z3=z0-k3+3.0*G4;\n\t\tdouble w3=w0-l3+3.0*G4;\n\t\tdouble x4=x0-1.0+4.0*G4; // Offsets for last corner in (x,y,z,w) coords\n\t\tdouble y4=y0-1.0+4.0*G4;\n\t\tdouble z4=z0-1.0+4.0*G4;\n\t\tdouble w4=w0-1.0+4.0*G4;\n\t\t// Work out the hashed gradient indices of the five simplex corners\n\t\tint ii=i&255;\n\t\tint jj=j&255;\n\t\tint kk=k&255;\n\t\tint ll=l&255;\n\t\tint gi0=perm[ii+perm[jj+perm[kk+perm[ll]]]]%32;\n\t\tint gi1=perm[ii+i1+perm[jj+j1+perm[kk+k1+perm[ll+l1]]]]%32;\n\t\tint gi2=perm[ii+i2+perm[jj+j2+perm[kk+k2+perm[ll+l2]]]]%32;\n\t\tint gi3=perm[ii+i3+perm[jj+j3+perm[kk+k3+perm[ll+l3]]]]%32;\n\t\tint gi4=perm[ii+1+perm[jj+1+perm[kk+1+perm[ll+1]]]]%32;\n\t\t// Calculate the contribution from the five corners\n\t\tdouble t0=0.6-x0*x0-y0*y0-z0*z0-w0*w0;\n\t\tif(t0<0) n0=0.0;\n\t\telse{\n\t\t\tt0*=t0;\n\t\t\tn0=t0*t0*dot(grad4[gi0], x0, y0, z0, w0);\n\t\t}\n\t\tdouble t1=0.6-x1*x1-y1*y1-z1*z1-w1*w1;\n\t\tif(t1<0) n1=0.0;\n\t\telse{\n\t\t\tt1*=t1;\n\t\t\tn1=t1*t1*dot(grad4[gi1], x1, y1, z1, w1);\n\t\t}\n\t\tdouble t2=0.6-x2*x2-y2*y2-z2*z2-w2*w2;\n\t\tif(t2<0) n2=0.0;\n\t\telse{\n\t\t\tt2*=t2;\n\t\t\tn2=t2*t2*dot(grad4[gi2], x2, y2, z2, w2);\n\t\t}\n\t\tdouble t3=0.6-x3*x3-y3*y3-z3*z3-w3*w3;\n\t\tif(t3<0) n3=0.0;\n\t\telse{\n\t\t\tt3*=t3;\n\t\t\tn3=t3*t3*dot(grad4[gi3], x3, y3, z3, w3);\n\t\t}\n\t\tdouble t4=0.6-x4*x4-y4*y4-z4*z4-w4*w4;\n\t\tif(t4<0) n4=0.0;\n\t\telse{\n\t\t\tt4*=t4;\n\t\t\tn4=t4*t4*dot(grad4[gi4], x4, y4, z4, w4);\n\t\t}\n\t\t// Sum up and scale the result to cover the range [-1,1]\n\t\treturn 27.0*(n0+n1+n2+n3+n4);\n\t}", "public double activationDerivative(double z);", "public static double nextGaussian() {\n return randGen.nextGaussian();\n }", "public NoiseCalculator() {\n this(1.0);\n }", "double cekStop(double x[][], double v0[],double v[][],double w0[],double w[][], double t[]){\n double akumY=0;\n //~ itung z_in dan z\n for(int h=0; h<jumlah_data; h++){\n for(int j=0; j<unit_hidden; j++){\n //itung sigma xi vij\n double jum_xv=0;\n for(int i=0; i<unit_input; i++){\n double cc=x[h][i]*v[i][j];\n jum_xv=jum_xv+cc;\n //System.out.println(x[h][j]);\n }\n z_in[j]=v0[j]+jum_xv;\n //itung z\n z[j]=1/(1+(double)Math.exp(-z_in[j]));\n //System.out.println(\" dan z= \"+z[j]);\n }\n \n //~ itung y_in dan y (output)\n double cxc=0;\n for(int k=0; k<unit_output; k++){\n double jum_zw=0;\n for(int j=0; j<unit_hidden; j++){\n double cc=z[j]*w[j][k];\n jum_zw=jum_zw+cc;\n }\n y_in[k]=w0[k]+jum_zw;\n y[k]=1/(1+(double)Math.exp(-y_in[k]));\n akumY = akumY + Math.pow((t[h]-y[k]),2);\n //System.out.println(t[h]+\"-\"+y[k]+\"=\"+(t[k]-y[k]));\n }\n }\n double E = 0.5 * akumY;\n //System.out.println(E);\n return E;\n }", "public VoxelGradient getGradient(double[] coord) {\r\n\r\n //if improper coordinates given, return\r\n if (coord[0] < 0 || coord[0] > (dimX - 2) || coord[1] < 0 || coord[1] > (dimY - 2) || coord[2] < 0 || coord[2] > (dimZ - 2)) {\r\n return zero;\r\n }\r\n\r\n /* notice that in this framework we assume that the distance between neighbouring voxels is 1 in all directions*/\r\n float x = (float) coord[0];\r\n float y = (float) coord[1];\r\n float z = (float) coord[2];\r\n\r\n int x0 = (int) Math.floor(coord[0]);\r\n int y0 = (int) Math.floor(coord[1]);\r\n int z0 = (int) Math.floor(coord[2]);\r\n int x1 = (int) Math.ceil(coord[0]);\r\n int y1 = (int) Math.ceil(coord[1]);\r\n int z1 = (int) Math.ceil(coord[2]);\r\n\r\n float xfactor = (x - x0) / (x1 - x0);\r\n float yfactor = (y - y0) / (y1 - y0);\r\n float zfactor = (z - z0) / (z1 - z0);\r\n\r\n //defining 8 voxel gradiant data-points of a voxel\r\n VoxelGradient c000 = new VoxelGradient(x0, y0, z0);\r\n VoxelGradient c001 = new VoxelGradient(x0, y0, z1);\r\n VoxelGradient c010 = new VoxelGradient(x0, y1, z0);\r\n VoxelGradient c011 = new VoxelGradient(x0, y1, z1);\r\n VoxelGradient c100 = new VoxelGradient(x1, y0, z0);\r\n VoxelGradient c101 = new VoxelGradient(x1, y0, z1);\r\n VoxelGradient c110 = new VoxelGradient(x1, y1, z0);\r\n VoxelGradient c111 = new VoxelGradient(x1, y1, z1);\r\n\r\n //7 linear interpolations\r\n //4 in x direction\r\n VoxelGradient c00 = new VoxelGradient();\r\n VoxelGradient c01 = new VoxelGradient();\r\n VoxelGradient c10 = new VoxelGradient();\r\n VoxelGradient c11 = new VoxelGradient();\r\n interpolate(c000, c100, xfactor, c00);\r\n interpolate(c001, c101, xfactor, c01);\r\n interpolate(c010, c110, xfactor, c10);\r\n interpolate(c011, c111, xfactor, c11);\r\n //2 in y direction\r\n VoxelGradient c0 = new VoxelGradient();\r\n VoxelGradient c1 = new VoxelGradient();\r\n interpolate(c00, c10, yfactor, c0);\r\n interpolate(c01, c11, yfactor, c1);\r\n //1 in z direction\r\n VoxelGradient c = new VoxelGradient();\r\n interpolate(c0, c1, zfactor, c);\r\n\r\n return c;\r\n }", "public static Double[] learnSimplePerceptronRound2(Data data1[],int index,double LearningRate,Double w[],HashMap<Integer, Integer> words)\r\n \t{\r\n \t\t//Double w[] = new Double[20]; \r\n \t/*\tDouble min =-0.01; // Set To Your Desired Min Value\r\n\t Double max = 0.01;\r\n \t\tdouble smallRandNumber = min + new Random().nextDouble() * (max - min); \r\n \t\tArrays.fill(w, smallRandNumber);*/\r\n \t\t\r\n \t\tData data[] = Arrays.copyOf(data1,index);\r\n \t\t\r\n \t\t//shuffle the data..\r\n \t \tArrayList<Data> arrayList = new ArrayList<Data>(Arrays.asList(Arrays.copyOf(data,index))); \r\n \t\tCollections.shuffle(arrayList,new Random(10));\r\n \t\tdata = arrayList.toArray(new Data[arrayList.size()]);\r\n \t\tfor(int i=0;i<index;i++)\r\n \t\t{\r\n \t\t\tdouble trueLabel;\r\n \t\t\tdouble predictedLabel;\r\n \t\t\tdouble dotProduct_wT_x = 0.0f;\r\n \t\t\tHashMap<Integer, Double> x = new HashMap<Integer, Double>();\r\n \t\t \r\n \t\t\ttrueLabel = data[i].getY();\r\n \t\t\tx= data[i].getX();\r\n \t\t\tboolean correct=false;\r\n \t\t\t// loop till its corrects..\r\n \t\t\t\r\n \t\t\twhile(correct==false)\r\n \t\t\t{\r\n \t\t\t//wT*x (contains bias)\r\n \t\t\tfor (Map.Entry<Integer, Double> entry : x.entrySet()) {\r\n \t\t\t\tdotProduct_wT_x = dotProduct_wT_x + w[entry.getKey()] * entry.getValue();\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\t//predict the label\r\n \t\t\tif(dotProduct_wT_x < 0)\r\n \t\t\t\tpredictedLabel = -1;\r\n \t\t\telse\t\r\n \t\t\t\tpredictedLabel = +1;\r\n \t\t\t\r\n \t\t\t//check if prediction is correct, if not update the weight vector and bias.\r\n \t\t\tif(predictedLabel != trueLabel)\r\n \t\t//\tif(dotProduct_wT_x<0)\r\n \t\t\t{\r\n \t\t\t\t//update bias\r\n \t\t\t\tw[0]=w[0]+trueLabel*LearningRate;\r\n \t\t\t\t\r\n \t\t\t\t//update all other weights only if those words are worthy tracking\r\n \t\t\t\r\n \t\t\t\tfor(int j=1;j<w.length;j++)\r\n \t\t\t\t{\r\n \t\t\t\t\t// if(x.containsKey(j))\r\n \t\t\t\t if(x.containsKey(j))\r\n \t\t\t\t//\t if(words.containsKey(j)) //give more weightage to words that matter\r\n \t\t\t//\t\t\t\tw[j]=w[j]+LearningRate*trueLabel*(x.get(j));\r\n \t\t\t\t//\t else\r\n\t\t\t\t\t\t\tw[j]=w[j]+LearningRate*trueLabel*x.get(j);\r\n\r\n \t\t\t\t//\telse\r\n \t\t\t//\t\t\tw[j]=(double)0;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t\tcorrect=true;\r\n \t\t }\r\n \t\t}\r\n \t\treturn w;\r\n \t}", "private double[] getOutputSumDerivsForHiddenOutput() {\n\t\t//dOutputSum/dHiddenOutput\n\t\tdouble[] outputSumDerivs = new double[synapses[1][0].length];\n\t\t\n\t\tfor (int i = 0 ; i < outputSumDerivs.length; i++) {\n\t\t\toutputSumDerivs[i] = synapses[1][0][i].getWeight();\n\t\t}\n\t\t\n\t\treturn outputSumDerivs;\n\t}" ]
[ "0.671821", "0.65200573", "0.64090955", "0.61593", "0.6096201", "0.60269284", "0.60100293", "0.59466016", "0.59021515", "0.5894323", "0.5749806", "0.5739503", "0.5729601", "0.5663542", "0.56419396", "0.5634335", "0.56268215", "0.5601494", "0.5572386", "0.55552197", "0.55475914", "0.55230194", "0.5459683", "0.5456117", "0.54199296", "0.54144275", "0.5380089", "0.536712", "0.53615785", "0.5334958", "0.5312939", "0.53095436", "0.53081954", "0.530005", "0.5281576", "0.5278008", "0.5277619", "0.52757967", "0.52618724", "0.52617735", "0.5238503", "0.520193", "0.5180979", "0.51787627", "0.5168467", "0.51479936", "0.5129456", "0.5118239", "0.5112416", "0.5103919", "0.5097222", "0.50732684", "0.5057384", "0.50508255", "0.5049068", "0.5044875", "0.50367403", "0.5024922", "0.50213444", "0.50204045", "0.5015637", "0.50011224", "0.49984202", "0.49938196", "0.49733946", "0.4950922", "0.49333012", "0.4896361", "0.4894964", "0.48947787", "0.4890364", "0.48868576", "0.48834744", "0.48726907", "0.48720947", "0.48663202", "0.4856701", "0.48481175", "0.48251897", "0.48215765", "0.4811478", "0.47905973", "0.47735456", "0.4772557", "0.4767707", "0.47669116", "0.4765278", "0.47616655", "0.4759324", "0.47568607", "0.4752728", "0.47518736", "0.47478735", "0.47453368", "0.47438806", "0.47419393", "0.47400624", "0.4732588", "0.4727891", "0.47137564" ]
0.5358528
29
One of the internal routines.
private float vec_stdDevBounded(float[] v, int n, float lower, float upper){ float t=(float)0.0, t2=(float)0.0; long m=0; for(int i=0;i<n;i++) { if (v[i] >= lower && v[i] <= upper) { m++; t+=v[i]; t2+=v[i]*v[i]; } } if (m <= 1) return 0; return (float)Math.sqrt((double)(t2/m - (t/m)*(t/m))); }
{ "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}", "public final void mo51373a() {\n }", "public void method_4270() {}", "protected void additionalProcessing() {\n\t}", "private void m50366E() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public void smell() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "public abstract void mo70713b();", "public final void mo91715d() {\n }", "public void mo12628c() {\n }", "private stendhal() {\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}", "public void mo21793R() {\n }", "public void mo21779D() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public void mo115190b() {\n }", "public void mo21825b() {\n }", "@Override\n\tprotected void interr() {\n\t}", "public abstract void mo6549b();", "public abstract void mo56925d();", "public void mo3376r() {\n }", "private final void i() {\n }", "private void getStatus() {\n\t\t\n\t}", "public abstract void mo27385c();", "public void mo21791P() {\n }", "public void mo38117a() {\n }", "private void method_2242() {\r\n this.field_1824.method_6863(0);\r\n this.field_1824.method_6861(false);\r\n this.field_1824.method_6859(0);\r\n this.field_1824.method_6857(false);\r\n }", "public void mo21787L() {\n }", "public void mo4359a() {\n }", "protected void mo6255a() {\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo27386d();", "public void mo21794S() {\n }", "void mo57277b();", "public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }", "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 }", "protected boolean func_70041_e_() { return false; }", "protected boolean func_70814_o() { return true; }", "public void method_6349() {\r\n super.method_6349();\r\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private static void iterator() {\n\t\t\r\n\t}", "public void m23075a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo21782G() {\n }", "public final void mo1285b() {\n }", "public void mo21781F() {\n }", "void mo72113b();", "protected void method_2251() {\r\n this.method_2181();\r\n this.field_1823.method_128(this.field_1824, this.field_1850.method_2383().method_8922());\r\n this.field_1826.method_7081();\r\n }", "public abstract void mo35054b();", "public void baocun() {\n\t\t\n\t}", "public final void mo8775b() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void mo21795T() {\n }", "public void mo21878t() {\n }", "public void mo21877s() {\n }", "public void func_70295_k_() {}", "@Override\n protected void prot() {\n }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void mo21785J() {\n }", "private void m50367F() {\n }", "public void redibujarAlgoformers() {\n\t\t\n\t}", "private void sub() {\n\n\t}", "public void mo21786K() {\n }", "public final void mo11687c() {\n }", "public void mo55254a() {\n }", "void m1864a() {\r\n }", "void mo41086b();", "public static void c0() {\n\t}", "public void mo6081a() {\n }", "public void mo21784I() {\n }", "public void mo21792Q() {\n }", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public void method_6191() {\r\n super.method_6191();\r\n }", "public final void mo12688e_() {\n }", "@Override\r\n\tpublic void func01() {\n\t\t\r\n\t}", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "void mo119582b();", "public void gored() {\n\t\t\n\t}", "public int method_209() {\r\n return 0;\r\n }", "public void method_192() {}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "static void feladat9() {\n\t}", "public void mo21780E() {\n }", "private void poetries() {\n\n\t}", "public void mo21789N() {\n }", "public void mo21783H() {\n }", "void mo80457c();", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}", "public void mo23813b() {\n }", "public void mo9137b() {\n }" ]
[ "0.6364281", "0.63417935", "0.6282839", "0.6220709", "0.6123851", "0.61004525", "0.60922277", "0.6070961", "0.6053424", "0.5977004", "0.5924675", "0.59198177", "0.59008956", "0.59005874", "0.59005874", "0.5897211", "0.58956075", "0.5890555", "0.58844894", "0.58681494", "0.583634", "0.5833754", "0.58314824", "0.5830592", "0.58304167", "0.5827169", "0.58268917", "0.5825601", "0.5825075", "0.5818846", "0.5816895", "0.58062714", "0.5802796", "0.5788983", "0.5788983", "0.57870996", "0.5780999", "0.57758856", "0.57680374", "0.5766784", "0.5752621", "0.57506216", "0.57340175", "0.5725846", "0.5722092", "0.57209766", "0.5720612", "0.5720612", "0.5720612", "0.5720612", "0.5720612", "0.5720612", "0.5720612", "0.5715877", "0.5698036", "0.5697195", "0.5691882", "0.56856173", "0.56722707", "0.56719047", "0.56666774", "0.56617266", "0.5660136", "0.5657652", "0.5656421", "0.5653562", "0.56520134", "0.56509733", "0.5645889", "0.5645771", "0.5645664", "0.56450045", "0.56311405", "0.56291884", "0.5624631", "0.5616515", "0.561552", "0.56146616", "0.5606666", "0.55941826", "0.55895394", "0.55858266", "0.5583322", "0.5572386", "0.55659366", "0.5564315", "0.5561683", "0.5557933", "0.555734", "0.5556588", "0.5553621", "0.5553403", "0.5551696", "0.55498004", "0.5545708", "0.5544361", "0.5539243", "0.55386734", "0.5538197", "0.55350095", "0.5532198" ]
0.0
-1
The other internal routine.
private float vec_stdDevMod(float[] v, int n) { float iqr, med; float lb, ub; long i; Arrays.sort(v); med = v[(int)(n/2)]; iqr = v[(int)(3*n/4)] - v[(int)(n/4)]; lb = med - (float)2.0*iqr; ub = med + (float)2.0*iqr; return vec_stdDevBounded(v,n,lb,ub); }
{ "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\tprotected void interr() {\n\t}", "protected void additionalProcessing() {\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "private void sub() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private void kk12() {\n\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void init2() throws Exception {\n\r\n\t}", "private void method_2242() {\r\n this.field_1824.method_6863(0);\r\n this.field_1824.method_6861(false);\r\n this.field_1824.method_6859(0);\r\n this.field_1824.method_6857(false);\r\n }", "private stendhal() {\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\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\n protected void prot() {\n }", "public void method_4270() {}", "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 }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "protected boolean func_70814_o() { return true; }", "public void baocun() {\n\t\t\n\t}", "private void assignment() {\n\n\t\t\t}", "public void method_6349() {\r\n super.method_6349();\r\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "double passer();", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public void redibujarAlgoformers() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF2() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private void m50366E() {\n }", "public abstract void mo70713b();", "public void init2() {\n }", "public void init2() {\n }", "@Override\r\n\tprotected void doF1() {\n\t\t\r\n\t}", "private void offer() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "protected void method_2251() {\r\n this.method_2181();\r\n this.field_1823.method_128(this.field_1824, this.field_1850.method_2383().method_8922());\r\n this.field_1826.method_7081();\r\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void inorder() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private static void iterator() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void abs2_m1() {\n\t\t\n\t}", "private final void i() {\n }", "public void method_6191() {\r\n super.method_6191();\r\n }", "protected void mo3576c() {\n m9185a(this.this$0.b.getChampIterator());\n }", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "private void t2() {\n // read from a super region, write to a sub region: keep both\n readProtected();\n writeDefault();\n }", "public static void CC2_1() {\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void skystonePos2() {\n }", "public void mo12628c() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void init2() {\n\t}", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "public final void mo91715d() {\n }", "void berechneFlaeche() {\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "public void Exterior() {\n\t\t\r\n\t}", "private void remplirFabricantData() {\n\t}", "public void mo21779D() {\n }", "public void mo4359a() {\n }", "protected void mo6255a() {\n }", "protected void h() {}", "protected void method_3848() {\r\n super.method_3848();\r\n }", "private void strin() {\n\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private FlyWithWings(){\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public static void method2(){\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void wrapup();", "public void mo21793R() {\n }", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "protected abstract Set method_1559();", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public abstract void mo56925d();", "public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }", "@Override\n\tpublic void dosomething2() {\n\t\t\n\t}", "@Override\n\tpublic void step2() {\n\t\t\n\t}", "public abstract void mo27386d();", "private Rekenhulp()\n\t{\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo27385c();", "@Override\n\tpublic void i2() {\n\t\t\n\t}", "public void mo21825b() {\n }" ]
[ "0.6428367", "0.6307782", "0.6188222", "0.611211", "0.60875946", "0.60874444", "0.60575056", "0.6054072", "0.59863085", "0.59844583", "0.59561366", "0.5953325", "0.5952841", "0.59095573", "0.5908976", "0.58827126", "0.5855301", "0.58286774", "0.58261055", "0.58261055", "0.5821813", "0.57686716", "0.5750792", "0.5733423", "0.5726879", "0.5715277", "0.5707617", "0.57019085", "0.56965137", "0.5688145", "0.5682038", "0.56817335", "0.5676002", "0.5663715", "0.56532204", "0.5640061", "0.5639944", "0.56383914", "0.5634935", "0.5634935", "0.56337625", "0.56309956", "0.5630135", "0.5624058", "0.5622238", "0.5619911", "0.56139344", "0.5605859", "0.56006765", "0.5596538", "0.5596538", "0.5595287", "0.5586845", "0.5585974", "0.5584909", "0.5584793", "0.5579703", "0.5579426", "0.55743676", "0.5572541", "0.55502105", "0.5539628", "0.55343336", "0.5533527", "0.5532774", "0.5531436", "0.5521478", "0.5518833", "0.5514604", "0.55056584", "0.55056584", "0.5502361", "0.54926443", "0.54886675", "0.5484374", "0.54840297", "0.54831964", "0.54795784", "0.547721", "0.5470854", "0.54682946", "0.54657", "0.5464288", "0.54631925", "0.54620725", "0.5451939", "0.5450976", "0.5444457", "0.5434683", "0.54322404", "0.54316986", "0.54246396", "0.54200447", "0.54151213", "0.54132706", "0.5405232", "0.54002976", "0.5396051", "0.539356", "0.5393148", "0.53900254" ]
0.0
-1
This is the MEDIATOR...
public static void showMessage(FlyingObject flyingObject, String message) { System.out.println("[" + new Date().toString() + "][" + flyingObject.getType().toUpperCase() + "]: " + message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected float m()\r\n/* 234: */ {\r\n/* 235:247 */ return 0.03F;\r\n/* 236: */ }", "@Override\n\tpublic void englishMedium() {\n\t\t\n\t}", "protected final void parseM() {\n current = read();\n skipSpaces();\n\n float x = parseNumber();\n skipCommaSpaces();\n float y = parseNumber();\n \n currentX = x;\n smoothQCenterX = x;\n smoothCCenterX = x;\n\n currentY = y;\n smoothQCenterY = y;\n smoothCCenterY = y;\n p.moveTo(x, y);\n lastMoveToX = x;\n lastMoveToY = y;\n\n skipCommaSpaces();\n }", "private void meditate() {\n\t\t\tUtils.pause(10_000);\n\t\t\t// System.out.println(this.name + \" is finished meditate\");\n\t\t}", "public int getMobCap()\r\n/* 24: */ {\r\n/* 25:41 */ return this.f;\r\n/* 26: */ }", "private void createMedia(Code32 code, int op, int cond, int Rd, int Rn, int lsb, int width) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | ((width-1) << 16) | (Rd << 12) | (lsb << 7) | Rn;\r\n\t\tcode.incInstructionNum();\r\n\t}", "@Override\r\n\tpublic int getMM() {\n\t\treturn MM;\r\n\t}", "@Override\n\tpublic int taille() {\n\t\treturn 1;\n\t}", "public String getMediatorNo() {\r\n return mediatorNo;\r\n }", "public int getM () {\n\t\treturn M;\n\t}", "private void addMediaMenu(){\n\t\t\n\t}", "public musico() {\n\t\tnombre = \" \";\n\t\tsexo = ' ';\n\n\t}", "public Unit<Length> metre() {return metre;}", "@Override\n\tpublic void m3() {\n\t\t\n\t}", "@Override\n public MediaControl getMediaControl() {\n return this;\n }", "void m() {\n\t\ti = 0;\r\n\t\tthis.m(\"\");\r\n\t}", "public int GetM()\r\n\t{\r\n\t\treturn M;\r\n\t}", "public void mo21788M() {\n }", "public void mo4359a() {\n }", "public String getMediumType() { return Constants.medium_MODEM; }", "@Override\n\tpublic String getTargetMedium() {\n\t\treturn targetMedium;\n\t}", "public DisparoJugador getMultiplicador(){\r\n\t\treturn nextLevel();\r\n\t}", "@Override\n public String getMoreMojor() {\n return moremajor;\n }", "public final void m8576c() {\n this.f7048a.i();\n }", "@Override\n\tpublic int getMC() {\n\t\treturn MC;\n\t}", "public java.lang.String getMID() {\r\n return MID;\r\n }", "private void m7222b() {\n this.f5601w.mo5525a((C1272h) this);\n this.f5601w.mo5527a((C1280l) this);\n this.f5601w.mo5528a(this.f5580E);\n }", "static void MichelMethod() {\n String CSI = \"\\u001B[\";\n System.out.print(CSI + \"32\" + \"m\");\n\n System.out.println(\"This is the group U calculator.\");\n System.out.println(\"Thanks for your preference!\");\n System.out.println(CSI + \"m\");\n\n }", "private void m76757i() {\n m76756h();\n if (this.f61633c != null) {\n this.f61633c.mo60893b();\n }\n this.f61634d = ValueAnimator.ofFloat(new float[]{1.0f, 0.0f});\n this.f61634d.setDuration(1400);\n this.f61634d.addListener(new AnimatorListenerAdapter() {\n public final void onAnimationEnd(Animator animator) {\n if (AudioControlView.this.f61633c != null) {\n AudioControlView.this.f61633c.mo60892a();\n AudioControlView.this.f61634d = null;\n }\n }\n });\n this.f61634d.start();\n }", "private void m50366E() {\n }", "@Override\n public void memoria() {\n \n }", "int getM();", "protected final void parsem() {\n current = read();\n skipSpaces();\n\n final float x = parseNumber();\n skipCommaSpaces();\n final float y = parseNumber();\n\n currentX += x;\n smoothQCenterX = currentX;\n smoothCCenterX = currentX;\n currentY += y;\n smoothQCenterY = currentY;\n smoothCCenterY = currentY;\n p.moveTo(smoothCCenterX, smoothCCenterY);\n lastMoveToX = smoothCCenterX;\n lastMoveToY = smoothCCenterY;\n\n skipCommaSpaces();\n }", "@Override\n protected void animStart() {\n }", "private String mediumMove() {\n int a = getBestMoveForBlack(FORESEEN_MOVES * 2);\n System.out.println(\"Moving \" + a);\n return super.makeAMove(a);\n }", "private void m50367F() {\n }", "public String getMediatorName() {\r\n return mediatorName;\r\n }", "public String getMedium() {\r\n return medium;\r\n }", "public void m23075a() {\n }", "@Override\n\tpublic void m1() {\n\t\t\n\t}", "public int getM() {\n return m_;\n }", "public int getMM() {\n\t\treturn MM;\n\t}", "speech_formatting.SegmentedTextOuterClass.TokenSegment.BreakLevel getBreakLevel();", "public int getMpen(){\n\t\treturn mpen;\n\t}", "private void makeMedicine() {\n\t\teating = true;\n\t\ttama.setLayoutX(200);\n\n\t\tmedicine = new Sprite(3, 3, 540, 478, new Image(\"file:./res/images/hearts.png\"), 1, 2100);\n\t\tmedicine.setLayoutX(150);\n\t\tmedicine.setLayoutY(150);\n\t\tmedicine.setScaleX(0.3);\n\t\tmedicine.setScaleY(0.3);\n\t\tgrid.getChildren().addAll(medicine);\n\t\tPauseTransition pause = new PauseTransition(Duration.millis(2100));\n\t\tpause.setOnFinished(e -> {\n\t\t\tgrid.getChildren().remove(medicine);\n\t\t\ttama.setLayoutX(190);\n\t\t\teating = false;\n\t\t\tmodel.getController().feedMedicine();\n\t\t});\n\t\tpause.play();\n\n\t}", "public int getM() {\n return m_;\n }", "String getMIDINotation();", "public String getName() {\n/* 50 */ return \"M\";\n/* */ }", "public abstract C7034m mo24416a();", "void miauler() {\r\n\t\tSystem.out.println(this.miaulement);\r\n\t}", "@Override\r\n\tpublic void newMedia(MediaPlayer mediaPlayer)\r\n\t{\n\r\n\t}", "public MotherRobot() {\n Random random = new Random();\n int sepInt = random.nextInt(3);\n if (sepInt == 1)\n setSeparate(true);\n }", "public Spider()\r\n/* 24: */ {\r\n/* 25: 21 */ setBackground(Color.WHITE);\r\n/* 26: */ }", "@Override\r\n\tpublic void next() {\n\n\t}", "public MEDIATION_STATE getMediationState() {\n return this.mMediationState;\n }", "public HiloM() { }", "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 }", "@AutoEscape\n\tpublic String getMoTa();", "@Override\n\tpublic void next() {\n\t\t\n\t}", "private void m7226c() {\n this.f5601w.mo5542b((C1272h) this);\n this.f5601w.mo5544b((C1280l) this);\n this.f5601w.mo5545b(this.f5580E);\n m7230f();\n }", "public void m2() {\n\n\t}", "public void mo3749d() {\n }", "public double getPauseBetweenMIDISends() \n {\n return 0.0;\n }", "Editor mo117962b();", "public C1818w mo7074m() {\n return C1818w.ABSTRACT;\n }", "@Override\n\tpublic void m2() {\n\t\t\n\t}", "public void mo55254a() {\n }", "protected abstract void nextWave();", "private MediumOrientationMedOrient(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}", "public void int1_m() {\n\t\t\n\t}", "public final int getMM()\n {\n return mm;\n }", "public Integer mo13274m() {\n DmcVideoMeta dmcVideoMeta = this.f9144g0;\n if (dmcVideoMeta != null) {\n UserMediaMeta X = dmcVideoMeta.mo13065X();\n if (X != null) {\n return X.mo13235m();\n }\n }\n return null;\n }", "@Override\n\tpublic void runMBA() {\n\t\t\n\t}", "@Override\n public double getPerimiter() {\n return 4 * width;\n }", "public void multiply() {\n\t\t\n\t}", "protected void extraExplosions_EM() {\n }", "public void medium() {\n\t\tGenerator solve = new Generator();\n\t\tsolve.medium();\n\t\tAnswer = solve.getEquationResult();\n\t\tTextView Equation = (TextView) findViewById(R.id.textView3);\n\t\tEquation.setText(solve.getEquation());\n\n\t}", "public void mo68520e() {\n super.mo68520e();\n C26780aa.m87959a(this.itemView, mo75290r(), this.f77546j);\n C24942al.m81837c(mo75261ab(), this.f89221bo);\n C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"otherclick\").mo65283e(\"video\").mo65270a(mo75261ab());\n }", "public void morir()\r\n\t{\r\n\t\tif(this.grafico != null)\t\r\n\t\t\tthis.mover(4);\r\n\t}", "public int getMp() \n\t{\n\t\treturn mp;\n\t}", "public CustomMenuAnimator() {\n \tmSpacing = 2.0f;\n }", "@Override\r\n\tpublic String mamar() {\n\t\treturn \"Usando Leite.\";\r\n\t}", "@Override\n\tpublic String maju() {\n\t\tif (gigiMasuk) {\n\t\t\treturn super.maju();\n\t\t}else {\n\t\t\treturn \"..............\";\n\t\t}\n\t}", "@Override\n\tpublic void show4() {\n\t\t\n\t}", "public int readMedium()\r\n/* 411: */ {\r\n/* 412:424 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 413:425 */ return super.readMedium();\r\n/* 414: */ }", "@Override\n\tpublic void m4() {\n\t\t\n\t\tSystem.out.println(\"m4\");\n\t\t\n\t}", "public void fltMotors(){\n\t\tsynchStop(MMXCOMMAND_FLOAT);\n\t}", "public int getLargeur() {\n return getWidth();\n }", "int getWidth() {return width;}", "public void mo23813b() {\n }", "@Override\n\tpublic int getMediaDuration() {\n\t\treturn 0;\n\t}", "public String mo8484a() {\n int i = this.f3539a;\n if (i == 1) {\n return \"add\";\n }\n if (i == 2) {\n return \"rm\";\n }\n if (i == 4) {\n return \"up\";\n }\n if (i != 8) {\n return \"??\";\n }\n return \"mv\";\n }", "public void mo12628c() {\n }", "public final /* synthetic */ void mo99828e() {\n int measuredWidth = this.f104232v.getMeasuredWidth();\n this.f104233w.setMaxWidth((C23482j.m77098b(this) - (measuredWidth * 2)) - ((int) C9738o.m28708b((Context) this, 60.0f)));\n this.f104232v.setVisibility(8);\n this.f104232v.setTextSize(1, 17.0f);\n }", "@Override \n\t public String getDescription() {\n\t \t return \"(*.MXD)\"; \n\t }" ]
[ "0.5426942", "0.54055613", "0.53570783", "0.5272506", "0.524441", "0.52363735", "0.52192247", "0.52080435", "0.5204707", "0.51875705", "0.51406205", "0.5138377", "0.5083414", "0.50680363", "0.506157", "0.505402", "0.5052286", "0.50498134", "0.50493664", "0.5041611", "0.50411314", "0.504008", "0.50138414", "0.50098306", "0.5008593", "0.5003999", "0.5003501", "0.49924684", "0.4976092", "0.49716628", "0.49704474", "0.49650508", "0.4961022", "0.49529496", "0.49373916", "0.49261823", "0.49184325", "0.491728", "0.4909194", "0.49033588", "0.49022418", "0.4901639", "0.4898805", "0.4895815", "0.48893717", "0.4885934", "0.48818535", "0.48804465", "0.4863732", "0.4863144", "0.48625714", "0.48601544", "0.48601022", "0.48490316", "0.4846289", "0.4843839", "0.48399726", "0.48399726", "0.48399726", "0.48399726", "0.48399726", "0.48399726", "0.48399726", "0.48273382", "0.48260653", "0.48255268", "0.48246753", "0.4823859", "0.48215222", "0.4818288", "0.48176545", "0.4815253", "0.48121077", "0.48105237", "0.48102498", "0.48093084", "0.48088047", "0.4808326", "0.48057255", "0.48036066", "0.48012993", "0.47999057", "0.47989285", "0.47950104", "0.47931919", "0.47893807", "0.47871312", "0.47833386", "0.478128", "0.47779286", "0.4776495", "0.47752586", "0.47714064", "0.4770896", "0.47685274", "0.4766755", "0.47620305", "0.47603065", "0.47580132", "0.47561604", "0.4752335" ]
0.0
-1
Created by Administrator on 2016/11/9.
public interface IIndexDataInfo { Index_DataInfo getDataInfo();// 获取首页的整体对象 List<Index_DataInfo.InfoBean.FocusBean> getFocusDataFromServer();// 首页图片轮播 List<Index_DataInfo.InfoBean.BannerBean> getBannerDataFromServer();// 首页轮播下选项 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\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\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo38117a() {\n }", "public void mo4359a() {\n }", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "public final void mo51373a() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void memoria() {\n \n }", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void verarbeite() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void gored() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "public contrustor(){\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "public void mo55254a() {\n }", "Petunia() {\r\n\t\t}", "public void mo6081a() {\n }", "public Pitonyak_09_02() {\r\n }", "public void autoDetails() {\n\t\t\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private TMCourse() {\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "public void mo12930a() {\n }", "@Override\n\tpublic void create() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tprotected void onCreate() {\n\t}", "@Override\n\tpublic void onCreate() {\n\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n void init() {\n }", "public void create() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private void poetries() {\n\n\t}" ]
[ "0.62181824", "0.6128533", "0.6084573", "0.605676", "0.5989271", "0.59771544", "0.5916375", "0.59157044", "0.5889726", "0.5874657", "0.5874657", "0.5856748", "0.5856748", "0.583856", "0.5834941", "0.5833396", "0.58204085", "0.5820225", "0.5817862", "0.5782024", "0.5780984", "0.5717115", "0.5710936", "0.56946295", "0.56781214", "0.5660614", "0.5657773", "0.56512815", "0.5645477", "0.5640069", "0.5632675", "0.5632675", "0.5632675", "0.5632675", "0.5632675", "0.5632675", "0.5632675", "0.56325436", "0.5600317", "0.55976844", "0.5597299", "0.5571609", "0.5571438", "0.556745", "0.5561758", "0.55606616", "0.5548068", "0.5546247", "0.55434746", "0.55421597", "0.55417037", "0.55262387", "0.5515848", "0.5512341", "0.5511316", "0.5511316", "0.5511316", "0.5511316", "0.5511316", "0.55089086", "0.5505509", "0.54973155", "0.5489727", "0.54890317", "0.54890317", "0.5486561", "0.54809076", "0.54774845", "0.5475804", "0.5474705", "0.5474705", "0.5474705", "0.54701406", "0.54611653", "0.54611653", "0.5455556", "0.54437727", "0.54437727", "0.54437727", "0.54437727", "0.54437727", "0.54437727", "0.5437627", "0.5437627", "0.5437627", "0.5432628", "0.5432628", "0.5428079", "0.54277897", "0.54260975", "0.54209393", "0.54187584", "0.5413844", "0.5413384", "0.5408848", "0.5407251", "0.5407251", "0.5407251", "0.54032415", "0.53955054", "0.53901124" ]
0.0
-1
BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH")));
public static void main(String[] args) throws IOException { int t = scanner.nextInt(); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?"); for (int tItr = 0; tItr < t; tItr++) { int n = scanner.nextInt(); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?"); int[] arr = new int[n]; String[] arrItems = scanner.nextLine().split(" "); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?"); for (int i = 0; i < n; i++) { int arrItem = Integer.parseInt(arrItems[i]); arr[i] = arrItem; } long result = countInversions(arr); cnt = 0; System.out.println(result); //bufferedWriter.write(String.valueOf(result)); //bufferedWriter.newLine(); } //bufferedWriter.close(); scanner.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws IOException {\n\t\tBufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv(\"OUTPUT_PATH\")));\n\t\t\n\t\tbufferedWriter.write(\"Hello\");\n\n\t}", "private static void prepareOutputFile() {\n try {\n outputFileBuffer = new BufferedWriter(new FileWriter(PATH+OUTPUT_FILE_NAME));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static BufferedWriter createFileWriter(String filePath) {\n String[] pathComponents = filePath.split(\"/data/\");\n //to avoid heavy nesting in output, replace nested directory with filenames\n\n String output = pathComponents[0] + \"/out/rule_comparisons/\" + pathComponents[1].replace(\"/\",\"-\");\n\n File file = new File(output);\n try {\n //create file in this location if one does not exist\n if (!file.exists()) {\n file.createNewFile();\n }\n return new BufferedWriter(new FileWriter(file));\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "public void open(){\n try {\n output = new BufferedWriter(new FileWriter(training_path, true));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private BufferedWriter getWriter(int secretPos) throws IOException {\n\t\tFile file = new File(\"reportingTool_tmp\" + sep + this.uniqueName + \"-\" + \"histogram_\" + this.dataset.getSecrets().get(secretPos).getFileName() + \".txt\");\n\t\tFileWriter writer = new FileWriter(file);\n\t\tBufferedWriter bw = new BufferedWriter(writer);\n\t\treturn bw;\n\t}", "public static BufferedWriter Writer(String path) throws IOException\n\t{\n\t\treturn new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path),\"UTF-8\"));\n\t}", "private void createWriter() throws IOException {\n if (outputFile.exists()) {\n outputFile.delete();\n }\n FileWriter outFw = null;\n try {\n outFw = new FileWriter(outputFile.getAbsolutePath());\n } catch (IOException e) {\n LOG.error(\"Can not create writer for {} {}\", outputFile.getAbsolutePath(), e);\n throw e;\n }\n this.bufferedWriter = new BufferedWriter(outFw);\n writeOutputLine(\"User Agent - started\");\n }", "private static void createTestFile(String path) throws IOException {\n\t\tFile file = new File(path);\n\t\tFileWriter writer = new FileWriter(file);\n\t\twriter.write(\"Jenkins Test : \"+new Date() + \" ==> Writing : \" + Math.random());\n\t\twriter.flush();\n\t\twriter.close();\n\t}", "private static void writeOutput(String text) {\n try {\n FileWriter outputWriter = new FileWriter(\"output.txt\", true);\n outputWriter.write(text);\n outputWriter.close();\n } catch (Exception e) {\n System.out.println(\"Could not write to file output.txt\");\n }\n }", "public static void WriteToFile(){\r\n try {\r\n File file = new File(\"output.txt\");\r\n file.createNewFile();\r\n \r\n FileWriter fw = new FileWriter(file.getAbsoluteFile());\r\n BufferedWriter bw = new BufferedWriter(fw);\r\n String[] FinalBoard = new String[Board.ReportBoardValues().length];\r\n FinalBoard = Board.ReportBoardValues();\r\n for(int i = 0; i < Board.ReportBoardValues().length; i++){\r\n bw.write(FinalBoard[i]);\r\n bw.newLine();\r\n }\r\n bw.close();\r\n fw.close();\r\n \r\n }\r\n catch (IOException e) {\r\n System.out.println (\"Output error\");\r\n }\r\n }", "private static void writeToOutput() {\r\n FileWriter salida = null;\r\n String archivo;\r\n JFileChooser jFC = new JFileChooser();\r\n jFC.setDialogTitle(\"KWIC - Seleccione el archivo de salida\");\r\n jFC.setCurrentDirectory(new File(\"src\"));\r\n int res = jFC.showSaveDialog(null);\r\n if (res == JFileChooser.APPROVE_OPTION) {\r\n archivo = jFC.getSelectedFile().getPath();\r\n } else {\r\n archivo = \"src/output.txt\";\r\n }\r\n try {\r\n salida = new FileWriter(archivo);\r\n PrintWriter bfw = new PrintWriter(salida);\r\n System.out.println(\"Índice-KWIC:\");\r\n for (String sentence : kwicIndex) {\r\n bfw.println(sentence);\r\n System.out.println(sentence);\r\n }\r\n bfw.close();\r\n System.out.println(\"Se ha creado satisfactoriamente el archivo de texto\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "private static void env (final String outFileName) throws IOException {\r\n\t\tstdout.print (\"Recoding: set\\t\");\r\n\t\tvar env = System.getenv ();\r\n\t\tvar out = new StringBuilder ();\r\n\t\tvar path = Paths.get (DIR.toString (), outFileName);\r\n\t\tenv.forEach ((key, value) -> out.append (String.format (\"%s=%s%n\", key, value)));\r\n\t\tFiles.writeString (path, out.toString ());\r\n\t\tstdout.println (\"(Done)\");\r\n\t}", "private void writeFile(String path)\n {\n FileIO fileIO = new FileIO();\n StringBuffer stringBuf = new StringBuffer();\n for(int i = 0; i< getDrivers().getSize(); i++) // go through each driver in the collection\n {\n stringBuf.append(getDrivers().getDriver(i).getName() + \",\" + getDrivers().getDriver(i).getRanking() \n + \",\" + getDrivers().getDriver(i).getSpecialSkill() + ((i == (getDrivers().getSize() - 1)) ? \"\" :\"\\n\")); // append details to buffer\n }\n fileIO.setFileName(path);\n fileIO.writeFile(stringBuf.toString());\n }", "public void FilesBufferWrite2Append() throws IOException {\n \ttry { \t\n \t\t\n \t \t/* This logic will check whether the file\n \t \t \t * exists or not. If the file is not found\n \t \t \t * at the specified location it would create\n \t \t \t * a new file*/\n \t \t \tif (!file.exists()) {\n \t \t\t file.createNewFile();\n \t \t \t}\n \t\t\n \t \t \t//KP : java.nio.file.Files.write - NIO is buffer oriented & IO is stream oriented!]\n \t\tString str2Write = \"\\n\" + LocalDateTime.now().toString() + \"\\t\" + outPrintLn + \"\\n\";\n \t\tFiles.write(Paths.get(outFilePath), str2Write.getBytes(), StandardOpenOption.APPEND);\n \t\t\n \t}catch (IOException e) {\n\t \t// TODO Auto-generated catch block\n\t \te.printStackTrace();\t\t\n\t\t\tSystem.out.print(outPrintLn);\n\t\t\tSystem.out.println(outPrintLn);\t\n \t}\n }", "private static void writeToFile(String[] writeStringArr, String outputFileName){\n BufferedWriter outputBuffer = null;\n try{\n File outputFile = new File(outputFileName);\n if(!outputFile.exists()){\n outputFile.createNewFile();\n }\n\n outputBuffer = new BufferedWriter(new FileWriter(outputFile)); //create buffered reader\n// outputBuffer.write(writeString);\n\n for(int i=0; i< writeStringArr.length; i++){\n outputBuffer.write(writeStringArr[i]);\n outputBuffer.newLine();\n }\n } catch (IOException e){System.err.println(\"Error Writing File\");}\n finally {\n try {\n outputBuffer.close();\n }catch (IOException e){System.err.println(\"Error Closing File\");}\n }\n }", "private void saveLocalFile(ByteArrayOutputStream out) {\n //sava in local files\n FileWriter fw;\n File file = new File(\"/home/shaowen2/testdata/\" + \"vm\" +servers.getServerAddress().substring(15, 17) +\"-ouput.log\");\n\n try {\n if (!file.exists()) {\n file.createNewFile();\n }\n fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw);\n bw.write(out.toString());\n //bw.write(\"\\n\" + \"Query Count:\" + count + \"|| Time:\" + new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date()) + \"\\n\");\n bw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static BufferedWriter getWriter(Path path) throws IOException {\n return Files.newBufferedWriter(path);\n }", "public void outputToFile(String filemame)\n {\n }", "@Override\n public void write(String str) {\n BufferedWriter writer;\n try {\n String path = FileManager.getInstance().getPath();\n writer = new BufferedWriter(new FileWriter(path, true));\n writer.write(str);\n writer.newLine();\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void createSaveData(){\n try {\n File f = new File(filePath, highScores);\n FileWriter output = new FileWriter(f);\n BufferedWriter writer = new BufferedWriter(output);\n\n writer.write(\"0-0-0-0-0\");\n writer.newLine();\n writer.write(\".....-.....-.....-.....-.....\");\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private PrintWriter createOutputFile(String outputFile) throws IOException {\n return new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));\n }", "private static void writeToOutput(String path, Apriori apriori){\n try{\n BufferedWriter output = new BufferedWriter(new FileWriter(path, false));\n for (String s : apriori.mItemSet){\n output.write(s);\n }\n output.close();\n } catch (IOException e){\n e.printStackTrace();\n }\n }", "private void outputFile() {\n // Define output file name\n Scanner sc = new Scanner(System.in);\n System.out.println(\"What do you want to call this file?\");\n String name = sc.nextLine();\n\n // Output to file\n Path outputFile = Paths.get(\"submissions/\" + name + \".java\");\n try {\n Files.write(outputFile, imports);\n if (imports.size() > 0)\n Files.write(outputFile, Collections.singletonList(\"\"), StandardOpenOption.APPEND);\n Files.write(outputFile, lines, StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "@Override\r\n\tpublic int saveProgramToFile(Robot robot, String path)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tBufferedWriter out = new BufferedWriter(new java.io.FileWriter(new java.io.File(path)));\r\n\t\t\tout.write(robot.getProgram().toString());\r\n\t\t\tout.close();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\tSystem.out.println(\"The operation failed.\");\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "public ThingToWriteFile(String filename) { \n\t\ttry { \t\n\t\t\tout = new BufferedWriter(new FileWriter(filename));\n\t\t}\n\t\tcatch (FileNotFoundException ee){\n\t\t\tSystem.out.println(\"File \" + filename + \" not found.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"File \" + filename + \" cannot be read.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private void writeTo(String logEntry, File logFile) throws IOException {\n try (FileWriter logFileWriter = new FileWriter(logFile, true);) {\n logFileWriter.write(logEntry);\n logFileWriter.write(System.lineSeparator());\n logFileWriter.flush();\n logFileWriter.close();\n }\n}", "private void writeToFile(){\n try(BufferedWriter br = new BufferedWriter(new FileWriter(filename))){\n for(Teme x:getAll())\n br.write(x.toString()+\"\\n\");\n br.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws IOException {\nFileInputStream fin=new FileInputStream(\"C:\\\\\\\\Users\\\\\\\\Dell\\\\\\\\Desktop\\\\\\\\input.txt\");\nFileOutputStream fout=new FileOutputStream(\"C:\\\\\\\\\\\\\\\\Users\\\\\\\\\\\\\\\\Dell\\\\\\\\\\\\\\\\Desktop\\\\\\\\\\\\\\\\output.txt\");\nint c=0;\nwhile((c=fin.read())!=-1)\n{\n\tfout.write(c);\n}\nSystem.out.println(\"written completed\");\n\t}", "public void write(File output) throws IOException {\n }", "void save(String output);", "protected void fileSet() throws IOException {\n//\t\tfos = new FileOutputStream(outFile, false);\n//\t\tdos = new DataOutputStream(fos);\n\t\trealWriter = new BufferedWriter(new FileWriter(outFile.getAbsolutePath()));\n\t}", "private static void writeOutputFile(BufferedWriter brWr, OutputBean outBean) throws IOException, Exception {\n\t\tif(outBean != null) {\n\t\t\tif(outBean.isNoPathAvailable()) {\n\t\t\t\tbrWr.write(outBean.getExpansion());\n\t\t\t\tbrWr.newLine();\n\t\t\t\tbrWr.write(\"NoPathAvailable\");\n\t\t\t\t//System.out.println(\"NoPathAvailable\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbrWr.write(outBean.getExpansion());\n\t\t\t\tbrWr.newLine();\n\t\t\t\tbrWr.write(outBean.getOutput());\n\t\t\t\tbrWr.newLine();\n\t\t\t\tbrWr.write(String.valueOf(outBean.getPathCost()));\n\t\t\t\t//System.out.println(outBean.getExpansion());\n\t\t\t\t//System.out.println(outBean.getOutput());\n\t\t\t\t//System.out.println(outBean.getPathCost());\n\t\t\t\t}\n\t\t\t}\n\t\telse {\n\t\t\t\tSystem.out.println(\"null outbean object...Check file for validity\");\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\t\tFileWriter fw = new FileWriter(\"C:\\\\Users\\\\shami\\\\OneDrive\\\\Desktop\\\\WriteData.txt\");\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tbw.write(\"Hello I am Working\");\n\t\tbw.write(\"Hello I am Sleeping\");\n\t\tSystem.out.println(\"Hey Done\");\n\t\tbw.close();\n\t\t\n\n\t}", "private static void writeDataLog(String string, String result) throws IOException {\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(new File(string), true));\n\t\tbw.write(result);\n\t\tbw.newLine();\n\t\tbw.flush();\n\t\tbw.close();\n\t}", "public static void main(String args[])\n {\n String FILENAME = \"myfile.txt\";\n\n // When used, the FileWriter object will immediately put it's output\n // to the file. So FileWriter output attempts to write to the file as\n // fast as possible. Maybe this is a good thing in some\n // circumstances, but I think it would be better to write data in\n // chunks. We employ a BufferedWriter object to capture the\n // FileWriter output into a collection of bytes that can be written\n // to the file.\n FileWriter fWriter = null;\n BufferedWriter bWriter = null;\n\n // Wrapping our attempt to write to the file inside a try / catch\n // statement allows us to trap some errors if they happen\n try\n {\n // Here is the content that we will write to the file.\n String fileContent = \"Dude, I'm totally writing to a file!!\";\n\n // These lines instantiate FileWriter and BufferedWriter objects.\n // When instantiating the FileWriter object we pass in the file\n // name that we are writing to. If no path is given in our\n // filename, the file will be created and written in the root\n // directory.\n fWriter = new FileWriter(FILENAME);\n\n // The BufferedWriter object is instantiated on this line and the\n // FileWriter object is passed in as an argument.\n bWriter = new BufferedWriter(fWriter);\n\n // Now that we have our buffer and writer objects created, we can\n // attempt to write content to the file. Here is what\n // (I think) this is doing. The BufferedWriter object will receive\n // the content to be written, and then pass that content as a\n // whole to the FileWriter so it can be written to the file as a\n // chunk. If we did not do it this way, the content would be read\n // passed into the FileWriter object, converted to bytes on the\n // fly, and immediately written, byte by byte as it is converted,\n // to the file. By buffering we are increasing the performance of\n // this action.\n bWriter.write(fileContent);\n }\n\n // The catch statement will trap and display any exception that is\n // created when we are attempting to create our writer objects, open\n // or create the file, or write content.\n catch(Exception e)\n {\n System.out.println(\"Unable to write to file : \" + e.getMessage());\n }\n\n // This 'finally' statement will always happen, regardless of what\n // happens in our try/catch statement. If we put this code into the\n // try statement and we received an error, it would never be\n // processed. Additionally, if we put this code at the bottom of our\n // program and ran into an error half way through, it would never be\n // processed. Placing the code into a finally statement allows us to\n // ensure that it is run every time.\n finally\n {\n // Another try and catch statement to trap any error that happens\n // when closing the files.\n try\n {\n // The last thing we want to do is close out our writer\n // objects. This is a best practice since if you leave the\n // writer open you are at best wasting system resources, and\n // at worst you could lock this file for editing while other\n // resources are trying to use it. We check to make sure it\n // is not already disposed of, and then we call the close()\n // method.\n if (bWriter != null) {\n bWriter.close();\n }\n\n if (fWriter != null) {\n fWriter.close();\n }\n }\n // Our final catch reveals any errors that popped up when we were\n // attempting to close the writer and buffer objects.\n catch (Exception e)\n {\n System.out.println(\"Unable to close writer objects :\"\n + e.getMessage());\n }\n }\n }", "public void saveFile() {\n\t\tPrintWriter output = null;\n\t\ttry {\n\t\t\toutput = new PrintWriter(\"/Users/katejeon/Documents/Spring_2020/CPSC_35339/avengers_project/game_result.txt\");\n\t\t\toutput.println(textArea.getText());\n\t\t\toutput.flush();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"File doesn't exist.\");\n\t\t} finally {\n\t\t\toutput.close();\n\t\t}\n\t}", "public static void main(String[] args) {\ntry\r\n{\r\n\tFileWriter fw= new FileWriter(\"D:/abc.txt\");\r\n\tString s=\"india \\t is my country\";\r\n\tfw.write(s);\r\n\tfw.flush();\r\n\tfw.close();\r\n}\r\ncatch(IOException e)\r\n{\r\n\tSystem.out.println(e);\r\n}\r\n\t}", "private void cmdWrite(String filename) throws NoSystemException {\n MSystem system = system();\n PrintWriter out = null;\n try {\n if (filename == null)\n out = new PrintWriter(System.out);\n else {\n out = new PrintWriter(new BufferedWriter(new FileWriter(\n filename)));\n }\n out\n .println(\"-- Script generated by USE \"\n + Options.RELEASE_VERSION);\n out.println();\n system.writeSoilStatements(out);\n } catch (IOException ex) {\n Log.error(ex.getMessage());\n } finally {\n if (out != null) {\n out.flush();\n if (filename != null)\n out.close();\n }\n }\n }", "protected void writeCompareOutputFile(String outputText) {\n try {\n BufferedWriter writer = new BufferedWriter(new FileWriter(getFile(), true));\n String lineSeparator = System.getProperty(\"line.separator\");\n writer.write(outputText + lineSeparator);\n writer.flush();\n writer.close();\n } catch (IOException e) {\n System.out.println(e.toString());\n }\n }", "public static void main(String[] args) throws IOException {\n PrintWriter outputFile = new PrintWriter(\"ResultFile.txt\");\n\n outputFile.println(\"Line 1\");\n outputFile.println(\"Line 2\");\n outputFile.println(\"Line 3\");\n outputFile.println(\"Line 4\");\n\n\n outputFile.close();\n\n }", "private void createFile(String outputData, File file) {\n try {\n FileWriter writer = new FileWriter(file);\n writer.write(outputData);\n writer.close();\n } catch (IOException e) {\n e.getSuppressed();\n }\n }", "private void saveOutputFile() {\n FileChooser fileChooser = new FileChooser();\n if (textMergeScript.hasCurrentDirectory()) {\n fileChooser.setInitialDirectory (textMergeScript.getCurrentDirectory());\n }\n chosenOutputFile = fileChooser.showSaveDialog (ownerWindow);\n if (fileChooser != null) {\n writeOutput();\n openOutputDataName.setText (tabNameOutput);\n }\n }", "private BufferedWriter abrirArquivoEscrita() {\n\t\ttry{\n\t\t\tBufferedWriter file = null;\n\t\t\tfile = new BufferedWriter(new FileWriter(caminho));\n\t\t\treturn file;\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "@Test\n public void testWriteToPrintWriter() throws Exception {\n System.out.println(\"writeToPrintWriter\");\n PrintWriter output = new PrintWriter(\"tmp.log\");\n String data = \"abc\";\n boolean expResult = true;\n boolean result = IOUtil.writeToPrintWriter(output, data);\n assertEquals(expResult, result);\n result = IOUtil.writeToPrintWriter(output, null);\n assertEquals(false, result);\n\n }", "public abstract void saveToFile(PrintWriter out);", "private PrintWriter getStorageFile() throws IOException {\n Path path = Paths.get(filePath);\n\n // Create directories if necessary\n if (path.getParent() != null) {\n Files.createDirectories(path.getParent().getFileName());\n }\n\n return new PrintWriter(new BufferedWriter(new FileWriter(filePath)));\n }", "private static void writeStringToFile(String string) {\n\t\ttry (BufferedWriter writer = new BufferedWriter(new FileWriter(OUTPUT_FILE_TEMP))) {\n\t\t\twriter.write(string);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void writeProc() throws Exception {\n\t\tWriter writer = new Writer(this.procPath,this.procDataList);\n\t\twriter.running();\n\t}", "public static void writeFile(String outFile, String text) {\n try{\n FileWriter fileWriter = new FileWriter(outFile,false);\n PrintWriter pw = new PrintWriter(fileWriter,true);\n \n if (text==null) {\n pw.println();\n }\n else\n {\n pw.println(text);\n }\n \n pw.close();\n fileWriter.close();\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }", "static void write (String filename, String graph_str) throws IOException {\n \ttry (FileWriter writer = new FileWriter(filename);\n BufferedWriter bw = new BufferedWriter(writer)) {\n bw.write(graph_str);\n } catch (IOException e) {\n System.err.format(\"IOException: %s%n\", e);\n }\n\t}", "public void writeCSVtable(String outBuffer) throws IOException\n {\n String csvFile;\n // Create a file chooser\n File currentDir = new File(\"\").getAbsoluteFile();\n final JFileChooser fc = new JFileChooser(currentDir);\n // In response to a button click:\n int returnVal = fc.showSaveDialog(null);\n // open file\n File file = fc.getSelectedFile();\n // obtain filename\n csvFile = file.getName();\n\n // open the file\n fWriter = new FileWriter(csvFile); \n // write ALL the to the file in 1 burst\n fWriter.write(outBuffer); \n // close the file\n fWriter.close();\n }", "public void createLogFile() {\n\t\tBufferedWriter out = null;\n\t\ttry {\n\t\t\tFile root = Environment.getExternalStorageDirectory();\n\t\t\tLog.e(\"SD CARD WRITE ERROR : \", \"SD CARD mounted and writable? \"\n\t\t\t\t\t+ root.canWrite());\n\t\t\tif (root.canWrite()) {\n\t\t\t\tFile gpxfile = new File(root, \"ReadConfigLog.txt\");\n\t\t\t\tFileWriter gpxwriter = new FileWriter(gpxfile);\n\t\t\t\tout = new BufferedWriter(gpxwriter);\n\t\t\t\tout.write(\"Hello world\");\n\t\t\t\t// out.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tLog.e(\"SD CARD READ ERROR : \", \"Problem reading SD CARD\");\n\t\t\tLog.e(\"SD CARD LOG ERROR : \", \"Please take logs using Logcat\");\n\t\t\tLog.e(\"<<<<<<<<<<WifiPreference>>>>>>>>>>>>\",\n\t\t\t\t\t\"Could not write file \" + e.getMessage());\n\t\t}\n\t}", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);//goes stream based on filename\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos)); //create buffer writer\n Gson gson = new Gson();\n gson.toJson(countbookList, out);//convert java object to json string & save in output\n out.flush();\n fos.close();\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "private void writeFile(String string) {\n\t\ttry {\n\t\t\tFormatter fileWriter = new Formatter(new File( System.getProperty(\"user.dir\") + \"\\\\highscores.txt\"));\n\t\t\t\n\t\t\tfileWriter.format(string);\n\t\t\t\n\t\t\tfileWriter.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.print(\"ERROR: Line 132: Unable to write file\");\n\t\t\t//e.printStackTrace();\n\t\t}\n\t}", "public static void createSaveFile( )\n {\n try\n {\n new File( \"data\" ).mkdirs( );\n PrintWriter writer = new PrintWriter( \"data/\" + Game.instance.getCurrentSaveFile( ).SAVEFILENAME + \".txt\", \"UTF-8\" );\n writer.println( \"dkeys: \" + Game.START_DIAMOND_KEY_COUNT );\n writer.close( );\n }\n catch ( IOException e )\n {\n e.printStackTrace( );\n System.exit( 1 );\n }\n }", "String getFileOutput();", "public static void RedirectOutput() {\t\n\t\ttry {\n\t\t\tPrintStream out = new PrintStream(new FileOutputStream(\"ybus.txt\"));\n\t\t\tSystem.setOut(out); //Re-assign the standard output stream to a file.\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void writeFile() {\n try {\n FileWriter writer = new FileWriter(writeFile, true);\n writer.write(user + \" \" + password);\n writer.write(\"\\r\\n\"); // write new line\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n }", "static void writeFile(String path , String data) throws IOException{\n\t\tFileOutputStream fo = new FileOutputStream(path,true);\n\t\tfo.write(data.getBytes());\n\t\tfo.close();\n\t\tSystem.out.println(\"Done...\");\n\t}", "private static void dosyaYazici(String text)\n {\n File log = new File(\"log.txt\");\n try\n {\n if (!log.exists())\n {\n log.createNewFile();\n }\n FileWriter fileWriter = new FileWriter(log,true);\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n bufferedWriter.append(text+\"\\n\");\n bufferedWriter.close();\n //System.out.print(\"TEST\");\n }\n catch (IOException e)\n {\n System.out.print(\"DOSYA HATASI!\");\n e.printStackTrace();\n }\n\n }", "void createFile()\n {\n //Check if file already exists\n try {\n File myObj = new File(\"src/main/java/ex45/exercise45_output.txt\");\n if (myObj.createNewFile()) {\n System.out.println(\"File created: \" + myObj.getName());// created\n } else {\n System.out.println(\"File already exists.\"); //exists\n }\n //Error check\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "private void writeToFile(SVGGraphics2D generator, String path) throws IOException {\n\t\tFile file = new File(path);\n\t\tif (!file.exists())\n\t\t\tfile.createNewFile();\n\t\tFileWriter fw = new FileWriter(file);\n\t\tPrintWriter writer = new PrintWriter(fw);\n\t\tgenerator.stream(writer);\n\t\twriter.close();\n\t}", "public void saveFile(TaskList tasklist) {\n try {\n String cwd = System.getProperty(\"user.dir\");\n FileWriter fw = new FileWriter(cwd + filePath);\n for (Task task : tasklist.getTasks()) {\n String data = task.getData();\n fw.write(data + System.lineSeparator());\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"Something went wrong: \" + e.getMessage());\n }\n\n }", "void setOutputPath(String outputPath);", "void writeToFile() throws IOException{\n\t\tString fileName = f.getTitle() + \".txt\";\n\t\tfileWrite = new BufferedWriter( new FileWriter(fileName));\n\t\tfileWrite.write(history);\n\t\tSystem.out.println(fileName + \" File Writing Successful!!\");\n\t\tSystem.out.println(\"Data in file :\\n\" + history);\n\t\tfileWrite.flush();\n\t\tFile file = new File(fileName);\n\t\tjava.awt.Desktop.getDesktop().open(file);\n\n\t}", "public static void WriteFile()throws java.io.FileNotFoundException,java.io.IOException\n {\n FileOutputStream out1= new FileOutputStream(\"Sample.bin\") ; \n String ab=\"Welcome to sample file\";\n out1.write(ab.getBytes());\n out1.flush();\n out1.close();\n }", "public void writeFile(String data){\n\t\t\n\t\tcurrentLine = data;\n\t\t\n\t\t\ttry{ \n\t\t\t\tFile file = new File(\"/Users/bpfruin/Documents/CSPP51036/hw3-bpfruin/src/phfmm/output.txt\");\n \n\t\t\t\t//if file doesnt exists, then create it\n\t\t\t\tif(!file.exists()){\n\t\t\t\t\tfile.createNewFile();\n\t\t\t\t}\n \n\t\t\t\t//true = append file\n\t\t\t\tFileWriter fileWriter = new FileWriter(file,true);\n \t \tBufferedWriter bufferWriter = new BufferedWriter(fileWriter);\n \t \tbufferWriter.write(data);\n \t \tbufferWriter.close();\n \n \n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t\n\t}", "public abstract void writeToFile( );", "private BufferedWriter openCacheFile() throws IOException {\n boolean hasLock = false;\n while (!hasLock) {\n synchronized (this) {\n if (!lock) {\n lock = true;\n hasLock = true;\n }\n }\n if (!hasLock) try {\n Thread.sleep(1000);\n } catch (Exception e) {\n }\n }\n tmpFile = new File(cacheDir, \"changeLog.tmp\");\n if (tmpFile.exists()) tmpFile.delete();\n tmpFile.createNewFile();\n BufferedWriter out = new BufferedWriter(new FileWriter(tmpFile));\n if (cacheFile.exists()) {\n BufferedReader in = new BufferedReader(new FileReader(cacheFile));\n String nextLine = in.readLine();\n while (nextLine != null) {\n out.write(nextLine);\n out.newLine();\n nextLine = in.readLine();\n }\n in.close();\n }\n return out;\n }", "private void writeFile(String line, BufferedWriter theOutFile) throws Exception {\n\t\ttheOutFile.append(line);\t\t\t// write the line out\n\t\ttheOutFile.newLine();\t\t\t\t// skip to the next line\t\t\n\t}", "private void setupWriter() {\n output = new StringWriter();\n writer = new PrintWriter(output);\n }", "public static void writeToFile(String path, String text) throws IOException {\n Charset charSet = Charset.forName(\"US-ASCII\");\n BufferedWriter writer = new BufferedWriter(new FileWriter(path));\n writer.write(text,0,text.length());\n writer.close();\n }", "private void writeToFile(){\n Calendar c = Calendar.getInstance();\n String dateMedTaken = DateFormat.getDateInstance(DateFormat.FULL).format(c);\n FileOutputStream fos = null;\n\n try {\n fos = openFileOutput(FILE_NAME, MODE_APPEND);\n fos.write(dateMedTaken.getBytes());\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if(fos != null){\n try {\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n }", "public void writeToFile(String s,String outFile) \n\t{\n\t\ttry \n\t\t{\n\t\t\tbw = new BufferedWriter(new FileWriter(outFile));\n\t\t\tbw.write(s);\n\t\t\tMyLogger.writeMessage(\"Results written to file\", MyLogger.DebugLevel.RESULTS);\n\t\t\tbw.close();\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.err.println(\"Exception: writing to output.txt\");\n\t\t\tSystem.err.println(\"Exiting\");\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t}", "private BufferedWriter createWriter(String filePath, String fileName)\r\n\t\t\tthrows IOException {\r\n\t\tString fullPath = filePath + \"/\" + fileName;\r\n\t\tFile file = new File(fullPath);\r\n\t\tboolean exists = new File(filePath).exists();\r\n\t\tif (!exists) {\r\n\t\t\tfile.mkdir();\r\n\t\t}\r\n\t\tFileWriter writer = new FileWriter(file);\r\n\t\tBufferedWriter bufferWriter = new BufferedWriter(writer);\r\n\r\n\t\treturn bufferWriter;\r\n\t}", "private static void writeToFile(String string){\n try {\n buffer.write(string);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void writeToFile(String context, String outputFileName) throws IOException {\n KubernetesDataHolder dataHolder = KubernetesContext.getInstance().getDataHolder();\n outputFileName = dataHolder.getOutputDir() + File\n .separator + extractBalxName(dataHolder.getBalxFilePath()) + outputFileName;\n DeploymentModel deploymentModel = dataHolder.getDeploymentModel();\n JobModel jobModel = dataHolder.getJobModel();\n // Priority given for job, then deployment.\n if (jobModel != null && jobModel.isSingleYAML()) {\n outputFileName =\n dataHolder.getOutputDir() + File.separator + extractBalxName(dataHolder.getBalxFilePath()) + YAML;\n } else if (jobModel == null && deploymentModel != null && deploymentModel.isSingleYAML()) {\n outputFileName =\n dataHolder.getOutputDir() + File.separator + extractBalxName(dataHolder.getBalxFilePath()) + YAML;\n \n }\n File newFile = new File(outputFileName);\n // append if file exists\n if (newFile.exists()) {\n Files.write(Paths.get(outputFileName), context.getBytes(StandardCharsets.UTF_8), StandardOpenOption.APPEND);\n return;\n }\n //create required directories\n if (newFile.getParentFile().mkdirs()) {\n Files.write(Paths.get(outputFileName), context.getBytes(StandardCharsets.UTF_8));\n return;\n }\n Files.write(Paths.get(outputFileName), context.getBytes(StandardCharsets.UTF_8));\n }", "public void writeOut(PrintWriter pw){}", "public static void saveAs(String line,String path)\n {\n \ttry (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path), \"utf-8\"))) {//goes to the directory\n \t\n \t\twriter.write(line,0,line.length());//saves the lines starting from 0 till the length of the lines\n \t} catch (Exception x) {\n \t\tx.printStackTrace();\n \t}\n }", "Path getWritePath()\n {\n return writePath;\n }", "private void writeToFiles(Context resultContext) throws IOException {\n\t\tMap<String, Map<Object, ArrayList<Object>>> keyValMappingByBaseOutputPath = resultContext.getKeyValMappingsByBaseOutputPath(); \n\t\t//Write key & value to each baseOutputPath's \n\t\tPath targetOutputDir = null;\n\t\tMap<Object, ArrayList<Object>> keyValMapping = null;\n\t\tPath finalOutputBaseDir = this.config.getFinalOutputDir();\n\t\tfor (String baseOutputPath: keyValMappingByBaseOutputPath.keySet()) {\n\t\t\tif (baseOutputPath.equals(\"\")) {\n\t\t\t\t//Regular output goes into the mapper output buffer directory.\n\t\t\t\ttargetOutputDir = this.config.getMapOutputBufferDir();\n\t\t\t}else {\n\t\t\t\t//Multiple output to a particular outputPath which was \n\t\t\t\t//specified by user goes into the final output directory. \n\t\t\t\ttargetOutputDir = Paths.get(finalOutputBaseDir.toString(), baseOutputPath);\n\t\t\t}\n\t\t\tkeyValMapping = keyValMappingByBaseOutputPath.get(baseOutputPath);\n\t\t\tthis.writeEachMapping(targetOutputDir, keyValMapping);\n\t\t};\n\t}", "public void writer(Vector<String> toWrite, String path) throws IOException {\n file = new File(path);\n fw = new FileWriter(file);\n\n for (int i = 0; i < toWrite.size(); i++) {\n fw.write(toWrite.get(i));\n fw.write('\\n');\n fw.flush();\n }\n }", "protected abstract void writeFile();", "public static void writeToCSV() {\n final String CSV_SEPARATOR = \",\";\n final String QUOTE = \"\\\"\";\n if (!Crawler.getKeyWordsHits().isEmpty()) {\n try (BufferedWriter bufferedWriter =\n new BufferedWriter(\n new OutputStreamWriter(\n new FileOutputStream(\"results.csv\", true), StandardCharsets.UTF_8))) {\n\n Crawler.getKeyWordsHits().forEach((keyWord, hitsNumber) -> {\n String oneLine = QUOTE + keyWord + QUOTE +\n CSV_SEPARATOR +\n hitsNumber;\n try {\n bufferedWriter.write(oneLine);\n bufferedWriter.newLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n String lastLine = QUOTE + Crawler.getUrl() + QUOTE + CSV_SEPARATOR + Crawler.getTotalHits();\n bufferedWriter.write(lastLine);\n bufferedWriter.newLine();\n bufferedWriter.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n Crawler.setKeyWordsHits(new HashMap<>());\n Crawler.setTotalHits(0);\n }", "public static void save(String line)\n {\n \ttry (BufferedWriter writer = Files.newBufferedWriter(path, StandardCharsets.UTF_8)) {\n \t\twriter.write(line,0,line.length());//takes the lines stars from the index 0 and saves till the end\n \t} catch (Exception x) {\n \t\tx.printStackTrace();//prints stack if something is worng\n \t}\n }", "public static void createJsonFile(JsonObject json) throws IOException {\n\r\n FileWriter file = new FileWriter(\"outputfile\", false);\r\n try {\r\n file.write(Jsoner.prettyPrint(json.toJson(),2));\r\n file.flush();\r\n } catch (IOException e) {\r\n out.println(\"Error \" + e);\r\n }\r\n }", "private void writeToFile() throws IOException {\n\t\tFileWriter write = new FileWriter(path);\n\t\tPrintWriter print_line = new PrintWriter(write);\n\t\t\n\t\tEnumeration<String> fd_key_Enum = fileData.keys();\n\t\tEnumeration<String> fd_value_Enum = fileData.elements();\n\t\twhile (fd_key_Enum.hasMoreElements() && fd_value_Enum.hasMoreElements()) {\n\t\t\tprint_line.printf(\"%s\" + \"%n\", fd_key_Enum.nextElement() + \":\" + fd_value_Enum.nextElement());\n\t\t}\n\t\t\n\t\tprint_line.close();\n\t\twrite.close();\n\t}", "private void CreateNewFile() {\n\tcheckState();\n\t\n\tif (CanR=CanW=true)\n\t{\n\t\t\n\t\ttry {\n\t\t root = Environment.getExternalStorageDirectory();\n\t\t \n\t\t if (root.canWrite()){\n\t\t gpxfile = new File(root, \"Speed_SD.csv\");\n\t\t gpxwriter = new FileWriter(gpxfile,true);\n\t\t out = new BufferedWriter(gpxwriter);\nout.append(\"\"+\",\"+\"\"+\",\"+\"\");\n\t\t out.newLine();\n\t\t }\n\t\t} catch (IOException e) {\n\t\t //Log.e(, \"Could not write file \" + e.getMessage());\ne.printStackTrace();\n\t\t\n\t}\n\t\t\n}\n\t\t}", "public void generateOutputFile(String inputFile) {\n\n String outputFile = properties.getProperty(\"output.directory\")\n + properties.getProperty(\"output.file.distinct\");\n\n\n try (PrintWriter out = new PrintWriter(new BufferedWriter(\n new FileWriter(outputFile)))){\n\n loopThroughTokens(out);\n\n\n } catch (FileNotFoundException fileNotFound) {\n fileNotFound.printStackTrace();\n } catch (IOException inputOutputException) {\n inputOutputException.printStackTrace();\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n }", "public static BufferedOutputStream getOutput(Path path) throws IOException {\n return get(Files.newOutputStream(path));\n }", "public static void main(String[] args) throws IOException {\n\r\n\t\t\r\n\t\tString file = \"data/example.txt\";\r\n\t\t\r\n\t\t\r\n\t\t//2. Create object of FileWrite\r\n\t\t\r\n\t\tFileWriter fw = new FileWriter (file);\r\n\t\t\r\n\t\tfw.write(\"This is my example file\");\r\n\t\t\r\n\t\t//3. you have to close the file.\r\n\t\t\r\n\t\tfw.close();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private boolean writeToFile(String message) \n\t{\n\t BufferedWriter writer = null;\n\t boolean status = false;\n\t\ttry {\n\t\t\twriter = new BufferedWriter(new FileWriter(outputFile, true));\n\t\t\twriter.write(\"\\n\"+message);\n\t\t writer.close();\n\t\t status = true;\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error occured in writing output to file: \"+e.getLocalizedMessage());\n\t\t\ttry {\n\t\t\t\tif(writer!=null) {\n\t\t\t\t\twriter.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e1) {\n\t\t\t\tSystem.err.println(\"Error occured in closing filewriter: \"+e1.getLocalizedMessage());\n\t\t\t}\n\t\t\treturn status;\n\t\t}\n\t\treturn status; \n\t \n\t}", "private void saveResourceFile()\r\n\t{\t\r\n\t\tFile file = null;\r\n\t\tFileWriter fw = null;\r\n\t\t//File complete = null;//New file for the completed list\r\n\t\t//FileWriter fw2 = null;//Can't use the same filewriter to do both the end task and the complted products.\r\n\t\ttry{\r\n\t\t\tfile = new File(outFileName);\r\n\t\t\tfile.createNewFile();\r\n\t\t\tfw = new FileWriter(outFileName,true);\r\n\t\t\tfor(FactoryObject object : mFObjects)\r\n\t\t\t{\r\n\t\t\t\tif(object instanceof FactoryReporter) {\r\n\t\t\t\t\t((FactoryReporter)object).report(fw);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.out.println(ioe.getMessage());\r\n\t\t\tif(file != null) {\r\n\t\t\t\tfile.delete();\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif(fw != null) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tfw.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tSystem.out.println(\"Failed to close the filewriter!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void writeFile(String text, String writePath)\r\n\t{\r\n\t\t//Use a filewriter but change it to a buffered writer. Open writing on the file provided by writePath\r\n\t\ttry (BufferedWriter writer = new BufferedWriter(new FileWriter(writePath)))\r\n\t\t{\r\n\t\t\t// Write given text to file\r\n\t\t\twriter.write(text);\t\r\n\t\t} \r\n\t\tcatch (IOException except)\r\n\t\t{\r\n\t\t\texcept.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void writeFile(String content){\n\t\tFile file = new File(filePath);\n\t\t\n\t\tBufferedWriter bw = null;\n\t\t\n\t\ttry{\n\t\t\tif (!file.exists())\n\t\t\t\tfile.createNewFile();\n\t\t\t\n\t\t\tbw = new BufferedWriter(new FileWriter(file));\n\t\t\tbw.write(content);\n\t\t}\n\t\tcatch (Exception oops){\n\t\t\tSystem.err.print(\"There was an error writing the file \"+oops.getStackTrace());\n\t\t}\n\t\tfinally{\n\t\t\ttry{\n\t\t\t\tbw.close();\n\t\t\t}\t\n\t\t\tcatch(IOException oops){\n\t\t\t\tSystem.err.print(\"There was an error closing the write buffer \"+oops.getStackTrace());\n\t\t\t}\n\t\t}\n\t}", "public void writeToFile(String outputName) throws Exception{\n if (trials == null || data == null) throw new Exception(\"Must read marker and data file before writing it out\");\n BufferedWriter bw = new BufferedWriter(new FileWriter(outputName));\n \n //.. write out the headers\n for (int i= FIRSTPROBEINDEX; i < header.length; i++) {\n bw.write(header[i]);\n bw.write(\",\");\n }\n \n //.. write out condition\n bw.write(\"condition\");\n \n bw.write(\"\\n\");\n int rowNum =0;\n \n //.. write out actual data\n for (String [] row : data) {\n if (row.length!= header.length) System.out.println(\"Row has \" + row.length + \" whereas header has \" + header.length);\n String label =null;\n for (int i = FIRSTPROBEINDEX; i < row.length; i++) {\n label = getLabel(rowNum); //.. will be null if it doesn't exist\n \n if (label != null ) {\n bw.write(row[i]);\n bw.write(\",\");\n }\n }\n if (label!=null) {\n //System.out.println(\"Writing \" + getLabel(rowNum));\n String condition = getLabel(rowNum);\n bw.write(condition);\n bw.write(\"\\n\");\n \n //.. this is a hack since my program gives an error if a conditon jsut has one line\n if (condition.equals(\"passed\")) duplicateLastLine(bw, row, condition,20 );\n \n }\n rowNum++;\n }\n \n bw.close();\n }", "public void writeFile(String filename, ArrayList<String> output)\n {\n try\n {\n PrintWriter write = new PrintWriter(filename);\n for(String out : output)\n {\n write.println(out);\n }\n write.close();\n }\n catch(FileNotFoundException exception) \n {\n String error = filename + \" not found\";\n System.out.println(error);\n }\n \n catch(IOException exception) \n {\n String error = \"Unexpected I/O error occured\";\n System.out.println(error); \n } \n }", "public void printDataToFile(){\n\ttry {\n\t File file = new File(\"media/gameOutput.txt\");\n \n\t // if file doesnt exists, then create it\n\t if (!file.exists()) {\n\t\tfile.createNewFile();\n\t }\n \n\t FileWriter fw = new FileWriter(file.getAbsoluteFile());\n\t BufferedWriter bw = new BufferedWriter(fw);\n\t bw.write(printString);\n\t bw.close();\n\t} catch (IOException e) {\n\t e.printStackTrace();\n\t}\n }", "public void writeOutputFile(String inputFilePath) {\n\n String outputFile = properties.getProperty(\"output.dir\") +\n properties.getProperty(\"output.file.token.size\");\n\n PrintWriter writer = null;\n try {\n writer = createOutputFile(outputFile);\n writeTotalsToFile(writer);\n writer.println();\n writer.println();\n writeHistograms(writer);\n } catch (IOException iOE) {\n System.out.println(\"Error Writing to \" + outputFile);\n iOE.printStackTrace();\n } catch (Exception exception) {\n System.out.println(\"General Error\");\n exception.printStackTrace();\n } finally {\n try {\n if (writer != null) {\n writer.close();\n }\n } catch (Exception exception) {\n\n exception.printStackTrace();\n }\n }\n }", "void writeToFile () throws IOException{\n FileWriter deleteFile = new FileWriter(\"Resolved Ticket of \" + this.resovedDate + \".txt\");\n BufferedWriter FileDeleted = new BufferedWriter(deleteFile);\n\n FileDeleted.write(\"Resolution: \" + this.Resolution + \" ; Date: \" + this.resovedDate);\n FileDeleted.close();\n }", "public void writeFile(String OUTPUT_PATH, boolean header) throws IOException {\r\n\t\t\r\n\t\tif(System.getProperty(\"os.name\").contains(\"indows\")) {\r\n\t\t\t// do nothing, hopefully\r\n\t\t} else {\r\n\t\t\tOUTPUT_PATH = OUTPUT_PATH.replace(\"\\\\\", \"/\");\r\n\t\t}\r\n\t\t\r\n\t\tBufferedWriter output = null;\r\n\t\tFile file = new File(OUTPUT_PATH);\r\n\t\toutput = new BufferedWriter(new FileWriter(file));\r\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tif(header == true) {\r\n\t\t\tfor(int i = 0; i < this.fieldNames.length; i++) {\r\n\t\t\t\tsb.append(this.fieldNames[i]);\r\n\t\t\t\tif(i != this.fieldNames.length-1) {\r\n\t\t\t\t\tsb.append(\"\\t\");\r\n\t\t\t\t}\r\n\t\t\t} sb.append(\"\\n\");\r\n\t\t\toutput.write(sb.toString());\r\n\t\t\tsb = new StringBuilder();\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < this.nrow(); i++) {\r\n\t\t\toutput.write(String.join(\"\\t\", this.get(i)) + \"\\n\");\r\n\t\t}\r\n\t\tSystem.out.println(this.nrow());\r\n\t\toutput.close();\r\n\t}" ]
[ "0.7209157", "0.68182474", "0.6045851", "0.6026026", "0.60066426", "0.5917836", "0.5892854", "0.58156013", "0.57768947", "0.5759149", "0.56143475", "0.56056494", "0.558266", "0.55772114", "0.55695826", "0.55376124", "0.5534617", "0.55092055", "0.54988045", "0.5494558", "0.5480817", "0.544774", "0.543302", "0.5430501", "0.54253095", "0.54196453", "0.5402425", "0.54013425", "0.5399362", "0.5381211", "0.53792554", "0.5374203", "0.5338487", "0.5336648", "0.53322995", "0.53238136", "0.5308325", "0.5299755", "0.5297856", "0.529385", "0.52873755", "0.5287185", "0.5279723", "0.5271198", "0.5263972", "0.5260191", "0.5249095", "0.5235857", "0.52251095", "0.5224014", "0.5220329", "0.5216707", "0.5213592", "0.5209926", "0.51747054", "0.5174616", "0.5165919", "0.5160914", "0.5154346", "0.51513684", "0.51496434", "0.51402366", "0.51322186", "0.5127421", "0.5125502", "0.5123898", "0.5119661", "0.51188517", "0.51184833", "0.5117368", "0.51164436", "0.511425", "0.5104626", "0.5098986", "0.50960654", "0.5091806", "0.5082035", "0.50790465", "0.5072302", "0.50712043", "0.5067998", "0.5061132", "0.5054627", "0.50476146", "0.50436616", "0.5040473", "0.50377375", "0.50264806", "0.5020191", "0.5000723", "0.4999714", "0.49936983", "0.49831384", "0.4976791", "0.4976632", "0.49737957", "0.49687967", "0.49643803", "0.49588427", "0.4952557", "0.49524966" ]
0.0
-1
Initialize the contents of the frame.
private void initialize() { frame = new JFrame(); frame.getContentPane().setForeground(Color.LIGHT_GRAY); frame.getContentPane().setFont(new Font("Times New Roman", Font.PLAIN, 16)); frame.setBounds(100, 100, 735, 467); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().setLayout(null); JButton btnGoAhead = new JButton("GO AHEAD"); btnGoAhead.setForeground(Color.BLACK); btnGoAhead.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { Desktop.getDesktop().browse(new URL("https://www.youtube.com/watch?v=eh7lp9umG2I&t=10s").toURI()); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (URISyntaxException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }); btnGoAhead.setFont(new Font("Times New Roman", Font.PLAIN, 21)); btnGoAhead.setBackground(Color.GRAY); btnGoAhead.setBounds(268, 166, 183, 29); frame.getContentPane().add(btnGoAhead); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BreukFrame() {\n super();\n initialize();\n }", "public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}", "public SiscobanFrame() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1100, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tsetUIComponents();\n\t\tsetControllers();\n\n\t}", "private void initialize() {\r\n\t\tthis.setSize(530, 329);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}", "private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\taddSampleData();\n\t\tsetDefaultSettings();\n\t\topenHomePage();\n\t\tframe.setVisible(true);\n\t}", "private void initialize() {\n\t\tframe = new JFrame(\"Media Inventory\");\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1000, 700);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tframeContent = new JPanel();\n\t\tframe.getContentPane().add(frameContent);\n\t\tframeContent.setBounds(10, 10, 700, 640);\n\t\tframeContent.setLayout(null);\n\t\t\n\t\tinfoPane = new JPanel();\n\t\tframe.getContentPane().add(infoPane);\n\t\tinfoPane.setBounds(710, 10, 300, 640);\n\t\tinfoPane.setLayout(null);\n\t}", "private void initialize() {\n\t\tframe = new JFrame(\"BirdSong\");\n\t\tframe.pack();\n\t\tframe.setVisible(true);\n\t\tframe.setBounds(100, 100, 400, 200);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tabc = new BirdPanel();\n\t\ttime = new TimePanel();\n\t\tgetContentPane().setLayout(new BoxLayout(frame, BoxLayout.Y_AXIS));\n\n\t\tframe.getContentPane().add(abc, BorderLayout.NORTH);\n\t\tframe.getContentPane().add(time, BorderLayout.CENTER);\n\t}", "private void initialize() {\r\n\t\tthis.setSize(311, 153);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tsetCancelButton( btnCancel );\r\n\t}", "public Frame() {\n initComponents();\n }", "public Frame() {\n initComponents();\n }", "private void initialize() {\r\n\t\tthis.setSize(497, 316);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tthis.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "protected HFrame(){\n\t\tinit();\n\t}", "private void initializeFields() {\r\n myFrame = new JFrame();\r\n myFrame.setSize(DEFAULT_SIZE);\r\n }", "private void initialize() {\n\t\tthis.setSize(329, 270);\n\t\tthis.setContentPane(getJContentPane());\n\t}", "private void initialize() {\r\n\t\t//setFrame\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(125,175, 720, 512);\r\n\t\tframe.setTitle(\"Periodic Table\");\r\n\t\tframe.setResizable(false);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initFrame() {\n setLayout(new BorderLayout());\n }", "private void initialize() {\n\t\tthis.setSize(300, 300);\n\t\tthis.setIconifiable(true);\n\t\tthis.setClosable(true);\n\t\tthis.setTitle(\"Sobre\");\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setFrameIcon(new ImageIcon(\"images/16x16/info16x16.gif\"));\n\t}", "public FrameControl() {\n initComponents();\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "public MainFrame() {\n initComponents();\n \n }", "private void init(Element frame) {\n\t\tthis.frameWidth = Integer.parseInt(frame.attributeValue(\"width\"));\n\t\tthis.frameHeight = Integer.parseInt(frame.attributeValue(\"height\"));\n\t\tthis.paddle = Integer.parseInt(frame.attributeValue(\"paddle\"));\n\t\tthis.size = Integer.parseInt(frame.attributeValue(\"size\"));\n\t}", "public MainFrame() {\n \n initComponents();\n \n this.initNetwork();\n \n this.render();\n \n }", "public internalFrame() {\r\n initComponents();\r\n }", "private void initialize() {\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setSize(810, 600);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n\t\tthis.setModal(true);\n\t\tthis.setResizable(false);\n\t\tthis.setName(\"FramePrincipalLR\");\n\t\tthis.setTitle(\"CR - Lista de Regalos\");\n\t\tthis.setLocale(new java.util.Locale(\"es\", \"VE\", \"\"));\n\t\tthis.setUndecorated(false);\n\t}", "public Mainframe() {\n initComponents();\n }", "private void initialize() {\r\n\t\tthis.setSize(392, 496);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"Informações\");\r\n\t}", "private void initialize() {\n this.setSize(253, 175);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setContentPane(getJContentPane());\n this.setTitle(\"Breuken vereenvoudigen\");\n }", "private void initialize() {\r\n\t\t// Initialize main frame\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(Constants.C_MAIN_PREFERED_POSITION_X_AT_START, Constants.C_MAIN_PREFERED_POSITION_Y_AT_START, \r\n\t\t\t\tConstants.C_MAIN_PREFERED_SIZE_X, Constants.C_MAIN_PREFERED_SIZE_Y);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.setTitle(Constants.C_MAIN_WINDOW_TITLE);\r\n\t\t\r\n\t\t// Tab panel and their panels\r\n\t\tmainTabbedPane = new JTabbedPane(JTabbedPane.TOP);\r\n\t\tframe.getContentPane().add(mainTabbedPane, BorderLayout.CENTER);\r\n\t\t\r\n\t\tpanelDecision = new DecisionPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_DECISION_TITLE, null, panelDecision, null);\r\n\t\t\r\n\t\tpanelCalculation = new CalculationPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_CALCULATION_TITLE, null, panelCalculation, null);\r\n\t\t\r\n\t\tpanelLibrary = new LibraryPanel();\r\n\t\tmainTabbedPane.addTab(Constants.C_TAB_LIBRARY_TITLE, null, panelLibrary, null);\r\n\t\t\r\n\t\t// Menu bar\r\n\t\tmenuBar = new JMenuBar();\r\n\t\tframe.setJMenuBar(menuBar);\r\n\t\tcreateMenus();\r\n\t}", "public void initializeFrame() {\n frame.getContentPane().removeAll();\n createComponents(frame.getContentPane());\n// frame.setSize(new Dimension(1000, 600));\n }", "private void initialize() {\r\n\t\t// this.setSize(271, 295);\r\n\t\tthis.setSize(495, 392);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(ResourceBundle.getBundle(\"Etiquetas\").getString(\"MainTitle\"));\r\n\t}", "private void initializeFrame() {\n add(container);\n setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n pack();\n }", "private void initialize() {\n this.setSize(300, 200);\n this.setContentPane(getJContentPane());\n this.pack();\n }", "private void initialize() {\n\t\tframe = new JFrame(\"DB Filler\");\n\t\tframe.setBounds(100, 100, 700, 500);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tdbc = new DataBaseConnector();\n\t\tcreateFileChooser();\n\n\t\taddTabbedPane();\n\t\tsl_panel = new SpringLayout();\n\t\taddAddFilePanel();\n\t}", "public mainframe() {\n initComponents();\n }", "public FrameDesign() {\n initComponents();\n }", "public Jframe() {\n initComponents();\n setIndice();\n loadTextBoxs();\n }", "public JGSFrame() {\n\tsuper();\n\tinitialize();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n initComponents();\n }", "public MainFrame() {\n try {\n initComponents();\n initElements();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error \" + e.getMessage());\n }\n }", "private void initialize() {\n this.setSize(495, 276);\n this.setTitle(\"Translate Frost\");\n this.setContentPane(getJContentPane());\n }", "private void initialize() {\r\n\t\t// set specific properties and add inner components.\r\n\t\tthis.setBorder(BorderFactory.createEtchedBorder());\r\n\t\tthis.setSize(300, 400);\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\taddComponents();\r\n\t}", "private void initialize() {\r\n\t\tthis.setBounds(new Rectangle(0, 0, 670, 576));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"数据入库 \");\r\n\t\tthis.setLocationRelativeTo(getOwner());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "public void initializePanelToFrame() {\n\t\tnew ColorResources();\n\t\tnew TextResources().changeLanguage();\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setPreferredSize(new Dimension(375, 812));\n\n\t\tconfigureLabels();\n\t\tconfigureButtons();\n\t\taddListeners();\n\t\taddComponentsToPanel();\n\n\t\tthis.setContentPane(panel);\n\t\tthis.pack();\n\t}", "private void initialize() {\n this.setLayout(new BorderLayout());\n this.setSize(new java.awt.Dimension(564, 229));\n this.add(getMessagePanel(), java.awt.BorderLayout.NORTH);\n this.add(getBalloonSettingsListBox(), java.awt.BorderLayout.CENTER);\n this.add(getBalloonSettingsButtonPane(), java.awt.BorderLayout.SOUTH);\n\n editBalloonSettingsFrame = new EditBalloonSettingsFrame();\n\n }", "public SMFrame() {\n initComponents();\n updateComponents();\n }", "private void initialize() {\n m_frame = new JFrame(\"Video Recorder\");\n m_frame.setResizable(false);\n m_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n m_frame.setLayout(new BorderLayout());\n m_frame.add(buildContentPanel(), BorderLayout.CENTER);\n\n JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 5, 5));\n JButton startButton = new JButton(\"Start\");\n startButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent ae) {\n listen();\n }\n });\n buttonPanel.add(startButton);\n\n m_connectionLabel = new JLabel(\"Disconnected\");\n m_connectionLabel.setOpaque(true);\n m_connectionLabel.setBackground(Color.RED);\n m_connectionLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 3));\n m_connectionLabel.setPreferredSize(new Dimension(100, 26));\n m_connectionLabel.setHorizontalAlignment(SwingConstants.CENTER);\n buttonPanel.add(m_connectionLabel);\n\n m_frame.add(buttonPanel, BorderLayout.PAGE_END);\n }", "public FirstNewFrame() {\n\t\tjbInit();\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Play\");\n\t\tbtnNewButton.setFont(new Font(\"Bodoni 72\", Font.BOLD, 13));\n\t\tbtnNewButton.setBounds(frame.getWidth() / 2 - 60, 195, 120, 30);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Space Escape\");\n\t\tlblNewLabel.setForeground(Color.WHITE);\n\t\tlblNewLabel.setFont(new Font(\"Bodoni 72\", Font.BOLD, 24));\n\t\tlblNewLabel.setBounds(frame.getWidth() / 2 - 60, 30, 135, 25);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"New label\");\n\t\tlblNewLabel_1.setBounds(0, 0, frame.getWidth(), frame.getHeight());\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t}", "private void initializeFrame()\r\n\t{\r\n\t\tthis.setResizable(false);\r\n\r\n\t\tsetSize(DIMENSIONS); // set the correct dimensions\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetLayout( new GridLayout(1,1) );\r\n\t}", "private void setupFrame()\n\t{\n\t\tthis.setContentPane(botPanel);\n\t\tthis.setSize(800,700);\n\t\tthis.setTitle(\"- Chatbot v.2.1 -\");\n\t\tthis.setResizable(true);\n\t\tthis.setVisible(true);\n\t}", "public MainFrame() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public EmulatorFrame() {\r\n\t\tsuper(\"Troyboy Chip8 Emulator\");\r\n\t\t\r\n\t\tsetNativeLAndF();\r\n\t\tinitComponents();\r\n\t\tinitMenubar();\r\n\t\tsetupLayout();\r\n\t\tinitFrame();\r\n\t\t//frame is now ready to run a game\r\n\t\t//running of any games must be started by loading a ROM\r\n\t}", "public void init()\n {\n buildUI(getContentPane());\n }", "private void initialize()\n {\n this.setTitle( \"SerialComm\" ); // Generated\n this.setSize( 500, 300 );\n this.setContentPane( getJContentPane() );\n }", "public launchFrame() {\n \n initComponents();\n \n }", "private void initialize() {\r\n\t\tthis.setSize(378, 283);\r\n\t\tthis.setJMenuBar(getMenubar());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JAVIER\");\r\n\t}", "private void initialize() {\n\t\tthis.setSize(430, 280);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setUndecorated(true);\n\t\tthis.setModal(true);\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setTitle(\"Datos del Invitado\");\n\t\tthis.addComponentListener(this);\n\t}", "public PilaFrame() {\n initComponents();\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 900, 900);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tgame = new Game();\n\t\t\n\t\tGameTable puzzle = new GameTable(game.getPuzzle());\n\t\tpuzzle.setBounds(100, 100, 700, 700);\n\t\t\n\t\tframe.add(puzzle);\n\t\t\n\t\tSystem.out.println(\"SAD\");\n\t\t\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setResizable(false);\r\n\t\tframe.setBounds(100, 100, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tPanel mainFramePanel = new Panel();\r\n\t\tmainFramePanel.setBounds(10, 10, 412, 235);\r\n\t\tframe.getContentPane().add(mainFramePanel);\r\n\t\tmainFramePanel.setLayout(null);\r\n\t\t\r\n\t\tfinal TextField textField = new TextField();\r\n\t\ttextField.setBounds(165, 62, 79, 24);\r\n\t\tmainFramePanel.add(textField);\r\n\t\t\r\n\t\tButton changeTextButt = new Button(\"Change Text\");\r\n\t\tchangeTextButt.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\ttextField.setText(\"Domograf\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tchangeTextButt.setBounds(165, 103, 79, 24);\r\n\t\tmainFramePanel.add(changeTextButt);\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setResizable(false);\n\t\tframe.setAlwaysOnTop(true);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t}", "StudentFrame() {\n \tgetContentPane().setFont(new Font(\"Times New Roman\", Font.PLAIN, 11));\n s1 = null; // setting to null\n initializeComponents(); // causes frame components to be initialized\n }", "private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setTitle(\"Error\");\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "public NewFrame() {\n initComponents();\n }", "public SerialCommFrame()\n {\n super();\n initialize();\n }", "public LoginFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public BaseFrame() {\n initComponents();\n }", "private void initialize() {\r\n\t\tthis.setSize(733, 427);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"jProxyChecker\");\r\n\t}", "public frame() {\r\n\t\tadd(createMainPanel());\r\n\t\tsetTitle(\"Lunch Date\");\r\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\r\n\r\n\t}", "public MercadoFrame() {\n initComponents();\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 800, 800);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJPanel browserPanel = new JPanel();\n\t\tframe.getContentPane().add(browserPanel, BorderLayout.CENTER);\n\t\t\n\t\t// create javafx panel for browser\n browserFxPanel = new JFXPanel();\n browserPanel.add(browserFxPanel);\n \n // create JavaFX scene\n Platform.runLater(new Runnable() {\n public void run() {\n createScene();\n }\n });\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(X_FRAME, Y_FRAME, WIDTH_FRAME, HEIGHT_FRAME);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJButton btnAddSong = new JButton(\"Add song\");\r\n\t\tbtnAddSong.setBounds(X_BTN, Y_ADDSONG, WIDTH_BTN, HEIGHT_BTN);\r\n\t\tframe.getContentPane().add(btnAddSong);\r\n\t\t\r\n\t\tJTextPane txtpnBlancoYNegro = new JTextPane();\r\n\t\ttxtpnBlancoYNegro.setText(\"Blanco y negro\\r\\nThe Spectre\\r\\nGirasoles\\r\\nFaded\\r\\nTu Foto\\r\\nEsencial\");\r\n\t\ttxtpnBlancoYNegro.setBounds(X_TXT, Y_TXT, WIDTH_TXT, HEIGHT_TXT);\r\n\t\tframe.getContentPane().add(txtpnBlancoYNegro);\r\n\t\t\r\n\t\tJLabel lblSongs = new JLabel(\"Songs\");\r\n\t\tlblSongs.setBounds(X_LBL, Y_LBL, WIDTH_LBL, HEIGHT_LBL);\r\n\t\tframe.getContentPane().add(lblSongs);\r\n\t\t\r\n\t\tJButton btnAddAlbum = new JButton(\"Add album\");\r\n\t\tbtnAddAlbum.setBounds(X_BTN, Y_ADDALBUM, WIDTH_BTN, HEIGHT_BTN);\r\n\t\tframe.getContentPane().add(btnAddAlbum);\r\n\t}", "public holdersframe() {\n initComponents();\n }", "public void init() {\n\t\tsetSize(500,300);\n\t}", "private void setupFrame()\n\t\t{\n\t\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\tthis.setResizable(false);\n\t\t\tthis.setSize(800, 600);\n\t\t\tthis.setTitle(\"SEKA Client\");\n\t\t\tthis.setContentPane(panel);\n\t\t\tthis.setVisible(true);\n\t\t}", "public addStFrame() {\n initComponents();\n }", "public JFrame() {\n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "private void initialize() {\n\t\tframe = new JFrame(\"View Report\");\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\n\t\tJButton backButton = new JButton(\"Back\");\n\t\tbackButton.setBounds(176, 227, 89, 23);\n\t\tframe.getContentPane().add(backButton);\n\t\tbackButton.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tframe.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\tJTextArea textArea = new JTextArea();\n\t\ttextArea.setBounds(50, 30, 298, 173);\n\t\tframe.getContentPane().add(textArea);\n\t\ttextArea.append(control.seeReport());\n\t\tframe.setVisible(true);\n\t}", "private void initialize() {\r\n this.setSize(new Dimension(666, 723));\r\n this.setContentPane(getJPanel());\r\n\t\t\t\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblSubmission = new JLabel(\"Submission\");\n\t\tlblSubmission.setForeground(Color.WHITE);\n\t\tlblSubmission.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 16));\n\t\tlblSubmission.setBounds(164, 40, 83, 14);\n\t\tframe.getContentPane().add(lblSubmission);\n\t\t\n\t\tJLabel lblTitle = new JLabel(\"Title:\");\n\t\tlblTitle.setForeground(Color.WHITE);\n\t\tlblTitle.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tlblTitle.setBounds(77, 117, 41, 14);\n\t\tframe.getContentPane().add(lblTitle);\n\t\t\n\t\tJLabel lblPath = new JLabel(\"Path:\");\n\t\tlblPath.setForeground(Color.WHITE);\n\t\tlblPath.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tlblPath.setBounds(85, 155, 33, 14);\n\t\tframe.getContentPane().add(lblPath);\n\t\t\n\t\ttitle = new JTextField();\n\t\ttitle.setBounds(128, 116, 197, 20);\n\t\tframe.getContentPane().add(title);\n\t\ttitle.setColumns(10);\n\t\t\n\t\tpath = new JTextField();\n\t\tpath.setBounds(128, 154, 197, 20);\n\t\tframe.getContentPane().add(path);\n\t\tpath.setColumns(10);\n\t\t\n\t\tbtnSubmit = new JButton(\"Submit\");\n\t\tbtnSubmit.setBackground(Color.BLACK);\n\t\tbtnSubmit.setForeground(Color.WHITE);\n\t\tbtnSubmit.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 14));\n\t\tbtnSubmit.setBounds(158, 210, 89, 23);\n\t\tframe.getContentPane().add(btnSubmit);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tframe.setVisible(true);\n\t}", "public void init() {\r\n\t\t\r\n\t\tsetSize(WIDTH, HEIGHT);\r\n\t\tColor backgroundColor = new Color(60, 0, 60);\r\n\t\tsetBackground(backgroundColor);\r\n\t\tintro = new GImage(\"EvilMehranIntroGraphic.png\");\r\n\t\tintro.setLocation(0,0);\r\n\t\tadd(intro);\r\n\t\tplayMusic(new File(\"EvilMehransLairThemeMusic.wav\"));\r\n\t\tinitAnimationArray();\r\n\t\taddKeyListeners();\r\n\t\taddMouseListeners();\r\n\t\twaitForClick();\r\n\t\tbuildWorld();\r\n\t}", "public FrameIntroGUI() {\n\t\ttry {\n\t\t\tjbInit();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void initialize() {\n\t\tthis.setBounds(100, 100, 950, 740);\n\t\tthis.setLayout(null);\n\n\t\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblCoisa = new JLabel(\"Coisa\");\n\t\tlblCoisa.setBounds(10, 11, 46, 14);\n\t\tframe.getContentPane().add(lblCoisa);\n\t\t\n\t\ttextField = new JTextField();\n\t\ttextField.setBounds(39, 8, 86, 20);\n\t\tframe.getContentPane().add(textField);\n\t\ttextField.setColumns(10);\n\t}", "private void initialize() {\n\t\tthis.setExtendedState(Frame.MAXIMIZED_BOTH);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setResizable(true);\n\t\tthis.screenDimensions = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tthis.getContentPane().setLayout(new BorderLayout());\n\t\t// Initialize SubComponents and GUI Commands\n\t\tthis.initializeSplitPane();\n\t\tthis.initializeExplorer();\n\t\tthis.initializeConsole();\n\t\tthis.initializeMenuBar();\n\t\tthis.pack();\n\t\tthis.hydraExplorer.refreshExplorer();\n\t}" ]
[ "0.77704835", "0.75652915", "0.7442664", "0.7369101", "0.7366378", "0.7358479", "0.73146075", "0.73096764", "0.72987294", "0.72978777", "0.7278321", "0.72729623", "0.7269468", "0.7269468", "0.7215727", "0.7180792", "0.71682984", "0.7140954", "0.7140953", "0.7126852", "0.7107974", "0.7100368", "0.7092515", "0.708178", "0.70652425", "0.70630395", "0.70621413", "0.7060283", "0.70517516", "0.7043992", "0.6996167", "0.6978269", "0.6971387", "0.6956391", "0.6938475", "0.6929829", "0.6929629", "0.69251114", "0.6921989", "0.6920365", "0.6914633", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.6911002", "0.69020075", "0.68911743", "0.6886017", "0.6873457", "0.6870402", "0.68686837", "0.68669385", "0.686311", "0.68616706", "0.68552315", "0.68537515", "0.681551", "0.68141145", "0.68094325", "0.67992085", "0.67930394", "0.6782133", "0.6765297", "0.6748138", "0.6731745", "0.6716807", "0.6711878", "0.6706194", "0.6697453", "0.6692831", "0.66927665", "0.6689213", "0.66724384", "0.66606426", "0.664954", "0.6642464", "0.6640775", "0.6638488", "0.663824", "0.663545", "0.66264987", "0.6625419", "0.6611392", "0.6608291", "0.6600817", "0.66005784", "0.6591052", "0.65869486", "0.65862876", "0.65753394", "0.6575285", "0.6570335", "0.655961" ]
0.0
-1
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPACES);\n }", "private String toIndentedString(Object o)\n/* */ {\n/* 128 */ if (o == null) {\n/* 129 */ return \"null\";\n/* */ }\n/* 131 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }", "private String toIndentedString( Object o )\n {\n if ( o == null )\n {\n return \"null\";\n }\n return o.toString().replace( \"\\n\", \"\\n \" );\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }" ]
[ "0.78847593", "0.75493765", "0.74971926", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168" ]
0.0
-1
TODO Autogenerated method stub
@Override public void myWork() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
this you'll need to index into the commandline array of Strings.
public static void main(String[] args) { System.out.println("args[0] = " + args[0]); System.out.println("args[1] = " + args[1]); System.out.println("args[2] = " + args[2]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] strings) {\n }", "protected abstract String[] getExecString();", "public static void main(String[] args)\n {\n cmdLineArgs = args;\n }", "public static void main(String arg[]) {\n\n }", "public static void main(String[ ] argv) {\n if(argv.length == 0){\n System.out.printf(\"sem argumentos!\\n\");\n }\n\n else{\n System.out.println (\"\\nmostrando o array \\n\");\n \n \n for(int i = 0;i < argv.length;i++){\n System.out.printf(\"\\narray na posiçao: %d eh %s\\n \",i+1,argv[i]);\n \n }\n System.out.printf(\"\\ntotal do array: %d\\n\",argv.length);\n}\n \n }", "public static void main(String[] args){\n\t\tSystem.out.println(\"main with String[]\");\n\t\t}", "java.lang.String getArgs(int index);", "java.lang.String getArgs(int index);", "java.lang.String getArgs(int index);", "ImmutableList<String> mainArgs();", "public String[] toArray()\n {\n return m_commandLine;\n }", "public static void main(String argv[]) {\n\n\n\n\t}", "public String[] getOptions() {\n return argv;\n }", "public static void main(String[] argv){\n\t}", "public static void main(String...strings){\n\t}", "final String[] args() {\n return args;\n }", "public java.lang.String getArgs(int index) {\n return args_.get(index);\n }", "public java.lang.String getArgs(int index) {\n return args_.get(index);\n }", "public java.lang.String getArgs(int index) {\n\t\t\t\treturn args_.get(index);\n\t\t\t}", "private String[] getArgs()\n {\n return cmd.getArgs();\n }", "public java.lang.String getArgs(int index) {\n\t\t\treturn args_.get(index);\n\t\t}", "public static void main(String[] args) {\n\n\t\tString myStrings[] = { \"Apple\", \"Orange\", \"Lemon\" };\n\n\t\tSystem.out.println(myStrings[0]);\n\t\tSystem.out.println(myStrings[1]);\n\t\tSystem.out.println(myStrings[2]);\n\n\t\tString[] newArray = new String[10]; // (0 to 9) I can add 10 array value\n\n\t\tSystem.out.println(\"\\n\");\n\n\t\tnewArray[0] = \"Zero\";\n\t\tnewArray[1] = \"One\";\n\t\tnewArray[2] = \"Two\";\n\t\tnewArray[3] = \"Three\";\n\n\t\tSystem.out.println(newArray[0]);\n\t\tSystem.out.println(newArray[1]);\n\t\tSystem.out.println(newArray[2]);\n\t\tSystem.out.println(newArray[3]);\n\n\t}", "ListProperty<String> getCommandLine();", "public static void main(String[] args) {\nSystem.out.println(\"you passed...\"+args.length);\r\nfor(int i=0;i<args.length;i++)\r\n{\r\n\tSystem.out.println(\"data is\"+args[i]);\r\n}\r\n\t}", "public static void main(String[] args) {\n\t\tloopThroughListOfStrings(Arrays.asList(\"appl\",\"apple\", \"mango-apple\",\"grapes\",\"watermelon\",\"pine-apple\",\"banana\"));\n\t\t\n\n\t}", "public java.lang.String getArgs(int index) {\n return args_.get(index);\n }", "public java.lang.String getArgs(int index) {\n return args_.get(index);\n }", "public static void main(String... argv) throws Exception {\n }", "public static void main(String[] args, String value) {\n }", "protected abstract String getCommandLine() throws ConfigException;", "public String[] readCommand();", "public static void main(String[] args) {\n \targuments = args;\n launch(args);\n }", "public static void main (String[] args) {\n\t\r\n\t\tString[] StringArray = {\"Ryan\", \"Paul\", \"\", \"\", \"Patrick\"};\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(StringArray.length);\r\n\t\tSystem.out.println(StringArray);\r\n\t\tSystem.out.println(StringArray[0]);\r\n\t}", "public static void main(String... argv) throws IOException {\n String[] lines = new String[0];\n lines = Files.lines(Paths.get(argv[0])).collect(Collectors.toList()).toArray(lines);\n Main main = new Main(lines);\n }", "public static void main(String[] args) {\n String[] motor = {\"Honda\",\"Yamaha\",\"Suzuki\"};\n System.out.println(motor[0]);\n System.out.println(motor[1]);\n System.out.println(motor[2]);\n }", "@Override\n protected String[] getArguments() {\n String[] args = new String[1];\n args[0] = _game_file_name;\n return args;\n }", "public static void main(String[] args) {\n\t\tString[] str=new String[10];\n\t\t//extracting substring from a string\n\t\tString subStr= str[9].substring(2,5);\n\t\t//displaying the output\n\t\tSystem.out.println(subStr);\n\n\t}", "public static void main(String ar[]) {\n }", "private static String viewCommand(String[] commandLineArguments) {\n \t\t// TODO Auto-generated method stub\n \t\treturn null;\n \t}", "public Main(String[] commandLineArgs) {\n\t\tint claLength = commandLineArgs.length;\n\t\tif (claLength == 0) {\n\t\t\thelp();\n\t\t} else {\n\t\t\tcommand = commandLineArgs[0];\n\t\t\tif (claLength >= 2) {\n\t\t\t\targuments = Arrays.asList(commandLineArgs).subList(1, commandLineArgs.length - 1);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String args[]) {}", "public static void main(String args[]) {}", "public static void main(String args[]) {}", "Optional<String> commandLine();", "void main(CommandLine cmd);", "public static void showArgs(String[] asArgs)\n {\n out();\n int cArgs = asArgs.length;\n out(cArgs + \" command line arguments:\");\n for (int i = 0; i < cArgs; ++i)\n {\n out(\"[\" + i + \"]=\\\"\" + asArgs[i] + \"\\\"\");\n }\n out();\n }", "public CommandLineBuilder()\n {\n m_commandLine = new String[0];\n }", "private Main(String... arguments) {\n this.operations = new ArrayDeque<>(List.of(arguments));\n }", "public static HashMap<String, String> pareseCLI(String[] args){\n\t\tif(args.length % 2 != 0){\t// There are no commands that take more than one argument, so if the arguments are odd, then there is a problem\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tHashMap<String, String> output = new HashMap<String, String>();\n\t\tfor(int i = 0; i < args.length; i += 2){\n\t\t\tif(args[i].charAt(0) != '-'){ \n\t\t\t\treturn null;\n\t\t\t}\n\t\t\toutput.put(args[i].substring(1), args[i + 1]);\n\t\t}\n\t\treturn output;\n\t}", "public static void main(String args[]) {\n\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\tString[] s_r = new String[] {\"foo \",\"hello\",\"bar\",\"world\"};\n\t\t\n\t\tSystem.out.println(s_r[0] + s_r[2]);\n\t}", "public static void main(String[] args) /*\n\n\tYou can actually use the array of strings in your program\n\t\tBelow is a program that expects three string arguments\n\t\tThe arguments are taken initially as strings, but you can use the parse methods to get numbers if needed\n\n\t*/", "public static void displayInput(final String[] commandLineArguments){ \n \t \n \t int length = commandLineArguments.length;\n \t String output = \"\";\n \t \n \t for(int i = 0; i < length; i++){\n \t\t output += commandLineArguments[i];\n \t\t output += \" \";\n \t }\n \t \n \t System.out.println(output);\n }", "public static void ToolChecker(String[] args) {\n\t\tString string=\"hello.moto\";\r\n\t\tSystem.out.println(string.split(\".\"));\r\n\t}", "public static void main(String[] args) {\n\t\tRuntimeMXBean bean = ManagementFactory.getRuntimeMXBean();\n\t\tList<String> aList = bean.getInputArguments();\n\n\t\tfor (int i = 0; i < aList.size(); i++) {\n\t\t\tSystem.out.println(aList.get(i));\n\t\t}\n\t}", "private String parseArgs(String args[])\n {\n String fpath = null;\n \n for (String arg : args)\n {\n if (arg.startsWith(\"-\"))\n {\n // TODO: maybe add something here.\n }\n else // expect a filename.\n {\n fpath = arg;\n }\n }\n \n return fpath;\n }", "public static void main(String[] args){\n cmd = args;\r\n init(cmd);\r\n }", "public static void main(String args[])\r\n {\n }", "public static void main(String args[]) { \r\n }", "public static String[] getInput(String[] args){\n if(args.length == 2){\n File f = new File(args[1]);\n try{\n List<String> in = new ArrayList<>();\n BufferedReader reader = new BufferedReader(new FileReader(f));\n String line;\n while( (line = reader.readLine())!= null){\n line.replaceAll(\"\\n\",\"\");\n line.replaceAll(\"\\r\\n\", \"\");\n line.trim();\n String[] words = line.split(\" \");\n in.addAll(Arrays.asList(words));\n }\n String[] ret = new String[in.size()];\n in.toArray(ret);\n return ret;\n }catch (Exception ex){\n }\n }\n List<String> argList = new ArrayList<>(Arrays.asList(args));\n argList.remove(0);\n args = new String[argList.size()];\n argList.toArray(args);\n return args;\n }", "private void scanArgs(String [] args)\n{\n for (int i = 0; i < args.length; ++i) {\n if (args[i].startsWith(\"-\")) {\n\t badArgs();\n }\n else badArgs();\n }\n}", "public static void main(String ar[]){\n }", "Optional<String[]> arguments();", "private static String[] processArgs(String[] args) {\r\n if (args.length == 0) {\r\n args = new String[1];\r\n args[0] = config.getProperty(ConfigParam.inputTrace.name());\r\n System.out.println(\"Args:\"+args[0]);\r\n } else if (args.length > 1) {\r\n System.out.println(\"Usage: [Trace_File]\");\r\n System.out.println(\"Example: ./traces/fdct_trace_without_optimization.txt\");\r\n System.out.println(\"If no arguments are given, the trace file defined in \" +\r\n configFile + \" is used.\");\r\n System.exit(1);\r\n }\r\n\r\n return args;\r\n }", "@Override\r\n public String[] extractCommandLineValues(String inputLine) {\r\n String strippedLine = inputLine.strip();\r\n String[] tokens = strippedLine.split(\" \", -1);\r\n int flagIndex = findFlagIndex(tokens);\r\n\r\n String[] argumentTokens = Arrays.copyOfRange(tokens, 1, flagIndex);\r\n String[] flagTokens = Arrays.copyOfRange(tokens, flagIndex + 1, tokens.length);\r\n\r\n String argumentValue = String.join(\" \", argumentTokens);\r\n String flagValue = String.join(\" \", flagTokens);\r\n\r\n return new String[] {argumentValue, flagValue};\r\n }", "public static void main(String args[]){\n }", "public static void main(String args[]){\n }", "public static void main(String args[]){\n }", "public static void main(String args[]){\n }", "public static void main(String args[]){\n }", "public static void main(String args[]){\n }", "public void processArgs(String[] args){\n\t\tPattern pat = Pattern.compile(\"-[a-z]\");\n\t\tString useqVersion = IO.fetchUSeqVersion();\n\t\tSystem.out.println(\"\\n\"+useqVersion+\" Arguments: \"+ Misc.stringArrayToString(args, \" \") +\"\\n\");\n\t\tfor (int i = 0; i<args.length; i++){\n\t\t\tString lcArg = args[i].toLowerCase();\n\t\t\tMatcher mat = pat.matcher(lcArg);\n\t\t\tif (mat.matches()){\n\t\t\t\tchar test = args[i].charAt(1);\n\t\t\t\ttry{\n\t\t\t\t\tswitch (test){\n\t\t\t\t\tcase 'r': bedFile = new File(args[++i]); break;\n\t\t\t\t\tcase 's': saveDirectory = new File(args[++i]); break;\n\t\t\t\t\tcase 'c': haploArgs = args[++i]; break;\n\t\t\t\t\tcase 't': numberConcurrentThreads = Integer.parseInt(args[++i]); break;\n\t\t\t\t\tdefault: Misc.printErrAndExit(\"\\nProblem, unknown option! \" + mat.group());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Exception e){\n\t\t\t\t\tMisc.printErrAndExit(\"\\nSorry, something doesn't look right with this parameter: -\"+test+\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//check save dir\n\t\tif (saveDirectory == null) Misc.printErrAndExit(\"\\nError: cannot find your save directory!\\n\"+saveDirectory);\n\t\tsaveDirectory.mkdirs();\n\t\tif (saveDirectory.isDirectory() == false) Misc.printErrAndExit(\"\\nError: your save directory does not appear to be a directory?\\n\");\n\n\t\t//check bed\n\t\tif (bedFile == null || bedFile.canRead() == false) Misc.printErrAndExit(\"\\nError: cannot find your bed file of regions to interrogate?\\n\"+bedFile);\n\t\t\n\t\t//check args\n\t\tif (haploArgs == null) Misc.printErrAndExit(\"\\nError: please provide a gatk haplotype caller launch cmd similar to the following where you \"\n\t\t\t\t+ \"replace the $xxx with the correct path to these resources on your system:\\n'java -Xmx4G -jar $GenomeAnalysisTK.jar -T \"\n\t\t\t\t+ \"HaplotypeCaller -stand_call_conf 5 -stand_emit_conf 5 --min_mapping_quality_score 13 -R $fasta --dbsnp $dbsnp -I $bam'\\n\");\n\t\tif (haploArgs.contains(\"~\") || haploArgs.contains(\"./\")) Misc.printErrAndExit(\"\\nError: full paths in the GATK command.\\n\"+haploArgs);\n\t\tif (haploArgs.contains(\"-o\") || haploArgs.contains(\"-L\")) Misc.printErrAndExit(\"\\nError: please don't provide a -o or -L argument to the cmd.\\n\"+haploArgs);\t\n\t\n\t\t//determine number of threads\n\t\tdouble gigaBytesAvailable = ((double)Runtime.getRuntime().maxMemory())/ 1073741824.0;\n\t\t\n\t\n\t}", "public String[] getRuntimeProgramArguments(IPath configPath, boolean debug, boolean starting);", "public static void main (String args[]) {\n\t\t\n }", "public static void main(String Args[]) {\r\n\t\r\n\t}", "public static void main(String[] args) {\n\n\n }", "public static void main(String[] args) {\n\n\n }", "public static void main(String[] args) {\n\n\n }", "public static void main(String[] args) {\n\n\n }", "public static void main(String[] args) {\n\n\n }", "public static void main(String[] args) {\n\n\n }", "public static void main(String[] args) {\n\n\n }", "public static void main(String[] args) {\n\n\n }", "public static void main(String[] args) {\n\n\n }", "public static void main(String[] args) {\n\n\n }", "private List<String> buildCommandLine()\n {\n List<String> commandLine = new ArrayList<String>();\n\n if (executable == null)\n {\n throw new CargoException(\"Java executable not set\");\n }\n commandLine.add(executable);\n\n commandLine.addAll(jvmArguments);\n commandLine.addAll(systemProperties);\n\n if (classpath != null && jarPath == null)\n {\n commandLine.add(\"-classpath\");\n commandLine.add(classpath);\n }\n\n if (jarPath != null)\n {\n commandLine.add(\"-jar\");\n commandLine.add(jarPath);\n }\n\n if (jarPath == null)\n {\n commandLine.add(mainClass);\n }\n commandLine.addAll(applicationArguments);\n\n return commandLine;\n }", "public static void main(String[] args) {\n\n\n\n }", "public static void main(String[] args) {\n\n\n\n }", "public static void main(String[] args) {\n\n\n\n }", "public static void main(String[] args) {\n \n\n if (args.length > 0) {\n System.out.println(\"Hello \" + args[1]);\n } else {\n \n //args[0] or any number will exception in main - java.lang.ArrayIndexOutOfBoundsException\n //System.out.println(\"args is 0\" + args[1]);\n System.out.println(\"args is 0 \" + args.length);\n }\n\n }", "public static void main(String args[]) {\n }", "public static void main(String args[]) {\n }", "public static void main(String args[]) {\n }", "public static void main(String[] args){\n\n\n }", "public static void main(String args[]){\n\t\t\n\t}", "public static void main(String[] args{\n }", "public static void main(String[] args) {\n\t\tnew FromNaveenChannel().stringManipulations();\n\t}", "Object[] args();", "public static void main(String args[]) {\r\n }", "public static void main(String[] args) {\n\t\tfor (int i =0; i<args.length; i++) {\r\n\t\t\tSystem.out.println(\"args[\"+i+\"]\" + args[i]);\r\n\t\t}\r\n\r\n\t}" ]
[ "0.655122", "0.6501965", "0.6438801", "0.6410494", "0.6370203", "0.6340129", "0.6184578", "0.6184578", "0.6184578", "0.61788017", "0.6130692", "0.6110644", "0.6106853", "0.5973794", "0.59676576", "0.5948934", "0.5945309", "0.5945309", "0.5933426", "0.5928819", "0.59244686", "0.59218574", "0.5912271", "0.5911047", "0.5909084", "0.5908659", "0.5908659", "0.5891158", "0.5882184", "0.5862783", "0.58526516", "0.58525205", "0.58506346", "0.5824859", "0.58223504", "0.5820122", "0.5800289", "0.5798026", "0.57955617", "0.57937986", "0.5784217", "0.5784217", "0.5784217", "0.57738006", "0.57630205", "0.57605153", "0.57550055", "0.5753112", "0.5735768", "0.57304764", "0.5728179", "0.57281566", "0.57261527", "0.57189417", "0.57035893", "0.5702894", "0.5679356", "0.5678421", "0.5660549", "0.5654127", "0.5652441", "0.56485707", "0.5640057", "0.56315076", "0.563147", "0.5625279", "0.5625279", "0.5625279", "0.5625279", "0.5625279", "0.56212425", "0.56138206", "0.56046635", "0.56042963", "0.56029433", "0.5599585", "0.5599585", "0.5599585", "0.5599585", "0.5599585", "0.5599585", "0.5599585", "0.5599585", "0.5599585", "0.5599585", "0.55882126", "0.55820835", "0.55820835", "0.55820835", "0.55781204", "0.556945", "0.556945", "0.556945", "0.5567351", "0.5566965", "0.5565618", "0.55653584", "0.5561765", "0.55585724", "0.55547863" ]
0.5563465
97
/ TODO: implement the following queries 1) find all books (done) 2) find book by id (done) 3) find book by title (done) 4) find book by type (done) 5) find all books for an author
public List<Book> findAll(String field, int pageNb, int pageSize) { Query allPageAndOrdered = new Query() .with(Sort.by(Sort.Direction.ASC, field)) .with(PageRequest.of(pageNb, pageSize)); return mongoTemplate.find(allPageAndOrdered, Book.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Book> getBooksByAuthorId(Integer authorId);", "public Books getBooks(String title,String authors,String isbn,String publisher);", "public List<Book> getByAuthor(String name );", "public List<Books> searchBook(int book_id){\n String sql=\"select * from Book where id=?\";\n BaseDao baseDao =dao.executeQuery(sql,new Object[]{book_id});\n return resultSetToBook(baseDao);\n }", "public List<BookData> searchBookbyAuthor (String author) throws SQLException{\n\t\tList<BookData> list = new ArrayList<>();\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tmyStmt = myConn.prepareStatement(\"select title, author_name, publisher_name, book_id from books natural join book_authors where author_name = ?\");\n\t\t\tmyStmt.setString(1, author);\n\t\t\tmyRs = myStmt.executeQuery();\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\n\t\t}\n\t\t\n\t}", "public Collection<Book> getAllByAuthorId(int authorId) {\n try (Statement statement = connection.createStatement()) {\n\n Collection<Book> result = new ArrayList<>();\n\n try (ResultSet cursor = statement.executeQuery(\n \"SELECT * FROM `books` WHERE `author_id` = \" + authorId)) {\n while (cursor.next()) {\n result.add(createBookFromCursor(cursor));\n }\n }\n\n return result;\n } catch (SQLException e) {\n throw new BookDaoException(e);\n }\n }", "List<Book> getAllBooks();", "List<Book> findAll();", "Book getBookByTitle(String title);", "Collection<Book> getAll();", "List<Book> findBooksByName(String name);", "private static void queryBooksByAuthor(){\n\t\tSystem.out.println(\"===Query Books By Author===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter First Name of Author to Query Books by: \");\n\t\tString author_firstname = string_input.next();\n\t\t\n\t\tSystem.out.println(\"Enter Middle Name of Author to Query Books by (Type 'null' if Author has no middlename): \");\n\t\tString author_middlename = string_input.next();\n\t\tif(author_middlename.equalsIgnoreCase(\"null\"))\n\t\t\tauthor_middlename = \"\";\n\t\t\n\t\tSystem.out.println(\"Enter Last Name of Author to Query Books by: \");\n\t\tString author_lastname = string_input.next();\n\t\t\n\t\tString author_fullname = author_firstname + \" \" + author_middlename + \" \" + author_lastname;\n\t\t\n\t\tif(ALL_AUTHORS.containsKey(author_fullname)){//if author_full_name exists in the Hashtable then print out all of the author's book titles\n\t\t\tSystem.out.println(\"Author found!\");\n\t\t\tSystem.out.println(author_fullname + \"'s list of book titles are: \"); \n\t\t\tIterator<String> iter = ALL_AUTHORS.get(author_fullname).iterator();\n\t\t\tprintAllElements(iter);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Sorry Author name entered does not exist in our records\");\n\t}", "public Books getBooksByAuthor(Author author) throws IOException {\n Books books = QueryGoogleBooksHelper.setUpClient();\n\n\n Books.Volumes.List volumesList = books.volumes().list(BYAUTHOR + \" \" + author.getName());\n\n Book bookToReturn = new Book();\n\n return books;\n\n }", "public String advancedSearchBooks() {\r\n List<Books> books = new ArrayList<Books>();\r\n keywords = keywords.trim();\r\n \r\n switch (searchBy) {\r\n case \"all\":\r\n return searchBooks();\r\n case \"title\":\r\n books = findBooksByTitle(keywords);\r\n break;\r\n case \"identifier\":\r\n books = findBooksByIdentifier(keywords);\r\n break;\r\n case \"contributor\":\r\n books = findBooksByContributor(keywords);\r\n break;\r\n case \"publisher\":\r\n books = findBooksByPublisher(keywords);\r\n break;\r\n case \"year\":\r\n books = findBooksByYear(keywords);\r\n break;\r\n case \"genre\":\r\n books = findBooksByGenre(keywords);\r\n break;\r\n case \"format\":\r\n books = findBooksByFormat(keywords);\r\n break;\r\n }\r\n clearFields();\r\n\r\n if (books == null || books.isEmpty()) {\r\n books = new ArrayList<Books>();\r\n }\r\n\r\n return displayBooks(books);\r\n }", "@Override\n public Set<Book> query(Set<Book> books) {\n Comparator<Book> comparator = Comparator.comparing(Book::getNumberOfPages);\n List<Book> list = new LinkedList<Book>(books);\n if (!isAscending) {\n comparator = comparator.reversed();\n }\n list.sort(comparator);\n return new LinkedHashSet<>(list);\n }", "public List<BookData> searchBookbyPublisher (String publisher) throws SQLException{\n\t\tList<BookData> list = new ArrayList<>();\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tmyStmt = myConn.prepareStatement(\"select title, author_name, publisher_name, book_id from books natural join book_authors where publisher_name = ?\");\n\t\t\tmyStmt.setString(1, publisher);\n\t\t\tmyRs = myStmt.executeQuery();\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\n\t\t}\n\t\t\n\t}", "public List<Books> searchBook(String keywords,String author,double low_price,double high_price){\n /*\n * search books by keywords of book_name\n * */\n List<Books> books=null;\n ResultSet resultSet=null;\n if(keywords!=\"\"&&author==\"\"&&low_price<0&&high_price<0){\n String sql=\"select * from Book where book_name like '%\"+keywords+\"%'\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{});\n books=resultSetToBook(baseDao);\n return books;\n }//search books by keywords and author\n else if(keywords!=\"\"&&author!=\"\"&&low_price<0&&high_price<0){\n String sql=\"select * from Book b where b.book_name like '%keywords=?%' and book_author=?\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{keywords,author});\n books=resultSetToBook(baseDao);\n return books;\n }//search books by author\n else if(keywords==\"\"&&author!=\"\"&&low_price<0&&high_price<0){\n String sql=\"select * from Book b where book_author=?\";\n BaseDao baseDaot=dao.executeQuery(sql,new Object[]{author});\n books=resultSetToBook(baseDaot);\n return books;\n }\n else if(keywords==\"\"&&author==\"\"&&low_price>0&&high_price>0){\n String sql=\"select * from Book b where book_price>? and book_price<?\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{low_price,high_price});\n books=resultSetToBook(baseDao);\n return books;\n }\n //search books by keywords and price\n else if(keywords!=\"\"&&author!=\"\"&&low_price>0&&high_price>0){\n String sql=\"select * from Book b where b.book_name like '%\"+keywords+\"%' \" +\n \"and book_author=? and book_price>? and book_price<?\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{author,low_price,high_price});\n books=resultSetToBook(baseDao);\n return books;\n }\n return null;\n }", "public List<Books> showAllBooks(){\n String sql=\"select * from Book\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{});\n List<Books> list=new ArrayList<>();\n list=resultSetToBook(baseDao);\n return list;\n }", "List<Book> selectByExample(BookExample example);", "@Override\n public List<Book> result(List<Book> books) {\n return search.result(books);\n }", "public ArrayList<Book> listOfBooksByAuthor (Author providedAuthor){\n //Array list for storing books written by provided author\n ArrayList<Book> authorBooks = new ArrayList<>();\n\n //loops through the booklist to find books with the author in the list of authors\n for (Book book : bookList) {\n //loops through the list of authors to see if the provided author is among thelist\n for (Author author1 : book.getAuthors()) {\n if (providedAuthor.equals(author1)) {\n authorBooks.add(book);\n }\n }\n }\n return authorBooks;\n }", "public List<Book> getAllBooks() {\n return entityManager.createQuery(\"select b from Book b\", Book.class).getResultList();\n }", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, String publisher, String sortOrder, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, isbn, publisher, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer) {\n if (b.getBookPublisher().equals(publisher) || publisher.equals(\"*\"))\n searchedBooks.add(b);\n }\n if (sortOrder.equals(\"title\")) {\n Collections.sort(searchedBooks, Book.BookTitleComparator);\n }\n else if(sortOrder.equals(\"publish-date\")){\n Collections.sort(searchedBooks,Book.BookDateComparator);\n }\n else{\n\n }\n return searchedBooks;\n }", "public List<Books> findBooksByTitle(String title) {\r\n return bookController.findBooksByTitle(title);\r\n }", "@Override\r\n\tpublic List<Book> getBooks() {\n\t\treturn bd.findAll();\r\n\t}", "public List<BookData> searchBookbyTitle (String name) throws SQLException{\n\t\tList<BookData> list = new ArrayList<>();\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tmyStmt = myConn.prepareStatement(\"select title, author_name, publisher_name, book_id from books natural join book_authors where title = ?\");\n\t\t\tmyStmt.setString(1, name);\n\t\t\tmyRs = myStmt.executeQuery();\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\n\t\t}\n\t\t\n\t}", "Book getBookById(Integer id);", "public interface BookService {\n\n List<Book> getBooks();\n\n void saveBook(Book theBook);\n\n Book getBooks(int theId);\n\n void deleteBook(int theId);\n\n List<Book> searchBook(String searchName);\n\n List<Book> getBooksForAuthor(int theId);\n}", "@Override\r\n\tpublic Book findOneBook(String id) {\n\t\t\r\n\t\tString sql=\"select * from books where id= ?\";\r\n\t\tString sql2 =\"select * from categories where id=?\";\r\n\t\tString sql3 =\"select * from publishers where id=?\";\r\n\t\ttry {\r\n\t\t\tBook book = runner.query(sql, new BeanHandler<Book>(Book.class), id);\r\n\t\t\tCategory category = runner.query(sql2, new BeanHandler<Category>(Category.class), book.getCategoryId());\r\n\t\t\tPublisher publisher = runner.query(sql3, new BeanHandler<Publisher>(Publisher.class), book.getPublisherId());\r\n\t\t\tbook.setPublisher(publisher);\r\n\t\t\tbook.setCategory(category);\r\n\t\t\tif(book!=null)\r\n\t\t\treturn book;\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 null;\r\n\t}", "public List<Book> getBooksByAuthorId(Long authId) {\n String queryStr = \"SELECT b FROM BookAuthor b where b.author.id = :coAuthor\";\n Query query = em.createQuery(queryStr);\n query.setParameter(\"coAuthor\", authId);\n\n return query.getResultList();\n }", "public List<Book> getAllBooks(){\n\t\treturn this.bRepo.findAll();\n\t}", "public void listBooksByAuthor(String name) {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price \" +\n \"FROM books \" +\n \"WHERE AuthorName = ?\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n // Set values\n pstmt.setString(1, name);\n\n ResultSet rs = pstmt.executeQuery();\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "ArrayList<News> findByAuthor(String author) throws DAOException, ConnectionPoolDataSourceException;", "@Test\n public void Given_store_with_books_When_filtering_by_existing_author_Then_only_books_of_the_author_are_returned() {\n booksList.add(B1_A);\n booksList.add(B2_A);\n booksList.add(B3_B);\n\n when(dao.getBooks()).thenReturn(booksList);\n\n List<Book> booksFilteredByAuthor = store.getBooksByAuthor(B1_A.getAuthor());\n\n assertThat(booksFilteredByAuthor).containsExactlyInAnyOrder(B1_A, B2_A);\n }", "public List<Book> getBooks() {\r\n \t\t// switch dates\r\n \t\tif (filter_dateFrom.compareTo(filter_dateTo) > 0) {\r\n \t\t\tCalendar tmp = filter_dateFrom;\r\n \t\t\tfilter_dateFrom = filter_dateTo;\r\n \t\t\tfilter_dateTo = tmp;\r\n \t\t}\r\n \r\n \t\tDate yearFrom = filter_dateFrom.getTime();\r\n \t\tDate yearTo = filter_dateTo.getTime();\r\n \r\n \t\t// genre\r\n \t\tGenre genre = null;\r\n \t\tif (!filter_genre.isEmpty() && !filter_genre.equalsIgnoreCase(\"all\")) {\r\n \t\t\tgenre = genreMgr.findByName(filter_genre);\r\n \t\t\tif (genre == null) {\r\n \t\t\t\tSystem.err.println(\"Badly working database encoding!\");\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\treturn bookMgr.find(filter_name, filter_author, yearFrom, yearTo, genre, filter_isbn_issn);\r\n \t}", "@Override\n public List<BookDto> getAllBooks() {\n try {\n List<BookEntity> bookEntityArrayList = bookRepository.findAll();\n if (bookEntityArrayList.isEmpty()) {\n LogUtils.getInfoLogger().info(\"No Books found\");\n return null;\n } else {\n List<BookDto> bookDtoArrayList = bookEntityArrayList.stream()\n .map(bookEntity ->\n bookDtoBookEntityMapper.bookEntityToBookDto(bookEntity))\n .collect(Collectors.toList());\n LogUtils.getInfoLogger().info(\"Books Found: {}\", bookDtoArrayList.toString());\n return bookDtoArrayList;\n }\n }catch (Exception exception){\n throw new BookException(exception.getMessage());\n }\n }", "public List<BookData> getAllBooks() throws Exception{\n\t\tList<BookData> list = new ArrayList<>();\n\t\tStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\tmyStmt = myConn.createStatement();\n\t\t\tmyRs = myStmt.executeQuery(\"select title, author_name, publisher_name, book_id from books natural join book_authors\");\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\t\n\t\t}\n\t\t\n\t}", "private void searchBook(String query) {\n String filter = this.bookFilter.getValue();\n String sort = this.sort.getValue();\n \n // Get the user defined comparator\n Comparator<Book> c = getBookComparator(filter, sort);\n\n // Create a book used for comparison\n Book book = createBookForQuery(filter, query);\n \n // Find all matches\n GenericList<Book> results = DashboardController.library.getBookTable().findAll(book, c);\n\n // Cast results to an array\n Book[] bookResults = bookResultsToArray(results, c);\n\n // Load the results in a new scene\n this.loadBookResultsView(bookResults);\n }", "public com.huqiwen.demo.book.model.Books fetchByPrimaryKey(long bookId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public static List<Book> selectBooksByAuthor(List<Book> books, String author) {\r\n List<Book> selectedBooks = new ArrayList<>();\r\n for (int i = 0; i < books.size(); i++) {\r\n if (books.get(i).getAuthor().equals(author)) {\r\n selectedBooks.add(books.get(i));\r\n }\r\n }\r\n return selectedBooks;\r\n }", "public void listBooks() {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price FROM books\";\n\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "@Override\n public List<Book> findBooks(SelectRequest selectRequest)\n throws DaoException {\n List<Book> foundBooks = new ArrayList<>();\n DataBaseHelper helper = new DataBaseHelper();\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statement = helper\n .prepareStatementFind(connection, selectRequest);\n ResultSet resultSet = statement.executeQuery()) {\n while (resultSet.next()) {\n BookCreator bookCreator = new BookCreator();\n Book book = bookCreator.create(resultSet);\n foundBooks.add(book);\n }\n } catch (SQLException e) {\n throw new DaoException(\"Error while reading database!\", e);\n }\n return foundBooks;\n }", "public interface BookDAO extends JpaRepository<Book,Integer> {\n List<Book> findAllByCategory(Category category);\n List<Book> findAllByTitleLikeOrAuthorLike(String keyword1, String keyword2);\n}", "@Override\n\tpublic List<Book> findAll() {\n\t\treturn dao.findAll();\n\t}", "public List<ViewSearchBook> getViewBookListByAuthorCategoryAndSubCategory(\r\n\t\t\tString author, Integer categoryId, Integer subcategoryId) {\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"This is Dao Impl for getBookListByAuthorCategoryAndSubCategory!!\");\r\n\t\tString hql = \"from ViewSearchBook i where i.noofcopies<>0 and i.authorName like '%\" +author+ \"%' and i.categoryId=? and i.subCategoryId=?\";\r\n\t\tObject[] parm = new Object[] {categoryId, subcategoryId };\r\n\t\tList<ViewSearchBook> l = getHibernateTemplate().find(hql, parm);\r\n\t\tSystem.out.println(\"list size:\" + l.size());\r\n\t\treturn l.isEmpty() || l == null ? null : l;\r\n\r\n\t}", "public List<Book> allBooks() {\n return bookRepository.findAll();\n }", "public ObservableList<Object> selectAllBooks(){\n System.out.println(\"Printing all books...\");\n dbmanager.open();\n ObservableList<Object> books = FXCollections.observableArrayList();\n\n try{\n try (DBIterator keyIterator = dbmanager.getDB().iterator()) {\n keyIterator.seekToFirst();\n while (keyIterator.hasNext()) {\n String key = asString(keyIterator.peekNext().getKey());\n String[] splittedString = key.split(\"-\");\n\n dbmanager.incrementNextId(Integer.parseInt(splittedString[1]));\n\n if(!\"book\".equals(splittedString[0])){\n keyIterator.next();\n continue;\n }\n String resultAttribute = asString(dbmanager.getDB().get(bytes(key)));\n JSONObject jbook = new JSONObject(resultAttribute);\n\n Book book = new Book(jbook);\n \n book.setPublisher(dbmanager.getPmanager().read(jbook.getInt(\"publisher\")));\n \n JSONArray jauthors = jbook.getJSONArray(\"authors\");\n List<Author> authors = new ArrayList();\n for(int i=0; i<jauthors.length(); i++){\n \n int a=-1;\n a=jauthors.getInt(i);\n if(a>=0){ \n authors.add(dbmanager.getAmanager().read(a));\n }else{\n System.out.println(\"A book has mysterious author\"); \n }\n \n }\n \n book.setAuthors(authors);\n books.add(book);\n keyIterator.next();\n }\n }\n } catch(IOException e){\n e.printStackTrace();\n }\n dbmanager.close();\n return books;\n }", "public List<Book> findAll() {\n return bookRepository.findAll();\n }", "public List<Book> findAll() {\n\t\treturn bookDao.findAll();\r\n\t}", "BookDO selectByPrimaryKey(String bookIsbn);", "public List<Book> getAllBooks()\n {\n List<Book> books = new LinkedList<Book>();\n\n //1. Query para la consulta\n String query = \"Select * FROM \"+ BookReaderContract.FeedBook.TABLE_NAME;\n\n //2. Obtener la referencia a la DB\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(query, null);\n\n //3. Recorrer el resultado y crear un objeto Book\n Book book = null;\n if(cursor.moveToFirst()){\n do{\n book = new Book();\n book.setId(Integer.parseInt(cursor.getString(0)));\n book.setTitle(cursor.getString(1));\n book.setAuthor(cursor.getString(2));\n books.add(book);\n }while(cursor.moveToNext());\n }\n Log.d(\"getAllBooks\",books.toString());\n return books;\n }", "public static ArrayList<Book> search(String title, ArrayList<String> authors, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(containsAllAuthors(authors, b))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, String publisher, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, isbn, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(b.getBookPublisher().equals(publisher) || publisher.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public static <T> void queryAll() {\n\t\tString sql = \"SELECT * FROM LIBRARY ORDER BY BID \";\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tClass<T> clazz = (Class<T>) Lib.class;\n\t\tSystem.out.println(\"All books info is displayed below: \");\n\t\ttry {\n\t\t\tList<T> eleList = dao.queryData(sql, clazz);\n\t\t\tfor (T ele : eleList) {\n\t\t\t\tSystem.out.println(\"\\t\"+ele);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public List<AuthorPaper> getAuthorPapers(int authorId) throws SQLException;", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(b.getBookIsbn().equals(isbn) || isbn.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public Book[] getRecommendBook(){\n\t\n\t String stmnt = String.format(\n \"SELECT * FROM book \" );\n ResultSet rs = executeQuery(stmnt);\n ArrayList<Book> arr = resultSetPacker(rs, Book.class);\n\n return arr.toArray(new Book[arr.size()]);\n}", "public Book search(String bookId) {\r\n for (Iterator iterator = books.iterator(); iterator.hasNext();) {\r\n Book book = (Book) iterator.next();\r\n if (book.getId().equals(bookId)) {\r\n return book;\r\n }\r\n }\r\n return null;\r\n }", "public interface BookService {\n\n /**\n * 根据主键删除图书\n * @param id\n * @return\n */\n int deleteByPrimaryKey(String id);\n\n /**\n * 插入新的图书\n * @param record\n * @return\n */\n int insert(Book record);\n\n /**\n * 有条件的插入图书信息\n * @param record\n * @return\n */\n int insertSelective(Book record);\n\n /**\n * 根据主键查询图书信息\n * @param id\n * @return\n */\n Book selectByPrimaryKey(String id);\n\n /**\n * 分页查询\n * @param bookName\n * @param pageNum\n * @param pageSize\n * @return\n */\n Pagination<BookVo> selectPageQuery (String bookName, int pageNum , int pageSize);\n\n /**\n * 有条件的更新图书信息\n * @param record\n * @return\n */\n int updateByPrimaryKeySelective(Book record);\n\n /**\n * 更新图书信息\n * @param record\n * @return\n */\n int updateByPrimaryKey(Book record);\n\n /**\n * 查询所有信息\n */\n List<Book> selectAll();\n\n\n /**\n * @param authorId\n * @return java.util.List<cn.edu.hfut.xc.bookauthordemo.common.model.Book>\n * @description 根据作者id来获取该作者所写的图书信息\n * @method selectBooksByAuthorId\n */\n List<Book> selectBooksByAuthorId(@Param(\"authorId\") String authorId);\n\n //根据图书馆id查询图书信息\n List<Book> selectBooksByLibraryId(@Param(\"libraryId\") String libraryId);\n\n //根据商店id查询商店售卖的图书信息\n List<Book> selectBooksByShopId(@Param(\"shopId\") String shopId);\n\n //根据商店id查询商店售卖的图书信息\n List<Book> selectBooksByNationalityId(@Param(\"nationalityId\") String nationalityId);\n\n /**\n * @param id\n * @return cn.edu.hfut.xc.bookauthordemo.common.model.Book\n * @description 根据主键查询图书信息\n * @method selectBookAuthorByPrimaryKey\n */\n Book selectBookAuthorByPrimaryKey(String id);\n\n /*\n * @param\n * @return java.util.List<cn.edu.hfut.xc.bookauthordemo.common.model.Book>\n * @description 查询所有图书信息\n * @method selectBookWithAuthor\n */\n List<Book> selectBookWithAuthor();\n\n /**\n * @param id\n * @return cn.edu.hfut.xc.bookauthordemo.common.model.Book\n * @description 根据主键查询图书信息包括该书所在的图书馆信息\n * @method selectBookLibraryByPrimaryKey\n */\n Book selectBookLibraryByPrimaryKey(String id);\n\n /**\n * @param\n * @return java.util.List<cn.edu.hfut.xc.bookauthordemo.common.model.Book>\n * @description 查询所有图书信息和该图书所在的图书馆信息\n * @method selectBookWithLibrary\n */\n List<Book> selectBookWithLibrary();\n\n// PageList<Book> pageSelect(String bookName, int pageNum , int pageSize );\n}", "@Override\n\tpublic Book findBook(Book book) throws RemoteException {\n\t\tPredicate<Book> predicate = x-> x.getIsbn().equals(book.getIsbn());\n\t\treturn bookList.stream().filter(predicate).findFirst().get();\n\t\t\n\t}", "private static void queryBook(){\n\t\tSystem.out.println(\"===Book Queries Menu===\");\n\t\t\n\t\t/*Display menu options*/\n\t\tSystem.out.println(\"1--> Query Books by Author\");\n\t\tSystem.out.println(\"2--> Query Books by Genre\");\n\t\tSystem.out.println(\"3--> Query Books by Publisher\");\n\t\tSystem.out.println(\"Any other number --> Exit To Main Menu\");\n\t\tSystem.out.println(\"Enter menu option: \");\n\t\tint menu_option = getIntegerInput(); //ensures user input is an integer value\n\t\t\n\t\tswitch(menu_option){\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println();\n\t\t\t\tqueryBooksByAuthor();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tSystem.out.println();\n\t\t\t\tqueryBooksByGenre();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println();\n\t\t\t\tqueryBooksByPublisher();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}", "public List<Book> findAll()\r\n\t{\r\n\t\tList<Book> booklist= null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSession();\r\n\t\t booklist=bookdao.findAll();\r\n\t\t\tbookdao.closeCurrentSession();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn booklist;\r\n\t}", "public List<Book> listBooks() {\n\t\tArrayList<Book> books = new ArrayList<>();\n\t\ttry (Connection con = LibraryConnection.getConnection()) {\n\t\t\tPreparedStatement stmt = con.prepareStatement(\"SELECT * FROM book\");\n\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tbooks.add(new Book(rs.getString(\"isbn\"), rs.getString(\"title\")));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn books;\n\t}", "Collection<Book> readAll();", "public interface BookDao {\n// 录入书籍\n boolean add(Book book);\n\n// 通过 isbn 号,查询\n boolean findByIsbn(String isbn);\n\n// 更新库存量\n boolean modifyQuantity(String isbn, int quantity);\n\n List<Book> findByBook();\n\n int findByIsbnQuantity(String isbn);\n\n double getByIsbnSalePrice(String isbn);\n\n List<Book> getByName(String text);\n}", "public ArrayList<Book> getBooks()\n {\n ArrayList<Book> books = new ArrayList<>();\n String sql = \"SELECT [book_id]\\n\" +\n \" ,[book_title]\\n \" +\n \" ,[book_author]\\n\" +\n \" ,[book_publish_year]\\n\" +\n \" ,[book_category]\\n\" +\n \" ,[book_keyword]\\n\" +\n \" ,[book_status]\\n \" +\n \" FROM [lib_book_master]\";\n try {\n PreparedStatement statement = connection.prepareStatement(sql);\n ResultSet rs = statement.executeQuery();\n //cursor\n while(rs.next()) \n { \n int book_id = rs.getInt(\"book_id\");\n String book_title = rs.getString(\"book_title\");\n String book_author = rs.getString(\"book_author\");\n String book_publish_year = rs.getString(\"book_publish_year\");\n String book_category = rs.getString(\"book_category\");\n String book_keyword = rs.getString(\"book_keyword\");\n String book_status = rs.getString(\"book_status\");\n \n Book s = new Book(book_id,book_title, book_author, book_publish_year,book_category,book_keyword,book_status);\n books.add(s);\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(DBContext.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return books;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Book> getAllBook() {\n\t\treturn entityManager.createQuery(\"from Book\").getResultList();\n\t}", "private static void queryBooksByPublisher(){\n\t\tSystem.out.println(\"===Query Books By Publisher===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter Publisher to Query Books by: \");\n\t\tString publisher = string_input.nextLine();\n\t\t\n\t\tif(ALL_PUBLISHERS.containsKey(publisher)){\n\t\t\tIterator<String> iter = ALL_PUBLISHERS.get(publisher).iterator();\n\t\t\tSystem.out.println(\"All books published by \" + publisher + \" are:\"); \n\t\t\tprintAllElements(iter);\n\t\t}\n\t\t\n\t\telse\n\t\t\tSystem.out.println(\"Sorry! There are no such publishers in our records!\");\n\t}", "@Override\r\n\tpublic List<Book> findSomeBook(PageEntiy entiy) {\n\t\tString sql = \"select * from books where tag=1 limit ?,?\";\r\n\t\t\r\n\t\t\ttry {\r\n\t\t\t\tList<Book> books = runner.query(sql,new BeanListHandler<Book>(Book.class),entiy.getPageNum()*entiy.getPageSize(),entiy.getPageSize());\r\n\t\t\t\t\t\r\n\t\t\t\treturn books;\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public void run(){\n\t\tif(searchHow==0){\n\t\t\tint isbnCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestIsbn = new SearchRequest(db, searchForThis, isbnCount, db.size());\n\t\t\t\t\tdb.searchByISBN(requestIsbn);\n\t\t\t\t\tisbnCount = requestIsbn.foundPos;\n\t\t\t\t\tif (requestIsbn.foundPos >= 0) {\n\t\t\t\t\t\tisbnCount++;\n\t\t\t\t\t\tString formatThis = \"Matched ISBN at position: \" + requestIsbn.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestIsbn.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==1){\n\t\t\tint titleCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestTitle = new SearchRequest(db, searchForThis, titleCount, db.size());\n\t\t\t\t\tdb.searchByTitle(requestTitle);\n\t\t\t\t\ttitleCount = requestTitle.foundPos;\n\t\t\t\t\tif (requestTitle.foundPos >= 0) {\n\t\t\t\t\t\ttitleCount++;\n\t\t\t\t\t\tString formatThis = \"Matched title at position: \" + requestTitle.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestTitle.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==2){\n\t\t\tint authorCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestAuthor = new SearchRequest(db, searchForThis, authorCount, db.size());\n\t\t\t\t\tdb.searchByAuthor(requestAuthor);\n\t\t\t\t\tauthorCount = requestAuthor.foundPos;\n\t\t\t\t\tif (requestAuthor.foundPos >= 0) {\n\t\t\t\t\t\tauthorCount++;\n\t\t\t\t\t\tString formatThis = \"Matched author at position: \" + requestAuthor.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestAuthor.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==3){\n\t\t\tint pageCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestPage = new SearchRequest(db, searchForThis, pageCount, db.size());\n\t\t\t\t\tdb.searchByNumPages(requestPage);\n\t\t\t\t\tpageCount = requestPage.foundPos;\n\t\t\t\t\tif (requestPage.foundPos >= 0) {\n\t\t\t\t\t\tpageCount++;\n\t\t\t\t\t\tString formatThis = \"Matched pages at position: \" + requestPage.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestPage.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==4){\n\t\t\tint yearCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestYear = new SearchRequest(db, searchForThis, yearCount, db.size());\n\t\t\t\t\tdb.searchByYear(requestYear);\n\t\t\t\t\tyearCount = requestYear.foundPos;\n\t\t\t\t\tif (requestYear.foundPos >= 0) {\n\t\t\t\t\t\tyearCount++;\n\t\t\t\t\t\tString formatThis = \"Matched year at position: \" + requestYear.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestYear.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t}", "public interface BookService {\n List<Book> selectAll();\n EBook search(String content);\n void insert(String isbn,Long userId) throws Exception;\n List<RequestBookDtoV2> requestSearch(String content, Long userId);\n DetailBookInfo detailBook(String bookId);\n String request(String isbn, Long userId);\n}", "public String searchBooks() {\r\n if (keywords.isEmpty()) {\r\n return \"advanced-search\";\r\n }\r\n\r\n keywords = keywords.trim();\r\n \r\n //Get list of all the queries\r\n List<List<Books>> listOfLists = new ArrayList<List<Books>>();\r\n listOfLists.add(findBooksByGenre(keywords));\r\n listOfLists.add(findBooksByIdentifier(keywords));\r\n listOfLists.add(findBooksByContributor(keywords));\r\n listOfLists.add(findBooksByFormat(keywords));\r\n listOfLists.add(findBooksByPublisher(keywords));\r\n listOfLists.add(findBooksByTitle(keywords));\r\n listOfLists.add(findBooksByYear(keywords));\r\n\r\n clearFields();\r\n\r\n List<Books> books = new ArrayList<Books>();\r\n\r\n //Filter out useless data\r\n List<Books> tempBookList;\r\n for (int cntr = 0; cntr < listOfLists.size(); cntr++) {\r\n tempBookList = listOfLists.get(cntr);\r\n\r\n if (tempBookList == null) {\r\n continue;\r\n }\r\n\r\n if (tempBookList.isEmpty()) {\r\n continue;\r\n }\r\n\r\n books.addAll(tempBookList);\r\n }\r\n\r\n //Remove duplicates\r\n Set<Books> bookSet = new HashSet<Books>();\r\n bookSet.addAll(books);\r\n books.clear();\r\n books.addAll(bookSet);\r\n\r\n return displayBooks(books);\r\n }", "public List<Book> getAll() {\n return bookFacade.findAll(); \n }", "@GetMapping(value = \"/{username}/books\")\n public Iterable<Book> listBooksInLibrary(@PathVariable String username,\n @RequestParam(required = false) String author,\n @RequestParam(required = false) String status) {\n\n UserBookStatus userBookStatus = StringUtils.isEmpty(status) ? null : UserBookStatus.valueOf(status.toUpperCase());\n List<UserBook> userBooks = userService.listBooks(username, author, userBookStatus);\n\n return userBooks.stream().map(userBookToBook).collect(Collectors.toList());\n }", "@Override\n public MyBook findByAllIds(final int bookId,\n final int userId, final int bookshelfId) {\n try {\n MyBook book = jdbcTemplate.queryForObject(\"select * from MyBook \"\n + \"where book_id = ? and user_id = ? and bookshelf_id = ?\",\n new Object[] {bookId, userId,\n bookshelfId}, new MyBookRowMapper());\n return book;\n\n } catch (EmptyResultDataAccessException e) {\n return null;\n }\n }", "public List<Book> getBooksByEditorialId(Long codePublisher) {\n String queryStr = \"SELECT b FROM Book b where b.publisher.code = :coPublisher\";\n Query query = em.createQuery(queryStr);\n query.setParameter(\"coPublisher\", codePublisher);\n\n return query.getResultList();\n }", "@Test\n\tpublic void testGetBooksSortedByAuthor() {\n\t\tSystem.out.println(\"Sorting books by author name...\");\n\t\tList<Book> result = store.getBooksSortedByAuthor();\n\t\tSystem.out.println(result);\n\t}", "public java.util.List<com.huqiwen.demo.book.model.Books> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "Book getLatestBook();", "public interface BookRepository extends JpaRepository<Book, Long> {\n\n List<String> giveMeAllBooksTitlesByAuthor(String author);\n\n List<Book> giveMeAllBooksByAuthorWithPrizeGraterThan(@Param(\"author\") String author,\n @Param(\"prize\") BigDecimal prize);\n\n BigDecimal giveMeAveragePrizeOfBooks();\n\n List<Book> giveMeAllBooksByAuthorOrderedByPagesDesc(@Param(\"author\") String author, Pageable pageable);\n\n List<Employee> giveMeAllEmployeesWhoSoldBooksOfThisAuthor(@Param(\"author\") String author);\n\n void increasePrizesByTenPercent(@Param(\"id\") Long id);\n}", "private Book createBookForQuery(String filter, String query) {\n switch(filter) {\n case \"Title\":\n return new Book(\n null, query, null, 0, null, 0, null);\n case \"Author\":\n return new Book(query, null, null, 0, null, 0, null);\n case \"Publisher\":\n return new Book(null, null, query, 0, null, 0, null);\n case \"Year\":\n return new Book(null, null, null, Integer.parseInt(query), null, 0, null);\n case \"Genre\":\n return new Book(null, null, null, 0, query, 0, null);\n case \"Pages\":\n return new Book(null, null, null, 0, null, Integer.parseInt(query), null);\n default:\n return new Book(null, query, null, 0, null, 0, null);\n }\n }", "public List<Books> findBooksByPublisher(String publisher) {\r\n return bookController.findBooksByPublisher(publisher);\r\n }", "public interface IBookService {\n\n Book findOne(Book book);\n\n Book findByAuthor(String author);\n\n}", "public List<Book> readByBookName(String searchString) throws Exception{\n\t\tsearchString = \"%\"+searchString+\"%\";\n\t\treturn (List<Book>) template.query(\"select * from tbl_book where title like ?\", new Object[] {searchString}, this);\n\t}", "public interface BookDao {\n //查询所有\n List findAll();\n // 分类查询\n List findOne(String cid);\n\n // 查询书的详细信息\n Book findOnlyOne(String cid);\n\n // 加载图书\n Book load(String bid);\n\n // 添加图书\n void add(Book book);\n\n // 删除图书\n void del(String bid);\n // 编辑图书\n void edit(Book book);\n\n\n}", "@Query(value=\"SELECT * FROM users WHERE (status = :status) AND (id IN (SELECT user_id FROM documents))\", nativeQuery = true)\n Page<User> findAuthors(@Param(\"status\") int status, Pageable pageable);", "public List<Books> findBooksByIdentifier(String identifier) {\r\n List<Books> bookList = new ArrayList<Books>();\r\n Books book;\r\n\r\n try {\r\n book = bookController.findBookByIdentifier(identifier);\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n\r\n bookList.add(bookController.findBookByIdentifier(identifier));\r\n\r\n return bookList;\r\n }", "public void findByIsbn(String isbn) {\n\t\tResultSet rs;\n\t\ttry (PreparedStatement stmt = LibraryConnection.getConnection()\n\t\t\t\t.prepareStatement(\"SELECT * FROM book WHERE isbn=?\")) {\n\t\t\tstmt.setString(1, isbn);\n\t\t\trs = stmt.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\t//\n\t\t\t}\n\t\t\t// TODO Auto-generated catch block\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public interface AuthorRepository extends CustomJpaRepository<Author, Long> {\n\n\tpublic Author findByAuthorName(String authorName);\n\n\tpublic Set<Author> findByAuthorBooks_Book_Id(Long bookId);\n}", "public interface BooksDao {\n long createBook(Books book);\n Books updateBook(Books book);\n void deleteBook(long id);\n List<Books> getAllBooks();\n Books getBook(long id);\n List<Books> getAllBooks(String bookName);\n List<Books> getAllCartBooks(String username);\n}", "@Override\n\tpublic List<BookInfoVO> findAll() {\n\t\treturn bookInfoDao.findAll();\n\t}", "public Book[] getRecommendBooks()\n {\n String stmnt = String.format(\n \"SELECT * FROM book LIMIT %d \",\n PAGE_LIMIT);\n ResultSet rs = executeQuery(stmnt);\n ArrayList<Book> arr = resultSetPacker(rs, Book.class);\n\n return arr.toArray(new Book[arr.size()]);\n\n }", "public Map<String, BookBean> retrieveAllBooks() throws SQLException {\r\n\t\tString query = \"select * from BOOK order by CATEGORY\";\t\t\r\n\t\tMap<String, BookBean> rv= new HashMap<String, BookBean>();\r\n\t\tPreparedStatement p = con.prepareStatement(query);\t\t\r\n\t\tResultSet r = p.executeQuery();\r\n\t\t\r\n\t\twhile(r.next()){\r\n\t\t\tString bid = r.getString(\"BID\");\r\n\t\t\tString title = r.getString(\"TITLE\");\r\n\t\t\tint price = r.getInt(\"PRICE\");\r\n\t\t\tString category = r.getString(\"CATEGORY\");\t\t\t\r\n\t\t\tBookBean s = new BookBean(bid, title, price,category);\t\t\t\r\n\t\t\trv.put(bid, s);\r\n\t\t}\r\n\t\tr.close();\r\n\t\tp.close();\r\n\t\treturn rv;\r\n\t\t}", "public interface BookStore {\r\n\r\n\t// CRUD - Create, Read, Update, Delete\r\n\t/**\r\n\t * create the specified book in the system.\r\n\t * \r\n\t * @param book\r\n\t * a book instance with all attributes initialized.\r\n\t */\r\n\tvoid create(Book book);\r\n\r\n\t/**\r\n\t * read the specified book from the system.\r\n\t * \r\n\t * @param book\r\n\t * a book instance with the isbn initialized.\r\n\t * @return a book instance with all attributes initialized or null if not found.\r\n\t */\r\n\tBook read(Book book);\r\n\r\n\t/**\r\n\t * update the specified book in the system according to the book parameter.\r\n\t * \r\n\t * @param book\r\n\t * a book instance with all attributes initialized.\r\n\t */\r\n\tvoid update(Book book);\r\n\r\n\t/**\r\n\t * delete the specified book (by isbn) from the system.\r\n\t * \r\n\t * @param book\r\n\t * a book instance with isbn initialized.\r\n\t */\r\n\tvoid delete(Book book);\r\n\r\n\t/**\r\n\t * read all books from the system\r\n\t * \r\n\t * @return a collection of all system books\r\n\t */\r\n\tCollection<Book> readAll();\r\n\r\n}", "@GetMapping(\"/bookworm/showAllAuthors\")\n public ResponseEntity<List> showAllAuthors() {\n\n log.debug(\"Showing all the Authors whose books are present in library\");\n return ResponseEntity.ok(authorService.getAuthor());\n }", "@Override\r\n\tpublic Book getBook(long bookId) {\n\t\treturn bd.getOne(bookId);\r\n\t}", "Book selectByPrimaryKey(String bid);", "public interface BookRepository extends JpaRepository<Book, Integer> {\n public List<Book> findByBookName(String bookName);\n}", "@Repository\npublic interface BookRepository extends JpaRepository<Book, Long> {\n\n List<BookNoContent> findAllByOrderByNameAsc();\n List<BookNoContent> findByNameLikeIgnoreCaseOrderByNameAsc(String name);\n List<BookNoContent> findByAuthorOrderByNameAsc(Author author);\n List<BookNoContent> findByGenreOrderByNameAsc(Genre genre);\n List<BookNoContent> findByNameStartingWithIgnoreCaseOrderByNameAsc(Character letter);\n\n}", "private static void queryBooksByGenre(){\n\t\tSystem.out.println(\"===Query Books By Genre===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter Genre to Query Books by: \");\n\t\tString genre = string_input.next();\n\t\tint genre_index = getGenreIndex(genre); //returns the index of the genre entered, in ALL_GENRES\n\t\t\n\t\tif(genre_index > -1){//valid genre was entered\n\t\t\tIterator<String> iter = ALL_GENRES.get(genre_index).iterator();\n\t\t\tSystem.out.println(\"All \" + genre + \" books are: \");\n\t\t\tprintAllElements(iter);\n\t\t}\n\t}", "CmsRoomBook selectByPrimaryKey(String bookId);" ]
[ "0.77804285", "0.7712485", "0.75517833", "0.72436595", "0.7238364", "0.7065408", "0.70458627", "0.7044296", "0.6997765", "0.6973849", "0.69629323", "0.6928622", "0.6922787", "0.6708748", "0.66780007", "0.66726506", "0.66549706", "0.6594098", "0.657411", "0.6531109", "0.65280044", "0.6510675", "0.650542", "0.6493159", "0.6479429", "0.64618343", "0.64612776", "0.6436019", "0.6432912", "0.6431635", "0.64300394", "0.64252096", "0.6404528", "0.6398504", "0.63830054", "0.63814855", "0.6373789", "0.6358114", "0.6348677", "0.6316545", "0.6307326", "0.63061434", "0.6295576", "0.6274057", "0.6270435", "0.62531716", "0.62471145", "0.62272763", "0.6225241", "0.62145716", "0.6210195", "0.6208833", "0.62008804", "0.61948806", "0.6183891", "0.6170186", "0.6169653", "0.61674315", "0.61659205", "0.6165252", "0.6157954", "0.61482763", "0.61468935", "0.61090827", "0.6103197", "0.61030966", "0.60988545", "0.608145", "0.60770965", "0.60731393", "0.60654134", "0.6056456", "0.6045935", "0.6039805", "0.6036445", "0.603511", "0.6031697", "0.60143197", "0.60052", "0.6003082", "0.5986778", "0.5986619", "0.59792185", "0.5958373", "0.59565616", "0.5954669", "0.59530085", "0.5951162", "0.5940874", "0.5921765", "0.5916349", "0.5915804", "0.59138936", "0.59119284", "0.5907518", "0.59031457", "0.58978933", "0.5895106", "0.58917445", "0.5891119", "0.58859867" ]
0.0
-1
TODO: add fields, constructors, fill method bodies, etc..
void shuffle() { cards.addAll(dealtCards); dealtCards.removeAll(dealtCards); Collections.shuffle(cards); System.out.println("Shuffled cards" + cards); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Methods() {\n // what is this doing? -PMC\n }", "private FundInfo() {\n initFields();\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private Infer() {\n\n }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n protected void init() {\n }", "Reproducible newInstance();", "@Override\n\tpublic void generate() {\n\t\tJavaObject object = new JavaObject(objectType);\n\n\t\t// Fields\n\t\taddFields(object);\n\n\t\t// Empty constructor\n\t\taddEmptyConstructor(object);\n\n\t\t// Types constructor\n\t\taddTypesConstructor(object);\n\n\t\t// Clone constructor\n\t\taddCloneConstructor(object);\n\n\t\t// Setters\n\t\taddSetters(object);\n\n\t\t// Build!\n\t\taddBuild(object);\n\n\t\t// Done!\n\t\twrite(object);\n\t}", "private TigerData() {\n initFields();\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n void init() {\n }", "@Override\n public void init() {\n }", "abstract Object build();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "private TMCourse() {\n\t}", "@Override\n public void init() {}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "protected abstract void construct();", "private void __sep__Constructors__() {}", "@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 protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private stendhal() {\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public void init() {\r\n\t\t// to override\r\n\t}", "public FieldScrapper() \r\n {\r\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "protected Doodler() {\n\t}", "@Override\n public void init() {\n }", "private void init() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override // opcional\n public void init(){\n\n }", "private FieldInfo() {\r\n\t}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "@Override\r\n\tpublic void makerear() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tprotected void initializeFields() {\n\n\t}", "@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}", "public MethodEx2() {\n \n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }", "private Response() {\n initFields();\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "private void init() {\n\n\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\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "private void init() {\n }", "private FundList() {\n initFields();\n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "protected void init() {\n // to override and use this method\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "public abstract Object build();", "@Override\n protected void prot() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "private MApi() {}", "@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 RandomData() {\n initFields();\n }", "private TypicalPersons() {}", "private TypicalPersons() {}", "@Override\n\tprotected void initialize() {\n\n\t}", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "public void init() {\n \n }" ]
[ "0.639159", "0.62765527", "0.61574304", "0.61524355", "0.6138258", "0.6127574", "0.6099286", "0.60955393", "0.60939646", "0.6092477", "0.6077862", "0.6065927", "0.6062237", "0.6058136", "0.6055563", "0.60280675", "0.6023094", "0.6019143", "0.6007541", "0.59960455", "0.59932125", "0.59874403", "0.59874403", "0.59874403", "0.59869164", "0.59869164", "0.59869164", "0.59869164", "0.59869164", "0.59869164", "0.59835994", "0.5977357", "0.5958464", "0.5955892", "0.5942862", "0.5942862", "0.5942862", "0.5942862", "0.5942862", "0.59388196", "0.5935545", "0.59139377", "0.5913878", "0.59121376", "0.58979243", "0.58973145", "0.58973145", "0.5896925", "0.5890678", "0.5884994", "0.58833206", "0.58758706", "0.5874574", "0.58740383", "0.5867374", "0.5862029", "0.5862029", "0.5862029", "0.58611715", "0.5861026", "0.58458275", "0.58454585", "0.58454585", "0.58454585", "0.58425695", "0.5841171", "0.5841171", "0.5837309", "0.5837309", "0.5837309", "0.5837309", "0.5837309", "0.5837309", "0.5835103", "0.58340067", "0.58327043", "0.5827722", "0.5820934", "0.5819566", "0.5805236", "0.5795843", "0.57955337", "0.57955337", "0.57949716", "0.57899004", "0.57899004", "0.5789038", "0.5783311", "0.5774478", "0.57728237", "0.5772264", "0.5772264", "0.5772129", "0.5771366", "0.5771366", "0.5766884", "0.5766275", "0.5766275", "0.5766275", "0.5766275", "0.57653594" ]
0.0
-1
Just for some manual tests
public static void main(String[] args) { CardDeck deck = new CardDeck(); System.out.println(deck.dealHand(5)); // <- print 5 cards 3 times System.out.println(deck.dealHand(5)); System.out.println(deck.dealHand(5)); System.out.println(deck.dealHand(50)); // <- only 39 cards should be printed here System.out.println(deck.dealHand(50)); // <- and empty list should be printed deck.shuffle(); System.out.println(deck.dealHand(5)); // <- another 5 cards }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void test() {\n\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private test5() {\r\n\t\r\n\t}", "public void testGetInsDyn() {\n }", "@Test\n public void testDAM30203001() {\n testDAM30102001();\n }", "@Test\r\n\tpublic void testSanity() {\n\t}", "@Test\n public void testDAM30103001() {\n // settings as done for testDAM30102001 are identical\n testDAM30102001();\n }", "private stendhal() {\n\t}", "private void testProXml(){\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Test\n public void testDAM30402001() {\n testDAM30101001();\n }", "@Test\n public void testDAM30601001() {\n testDAM30102001();\n }", "@Test\n public void testDAM30903001() {\n testDAM30802001();\n }", "@Test\n\tpublic void testDoGeneration() {\n\t}", "@Test\n\tpublic void testEvilPuzzleGeneration() {\n\t}", "public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }", "private void kk12() {\n\n\t}", "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "@Test\r\n\tpublic void contents() throws Exception {\n\t}", "@Test\n\tpublic void testNormalPuzzleGeneration() {\n\t}", "@Override\n\tpublic void test() {\n\t\t\n\t}", "public void testaReclamacao() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void test5() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "@Test\n\tpublic void getWorksTest() throws Exception {\n\t}", "public void testCheckOxyEmpty() {\n }", "@Test\n public void testAddACopy() {\n }", "public void testPerformance() {\n \t}", "protected boolean func_70814_o() { return true; }", "private ProtomakEngineTestHelper() {\r\n\t}", "public void testGetBasedata() {\n }", "public void testSetBasedata() {\n }", "@Override\n public void test() {\n \n }", "@Test\n\tpublic abstract void testTransform4();", "@Test\n public void testQuickMapList() {\n//TODO: Test goes here... \n }", "private void poetries() {\n\n\t}", "@Test\n public void testGetProductInfo() throws Exception {\n }", "private void strin() {\n\n\t}", "public void mo38117a() {\n }", "@Before\n\t public void setUp() {\n\t }", "public void testLoadOrder() throws Exception {\n }", "@Override\n public void perish() {\n \n }", "protected TestBench() {}", "@Test\n public void testWalkForPduTarget() throws Exception {\n//TODO: Test goes here... \n }", "public final void mo51373a() {\n }", "private static void cajas() {\n\t\t\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void method_4270() {}", "@Override\n public void runTest() {\n }", "@Test\n\tpublic void testReadTicketOk() {\n\t}", "void mo57277b();", "public void testWriteOrders() throws Exception {\n }", "public void mo21877s() {\n }", "@Test\n\tpublic void testHardPuzzleGeneration() {\n\t}", "@Test\r\n public void elCerdoNoSePuedeAtender() {\n }", "@Test\n public void shouldProcessData() throws Exception {\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 }", "@Test\n\tpublic void testFetchResult_with_proper_data() {\n\t}", "@Test \n\tpublic void get() \n\t{\n\t\tassertTrue(true);\n\t}", "@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}", "@Test\r\n\tpublic void testFrontTimes() {\r\n//\t\tassertEquals(\"ChoCho\", WarmUpTwo.frontTimes)\r\n\t\tfail(\"Not yet implemented\");\r\n\t\t\r\n\t}", "public void testBidu(){\n\t}", "@Test\n\tpublic void testVersionCheck() throws Exception{\n\t}", "@Override\n @Before\n public void setUp() throws IOException {\n }", "@Test\n\tpublic void testSet() {\n\t}", "@Test\n public void matchCorrect() {\n }", "@Test\n\tpublic void searchForProductLandsOnCorrectProduct() {\n\t}", "public void mo38850q() {\n }", "@Override\n protected void setup() {\n }", "@Test\r\n\tpublic void testGetState() {\r\n\t}", "public void mo4359a() {\n }", "@Test\n\tvoid searchTest() {\n\t}", "public void testAddEntry(){\n }", "@Test\n public void testOncoKBInfo() {\n // TODO: test OncoKBInfo\n }", "@Test\n public void iterator() {\n }", "protected void mo6255a() {\n }", "private void m50366E() {\n }", "void testCanGetList();", "@Test\n public void testDAM31102001() {\n testDAM31001001();\n }", "@Test\n void completeItemsAsString() {\n\n }", "public void test() {\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Test\n\tpublic void test_process_some_stage_operation()\n\t{\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Test\n void completeItemsAsString() {\n }", "public void testGetStartValue() {\n TaskSeriesCollection c = createCollection1();\n TaskSeriesCollection c3 = createCollection3();\n }", "@Test\n public void testQuickCopy() {\n//TODO: Test goes here... \n }", "@Test\n public void testGetNumberAvailable() {\n }", "@Test\n\tpublic void shouldGenerateSomeStuff() {\n\t\tString applicationName = \"cool-application-name\";\n\t\tEngagement engagement = buildSingleClusterMultiProjectEngagementNoBuildTool(applicationName);\n\t\tGson gson = new GsonBuilder().create();\n\t\tString output = gson.toJson(engagement);\n\t\tLOGGER.info(\"{}{}{}\",\"\\n\\n\", output, \"\\n\\n\");\n\t}", "@Before\n\tpublic void setUp() {\n\t}", "@Test\n\tpublic void testFtoC(){\n\t}", "@Override\r\n\tpublic void sssDoLwTestInit() {\n\r\n\t}", "abstract int pregnancy();", "@Test\r\n public void testGetUserHistory() {\r\n }" ]
[ "0.64173454", "0.64031696", "0.6056965", "0.5950567", "0.5825551", "0.58148694", "0.579752", "0.57839584", "0.57695913", "0.5739704", "0.57165235", "0.5714779", "0.5683232", "0.5675774", "0.5669667", "0.56651264", "0.56525946", "0.5650546", "0.5645881", "0.5644267", "0.56439704", "0.5625836", "0.5612464", "0.5608624", "0.5606656", "0.5594855", "0.5594456", "0.5591917", "0.5587295", "0.5570439", "0.5568268", "0.556606", "0.55610865", "0.5560849", "0.5560426", "0.5553265", "0.554816", "0.5547968", "0.5546383", "0.55337644", "0.55323243", "0.5529359", "0.5514568", "0.55140185", "0.5511459", "0.5506661", "0.5502767", "0.54892594", "0.54791677", "0.54697764", "0.546976", "0.54576766", "0.54565483", "0.54565066", "0.545513", "0.5441791", "0.5435853", "0.54326224", "0.5432387", "0.5432387", "0.5432387", "0.5432387", "0.5432387", "0.5432387", "0.5432387", "0.5422368", "0.5418498", "0.5418141", "0.5412514", "0.54062855", "0.5405488", "0.54024166", "0.5399556", "0.5393835", "0.5392254", "0.5385795", "0.5378166", "0.53770304", "0.5375647", "0.5368249", "0.5364", "0.53636205", "0.5362724", "0.5362313", "0.5359061", "0.5358809", "0.5355909", "0.5349042", "0.5346415", "0.5343122", "0.53393954", "0.5337236", "0.5333117", "0.5332748", "0.53289986", "0.5327976", "0.53273845", "0.5319741", "0.5318476", "0.5317681", "0.53169876" ]
0.0
-1
function to load map. If map is not created it will create it for you
private void initilizeMap() { mContext = getApplicationContext(); try { locationManager = (LocationManager) getSystemService(LOCATION_SERVICE); // Getting GPS status isGPSEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER); // Getting network status isNetworkEnabled = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER); if (!isGPSEnabled && !isNetworkEnabled) { // No network provider is enabled } else { this.canGetLocation = true; if (isNetworkEnabled) { locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this); Log.d("Network", "Network"); if (locationManager != null) { // Criteria criteria = new Criteria(); // provider = locationManager.getBestProvider(criteria, false); location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); if (location != null) { latitude = location.getLatitude(); longitude = location.getLongitude(); // initialLocation = new LatLng(latitude, longitude); initialLocation = new Location("inicial"); initialLocation.setLatitude(latitude); initialLocation.setLongitude(longitude); } } } // If GPS enabled, get latitude/longitude using GPS Services if (isGPSEnabled) { if (location == null) { locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this); Log.d("GPS Enabled", "GPS Enabled"); if (locationManager != null) { location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); if (location != null) { latitude = location.getLatitude(); longitude = location.getLongitude(); // initialLocation = new LatLng(latitude, longitude); initialLocation = new Location("inicial"); initialLocation.setLatitude(latitude); initialLocation.setLongitude(longitude); } } } } } } catch (Exception e) { e.printStackTrace(); } gMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap(); myLocation = new LatLng(latitude,longitude); gMap.animateCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 15)); // // // check if map is created successfully or not // if (gMap == null) // { // Toast.makeText(getApplicationContext(), // "Sorry! unable to create maps", Toast.LENGTH_SHORT) // .show(); // } gMap.setMyLocationEnabled(true); // Marker TP = gMap.addMarker(new MarkerOptions().position(myLocation).title("Estoy aca").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_VIOLET))); // lstLatLngs = new ArrayList<LatLng>(); gMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() { @Override public void onMapClick(final LatLng point) { // TODO Auto-generated method stub AlertDialog.Builder builder = new AlertDialog.Builder(CrearIncidenteGPS.this); builder.setMessage("Desea agregar un incidente en este lugar?") .setCancelable(false) .setPositiveButton("Si", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { //Agregar el incidente // lstLatLngs.add(point); insertarIncidente(point); // gMap.addMarker(new MarkerOptions().position(point)); } }) .setNegativeButton("No", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); AlertDialog alert = builder.create(); alert.show(); } }); // HttpRequestFactory httpRequestFactory = createRequestFactory(transport); // HttpRequest request = httpRequestFactory.buildGetRequest(new GenericUrl(PLACES_SEARCH_URL)); // request.url.put("key", ""); // request.url.put("location", latitude + "," + longitude); // request.url.put("radius", 500); // request.url.put("sensor", "false"); // infowindow = new google.maps.InfoWindow(); // var service = new google.maps.places.PlacesService(gMap); // service.nearbySearch(request, callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TiledMap loadMap(String path);", "public void loadMap() {\n\n try {\n new File(this.mapName).mkdir();\n FileUtils.copyDirectory(\n new File(this.plugin.getDataFolder() + \"/maps/\" + this.mapName), new File(this.mapName));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n WorldCreator wc = new WorldCreator(this.mapName);\n World world = wc.createWorld();\n world.setAutoSave(false);\n world.setPVP(false);\n world.setDifficulty(Difficulty.PEACEFUL);\n world.setGameRuleValue(\"doDaylightCycle\", \"false\");\n world.setGameRuleValue(\"mobGriefing\", \"false\");\n world.setGameRuleValue(\"doMobSpawning\", \"false\");\n world.setGameRuleValue(\"doFireTick\", \"false\");\n world.setGameRuleValue(\"keepInventory\", \"true\");\n world.setGameRuleValue(\"commandBlockOutput\", \"false\");\n world.setSpawnFlags(false, false);\n\n try {\n final JsonParser parser = new JsonParser();\n final FileReader reader =\n new FileReader(this.plugin.getDataFolder() + \"/maps/\" + this.mapName + \"/config.json\");\n final JsonElement element = parser.parse(reader);\n this.map = JumpyJumpMap.fromJson(element.getAsJsonObject());\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "public void loadMapsModule(){\n Element rootElement = FileOperator.fileReader(MAPS_FILE_PATH);\n if(rootElement!=null){\n Iterator i = rootElement.elementIterator();\n while (i.hasNext()) {\n Element element = (Element) i.next();\n GridMap map =new GridMap();\n map.decode(element);\n mapsList.add(map);\n }\n }\n }", "public void loadMap(){\n level= dataBase.getData(\"MAP\",\"PLAYER\");\n }", "private void initilizeMap() {\n\t\tif (googleMap == null) {\n\t\t\tgoogleMap = ((MapFragment) getFragmentManager().findFragmentById(\n\t\t\t\t\tR.id.map)).getMap();\n\n\t\t\tif (googleMap == null) {\n\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\"Sorry! unable to create maps\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t.show();\n\t\t\t}\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void loadMap(){\r\n\t\t//Datei anlegen, falls nicht vorhanden\r\n\t\ttry {\r\n\t\t\tFile file = new File(homeFileLocation);\r\n\t\t\tif(!file.exists()){\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t\tSystem.out.println(\"Created new File.\");\r\n\r\n\t\t\t\t//Leere Map schreiben\r\n\t\t\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(homeFileLocation));\r\n\t\t\t\toos.writeObject(new HashMap<String, String>());\r\n\t\t\t\toos.flush();\r\n\t\t\t\toos.close();\r\n\r\n\t\t\t\tSystem.out.println(\"Wrote empty HashMap.\");\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\t//Map laden\r\n\t\ttry {\r\n\t\t\tObjectInputStream ois = new ObjectInputStream(new FileInputStream(homeFileLocation));\r\n\t\t\tthis.map = (HashMap<String, String>) ois.readObject();\r\n\t\t\tois.close();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public abstract void createMap();", "public void initializeMap() {\n\t\tgameMap = new GameMap(GameMap.MAP_HEIGHT, GameMap.MAP_WIDTH);\n\t\tgameMap.initializeFields();\n\t}", "public void load(String mapData){\n try {\n JSONObject obj = new JSONObject(mapData);\n int rows = (int)Math.round(obj.getDouble(\"rows\"));\n int cols = (int)Math.round(obj.getDouble(\"columns\"));\n loomoMap.buildMap(rows,cols);\n loomoMap.setMapName(obj.getString(\"name\"));\n loomoMap.setCellSize(obj.getDouble(\"cellSize\"));\n addLandmarkFromJSONMap(C.LANDMARK_OBSTACLE,obj,\"obstacles\");\n addLandmarkFromJSONMap(C.LANDMARK_DESTINATIONS,obj,\"destinations\");\n addLandmarkFromJSONMap(C.LANDMARK_HOME,obj,\"homeStations\");\n Destination hl = loomoMap.getLandmarks().get(\"homeA\");\n homeDestination = hl;\n loomoApplication.updateHomeLocation(this.homeDestination);\n loomoMap.printMap();\n } catch (Exception e){\n Log.d(TAG, \"loadMap: \"+ e.getMessage());\n }\n }", "public void loadMap(Player player) {\r\n\tregionChucks = RegionBuilder.findEmptyChunkBound(8, 8); \r\n\tRegionBuilder.copyAllPlanesMap(235, 667, regionChucks[0], regionChucks[1], 8);\r\n\t\r\n\t}", "public void loadMap() {\n\t\tchests.clear();\r\n\t\t// Load the chests for the map\r\n\t\tchestsLoaded = false;\r\n\t\t// Load data asynchronously\r\n\t\tg.p.getServer().getScheduler().runTaskAsynchronously(g.p, new AsyncLoad());\r\n\t}", "public Map getMap(){\n\t image = ImageIO.read(getClass().getResource(\"/images/maps/\" + mapName + \".png\"));\n\t\t\n\t\t\n\t\treturn null;\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\r\n private void newMap() throws IOException, ClassNotFoundException {\r\n this.music_map.clear();\r\n if (needNewMap()) {\r\n if (!save_file.exists()) {\r\n System.out.println(\"DIZIONARIO NON PRESENTE\");\r\n System.out.println(\"CREAZIONE NUOVO DIZIONARIO IN CORSO...\");\r\n\r\n this.setTarget();\r\n\r\n this.recoursiveMapCreation(this.music_root);\r\n this.saveMap();\r\n } else {\r\n System.out.println(\"DIZIONARIO NON AGGIORNATO\");\r\n if (!UtilFunctions.newDictionaryRequest(this.save_file, this.music_root)) {\r\n System.out.println(\"AGGIORNAMENTO DIZIONARIO RIFIUTATO\");\r\n FileInputStream f = new FileInputStream(this.save_file);\r\n ObjectInputStream o = new ObjectInputStream(f);\r\n this.music_map.putAll((Map<String, String[]>) o.readObject());\r\n current.set(ProgressDialog.TOTAL.get());\r\n } else {\r\n System.out.println(\"CREAZIONE NUOVO DIZIONARIO IN CORSO...\");\r\n this.setTarget();\r\n this.recoursiveMapCreation(this.music_root);\r\n this.saveMap();\r\n }\r\n }\r\n } else {\r\n System.out.println(\"DIZIONARIO GIA' PRESENTE\");\r\n FileInputStream f = new FileInputStream(this.save_file);\r\n ObjectInputStream o = new ObjectInputStream(f);\r\n this.music_map.putAll((Map<String, String[]>) o.readObject());\r\n current.set(ProgressDialog.TOTAL.get());\r\n }\r\n }", "public void buildMap(){\n map =mapFactory.createMap(level);\n RefLinks.SetMap(map);\n }", "private void createMapView() {\n try {\n if (null == mMap) {\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();\n\n /**\n * If the map is still null after attempted initialisation,\n * show an error to the user\n */\n if (null == mMap) {\n Toast.makeText(getApplicationContext(),\n \"Error creating map\", Toast.LENGTH_SHORT).show();\n }\n }\n } catch (NullPointerException exception) {\n Log.e(\"mapApp\", exception.toString());\n }\n }", "private void initializeMap() {\n // - Map -\n map = (MapView) this.findViewById(R.id.map);\n //map.setBuiltInZoomControls(true);\n map.setMultiTouchControls(true);\n map.setMinZoomLevel(16);\n // Tiles for the map, can be changed\n map.setTileSource(TileSourceFactory.MAPNIK);\n\n // - Map controller -\n IMapController mapController = map.getController();\n mapController.setZoom(19);\n\n // - Map overlays -\n CustomResourceProxy crp = new CustomResourceProxy(getApplicationContext());\n currentLocationOverlay = new DirectedLocationOverlay(this, crp);\n\n map.getOverlays().add(currentLocationOverlay);\n\n // - Location -\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n if(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER));\n }\n else if (locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER));\n }\n else {\n currentLocationOverlay.setEnabled(false);\n }\n }", "public void initMap(String path) {\n \tgameState = StateParser.makeGame(path);\n\t\tintel = gameState.getCtrlIntel();\t\n\t\tsnakes = gameState.getSnake();\n\t\tmap = gameState.getMap();\n }", "public void initMap() {\r\n\r\n\t\tproviders = new AbstractMapProvider[3];\t\r\n\t\tproviders[0] = new Microsoft.HybridProvider();\r\n\t\tproviders[1] = new Microsoft.RoadProvider();\r\n\t\tproviders[2] = new Microsoft.AerialProvider();\r\n\t\t/*\r\n\t\t * providers[3] = new Yahoo.AerialProvider(); providers[4] = new\r\n\t\t * Yahoo.RoadProvider(); providers[5] = new OpenStreetMapProvider();\r\n\t\t */\r\n\t\tcurrentProviderIndex = 0;\r\n\r\n\t\tmap = new InteractiveMap(this, providers[currentProviderIndex],\r\n\t\t\t\tUtilities.mapOffset.x, Utilities.mapOffset.y,\r\n\t\t\t\tUtilities.mapSize.x, Utilities.mapSize.y);\r\n\t\tmap.panTo(locationUSA);\r\n\t\tmap.setZoom(minZoom);\r\n\r\n\t\tupdateCoordinatesLimits();\r\n\t}", "private GameMap loadMap(final int mapId, final boolean mobsRespawn, final boolean loadNpcs, final boolean loadReactors) {\n\t\tWzData data = mapDataProvider.getData(this.getPaddedMapName(mapId));\n\t\tfinal WzData link = data.getChildByPath(\"info/link\");\n\t\tif (link != null) {\n\t\t\tdata = mapDataProvider.getData(this.getPaddedMapName(WzDataTool.getIntConvert(\"info/link\", data)));\n\t\t}\n\n\t\tfloat monsterRate = 0;\n\t\tif (mobsRespawn) {\n\t\t\tfinal WzData mobRate = data.getChildByPath(\"info/mobRate\");\n\t\t\tif (mobRate != null) {\n\t\t\t\tmonsterRate = ((Float) mobRate.getData()).floatValue();\n\t\t\t}\n\t\t}\n\n\t\tfinal int returnMapId = WzDataTool.getInt(\"info/returnMap\", data);\n\t\tfinal GameMap map = new GameMap(mapId, returnMapId, monsterRate);\n\n\t\tfinal PortalFactory portalFactory = new PortalFactory();\n\t\tfor (final WzData portalData : data.getChildByPath(\"portal\")) {\n\t\t\tfinal Portal portal = portalFactory.createPortal(portalData);\n\t\t\tmap.addPortal(portal);\n\t\t}\n\n\t\tfinal FootholdTree footholds = loadFootholds(data);\n\t\tmap.setFootholds(footholds);\n\n\t\t// load areas (EG PQ platforms)\n\t\tfinal WzData areaData = data.getChildByPath(\"area\");\n\t\tif (areaData != null) {\n\t\t\tfor (final WzData area : areaData) {\n\t\t\t\tfinal Rectangle mapArea = WzDataTool.getRectangle(\"x1\", \"y1\", \"x2\", \"y2\", area);\n\t\t\t\tmap.addArea(mapArea);\n\t\t\t}\n\t\t}\n\n\t\tString message = null;\n\t\tfinal WzData timeMob = data.getChildByPath(\"info/timeMob\");\n\t\tif (timeMob != null) {\n\t\t\tmessage = WzDataTool.getString(\"message\", timeMob, null);\n\t\t}\n\n\t\t// load life data (npc, monsters)\n\t\tfor (final WzData life : data.getChildByPath(\"life\")) {\n\t\t\tfinal String type = WzDataTool.getString(\"type\", life);\n\t\t\tif (loadNpcs || !type.equals(\"n\")) {\n\t\t\t\tfinal String id = WzDataTool.getString(\"id\", life);\n\t\t\t\tfinal AbstractLoadedLife myLife = this.loadLife(life, id, type);\n\t\t\t\tif (myLife instanceof Monster) {\n\t\t\t\t\tfinal Monster mob = (Monster) myLife;\n\t\t\t\t\tfinal int mobTime = WzDataTool.getInt(\"mobTime\", life, 0);\n\t\t\t\t\tfinal byte team = (byte) WzDataTool.getInt(\"team\", life, -1);\n\t\t\t\t\tmap.addMonsterSpawn(mob, mobTime, team, message);\n\t\t\t\t} else {\n\t\t\t\t\tfinal boolean bAdd = true;\n\t\t\t\t\tif (bAdd) {\n\t\t\t\t\t\tmap.addMapObject(myLife);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.addAreaBossSpawn(map);\n\t\tmap.loadMonsterRate(true);\n\n\t\t// load reactor data\n\t\tfinal WzData reactorEntry = data.getChildByPath(\"reactor\");\n\t\tif (loadReactors && reactorEntry != null) {\n\t\t\tfor (final WzData reactor : reactorEntry) {\n\t\t\t\tfinal String id = WzDataTool.getString(\"id\", reactor);\n\t\t\t\tif (id == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfinal Reactor loadedReactor = this.loadReactor(reactor, id);\n\t\t\t\tmap.spawnReactor(loadedReactor);\n\t\t\t}\n\t\t}\n\n\t\tmap.setClock(data.getChildByPath(\"clock\") != null);\n\t\tmap.setEverlast(data.getChildByPath(\"info/everlast\") != null);\n\t\tmap.setTown(data.getChildByPath(\"info/town\") != null);\n\n\t\tmap.setForcedReturnMap(WzDataTool.getInt(\"info/forcedReturn\", data, 999999999));\n\n\t\tmap.setRecoveryRate(WzDataTool.getFloat(\"info/recovery\", data, 1.0f));\n\t\tmap.setHPDec(WzDataTool.getInt(\"info/decHP\", data, 0));\n\t\tmap.setHPDecProtect(WzDataTool.getInt(\"info/protectItem\", data, 0));\n\t\tmap.setFieldLimit(WzDataTool.getInt(\"info/fieldLimit\", data, 0));\n\t\tmap.setTimeLimit(WzDataTool.getInt(\"info/timeLimit\", data, -1));\n\n\t\tmap.setPersonalShop(data.getChildByPath(\"info/personalShop\") != null);\n\t\tmap.setCreateMobInterval((short) WzDataTool.getInt(\"info/createMobInterval\", data, 9000));\n\n\t\tmap.setFirstUserEnter(WzDataTool.getString(\"info/onFirstUserEnter\", data, \"\"));\n\t\tmap.setUserEnter(WzDataTool.getString(\"info/onUserEnter\", data, \"\"));\n\t\treturn map;\n\t}", "public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}", "public Map initMap(){\n\t\tif (map == null){\n\t\t\tmap = createMap();\n\t\t}\n\t\treturn map;\n\t}", "public void setMapFile(String mapName) {\n map = Map.loadFromJSON(mapName);\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n\n setUpMap();\n\n }\n });\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.mapView2))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap( lat, longi, \"ISS/ NUS\");\n }\n }\n }", "private void initMap() {\n Log.wtf(TAG, \"initMap() has been instantiated\");\n\n Log.d(TAG, \"initMap: initializing the map...\");\n try {\n MapsInitializer.initialize(getActivity().getApplicationContext());\n } catch (Exception e) {\n e.printStackTrace();\n }\n mMapView.getMapAsync(this);\n }", "private void intializeMap() {\n\n if (googleMap == null) {\n\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n\n\n // getPlacesMarkers();\n }\n }", "private void setUpMapIfNeeded() {\n if (map == null) {\n map = fragMap.getMap();\n if (map != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n try {\n setUpMap();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "public abstract mapnik.Map createMap(Object recycleTag);", "private void setUpMapIfNeeded() {\n \tif (mMap == null) {\r\n \t\t//Instanciamos el objeto mMap a partir del MapFragment definido bajo el Id \"map\"\r\n \t\tmMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\r\n \t\t// Chequeamos si se ha obtenido correctamente una referencia al objeto GoogleMap\r\n \t\tif (mMap != null) {\r\n \t\t\t// El objeto GoogleMap ha sido referenciado correctamente\r\n \t\t\t//ahora podemos manipular sus propiedades\r\n \t\t\t//Seteamos el tipo de mapa\r\n \t\t\tmMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\r\n \t\t\t//Activamos la capa o layer MyLocation\r\n \t\t\tmMap.setMyLocationEnabled(true);\r\n \t\t\t\r\n \t\t\tAgregarPuntos();\r\n \t\t\t\r\n \t\t\t\r\n \t\t}\r\n \t}\r\n }", "private void setUpMapIfNeeded() {\n\t\tif (mMap == null) {\n\t\t\t// Try to obtain the map from the SupportMapFragment.\n\t\t\tmMap = ((SupportMapFragment) getSupportFragmentManager()\n\t\t\t\t\t.findFragmentById(R.id.map1)).getMap();\n\t\t\t// Check if we were successful in obtaining the map.\n\t\t\tif (mMap != null) {\n\t\t\t\tsetUpMap();\n\t\t\t}\n\t\t}\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Intent info = getIntent();\n setUpMap(new LatLng(info.getDoubleExtra(\"latitude\", 0), info.getDoubleExtra(\"longitude\", 0)), info.getStringExtra(\"name\"));\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\r\n // Try to obtain the map from the SupportMapFragment.\r\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\r\n .getMap();\r\n // Check if we were successful in obtaining the map.\r\n if (mMap != null) {\r\n setUpMap();\r\n }\r\n }\r\n }", "private void initilizeMap() {\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n }", "private void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void initMapEngine() {\n String path = new File(m_activity.getExternalFilesDir(null), \".here-map-data\")\n .getAbsolutePath();\n // This method will throw IllegalArgumentException if provided path is not writable\n com.here.android.mpa.common.MapSettings.setDiskCacheRootPath(path);\n\n MapEngine.getInstance().init(new ApplicationContext(m_activity), new OnEngineInitListener() {\n @Override\n public void onEngineInitializationCompleted(Error error) {\n if (error == Error.NONE) {\n /*\n * Similar to other HERE Android SDK objects, the MapLoader can only be\n * instantiated after the MapEngine has been initialized successfully.\n */\n getMapPackages();\n } else {\n Log.e(TAG, \"Failed to initialize MapEngine: \" + error);\n new AlertDialog.Builder(m_activity).setMessage(\n \"Error : \" + error.name() + \"\\n\\n\" + error.getDetails())\n .setTitle(R.string.engine_init_error)\n .setNegativeButton(android.R.string.cancel,\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(\n DialogInterface dialog,\n int which) {\n m_activity.finish();\n }\n }).create().show();\n }\n }\n });\n }", "private static void initializeMaps()\n\t{\n\t\taddedPoints = new HashMap<String,String[][][]>();\n\t\tpopulatedList = new HashMap<String,Boolean>();\n\t\tloadedAndGenerated = new HashMap<String,Boolean>();\n\t}", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n \tmMap = ((com.google.android.gms.maps.MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\n \t// Check if we were successful in obtaining the map.\n \tif (mMap != null) {\n \t\tmakeMarkers();\n \t\tloadMarkersFromParse();\n \t}\n }\n \n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n try {\n\t\t\t\t\tsetUpMap();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n }\n }", "private void setupMap() {\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());\n \t\tif ( status != ConnectionResult.SUCCESS ) {\n \t\t\t// Google Play Services are not available.\n \t\t\tint requestCode = 10;\n \t\t\tGooglePlayServicesUtil.getErrorDialog( status, this, requestCode ).show();\n \t\t} else {\n \t\t\t// Google Play Services are available.\n \t\t\tif ( this.googleMap == null ) {\n \t\t\t\tFragmentManager fragManager = this.getSupportFragmentManager();\n \t\t\t\tSupportMapFragment mapFrag = (SupportMapFragment) fragManager.findFragmentById( R.id.edit_gpsfilter_area_google_map );\n \t\t\t\tthis.googleMap = mapFrag.getMap();\n \n \t\t\t\tif ( this.googleMap != null ) {\n \t\t\t\t\t// The Map is verified. It is now safe to manipulate the map.\n \t\t\t\t\tthis.configMap();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "@Override\n\tpublic void init() {\n\t\tworld = new World(gsm);\n\t\tworld.init();\n\t\t\n\t\tif(worldName == null){\n\t\t\tworldName = \"null\";\n\t\t\tmap_name = \"map\";\n\t\t} \n\t\tworld.generate(map_name);\n\t}", "private void setUpMap() {\n mMap.setMyLocationEnabled(true);\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n SupportMapFragment mapFragment = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map));\n mapFragment.getMapAsync(this);\n mMap = mapFragment.getMap();\n\n }\n }", "private void loadMapScene() {\n mapView.getMapScene().loadScene(MapScheme.NORMAL_DAY, new MapScene.LoadSceneCallback() {\n\n @Override\n public void onLoadScene(@Nullable MapError mapError) {\n if (mapError == null) {\n positioningExample = new BackgroundPositioningExample();\n positioningExample.onMapSceneLoaded(mapView, MainActivity.this);\n positioningExample.startForegroundService();\n } else {\n Log.d(TAG, \"Loading map failed: mapError: \" + mapError.name());\n }\n }\n });\n }", "private void loadMap(String path) {\n\t\ttry {\n\t\t\tfor(Player p : players)\tp.clear();\n\t\t\tmap.players = players;\n\t\t\tmap.setPlayerNumber(playerNumber);\n\t\t\tfor(Player p : map.players) {\n\t\t\t\tp.setMap(map);\n\t\t\t\tp.setArmies(map.getInitialArmiesNumber());\n\t\t\t}\n\t\t\tmap.setPlayerNumber(map.players.size());\n\t\t\tmap.load(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "MAP createMAP();", "public void open() {\r\n\t\tFile f = getOpenFile(\"Map Files\", \"tilemap\");\r\n\t\tif (f == null) return;\r\n\t\tfile = f;\r\n\t\tframe.setTitle(\"Tile Mapper - \"+file.getName());\r\n\t\tSystem.out.println(\"Opening \"+file.getAbsolutePath());\r\n\r\n\t\ttry {\r\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r\n\t\t\tInputStream is = this.getClass().getClassLoader().getResourceAsStream(\"tilemapper/Map.xsd\");\r\n\t\t\tfactory.setSchema(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(new StreamSource(is)));\r\n\r\n\t\t\tDocument dom = factory.newDocumentBuilder().parse(file);\r\n\r\n\t\t\t// we have a valid document\r\n\t\t\t//printNode(dom, \"\");\r\n\t\t\tNode mapNode = null;\r\n\t\t\tNodeList nodes = dom.getChildNodes();\r\n\t\t\tfor (int i=0; i<nodes.getLength(); i++) {\r\n\t\t\t\tNode node = nodes.item(i);\r\n\t\t\t\tif (node.getNodeName() == \"Map\") mapNode = node;\r\n\t\t\t}\r\n\t\t\tif (mapNode == null) return;\r\n\t\t\tmapPanel.parseDOM((Element)mapNode);\r\n\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\tSystem.out.println(\"The underlying parser does not support the requested features.\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (FactoryConfigurationError e) {\r\n\t\t\tSystem.out.println(\"Error occurred obtaining Document Builder Factory.\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public Map makeMap(int mapID) throws IOException{\r\n switch (mapID){\r\n case 1:\r\n BufferedReader br1 = new BufferedReader(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(\"maps\" + \"/\" + \"map1.json\")));\r\n map = json.fromJson(br1, Map.class);\r\n break;\r\n case 2:\r\n BufferedReader br2 = new BufferedReader(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(\"maps\" + \"/\" + \"map2.json\")));\r\n map = json.fromJson(br2, Map.class);\r\n break;\r\n case 3:\r\n BufferedReader br3 = new BufferedReader(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(\"maps\" + \"/\" + \"map3.json\")));\r\n map = json.fromJson(br3, Map.class);\r\n break;\r\n case 4:\r\n BufferedReader br4 = new BufferedReader(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(\"maps\" + \"/\" + \"map4.json\")));\r\n map = json.fromJson(br4, Map.class);\r\n break;\r\n }\r\n\r\n return map;\r\n }", "private void inflateMap() {\n\n // Alter the visibiliity\n waitLayout.setVisibility(View.GONE);\n mapWearFrame.setVisibility(View.VISIBLE);\n\n // Set up fragment manager\n fm = getFragmentManager();\n\n // Set up map fragment\n mapFragment = (MapFragment) fm.findFragmentByTag(TAG_FRAG_MAP);\n if (mapFragment == null) {\n // Initialize map options\n GoogleMapOptions mapOptions = new GoogleMapOptions();\n mapOptions.mapType(GoogleMap.MAP_TYPE_NORMAL)\n .compassEnabled(true)\n .rotateGesturesEnabled(true)\n .tiltGesturesEnabled(true);\n mapFragment = MapFragment.newInstance(mapOptions);\n }\n mapFragment.getMapAsync(this);\n\n // Add map to DismissOverlayView\n fm.beginTransaction().add(R.id.mapWearFrame, mapFragment).commit();\n }", "private void initializeMap() {\n if (googleMap == null) {\n googleMap = ((MapFragment) getFragmentManager().findFragmentById(\n R.id.map)).getMap();\n\n // check if map is created successfully or not\n if (googleMap == null) {\n Toast.makeText(getApplicationContext(),\n \"Sorry! unable to create maps\", Toast.LENGTH_SHORT)\n .show();\n }\n\n // Set Enable of My Location\n //googleMap.setMyLocationEnabled(true);\n\n // Setting a ChangeListener of my location for the Google Map\n //googleMap.setOnMyLocationChangeListener(mMLCListener);\n\n // Setting a ClickListener for the Google Map\n googleMap.setOnMapClickListener(mMCListener);\n\n // Set Enable of Zoom\n googleMap.getUiSettings().setZoomGesturesEnabled(true);\n }\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMapFragment = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.fragment_show_place_info_map));\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "private void setUpMapIfNeeded() {\n if ( googleMap == null) {\r\n\r\n // Try to obtain the map from the SupportMapFragment.\r\n googleMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.routesMap)).getMap();\r\n // Check if we were successful in obtaining the map.\r\n if (googleMap != null) {\r\n setUpMap();\r\n }\r\n }\r\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n }\n }", "public void createMap() {\n\t\tArrayList<String>boardMap = new ArrayList<String>(); //boardmap on tiedostosta ladattu maailman malli\n\t\t\n\t\t//2. try catch blocki, ei jaksa laittaa metodeja heittämään poikkeuksia\n\t\ttry {\n\t\t\tboardMap = loadMap(); //ladataan data boardMap muuttujaan tiedostosta\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\t\n\t\t// 3. j=rivit, i=merkit yksittäisellä rivillä\n\t\tfor(int j=0; j<boardMap.size();j++){ \t\t//..rivien lkm (boardMap.size) = alkioiden lkm. \n\t\t\tfor(int i=0; i<boardMap.get(j).length(); i++){\t\t//..merkkien lkm rivillä (alkion Stringin pituus .length)\n\t\t\t\tCharacter hexType = boardMap.get(j).charAt(i);\t//tuodaan tietyltä riviltä, yksittäinen MERKKI hexType -muuttujaan\n\t\t\t\tworld.add(new Hex(i, j, hexType.toString()));\t//Luodaan uusi HEXa maailmaan, Character -merkki muutetaan Stringiksi että Hex konstructori hyväksyy sen.\n\t\t\t}\n\t\t}\n\t\tconvertEmptyHex();\n\t}", "public void setMap01(){\n\t\tmapSelect = \"map01.txt\";\n\t\treloadMap(mapSelect);\n\t\tsetImg(mapSelect);\n\t}", "public void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getChildFragmentManager()\n .findFragmentById(R.id.location_map)).getMap();\n MapsInitializer.initialize(getActivity().getApplicationContext());\n // Check if we were successful in obtaining the map.\n if (mMap != null)\n setUpMap();\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void readMapFromFile() {\r\n\t\ttry {\r\n\t\t\tType type = new TypeToken<HashMap<String, Country>>() {}.getType();\r\n\t\t\tthis.daoMap = (HashMap<String, Country>) gson.fromJson(new FileReader(path), type);\r\n\t\t} catch (JsonSyntaxException | JsonIOException | FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "private boolean initMap(Bundle savedInstanceState) {\n // setContentView(R.layout.activity_map);\n Log.v(TAG, \"Map Activated\");\n LayoutInflater inflater = LayoutInflater.from(GeoCollectMapActivity.this);\n inflater.inflate(R.layout.activity_map, (FrameLayout)findViewById(R.id.content_frame));\n \n this.mapView = (AdvancedMapView) findViewById(R.id.advancedMapView);\n\n mapView.setClickable(true);\n mapView.setBuiltInZoomControls(true);\n\n // mapView.setDebugSettings(new DebugSettings(true, true, false));\n\n mapView.getMapZoomControls().setZoomLevelMax((byte) 24);\n mapView.getMapZoomControls().setZoomLevelMin((byte) 1);\n\n final String filePath = PreferenceManager.getDefaultSharedPreferences(this).getString(\n MapView.MAPSFORGE_BACKGROUND_FILEPATH, null);\n final int type = Integer.parseInt(PreferenceManager.getDefaultSharedPreferences(this).getString(\n MapView.MAPSFORGE_BACKGROUND_RENDERER_TYPE, \"0\"));\n File mapfile = null;\n\n // if the map file was edited in the preferences\n if (filePath != null && type == 0) {\n mapfile = new File(filePath);\n }\n\n if (mapfile != null && mapfile.exists()) {\n // use it\n mapView.setMapFile(new File(filePath));\n\n } else if (MAP_FILE != null) {\n\n Log.i(TAG, \"setting background file\");\n mapView.setMapFile(MAP_FILE);\n loadPersistencePreferences();\n\n } else {\n Log.i(TAG, \"unable to set background file\");\n // return false;\n }\n\n return true;\n }", "public void loadMap(FlxState gameState, String jsonMapPath){\n\t\tHashMap<String, String> layers = new HashMap<String, String>();\n\t\tHashMap<String, Array<JsonValue>> objectsJson = new HashMap<String, Array<JsonValue>>();\n\n\t\t// Cargo las layers y objectsJson. También seteo la FlxG.camera para que tenga los bounds del mapa.\n\t\tparseMap(jsonMapPath, RmbsTiledManager.objectsLayerName, layers, objectsJson);\n\n\t\t// Delego el parseo de layers a algún RmbsLayerParser\n\t\tthis.layerParser.parseLayers(gameState, layers, objectsJson);\n\t}", "@SuppressWarnings(\"all\")\r\n\tpublic Map(String map, Location mapLocation){\r\n\t\tMapPreset preset = MapPreset.presets.get(map);\r\n\t\tif (preset != null){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tfinal World world = mapLocation.getWorld();\r\n\t\t\t\tfinal double x = mapLocation.getX();\r\n\t\t\t\tfinal double y = mapLocation.getY();\r\n\t\t\t\tfinal double z = mapLocation.getZ();\r\n\t\t\t\tfinal float pitch = mapLocation.getPitch();\r\n\t\t\t\tfinal float yaw = mapLocation.getYaw();\r\n\t\t\t\t\t\t\r\n\t\t\t\tfinal Float[] alliesBase = preset.getSpawnAllies();\r\n\t\t\t\tfinal Float[] axisBase = preset.getSpawnAxis();\r\n\t\t\t\t\r\n\t\t\t\tfinal Float[] bombA = preset.getBombA();\r\n\t\t\t\tfinal Float[] bombB = preset.getBombB();\r\n\t\t\t\t\r\n\t\t\t\tfinal Float[] domA = preset.getDomA();\r\n\t\t\t\tfinal Float[] domB = preset.getDomB();\r\n\t\t\t\tfinal Float[] domC = preset.getDomC();\r\n\t\t\t\t\r\n\t\t\t\tmainSpawn = mapLocation;\r\n\t\t\t\talliesSpawn = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + alliesBase[0], \r\n\t\t\t\t\t\ty + alliesBase[1], \r\n\t\t\t\t\t\tz + alliesBase[2],\r\n\t\t\t\t\t\talliesBase[3], \r\n\t\t\t\t\t\talliesBase[4]);\r\n\t\t\t\t\r\n\t\t\t\taxisSpawn = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + axisBase[0], \r\n\t\t\t\t\t\ty + axisBase[1], \r\n\t\t\t\t\t\tz + axisBase[2],\r\n\t\t\t\t\t\taxisBase[3], \r\n\t\t\t\t\t\taxisBase[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.bombA = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + bombA[0], \r\n\t\t\t\t\t\ty + bombA[1], \r\n\t\t\t\t\t\tz + bombA[2],\r\n\t\t\t\t\t\tbombA[3], \r\n\t\t\t\t\t\tbombA[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.bombB = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + bombB[0], \r\n\t\t\t\t\t\ty + bombB[1], \r\n\t\t\t\t\t\tz + bombB[2],\r\n\t\t\t\t\t\tbombB[3], \r\n\t\t\t\t\t\tbombB[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.domA = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + domA[0], \r\n\t\t\t\t\t\ty + domA[1], \r\n\t\t\t\t\t\tz + domA[2],\r\n\t\t\t\t\t\tdomA[3], \r\n\t\t\t\t\t\tdomA[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.domB = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + domB[0], \r\n\t\t\t\t\t\ty + domB[1], \r\n\t\t\t\t\t\tz + domB[2],\r\n\t\t\t\t\t\tdomB[3], \r\n\t\t\t\t\t\tdomB[4]);\r\n\t\t\t\t\r\n\t\t\t\tthis.domC = new Location(\r\n\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\tx + domC[0], \r\n\t\t\t\t\t\ty + domC[1], \r\n\t\t\t\t\t\tz + domC[2],\r\n\t\t\t\t\t\tdomC[3], \r\n\t\t\t\t\t\tdomC[4]);\r\n\t\t\t\t\r\n\t\t\t\tfor (Float[] spawnpoint : preset.getSpawnpoints()){\r\n\t\t\t\t\tspawnsList.add(new Location(\r\n\t\t\t\t\t\t\tworld, \r\n\t\t\t\t\t\t\tx + spawnpoint[0], \r\n\t\t\t\t\t\t\ty + spawnpoint[1], \r\n\t\t\t\t\t\t\tz + spawnpoint[2], \r\n\t\t\t\t\t\t\tspawnpoint[3], \r\n\t\t\t\t\t\t\tspawnpoint[4]));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tmapID = maps.size()+1;\r\n\t\t\t\tmapName = map;\r\n\t\t\t\tmapAvailable.add(mapID);\r\n\t\t\t\tmaps.put(maps.size()+1, this);\r\n\t\t\t} catch (Exception e){\r\n\t\t\t\tFPSCaste.log(\"Something went wrong! disabling map: \" + map, Level.WARNING);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tFPSCaste.log(\"Could not initialise the Map \" + map, Level.WARNING);\r\n\t\t}\r\n\t}", "public void SetupMap()\n {\n mMap.setMyLocationEnabled(true);\n\n // GAME LatLng\n LatLng latLng = new LatLng(53.227668, -0.540038);\n\n // Create instantiate Marker\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.draggable(false);\n markerOptions.title(\"GAME\");\n\n MapsInitializer.initialize(getActivity());\n // Create Marker at pos\n mMap.addMarker(markerOptions);\n // Position Map Camera to pos\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition(latLng, 100, 0, 0)));\n }", "void readMap()\n {\n try {\n FileReader\t\tmapFile = new FileReader(file);\n StringBuffer\tbuf = new StringBuffer();\n int\t\t\t\tread;\n boolean\t\t\tdone = false;\n \n while (!done)\n {\n read = mapFile.read();\n if (read == -1)\n done = true;\n else\n buf.append((char) read);\n }\n \n mapFile.close();\n \n parseMap(buf.toString());\n \n } catch (Exception e) {\n ErrorHandler.displayError(\"Could not read the map file data.\", ErrorHandler.ERR_OPEN_FAIL);\n }\n }", "@Override\r\n\t\t\tpublic void onMapLoadFinish() {\n\t\t\t}", "private void initMap(){\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n mapFragment.getMapAsync(this);\n\n }", "private void setUpMap() {\n // Crear all map elements\n mGoogleMap.clear();\n // Set map type\n mGoogleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n // If we cant find the location now, we call a Network Provider location\n if (mLocation != null) {\n // Create a LatLng object for the current location\n LatLng latLng = new LatLng(mLocation.getLatitude(), mLocation.getLongitude());\n // Show the current location in Google Map\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n // Draw the first circle in the map\n mCircleOptions = new CircleOptions().fillColor(0x5500ff00).strokeWidth(0l);\n // Zoom in the Google Map\n mGoogleMap.animateCamera(CameraUpdateFactory.zoomTo(15));\n\n // Zoom in the Google Map\n //icon = BitmapDescriptorFactory.fromResource(R.drawable.logo2);\n\n // Creation and settings of Marker Options\n mMarkerOptions = new MarkerOptions().position(latLng).title(\"You are here!\");//.icon(icon);\n // Creation and addition to the map of the Marker\n mMarker = mGoogleMap.addMarker(mMarkerOptions);\n // set the initial map radius and draw the circle\n drawCircle(RADIUS);\n }\n }", "protected final boolean loadMapping() {\r\n if (_loaded) { return false; }\r\n _loaded = true;\r\n return true;\r\n }", "@Override\n\tpublic Map loadMap() {\n\t\ttry {\n\t\t\treturn XMLDeserialiser.loadMap();\n\t\t} catch (XMLException e) {\n\t\t\tPopup.showInformation(\"Le fichier choisi n'est pas un plan valide.\");\n\t\t\treturn null;\n\t\t} catch (NoFileChosenException e) {\n\t\t\treturn null;\n\t\t}\n\t}", "private void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))\n .getMap();\n mMap.setOnMarkerDragListener(this);\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap();\n }\n }\n }", "public void loadMapGame(LoadedMap map)throws BadMapException{\n ArrayList<Boat> boats = createLoadedBoats(map);\n\n Board board = new Board(map.getInterMatrix().length, map.getInterMatrix()[0].length, 0);\n\n //CREATE A GAME\n GameData gameData = new GameData(board, boats, false);\n\n //POSITION BOATS INTO MATRIX\n loadPosBoats(gameData);\n Game.getInstance().setGameData(gameData);\n Game.getInstance().setEnded(false);\n }", "public static void loadMap(CityMap map)\n\t\t\tthrows ParserConfigurationException, SAXException, IOException, XMLException {\n\t\tCityMap previous = map;\n\t\tFile xml = XMLFileOpener.getInstance().open(true);\n\t\tDocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\n\t\tDocument document = docBuilder.parse(xml);\n\t\tElement root = document.getDocumentElement();\n\t\tif (root.getNodeName().equals(\"Reseau\")) {\n\t\t\tmap.clear();\n\t\t\tbuildMapFromDOMXML(root, map);\n\t\t} else {\n\t\t\tmap = previous;\n\t\t\tthrow new XMLException(\"Document non conforme\");\n\t\t}\n\t}", "public abstract void createMap(Game game) throws FreeColException;", "public abstract void createMap(Game game) throws FreeColException;", "public MapData(String mapName) {\n this.mapName = mapName;\n readFile();\n}", "public MapPanel(String map, Object[] toLoad) {\n\t\tthis.setLayout(null);\n\t\tthis.setBackground(Color.white);\n\t\tthis.setPreferredSize(new Dimension(WIDTH, HEIGHT));\n\t\tthis.setSize(this.getPreferredSize());\n\t\tthis.setVisible(true);\n\t\tthis.setFocusable(true);\n\t\tthis.requestFocus();\n\t\ttheMap = new Map(map, 50);\n\t\ttheTrainer = new Trainer(theMap, toLoad);\n\n\t\tinBattle = false;\n\t}", "private void setUpMap() {\n\t\t \n\t\tmMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\t\t//mMap.setMyLocationEnabled(true);\n\t\t\t \n\t\tmMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(\n\t\t\t\tlatitude, longitude), 12.0f));\n\n\t}", "public void loadStartingMap(int up_offset, int down_offset, int left_offset,\n int right_offset) {\n int counter = 0;\n for (int y = 0; y < MAP_HEIGHT; y++) {\n for (int x = 0; x < MAP_WIDTH; x++) {\n tiles[x][y] = new Tile(x * TILE_SIZE, y * TILE_SIZE,\n Constants.testMap[counter], true);\n backGroundTiles[x][y] = new Tile(x * TILE_SIZE, y * TILE_SIZE,\n Constants.testMap_base[counter], true);\n grassTiles[x][y] = new Tile(x * TILE_SIZE, y * TILE_SIZE,\n Constants.testMap_grass[counter], true);\n counter++;\n }\n }\n\n for (int i = 0; i < up_offset; i++) {\n for (int j = 0; j < 4; j++) {\n adjustUp();\n }\n }\n for (int i = 0; i < down_offset; i++) {\n for (int j = 0; j < 4; j++) {\n adjustDown();\n }\n }\n for (int i = 0; i < left_offset; i++) {\n for (int j = 0; j < 4; j++) {\n adjustLeft();\n }\n }\n for (int i = 0; i < right_offset; i++) {\n for (int j = 0; j < 4; j++) {\n adjustRight();\n }\n }\n\n this.setGrassTileRaw(Constants.testMap_grass); // used for IsInGrass\n this.id = 1;\n }", "private void setUpMapIfNeeded() {\r\n if (map == null) {\r\n SupportMapFragment smf = null;\r\n smf = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);\r\n\r\n if (smf != null) {\r\n map = smf.getMap();\r\n if (map != null) {\r\n map.setMyLocationEnabled(true);\r\n }\r\n }\r\n }\r\n }", "public MapManager(DataBase dataBase,boolean load){\n RefLinks.setMapManager(this);\n this.dataBase=dataBase;\n mapFactory=new MapFactory();\n loadMap();\n buildMap();\n }", "void loadMapToPhysics(TiledMap map, World physics);", "private void setUpMapIfNeeded() {\n\t\tif (mMap == null) {\n\t\t\tlogger.info(\"map is null\");\n\t\t\tlogger.debug(\"maps is null\");\n\t\t\tSystem.out.println(\"map is null\");\n\t\t\t// Try to obtain the map from the SupportMapFragment.\n\t\t\tmMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();\n\t\t\t// Check if we were successful in obtaining the map.\n\t\t\tif (mMap != null) {\n\t\t\t\taddMarker(markerLatLng);\n\t\t\t\t \n\t\t\t}\n\t\t}else\n\t\t{\n\t\t\t\n\t\t\t// Creating an instance of MarkerOptions\n addMarker(markerLatLng);\n \n\t\t\n\t\t}\n\t}", "private static void initCityMapping() {\n try {\n log.info(\"initCityMapping start.....\");\n try {\n File dicFile = new File(\"/config/gj_city.json\");\n if (dicFile.exists()) {\n String dic = FileCopyUtils.copyToString(new InputStreamReader(\n new FileInputStream(dicFile),\n StandardCharsets.UTF_8));\n cityInfos = JSONObject.parseObject(dic, Map.class);\n }\n } catch (Exception e) {\n log.error(\"加载城市信息失败,{}\", e.getMessage(), e);\n e.printStackTrace();\n }\n log.info(\"initCityMapping end.....\");\n } catch (Exception e) {\n log.info(\"初始化城市字典数据失败!\", e);\n }\n }", "public boolean openMap(String name){\n\t\tObjectInputStream inputStream;\n\t\tString path = new File (\".\").getAbsolutePath();\n\t\tString fileName=path.concat(\"//Maps//\"+name+\".txt\");\n\t\tFile file = new File(fileName);\n\t\t\n\t\tMap m=Map.getInstance();\n\t\ttemp.clear();\n\t\t\n\t\t//Map.temp = new LinkedList<Path>();\n\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fileInputStream=new FileInputStream(file);\n\t\t\tinputStream = new ObjectInputStream(fileInputStream);\n\t\t\tint width=inputStream.readInt();\n\t\t\tint height=inputStream.readInt();\n//\t\t\tSystem.out.println(\"width: \"+width);\n//\t\t\tSystem.out.println(\"height: \"+height);\n\n\t\t\tm.setMap(height, width);\n\t\t\t\n\t\t\tm.setCompletePath(false);\n\t\t\tm.currentPos=-1;\n\t\t\tm.currentPath=null;\n\t\t\t\n\t\t\t\n\t\t\tint pPos=0;\n\t\t\tpPos=inputStream.readInt();\n\n\t\t\t//System.out.println(\"The Path is:\");\n\t\t\twhile(pPos>=0){\n\t\t\t\tm.setCellToPath(pPos);\n\t\t\t//\tSystem.out.println(pPos);\n\t\t\t\tpPos=inputStream.readInt();\n\n\t\t\t}\n\t\t\t\n\t\t\tinputStream.close();\n\t\t\tm.finalizePath();\n\t\t\treturn true; \n\t\t\n\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Problem opening the file \"+ name+\".txt\");\n\t\t//\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Problem reading the file\"+ name+\".txt\");\n\t\t//\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn false;\n\n\t}", "@Override\n public void onMapLoaded() {\n mMapStatus = new MapStatus.Builder().zoom(9).build();\n mBaiduMap.animateMapStatus(MapStatusUpdateFactory.newMapStatus(mMapStatus));\n }", "@FXML\n\tpublic void loadMap(ActionEvent ev) {\n menuBar.getScene().getWindow().hide();\n \n\t\tStage map = new Stage();\n\t\ttry {\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"/FXML/Map.fxml\"));\n\t\t\tScene scene = new Scene(root);\n\t\t\tmap.setScene(scene);\n\t\t\tmap.show();\n\t\t\tmap.setResizable(false);\n\t\t\tmap.centerOnScreen();\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\t\n\t}", "@FXML\n\tpublic void loadMap(ActionEvent ev) {\n menuBar.getScene().getWindow().hide();\n \n\t\tStage map = new Stage();\n\t\ttry {\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"/FXML/Map.fxml\"));\n\t\t\tScene scene = new Scene(root);\n\t\t\tmap.setScene(scene);\n\t\t\tmap.show();\n\t\t\tmap.setResizable(false);\n\t\t\tmap.centerOnScreen();\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\t\n\t}", "private void setUpMap() {\n mMap.getUiSettings().setZoomControlsEnabled(false);\n \n // Setting an info window adapter allows us to change the both the\n // contents and look of the\n // info window.\n mMap.setInfoWindowAdapter(new CustomInfoWindowAdapter(getLayoutInflater()));\n \n // Add lots of markers to the map.\n addMarkersToMap();\n \n }", "public MKMapView() {}", "public void notifyMapLoaded();", "public void loadLevel(String tileMapPath)\r\n\t{\r\n\t\tTiledMap map= new TmxMapLoader().load(tileMapPath);\r\n\t\tcreateLights(map);\r\n\t}", "public MapGenerator(GameMap map) {\n\n gameMap = map;\n setGuiHashMap();\n firstCountryFlag=true;\n validator = new MapValidator(gameMap);\n }", "public static Map load(Player player, String name) {\n\t\tif (!new File(\"save/\" + name + \"/chunk\").isDirectory())\n\t\t\treturn null;\n\t\t// Setting\n\t\ttry (DataInputStream dis = new DataInputStream(\n\t\t\t\tnew FileInputStream(new File(\"save/\" + name + \"/map.settings\")))) {\n\t\t\tplayer.getCamera().setPosition(new Vector3f(dis.readFloat(), dis.readFloat(), dis.readFloat())); // Player\n\t\t\tChunk.SIZE = dis.readInt();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\t// Chunk\n\t\tMap map = new Map(name);\n\t\tfor (String fileName : new File(\"save/\" + name + \"/chunk\").list()) {\n\t\t\tString[] pos = fileName.substring(0, fileName.length() - 4).split(\"_\");\n\t\t\tint chunkX = Integer.parseInt(pos[0]);\n\t\t\tint chunkY = Integer.parseInt(pos[1]);\n\t\t\tif (!loadChunk(map, new Vector2i(chunkX, chunkY)))\n\t\t\t\treturn null;\n\t\t}\n\t\tSystem.out.println(\"[Info] Map \" + name + \" loaded\");\n\t\treturn map;\n\t}", "private void generate()\r\n {\r\n mapPieces = myMap.Generate3();\r\n mapWidth = myMap.getMapWidth();\r\n mapHeight = myMap.getMapHeight();\r\n }", "public void loadMapping(final String url) throws IOException, MappingException {\r\n loadMapping(url, DEFAULT_SOURCE_TYPE);\r\n }", "private void setUpMap() {\n Log.i(TAG, \"in setUpMap()\");\n // Set listeners for marker events. See the bottom of this class for their behavior.\n mMap.setOnMarkerClickListener(this);\n mMap.setOnInfoWindowClickListener(this);\n mMap.setOnMarkerDragListener(this);\n\n //just for testing\n// int uniqueId = generateMarkerId();\n// Marker marker = mMap.addMarker(new MarkerOptions().position(new LatLng(0, 0)).title(\"Marker\"));\n// markers.put(marker, uniqueId);\n //////\n // create UiSetting instance and default ui settings of the map\n mUiSettings = mMap.getUiSettings();\n mUiSettings.setCompassEnabled(this.compassEnabled);\n mUiSettings.setRotateGesturesEnabled(this.rotateEnabled);\n mUiSettings.setScrollGesturesEnabled(this.scrollEnabled);\n mUiSettings.setZoomControlsEnabled(this.zoomControlEnabled);\n mUiSettings.setZoomGesturesEnabled(this.zoomGesturesEnabled);\n\n // after this method is called, user can add markers and change other settings.\n //TODO: Actions(Functions) that are called within MapIsReady() are not working\n MapIsReady();\n\n }", "private void populateMap() {\n DatabaseHelper database = new DatabaseHelper(this);\n Cursor cursor = database.getAllDataForScavengerHunt();\n\n //database.updateLatLng(\"Gym\", 34.181243783767364, -117.31866795569658);\n\n while (cursor.moveToNext()) {\n double lat = cursor.getDouble(cursor.getColumnIndex(database.COL_LAT));\n double lng = cursor.getDouble(cursor.getColumnIndex(database.COL_LONG));\n int image = database.getImage(cursor.getString(cursor.getColumnIndex(database.COL_LOC)));\n\n //Log.i(\"ROW\", R.drawable.library + \"\");\n LatLng coords = new LatLng(lat, lng);\n\n GroundOverlayOptions overlayOptions = new GroundOverlayOptions()\n .image(BitmapDescriptorFactory.fromResource(image))\n .position(coords, 30f, 30f);\n\n mMap.addGroundOverlay(overlayOptions);\n }\n }", "private void setupMapView(){\n Log.d(TAG, \"setupMapView: Started\");\n\n view_stage_map = VIEW_MAP_FULL;\n cycleMapView();\n\n }", "private static void setUpMap() {\n onMapReady();\n /*mMap.setMyLocationEnabled(true);\n // For dropping a marker at a point on the Map\n mMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).title(\"My Home\").snippet(\"Home Address\"));\n // For zooming automatically to the Dropped PIN Location\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude,\n longitude), 12.0f));*/\n }" ]
[ "0.78768814", "0.7869801", "0.713924", "0.7086959", "0.703925", "0.6957559", "0.69241786", "0.68649834", "0.6818675", "0.6804128", "0.67892957", "0.6777142", "0.6694093", "0.6684106", "0.66588753", "0.66574687", "0.6656661", "0.6649066", "0.66328335", "0.66221774", "0.6604836", "0.65904343", "0.6589717", "0.6583156", "0.65756893", "0.65525407", "0.65516615", "0.65451205", "0.6519149", "0.6508489", "0.64903516", "0.6465197", "0.645817", "0.64479184", "0.6446032", "0.6439096", "0.6438176", "0.64161736", "0.64153516", "0.64120644", "0.6406473", "0.6389663", "0.6384887", "0.63752896", "0.63752896", "0.63752896", "0.6374535", "0.63719136", "0.63718647", "0.6358544", "0.6355458", "0.6353448", "0.63502765", "0.6340387", "0.63100034", "0.6306852", "0.62761825", "0.6264095", "0.62616307", "0.62485766", "0.62389034", "0.62275535", "0.6220058", "0.62120736", "0.62104714", "0.6210198", "0.6202957", "0.61907357", "0.6186279", "0.6177992", "0.61696464", "0.6166184", "0.6148865", "0.6142664", "0.6133684", "0.6133684", "0.612338", "0.61005735", "0.6095043", "0.60697025", "0.60603076", "0.60520464", "0.6041813", "0.6039734", "0.6037162", "0.602922", "0.60284495", "0.6022368", "0.6022368", "0.6008613", "0.6003948", "0.59963167", "0.5994192", "0.5990436", "0.5979677", "0.5977011", "0.5976823", "0.5976336", "0.59659475", "0.59613496", "0.5953902" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onMapClick(final LatLng point) { AlertDialog.Builder builder = new AlertDialog.Builder(CrearIncidenteGPS.this); builder.setMessage("Desea agregar un incidente en este lugar?") .setCancelable(false) .setPositiveButton("Si", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { //Agregar el incidente // lstLatLngs.add(point); insertarIncidente(point); // gMap.addMarker(new MarkerOptions().position(point)); } }) .setNegativeButton("No", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); AlertDialog alert = builder.create(); alert.show(); }
{ "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
Agregar el incidente lstLatLngs.add(point);
public void onClick(DialogInterface dialog, int id) { insertarIncidente(point); // gMap.addMarker(new MarkerOptions().position(point)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addPoints(List<Point2D> points);", "public static void instantiate(){\n listOfpoints = new ArrayList<>(12);\n listOfPolygons = new ArrayList<>(listOfpoints.size());\n\n for ( int i= 0 ; i < 70; i++ ){\n listOfpoints.add(new ArrayList<LatLng>());\n }\n\n listOfpoints.get(0).add(new LatLng(44.4293595,26.1035863));\n listOfpoints.get(0).add(new LatLng(44.4295434,26.1035434));\n listOfpoints.get(0).add(new LatLng(44.4297579,26.103479));\n listOfpoints.get(0).add(new LatLng(44.431566,26.1033503));\n listOfpoints.get(0).add(new LatLng(44.4327305,26.1031572));\n listOfpoints.get(0).add(new LatLng(44.4337724,26.1029211));\n listOfpoints.get(0).add(new LatLng(44.4342474,26.1028138));\n listOfpoints.get(0).add(new LatLng( 44.4348756,26.1025563));\n listOfpoints.get(0).add(new LatLng(44.4353199,26.1023203));\n listOfpoints.get(0).add(new LatLng( 44.4353046,26.101977));\n listOfpoints.get(0).add(new LatLng( 44.4352893,26.1015478));\n listOfpoints.get(0).add(new LatLng(44.4351974,26.1010758));\n listOfpoints.get(0).add(new LatLng(44.4350595,26.100432));\n listOfpoints.get(0).add(new LatLng(44.4348756,26.0995523));\n listOfpoints.get(0).add(new LatLng(44.4346458,26.0983292));\n listOfpoints.get(0).add(new LatLng(44.4343547,26.098415));\n listOfpoints.get(0).add(new LatLng( 44.4340176,26.0983506));\n listOfpoints.get(0).add(new LatLng( 44.4327918,26.0975996));\n listOfpoints.get(0).add(new LatLng(44.4318878,26.0972134));\n listOfpoints.get(0).add(new LatLng( 44.4307692,26.0968701));\n listOfpoints.get(0).add(new LatLng( 44.4300644,26.0968271));\n listOfpoints.get(0).add(new LatLng( 44.4298498,26.0972992));\n listOfpoints.get(0).add(new LatLng(44.4297732,26.0977713));\n listOfpoints.get(0).add(new LatLng(44.4296966,26.0985867));\n listOfpoints.get(0).add(new LatLng (44.4296506,26.0994235));\n listOfpoints.get(0).add(new LatLng (44.4295587,26.1002389));\n listOfpoints.get(0).add(new LatLng (44.4294361,26.1007754));\n listOfpoints.get(0).add(new LatLng (44.4292369,26.1016766));\n listOfpoints.get(0).add(new LatLng (44.429099,26.1025778));\n listOfpoints.get(0).add(new LatLng (44.4289917,26.1033717));\n\n\n listOfpoints.get(1).add(new LatLng (44.4356099,26.1021262));\n listOfpoints.get(1).add(new LatLng (44.43630606,26.1017829));\n listOfpoints.get(1).add(new LatLng (44.4370654,26.101461));\n listOfpoints.get(1).add(new LatLng (44.4382451,26.1007958));\n listOfpoints.get(1).add(new LatLng (44.4393176,26.1002379));\n listOfpoints.get(1).add(new LatLng (44.4406045,26.0996371));\n listOfpoints.get(1).add(new LatLng (44.4418301,26.0990792));\n listOfpoints.get(1).add(new LatLng (44.4415084,26.0983067));\n listOfpoints.get(1).add(new LatLng (44.4412173,26.0977059));\n listOfpoints.get(1).add(new LatLng (44.4409875,26.097148));\n listOfpoints.get(1).add(new LatLng (44.4406811,26.0965472));\n listOfpoints.get(1).add(new LatLng (44.4404207,26.0959893));\n listOfpoints.get(1).add(new LatLng (44.4400989,26.0963326));\n listOfpoints.get(1).add(new LatLng (44.4393636,26.0968691));\n listOfpoints.get(1).add(new LatLng (44.4390725,26.0969549));\n listOfpoints.get(1).add(new LatLng (44.4381532,26.0971051));\n listOfpoints.get(1).add(new LatLng (44.4372952,26.0975557));\n listOfpoints.get(1).add(new LatLng (44.4365598,26.0977703));\n listOfpoints.get(1).add(new LatLng (44.4358244,26.0977918));\n listOfpoints.get(1).add(new LatLng (44.435043,26.0980063));\n listOfpoints.get(1).add(new LatLng (44.4348132,26.0979205));\n listOfpoints.get(1).add(new LatLng (44.4348591,26.0983497));\n listOfpoints.get(1).add(new LatLng (44.4352115,26.1003452));\n listOfpoints.get(1).add(new LatLng (44.435472,26.1017185));\n listOfpoints.get(1).add(new LatLng (44.4356099,26.1021262));\n\n\n listOfpoints.get(2).add(new LatLng (44.4358071,26.1034753));\n listOfpoints.get(2).add(new LatLng (44.435899,26.1039688));\n listOfpoints.get(2).add(new LatLng (44.4360216,26.1044623));\n listOfpoints.get(2).add(new LatLng (44.4360982,26.1049988));\n listOfpoints.get(2).add(new LatLng (44.4362361,26.1055781));\n listOfpoints.get(2).add(new LatLng (44.4363127,26.1059));\n listOfpoints.get(2).add(new LatLng (44.4364506,26.1063721));\n listOfpoints.get(2).add(new LatLng (44.4365425,26.1067583));\n listOfpoints.get(2).add(new LatLng (44.4367264,26.1068441));\n listOfpoints.get(2).add(new LatLng (44.4369715,26.1071016));\n listOfpoints.get(2).add(new LatLng (44.4374312,26.1073591));\n listOfpoints.get(2).add(new LatLng (44.4380593,26.1076381));\n listOfpoints.get(2).add(new LatLng (44.4386722,26.1078741));\n listOfpoints.get(2).add(new LatLng (44.439239,26.1080672));\n listOfpoints.get(2).add(new LatLng (44.4399744,26.1083033));\n listOfpoints.get(2).add(new LatLng (44.4406485,26.1084106));\n listOfpoints.get(2).add(new LatLng (44.4407557,26.1080458));\n listOfpoints.get(2).add(new LatLng (44.440817,26.1075737));\n listOfpoints.get(2).add(new LatLng (44.440863,26.1070373));\n listOfpoints.get(2).add(new LatLng (44.4410928,26.1070587));\n listOfpoints.get(2).add(new LatLng (44.4419814,26.1071016));\n listOfpoints.get(2).add(new LatLng (44.4422877,26.1071875));\n listOfpoints.get(2).add(new LatLng (44.4432069,26.107445));\n listOfpoints.get(2).add(new LatLng (44.443498,26.107402));\n listOfpoints.get(2).add(new LatLng (44.4433754,26.10693));\n listOfpoints.get(2).add(new LatLng (44.4432988,26.1065008));\n listOfpoints.get(2).add(new LatLng (44.4431763,26.1059858));\n listOfpoints.get(2).add(new LatLng (44.4429465,26.1052992));\n listOfpoints.get(2).add(new LatLng (44.4429312,26.1044838));\n listOfpoints.get(2).add(new LatLng (44.4429312,26.1036469));\n listOfpoints.get(2).add(new LatLng (44.4429618,26.1029818));\n listOfpoints.get(2).add(new LatLng (44.4432069,26.1027457));\n listOfpoints.get(2).add(new LatLng (44.4431303,26.1025311));\n listOfpoints.get(2).add(new LatLng (44.4429618,26.1022737));\n listOfpoints.get(2).add(new LatLng (44.4427627,26.101866));\n listOfpoints.get(2).add(new LatLng (44.4426707,26.1015656));\n listOfpoints.get(2).add(new LatLng (44.4426554,26.101072));\n listOfpoints.get(2).add(new LatLng (44.4427014,26.1002781));\n listOfpoints.get(2).add(new LatLng (44.4427933,26.0989692));\n listOfpoints.get(2).add(new LatLng (44.4420426,26.0993125));\n listOfpoints.get(2).add(new LatLng (44.4412,26.0997202));\n listOfpoints.get(2).add(new LatLng (44.4400663,26.100321));\n listOfpoints.get(2).add(new LatLng (44.4390399,26.100836));\n listOfpoints.get(2).add(new LatLng (44.4382279,26.1012651));\n listOfpoints.get(2).add(new LatLng (44.4374924,26.1016514));\n listOfpoints.get(2).add(new LatLng (44.4366038,26.1021449));\n listOfpoints.get(2).add(new LatLng (44.4358071,26.1026384));\n listOfpoints.get(2).add(new LatLng (44.4357305,26.1027886));\n listOfpoints.get(2).add(new LatLng (44.4358071,26.1034753));\n\n\n listOfpoints.get(3).add(new LatLng (44.4290806,26.1040332));\n listOfpoints.get(3).add(new LatLng (44.4295709,26.1054494));\n listOfpoints.get(3).add(new LatLng (44.4302604,26.1070373));\n listOfpoints.get(3).add(new LatLng (44.4307508,26.1080887));\n listOfpoints.get(3).add(new LatLng (44.432804,26.111994));\n listOfpoints.get(3).add(new LatLng (44.4329113,26.1123373));\n listOfpoints.get(3).add(new LatLng (44.4330798,26.1136248));\n listOfpoints.get(3).add(new LatLng (44.4332483,26.1150195));\n listOfpoints.get(3).add(new LatLng (44.433325,26.1158349));\n listOfpoints.get(3).add(new LatLng (44.4347959,26.1162855));\n listOfpoints.get(3).add(new LatLng (44.4359143,26.1166288));\n listOfpoints.get(3).add(new LatLng (44.4365272,26.1168005));\n listOfpoints.get(3).add(new LatLng (44.4367723,26.1168434));\n listOfpoints.get(3).add(new LatLng (44.4373852,26.1166503));\n listOfpoints.get(3).add(new LatLng (44.43809,26.1163713));\n listOfpoints.get(3).add(new LatLng (44.4378755,26.1154272));\n listOfpoints.get(3).add(new LatLng (44.435516,26.1027672));\n listOfpoints.get(3).add(new LatLng (44.433708,26.1034109));\n listOfpoints.get(3).add(new LatLng (44.4330032,26.1035826));\n listOfpoints.get(3).add(new LatLng (44.4321451,26.1038401));\n listOfpoints.get(3).add(new LatLng (44.4309959,26.1039259));\n listOfpoints.get(3).add(new LatLng (44.4302451,26.1039903));\n listOfpoints.get(3).add(new LatLng (44.4296628,26.1039903));\n listOfpoints.get(3).add(new LatLng(44.4290806,26.1040332));\n\n\n\n listOfpoints.get(4).add(new LatLng ( 44.4343669 ,26.0798289));\n listOfpoints.get(4).add(new LatLng (44.434229 ,26.0801508));\n listOfpoints.get(4).add(new LatLng (44.4335088 ,26.0905363));\n listOfpoints.get(4).add(new LatLng (44.4333862 ,26.092124));\n listOfpoints.get(4).add(new LatLng ( 44.433233 ,26.0926177));\n listOfpoints.get(4).add(new LatLng ( 44.4329879 ,26.0932614));\n listOfpoints.get(4).add(new LatLng (44.4327427 , 26.0936906));\n listOfpoints.get(4).add(new LatLng (44.4301838 ,26.0965659));\n listOfpoints.get(4).add(new LatLng (44.4301685 ,26.0967161));\n listOfpoints.get(4).add(new LatLng (44.4305209 ,26.096759));\n listOfpoints.get(4).add(new LatLng (44.4311338 ,26.0968878));\n listOfpoints.get(4).add(new LatLng (44.4317468 ,26.097038));\n listOfpoints.get(4).add(new LatLng (44.4323137 ,26.0972955));\n listOfpoints.get(4).add(new LatLng (44.4327427 ,26.0974457));\n listOfpoints.get(4).add(new LatLng (44.4333709 ,26.0978534));\n listOfpoints.get(4).add(new LatLng (44.4338919 ,26.0981538));\n listOfpoints.get(4).add(new LatLng (44.434229 ,26.0982611));\n listOfpoints.get(4).add(new LatLng ( 44.4345354 ,26.0982611));\n listOfpoints.get(4).add(new LatLng (44.4346886 ,26.0981752));\n listOfpoints.get(4).add(new LatLng (44.4345814, 26.0918667));\n listOfpoints.get(4).add(new LatLng (44.4343669 ,26.0798289));\n\n\n listOfpoints.get(5).add(new LatLng (44.4348405,26.097773));\n listOfpoints.get(5).add(new LatLng (44.435043,26.0980063));\n listOfpoints.get(5).add(new LatLng (44.4365598,26.0977703));\n listOfpoints.get(5).add(new LatLng (44.4372952, 26.0975557));\n listOfpoints.get(5).add(new LatLng (44.4381532, 26.0971051));\n listOfpoints.get(5).add(new LatLng ( 44.4393636,26.0968691));\n listOfpoints.get(5).add(new LatLng(44.4397739, 26.0964855));\n listOfpoints.get(5).add(new LatLng (44.4402029,26.0960993));\n listOfpoints.get(5).add(new LatLng (44.4406778,26.0956487));\n listOfpoints.get(5).add(new LatLng(44.4405706,26.0952195));\n listOfpoints.get(5).add(new LatLng (44.4403408 ,26.0942539));\n listOfpoints.get(5).add(new LatLng (44.440065 ,26.0931811));\n listOfpoints.get(5).add(new LatLng (44.4400497, 26.0919151));\n listOfpoints.get(5).add(new LatLng (44.4398199 ,26.0897693));\n listOfpoints.get(5).add(new LatLng (44.4397893 ,26.0891041));\n listOfpoints.get(5).add(new LatLng (44.4399271 , 26.0879668));\n listOfpoints.get(5).add(new LatLng (44.4399731 ,26.0873017));\n listOfpoints.get(5).add(new LatLng (44.4399884 ,26.0867223));\n listOfpoints.get(5).add(new LatLng (44.4365719, 26.0887179));\n listOfpoints.get(5).add(new LatLng (44.434672 ,26.0898337));\n listOfpoints.get(5).add(new LatLng (44.4348405 ,26.097773));\n\n\n listOfpoints.get(6).add(new LatLng (44.4365425,26.1067583));\n listOfpoints.get(6).add(new LatLng (44.4365354,26.1075151));\n listOfpoints.get(6).add(new LatLng (44.4375926,26.113137));\n listOfpoints.get(6).add(new LatLng (44.4378224,26.114167));\n listOfpoints.get(6).add(new LatLng (44.4435828,26.1191452));\n listOfpoints.get(6).add(new LatLng (44.4440117, 26.1184585));\n listOfpoints.get(6).add(new LatLng (44.4448849, 26.1172784));\n listOfpoints.get(6).add(new LatLng (44.4457888,26.1161411));\n listOfpoints.get(6).add(new LatLng (44.4462483, 26.1149395));\n listOfpoints.get(6).add(new LatLng (44.4466773, 26.113137));\n listOfpoints.get(6).add(new LatLng (44.4467998, 26.1121929));\n listOfpoints.get(6).add(new LatLng (44.4467539, 26.1112917));\n listOfpoints.get(6).add(new LatLng (44.4469683, 26.1101973));\n listOfpoints.get(6).add(new LatLng (44.4458041, 26.1093176));\n listOfpoints.get(6).add(new LatLng (44.4453905, 26.1091888));\n listOfpoints.get(6).add(new LatLng (44.4448083, 26.1089099));\n listOfpoints.get(6).add(new LatLng (44.4442109, 26.1084163));\n listOfpoints.get(6).add(new LatLng (44.4435828, 26.1076224));\n listOfpoints.get(6).add(new LatLng (44.4433377, 26.107558));\n listOfpoints.get(6).add(new LatLng (44.4420662,26.1072791));\n listOfpoints.get(6).add(new LatLng (44.440863,26.1070373));\n listOfpoints.get(6).add(new LatLng (44.4407946,26.1082018));\n listOfpoints.get(6).add(new LatLng ( 44.4406107,26.1085451));\n listOfpoints.get(6).add(new LatLng (44.43986, 26.1084163));\n listOfpoints.get(6).add(new LatLng (44.4384659, 26.1079014));\n listOfpoints.get(6).add(new LatLng (44.4372095, 26.1073864));\n listOfpoints.get(6).add(new LatLng (44.4365425, 26.1067583));\n\n\n listOfpoints.get(7).add(new LatLng (44.4268641,26.1040563));\n listOfpoints.get(7).add(new LatLng ( 44.4265883,26.1107511));\n listOfpoints.get(7).add(new LatLng (44.4261898,26.118905));\n listOfpoints.get(7).add(new LatLng (44.4274311,26.1189909));\n listOfpoints.get(7).add(new LatLng (44.4276303,26.1189265));\n listOfpoints.get(7).add(new LatLng (44.4285497,26.1191625));\n listOfpoints.get(7).add(new LatLng (44.4288408,26.1193342));\n listOfpoints.get(7).add(new LatLng (44.4294997,26.1199564));\n listOfpoints.get(7).add(new LatLng (44.4297909, 26.1200852));\n listOfpoints.get(7).add(new LatLng (44.4303272,26.1203427));\n listOfpoints.get(7).add(new LatLng (44.431124, 26.1205787));\n listOfpoints.get(7).add(new LatLng (44.4328861, 26.1207289));\n listOfpoints.get(7).add(new LatLng (44.4329933, 26.1206431));\n listOfpoints.get(7).add(new LatLng (44.4331159, 26.1194844));\n listOfpoints.get(7).add(new LatLng (44.4331925,26.118154));\n listOfpoints.get(7).add(new LatLng (44.4332844,26.1160512));\n listOfpoints.get(7).add(new LatLng (44.4328094,26.112339));\n listOfpoints.get(7).add(new LatLng (44.4327022, 26.1120171));\n listOfpoints.get(7).add(new LatLng (44.4299135, 26.1064596));\n listOfpoints.get(7).add(new LatLng (44.4289634,26.1040778));\n listOfpoints.get(7).add(new LatLng (44.4281819,26.1039705));\n listOfpoints.get(7).add(new LatLng (44.4268641,26.1040563));\n\n\n\n\n listOfpoints.get(8).add (new LatLng (44.4262461,26.1007836));\n listOfpoints.get(8).add (new LatLng (44.4260163,26.1014488));\n listOfpoints.get(8).add (new LatLng (44.4259397,26.1023715));\n listOfpoints.get(8).add (new LatLng (44.4258784,26.103616));\n listOfpoints.get(8).add (new LatLng (44.426001,26.1039593));\n listOfpoints.get(8).add (new LatLng (44.42643,26.1039593));\n listOfpoints.get(8).add (new LatLng (44.4272882,26.1038735));\n listOfpoints.get(8).add (new LatLng (44.4282995,26.1038306));\n listOfpoints.get(8).add (new LatLng (44.4289278,26.1035731));\n listOfpoints.get(8).add (new LatLng (44.4289431,26.1028006));\n listOfpoints.get(8).add (new LatLng (44.4291423,26.1015132));\n listOfpoints.get(8).add (new LatLng (44.4286366,26.1007836));\n listOfpoints.get(8).add (new LatLng (44.4284834,26.1010196));\n listOfpoints.get(8).add (new LatLng (44.4271043,26.1008694));\n listOfpoints.get(8).add (new LatLng (44.4262461, 26.1007836));\n\n\n\n listOfpoints.get(9).add(new LatLng (44.4262461,26.1007836));\n listOfpoints.get(9).add(new LatLng (44.4284834,26.1010196));\n listOfpoints.get(9).add(new LatLng (44.4290094,26.1000479));\n listOfpoints.get(9).add(new LatLng (44.4292545,26.0986961));\n listOfpoints.get(9).add(new LatLng (44.4293465,26.0971726));\n listOfpoints.get(9).add(new LatLng (44.4294844,26.0964216));\n listOfpoints.get(9).add(new LatLng (44.4301739,26.0956276));\n listOfpoints.get(9).add(new LatLng (44.432411,26.0931385));\n listOfpoints.get(9).add(new LatLng (44.4327022,26.0925163));\n listOfpoints.get(9).add(new LatLng (44.4328401,26.0919584));\n listOfpoints.get(9).add(new LatLng (44.4329014, 26.0913576));\n listOfpoints.get(9).add(new LatLng (44.4260059,26.0907353));\n listOfpoints.get(9).add(new LatLng (44.4262051,26.091658));\n listOfpoints.get(9).add(new LatLng (44.4265882, 26.0922588));\n listOfpoints.get(9).add(new LatLng (44.4269867,26.0926879));\n listOfpoints.get(9).add(new LatLng (44.4267108,26.0998763));\n listOfpoints.get(9).add(new LatLng (44.4262461,26.1007836));\n\n\n listOfpoints.get(10).add(new LatLng (44.4260059,26.0907353));\n listOfpoints.get(10).add(new LatLng (44.4215507, 26.0903665));\n listOfpoints.get(10).add(new LatLng (44.4255811,26.0980483));\n listOfpoints.get(10).add(new LatLng ( 44.4265772,26.0999795));\n listOfpoints.get(10).add(new LatLng (44.4266998,26.099722));\n listOfpoints.get(10).add(new LatLng (44.4269867, 26.0926879));\n listOfpoints.get(10).add(new LatLng (44.4265882,26.0922588));\n listOfpoints.get(10).add(new LatLng (44.4262051,26.091658));\n listOfpoints.get(10).add(new LatLng (44.4260059,26.0907353));\n\n\n listOfpoints.get(11).add(new LatLng (44.4214281, 26.0905382));\n listOfpoints.get(11).add(new LatLng (44.4207385, 26.0915467));\n listOfpoints.get(11).add(new LatLng (44.4199568, 26.0929629));\n listOfpoints.get(11).add(new LatLng (44.4192059,26.0943576));\n listOfpoints.get(11).add(new LatLng (44.4187155,26.095409));\n listOfpoints.get(11).add(new LatLng (44.4186235,26.0957524));\n listOfpoints.get(11).add(new LatLng (44.4189607, 26.0968253));\n listOfpoints.get(11).add(new LatLng (44.4212442,26.1039063));\n listOfpoints.get(11).add(new LatLng (44.4227001,26.1039921));\n listOfpoints.get(11).add(new LatLng (44.4251367,26.1039921));\n listOfpoints.get(11).add(new LatLng (44.425765,26.103799));\n listOfpoints.get(11).add(new LatLng (44.425811,26.1027476));\n listOfpoints.get(11).add(new LatLng (44.4259182,26.101503));\n listOfpoints.get(11).add(new LatLng (44.4260715,26.1009237));\n listOfpoints.get(11).add(new LatLng (44.4264086,26.1001297));\n listOfpoints.get(11).add(new LatLng (44.4260255, 26.0993143));\n listOfpoints.get(11).add(new LatLng (44.4252899, 26.0978981));\n listOfpoints.get(11).add(new LatLng (44.424064,26.0955593));\n listOfpoints.get(11).add(new LatLng (44.4230372,26.0935851));\n listOfpoints.get(11).add(new LatLng (44.4214281,26.0905382));\n\n\n listOfpoints.get(12).add(new LatLng (44.4213365,26.1040423));\n listOfpoints.get(12).add(new LatLng (44.4216123,26.1052654));\n listOfpoints.get(12).add(new LatLng (44.4226851,26.1084411));\n listOfpoints.get(12).add(new LatLng (44.4237731,26.1117241));\n listOfpoints.get(12).add(new LatLng (44.4244168,26.11181));\n listOfpoints.get(12).add(new LatLng (44.4263629,26.1118743));\n listOfpoints.get(12).add(new LatLng (44.4264242,26.1109946));\n listOfpoints.get(12).add(new LatLng (44.4265315,26.1078832));\n listOfpoints.get(12).add(new LatLng (44.4267154,26.1041496));\n listOfpoints.get(12).add(new LatLng (44.4254588, 26.1042354));\n listOfpoints.get(12).add(new LatLng (44.4242482,26.1041925));\n listOfpoints.get(12).add(new LatLng (44.4213365,26.1040423));\n\n\n\n listOfpoints.get(13).add(new LatLng (44.4212442, 26.1039063));\n listOfpoints.get(13).add(new LatLng (44.4208987, 26.1041756));\n listOfpoints.get(13).add(new LatLng (44.4155345,26.1045404));\n listOfpoints.get(13).add(new LatLng (44.4156111, 26.1051198));\n listOfpoints.get(13).add(new LatLng (44.4156724, 26.106257));\n listOfpoints.get(13).add(new LatLng (44.4157184,26.1068793));\n listOfpoints.get(13).add(new LatLng (44.4157797, 26.1071153));\n listOfpoints.get(13).add(new LatLng (44.415841, 26.1077805));\n listOfpoints.get(13).add(new LatLng (44.4159024,26.1090465));\n listOfpoints.get(13).add(new LatLng (44.416025,26.1110635));\n listOfpoints.get(13).add(new LatLng (44.4161629,26.1116643));\n listOfpoints.get(13).add(new LatLng (44.4163468, 26.112072));\n listOfpoints.get(13).add(new LatLng (44.4166993,26.1127158));\n listOfpoints.get(13).add(new LatLng (44.4170518, 26.1133595));\n listOfpoints.get(13).add(new LatLng (44.4177109, 26.1127158));\n listOfpoints.get(13).add(new LatLng (44.4184006,26.1118575));\n listOfpoints.get(13).add(new LatLng (44.4190136,26.1112566));\n listOfpoints.get(13).add(new LatLng (44.4199331, 26.1107846));\n listOfpoints.get(13).add(new LatLng (44.4215883,26.1101838));\n listOfpoints.get(13).add(new LatLng (44.4229369,26.10954));\n listOfpoints.get(13).add(new LatLng (44.422753, 26.1089178));\n listOfpoints.get(13).add(new LatLng (44.4222626,26.1074372));\n listOfpoints.get(13).add(new LatLng (44.4217262,26.1059137));\n listOfpoints.get(13).add(new LatLng (44.4212442, 26.1039063));\n\n\n\n listOfpoints.get(14).add(new LatLng (44.4172379,26.1135832));\n listOfpoints.get(14).add(new LatLng (44.4169314,26.1139266));\n listOfpoints.get(14).add(new LatLng (44.4177284,26.1143128));\n listOfpoints.get(14).add(new LatLng (44.4185253,26.1147205));\n listOfpoints.get(14).add(new LatLng (44.4237666,26.1189047));\n listOfpoints.get(14).add(new LatLng (44.4237819,26.1191408));\n listOfpoints.get(14).add(new LatLng (44.4240425,26.1191622));\n listOfpoints.get(14).add(new LatLng (44.4258814,26.1192481));\n listOfpoints.get(14).add(new LatLng (44.425912,26.1188404));\n listOfpoints.get(14).add(new LatLng (44.426004,26.1167804));\n listOfpoints.get(14).add(new LatLng (44.4261113,26.1148063));\n listOfpoints.get(14).add(new LatLng (44.4262798,26.1120812));\n listOfpoints.get(14).add(new LatLng (44.4238739,26.1119525));\n listOfpoints.get(14).add(new LatLng (44.4235674,26.1115662));\n listOfpoints.get(14).add(new LatLng (44.4230157,26.109914));\n listOfpoints.get(14).add(new LatLng (44.4218817,26.1103646));\n listOfpoints.get(14).add(new LatLng (44.4200733,26.1110512));\n listOfpoints.get(14).add(new LatLng (44.4187246,26.1118666));\n listOfpoints.get(14).add(new LatLng (44.4172379,26.1135832));\n\n\n listOfpoints.get(15).add(new LatLng (44.4329128,26.0911565));\n listOfpoints.get(15).add(new LatLng (44.4334184,26.0843973));\n listOfpoints.get(15).add(new LatLng (44.4305378,26.0839467));\n listOfpoints.get(15).add(new LatLng (44.4304765,26.0840969));\n listOfpoints.get(15).add(new LatLng (44.4305531,26.0845475));\n listOfpoints.get(15).add(new LatLng (44.4306604,26.0853844));\n listOfpoints.get(15).add(new LatLng (44.4302773,26.0908131));\n listOfpoints.get(15).add(new LatLng (44.4304765,26.0910277));\n listOfpoints.get(15).add(new LatLng (44.4329128,26.0911565));\n\n\n listOfpoints.get(16).add(new LatLng (44.4254029,26.0786466));\n listOfpoints.get(16).add(new LatLng (44.4252956,26.0790543));\n listOfpoints.get(16).add(new LatLng (44.4246213,26.0901265));\n listOfpoints.get(16).add(new LatLng (44.4247746,26.0905127));\n listOfpoints.get(16).add(new LatLng (44.4298621,26.0909634));\n listOfpoints.get(16).add(new LatLng (44.4300919,26.0907273));\n listOfpoints.get(16).add(new LatLng (44.430475,26.0853414));\n listOfpoints.get(16).add(new LatLng ( 44.4291112,26.0806422));\n listOfpoints.get(16).add(new LatLng (44.428391,26.0795693));\n listOfpoints.get(16).add(new LatLng (44.4277781,26.0794835));\n listOfpoints.get(16).add(new LatLng (44.42574,26.0784535));\n listOfpoints.get(16).add(new LatLng (44.4254029,26.0786466));\n\n\n listOfpoints.get(17).add(new LatLng (44.4334039,26.1159853));\n listOfpoints.get(17).add(new LatLng (44.433312,26.1178736));\n listOfpoints.get(17).add(new LatLng (44.4331128,26.1208562));\n listOfpoints.get(17).add(new LatLng (44.4327757,26.1238603));\n listOfpoints.get(17).add(new LatLng (44.4325765,26.1256413));\n listOfpoints.get(17).add(new LatLng (44.4354264,26.1251477));\n listOfpoints.get(17).add(new LatLng (44.4389196,26.122723));\n listOfpoints.get(17).add(new LatLng (44.4391954,26.1224012));\n listOfpoints.get(17).add(new LatLng (44.4381383,26.1165003));\n listOfpoints.get(17).add(new LatLng (44.4368666,26.1169724));\n listOfpoints.get(17).add(new LatLng (44.4364683,26.1169295));\n listOfpoints.get(17).add(new LatLng (44.4334039,26.1159853));\n\n\n listOfpoints.get(18).add(new LatLng (44.4454662,26.0911104));\n listOfpoints.get(18).add(new LatLng (44.4453896, 26.0909388));\n listOfpoints.get(18).add(new LatLng (44.4444245,26.0918185));\n listOfpoints.get(18).add(new LatLng (44.4428313, 26.093342));\n listOfpoints.get(18).add(new LatLng (44.4413912,26.0947797));\n listOfpoints.get(18).add(new LatLng (44.4405333,26.0959169));\n listOfpoints.get(18).add(new LatLng (44.4419274,26.0990069));\n listOfpoints.get(18).add(new LatLng (44.4433368,26.0983202));\n listOfpoints.get(18).add(new LatLng (44.4452824,26.0973761));\n listOfpoints.get(18).add(new LatLng (44.446707,26.0966894));\n listOfpoints.get(18).add(new LatLng (44.4468296,26.0961959));\n listOfpoints.get(18).add(new LatLng (44.4465385,26.0945651));\n listOfpoints.get(18).add(new LatLng (44.4462628,26.0935351));\n listOfpoints.get(18).add(new LatLng (44.4454662,26.0911104));\n\n\n listOfpoints.get(19).add(new LatLng (44.4401196,26.0817507));\n listOfpoints.get(19).add(new LatLng (44.4401043,26.0831669));\n listOfpoints.get(19).add(new LatLng (44.4402115,26.0846046));\n listOfpoints.get(19).add(new LatLng (44.440089,26.0863641));\n listOfpoints.get(19).add(new LatLng (44.4399358,26.0894755));\n listOfpoints.get(19).add(new LatLng ( 44.4402115, 26.0932949));\n listOfpoints.get(19).add(new LatLng (44.4407937,26.0953763));\n listOfpoints.get(19).add(new LatLng (44.440855,26.0952047));\n listOfpoints.get(19).add(new LatLng (44.4450832,26.0910419));\n listOfpoints.get(19).add(new LatLng (44.4454509,26.0905698));\n listOfpoints.get(19).add(new LatLng (44.4445011,26.0879949));\n listOfpoints.get(19).add(new LatLng (44.4437964,26.0862783));\n listOfpoints.get(19).add(new LatLng (44.4434287,26.0840681));\n listOfpoints.get(19).add(new LatLng (44.443061, 26.0812143));\n listOfpoints.get(19).add(new LatLng (44.4423257, 26.0809997));\n listOfpoints.get(19).add(new LatLng (44.4419887, 26.0810211));\n listOfpoints.get(19).add(new LatLng (44.4411767, 26.0813215));\n listOfpoints.get(19).add(new LatLng (44.4401196, 26.0817507));\n\n\n listOfpoints.get(20).add(new LatLng (44.418527,26.0958537));\n listOfpoints.get(20).add(new LatLng (44.4145114,26.0985144));\n listOfpoints.get(20).add(new LatLng (44.4143275,26.098729));\n listOfpoints.get(20).add(new LatLng (44.4143275,26.0990294));\n listOfpoints.get(20).add(new LatLng (44.4143735, 26.0993727));\n listOfpoints.get(20).add(new LatLng (44.4144195, 26.0998233));\n listOfpoints.get(20).add(new LatLng (44.4142969, 26.1008104));\n listOfpoints.get(20).add(new LatLng (44.4140976,26.1009177));\n listOfpoints.get(20).add(new LatLng (44.4138983,26.1008962));\n listOfpoints.get(20).add(new LatLng (44.4138064,26.1006602));\n listOfpoints.get(20).add(new LatLng (44.4137451,26.1000379));\n listOfpoints.get(20).add(new LatLng (44.4130247,26.098729));\n listOfpoints.get(20).add(new LatLng (44.4127335,26.0984286));\n listOfpoints.get(20).add(new LatLng (44.4113386,26.0985144));\n listOfpoints.get(20).add(new LatLng (44.4102503, 26.0985788));\n listOfpoints.get(20).add(new LatLng (44.414021,26.1043509));\n listOfpoints.get(20).add(new LatLng (44.4143122,26.1043938));\n listOfpoints.get(20).add(new LatLng (44.4159522,26.1042865));\n listOfpoints.get(20).add(new LatLng (44.4191554,26.104029));\n listOfpoints.get(20).add(new LatLng (44.4210711,26.1038574));\n listOfpoints.get(20).add(new LatLng (44.4208259,26.1030205));\n listOfpoints.get(20).add(new LatLng (44.4203508,26.1016258));\n listOfpoints.get(20).add(new LatLng (44.4198297,26.1000379));\n listOfpoints.get(20).add(new LatLng (44.4192167, 26.0981067));\n listOfpoints.get(20).add(new LatLng (44.418527,26.0958537));\n\n\n listOfpoints.get(21).add(new LatLng (44.410189,26.0984071));\n listOfpoints.get(21).add(new LatLng (44.4103883,26.0984715));\n listOfpoints.get(21).add(new LatLng (44.4128867,26.0983213));\n listOfpoints.get(21).add(new LatLng (44.4138524, 26.1000594));\n listOfpoints.get(21).add(new LatLng (44.4138524,26.1004671));\n listOfpoints.get(21).add(new LatLng (44.4139597,26.1007246));\n listOfpoints.get(21).add(new LatLng (44.4141742,26.1007246));\n listOfpoints.get(21).add(new LatLng (44.4142662,26.1003812));\n listOfpoints.get(21).add(new LatLng (44.4143275,26.0996946));\n listOfpoints.get(21).add(new LatLng (44.4141589,26.0986646));\n listOfpoints.get(21).add(new LatLng (44.418435,26.0957464));\n listOfpoints.get(21).add(new LatLng (44.4190021,26.0946306));\n listOfpoints.get(21).add(new LatLng (44.4183737,26.0934504));\n listOfpoints.get(21).add(new LatLng (44.4176534, 26.0933431));\n listOfpoints.get(21).add(new LatLng (44.4165652, 26.0933431));\n listOfpoints.get(21).add(new LatLng (44.4155996,26.0927423));\n listOfpoints.get(21).add(new LatLng (44.4149406,26.0921415));\n listOfpoints.get(21).add(new LatLng (44.4142662,26.0919055));\n listOfpoints.get(21).add(new LatLng (44.412994, 26.0920986));\n listOfpoints.get(21).add(new LatLng (44.4098211,26.0943945));\n listOfpoints.get(21).add(new LatLng (44.4096679,26.0947164));\n listOfpoints.get(21).add(new LatLng (44.4096985, 26.0953816));\n listOfpoints.get(21).add(new LatLng (44.4088401, 26.0962399));\n listOfpoints.get(21).add(new LatLng (44.4088248,26.0966047));\n listOfpoints.get(21).add(new LatLng (44.410189, 26.0984071));\n\n\n listOfpoints.get(22).add(new LatLng (44.4238034,26.0734041));\n listOfpoints.get(22).add(new LatLng (44.4252745,26.0779102));\n listOfpoints.get(22).add(new LatLng (44.426102,26.0783394));\n listOfpoints.get(22).add(new LatLng (44.4286458, 26.079541));\n listOfpoints.get(22).add(new LatLng (44.4293813,26.0807855));\n listOfpoints.get(22).add(new LatLng (44.4303313,26.0837038));\n listOfpoints.get(22).add(new LatLng (44.4329668,26.08409));\n listOfpoints.get(22).add(new LatLng (44.4335797,26.0839613));\n listOfpoints.get(22).add(new LatLng (44.4337023,26.0821159));\n listOfpoints.get(22).add(new LatLng (44.4339474,26.0797556));\n listOfpoints.get(22).add(new LatLng (44.434499,26.078039));\n listOfpoints.get(22).add(new LatLng (44.4358473,26.0748632));\n listOfpoints.get(22).add(new LatLng (44.4351732,26.073962));\n listOfpoints.get(22).add(new LatLng (44.433212,26.0710867));\n listOfpoints.get(22).add(new LatLng (44.4312201,26.0683401));\n listOfpoints.get(22).add(new LatLng (44.4299329,26.067396));\n listOfpoints.get(22).add(new LatLng (44.4283087,26.0655506));\n listOfpoints.get(22).add(new LatLng (44.4274812,26.0668381));\n listOfpoints.get(22).add(new LatLng (44.4261633,26.0691984));\n listOfpoints.get(22).add(new LatLng (44.4249374,26.0715587));\n listOfpoints.get(22).add(new LatLng (44.4238034,26.0734041));\n\n\n listOfpoints.get(23).add(new LatLng (44.4205851,26.0657652));\n listOfpoints.get(23).add(new LatLng (44.4169069,26.0695417));\n listOfpoints.get(23).add(new LatLng (44.4131364,26.073447));\n listOfpoints.get(23).add(new LatLng (44.4139948,26.0749491));\n listOfpoints.get(23).add(new LatLng (44.4156807,26.0782106));\n listOfpoints.get(23).add(new LatLng (44.4178265,26.0819443));\n listOfpoints.get(23).add(new LatLng (44.4184089,26.0840471));\n listOfpoints.get(23).add(new LatLng (44.4213514,26.0900982));\n listOfpoints.get(23).add(new LatLng (44.4240486, 26.0903986));\n listOfpoints.get(23).add(new LatLng (44.424447,26.0897978));\n listOfpoints.get(23).add(new LatLng (44.4252132,26.0783394));\n listOfpoints.get(23).add(new LatLng (44.4236808, 26.0737474));\n listOfpoints.get(23).add(new LatLng (44.4205851,26.0657652));\n\n\n\n listOfpoints.get(24).add(new LatLng (44.4427933,26.0989692));\n listOfpoints.get(24).add(new LatLng (44.442854,26.1011417));\n listOfpoints.get(24).add(new LatLng (44.4434668,26.1027725));\n listOfpoints.get(24).add(new LatLng (44.4430685, 26.1033304));\n listOfpoints.get(24).add(new LatLng (44.4430685,26.1047895));\n listOfpoints.get(24).add(new LatLng (44.4437732,26.1076648));\n listOfpoints.get(24).add(new LatLng (44.4446617,26.1085661));\n listOfpoints.get(24).add(new LatLng (44.4461629,26.1092956));\n listOfpoints.get(24).add(new LatLng (44.447174,26.1100252));\n listOfpoints.get(24).add(new LatLng (44.4473272,26.108609));\n listOfpoints.get(24).add(new LatLng (44.4480624,26.107064));\n listOfpoints.get(24).add(new LatLng (44.4480931,26.1060341));\n listOfpoints.get(24).add(new LatLng (44.4476948,26.1029871));\n listOfpoints.get(24).add(new LatLng (44.448522, 26.1028583));\n listOfpoints.get(24).add(new LatLng (44.4499006,26.102515));\n listOfpoints.get(24).add(new LatLng (44.4509729, 26.101485));\n listOfpoints.get(24).add(new LatLng (44.4529335,26.1007555));\n listOfpoints.get(24).add(new LatLng (44.452719,26.0935457));\n listOfpoints.get(24).add(new LatLng (44.4521063,26.0865934));\n listOfpoints.get(24).add(new LatLng (44.4506359,26.0897262));\n listOfpoints.get(24).add(new LatLng (44.4472046,26.0966785));\n listOfpoints.get(24).add(new LatLng (44.4465306,26.0971077));\n listOfpoints.get(24).add(new LatLng (44.4427933,26.0989692));\n\n\n listOfpoints.get(25).add(new LatLng (44.3944544,26.1201103));\n listOfpoints.get(25).add(new LatLng (44.3948837,26.1205394));\n listOfpoints.get(25).add(new LatLng (44.400587,26.1207969));\n listOfpoints.get(25).add(new LatLng (44.4069336,26.1209686));\n listOfpoints.get(25).add(new LatLng (44.4075468,26.1204536));\n listOfpoints.get(25).add(new LatLng (44.4081599,26.119252));\n listOfpoints.get(25).add(new LatLng (44.4083439, 26.1177499));\n listOfpoints.get(25).add(new LatLng (44.4084665, 26.1148317));\n listOfpoints.get(25).add(new LatLng (44.4090183,26.1131151));\n listOfpoints.get(25).add(new LatLng (44.4102139, 26.1109693));\n listOfpoints.get(25).add(new LatLng (44.411992,26.106549));\n listOfpoints.get(25).add(new LatLng (44.4128197, 26.105562));\n listOfpoints.get(25).add(new LatLng (44.4140152, 26.1047037));\n listOfpoints.get(25).add(new LatLng (44.4105512, 26.099468));\n listOfpoints.get(25).add(new LatLng (44.4088344, 26.0971077));\n listOfpoints.get(25).add(new LatLng (44.4074854,26.0960777));\n listOfpoints.get(25).add(new LatLng (44.4067803, 26.0957773));\n listOfpoints.get(25).add(new LatLng (44.4047262, 26.096936));\n listOfpoints.get(25).add(new LatLng (44.4024267, 26.098481));\n listOfpoints.get(25).add(new LatLng (44.4015068, 26.0996826));\n listOfpoints.get(25).add(new LatLng (44.3998818, 26.1055191));\n listOfpoints.get(25).add(new LatLng (44.3944544, 26.1201103));\n\n\n\n listOfpoints.get(26).add(new LatLng (44.4523651,26.0865441));\n listOfpoints.get(26).add(new LatLng (44.4526408,26.0898486));\n listOfpoints.get(26).add(new LatLng (44.4530697,26.0983887));\n listOfpoints.get(26).add(new LatLng (44.4558573,26.0971013));\n listOfpoints.get(26).add(new LatLng ( 44.4622592,26.0925522));\n listOfpoints.get(26).add(new LatLng ( 44.4635762, 26.0910073));\n listOfpoints.get(26).add(new LatLng (44.4658121,26.0865441));\n listOfpoints.get(26).add(new LatLng (44.4631474,26.0864153));\n listOfpoints.get(26).add(new LatLng (44.4534067,26.0861578));\n listOfpoints.get(26).add(new LatLng (44.4523651,26.0865441));\n\n\n\n listOfpoints.get(27).add(new LatLng (44.4346864, 26.0895482));\n listOfpoints.get(27).add(new LatLng (44.4398343, 26.0864583));\n listOfpoints.get(27).add(new LatLng (44.439865,26.0816947));\n listOfpoints.get(27).add(new LatLng (44.4420098,26.0807076));\n listOfpoints.get(27).add(new LatLng (44.4429903, 26.0808793));\n listOfpoints.get(27).add(new LatLng (44.4426532,26.0791626));\n listOfpoints.get(27).add(new LatLng (44.4405084, 26.0729399));\n listOfpoints.get(27).add(new LatLng (44.440202, 26.0727253));\n listOfpoints.get(27).add(new LatLng (44.4384555, 26.0702363));\n listOfpoints.get(27).add(new LatLng (44.4362186, 26.0744849));\n listOfpoints.get(27).add(new LatLng (44.4344413,26.0792914));\n listOfpoints.get(27).add(new LatLng (44.4346864,26.0895482));\n\n\n\n listOfpoints.get(28).add(new LatLng (44.443266, 26.0812226));\n listOfpoints.get(28).add(new LatLng (44.443061,26.0812143));\n listOfpoints.get(28).add(new LatLng (44.4437562,26.0855141));\n listOfpoints.get(28).add(new LatLng (44.4440626,26.0866299));\n listOfpoints.get(28).add(new LatLng (44.444798, 26.0884753));\n listOfpoints.get(28).add(new LatLng (44.4465443,26.0937539));\n listOfpoints.get(28).add(new LatLng (44.4468813,26.0958138));\n listOfpoints.get(28).add(new LatLng (44.4471264,26.0961142));\n listOfpoints.get(28).add(new LatLng (44.4492097, 26.0919943));\n listOfpoints.get(28).add(new LatLng (44.4507109,26.0889473));\n listOfpoints.get(28).add(new LatLng (44.4519056, 26.0864153));\n listOfpoints.get(28).add(new LatLng (44.4518137,26.0848275));\n listOfpoints.get(28).add(new LatLng (44.4481987, 26.0827246));\n listOfpoints.get(28).add(new LatLng (44.4455026,26.081523));\n listOfpoints.get(28).add(new LatLng (44.443266, 26.0812226));\n\n\n\n listOfpoints.get(29).add(new LatLng (44.4380283, 26.1146959));\n listOfpoints.get(29).add(new LatLng (44.437967, 26.115168));\n listOfpoints.get(29).add(new LatLng (44.4410924, 26.131905));\n listOfpoints.get(29).add(new LatLng (44.4413375,26.1327204));\n listOfpoints.get(29).add(new LatLng (44.443758, 26.1284717));\n listOfpoints.get(29).add(new LatLng (44.4467299, 26.1259827));\n listOfpoints.get(29).add(new LatLng (44.4480167,26.1254248));\n listOfpoints.get(29).add(new LatLng (44.4491809, 26.124266));\n listOfpoints.get(29).add(new LatLng (44.4380283, 26.1146959));\n\n\n listOfpoints.get(30).add(new LatLng (44.4129016,26.0735409));\n listOfpoints.get(30).add(new LatLng (44.4072915,26.0791628));\n listOfpoints.get(30).add(new LatLng (44.4031525,26.0816948));\n listOfpoints.get(30).add(new LatLng (44.4003317,26.0844414));\n listOfpoints.get(30).add(new LatLng (44.3973268,26.0850422));\n listOfpoints.get(30).add(new LatLng (44.4005463,26.0880463));\n listOfpoints.get(30).add(new LatLng (44.4017115, 26.0912221));\n listOfpoints.get(30).add(new LatLng (44.4043176,26.0963719));\n listOfpoints.get(30).add(new LatLng (44.4048695, 26.096329));\n listOfpoints.get(30).add(new LatLng (44.4060652,26.0956423));\n listOfpoints.get(30).add(new LatLng (44.4070462,26.0953848));\n listOfpoints.get(30).add(new LatLng (44.4084871, 26.096329));\n listOfpoints.get(30).add(new LatLng (44.4094682, 26.0951703));\n listOfpoints.get(30).add(new LatLng (44.4094375, 26.0944836));\n listOfpoints.get(30).add(new LatLng (44.4132388, 26.09178));\n listOfpoints.get(30).add(new LatLng (44.4145263, 26.091737));\n listOfpoints.get(30).add(new LatLng (44.4163656,26.0929387));\n listOfpoints.get(30).add(new LatLng (44.4183273,26.0930674));\n listOfpoints.get(30).add(new LatLng (44.4189404,26.0941832));\n listOfpoints.get(30).add(new LatLng (44.4212086, 26.0904067));\n listOfpoints.get(30).add(new LatLng (44.4210553,26.0898488));\n listOfpoints.get(30).add(new LatLng (44.4186339, 26.0850852));\n listOfpoints.get(30).add(new LatLng (44.4181741,26.0840123));\n listOfpoints.get(30).add(new LatLng (44.4176836, 26.0822527));\n listOfpoints.get(30).add(new LatLng (44.4171932,26.0813944));\n listOfpoints.get(30).add(new LatLng (44.4150781, 26.077575));\n listOfpoints.get(30).add(new LatLng (44.4129016, 26.0735409));\n\n\n\n listOfpoints.get(31).add(new LatLng (44.4152528, 26.1045537));\n listOfpoints.get(31).add(new LatLng (44.4142412, 26.1048541));\n listOfpoints.get(31).add(new LatLng (44.4125552,26.1062274));\n listOfpoints.get(31).add(new LatLng (44.4118501,26.1074291));\n listOfpoints.get(31).add(new LatLng (44.4107158,26.1103473));\n listOfpoints.get(31).add(new LatLng (44.4093976,26.1127935));\n listOfpoints.get(31).add(new LatLng (44.4087844, 26.1144243));\n listOfpoints.get(31).add(new LatLng (44.4085392, 26.1156259));\n listOfpoints.get(31).add(new LatLng (44.4085392,26.1170421));\n listOfpoints.get(31).add(new LatLng (44.4083246, 26.1195741));\n listOfpoints.get(31).add(new LatLng (44.4074355, 26.1209903));\n listOfpoints.get(31).add(new LatLng (44.409183, 26.1223636));\n listOfpoints.get(31).add(new LatLng (44.4168774, 26.1136518));\n listOfpoints.get(31).add(new LatLng (44.4158658, 26.1113344));\n listOfpoints.get(31).add(new LatLng (44.4156513, 26.1077295));\n listOfpoints.get(31).add(new LatLng (44.4152528,26.1045537));\n\n\n listOfpoints.get(32).add(new LatLng (44.4169364, 26.1141937));\n listOfpoints.get(32).add(new LatLng (44.4164766, 26.114537));\n listOfpoints.get(32).add(new LatLng (44.4110201,26.120631));\n listOfpoints.get(32).add(new LatLng (44.4094872,26.122648));\n listOfpoints.get(32).add(new LatLng (44.4131046, 26.1296003));\n listOfpoints.get(32).add(new LatLng (44.4151891, 26.1329906));\n listOfpoints.get(32).add(new LatLng (44.4171203, 26.1348789));\n listOfpoints.get(32).add(new LatLng (44.4201242, 26.1365526));\n listOfpoints.get(32).add(new LatLng (44.4204001,26.1351364));\n listOfpoints.get(32).add(new LatLng (44.4206759, 26.1333339));\n listOfpoints.get(32).add(new LatLng (44.42181,26.1313169));\n listOfpoints.get(32).add(new LatLng (44.4228827, 26.1314028));\n listOfpoints.get(32).add(new LatLng (44.4255799, 26.1284845));\n listOfpoints.get(32).add(new LatLng (44.4256412, 26.1274975));\n listOfpoints.get(32).add(new LatLng (44.4257638, 26.1234634));\n listOfpoints.get(32).add(new LatLng (44.425917, 26.1195152));\n listOfpoints.get(32).add(new LatLng (44.4238635, 26.1194294));\n listOfpoints.get(32).add(new LatLng (44.4193273,26.115567));\n listOfpoints.get(32).add(new LatLng (44.4169364, 26.1141937));\n\n\n listOfpoints.get(33).add(new LatLng (44.4261929,26.1191112));\n listOfpoints.get(33).add(new LatLng (44.4255799,26.1284845));\n listOfpoints.get(33).add(new LatLng (44.4318104,26.1386596));\n listOfpoints.get(33).add(new LatLng (44.4320863,26.1385309));\n listOfpoints.get(33).add(new LatLng (44.4313814,26.1329948));\n listOfpoints.get(33).add(new LatLng (44.4316879,26.129819));\n listOfpoints.get(33).add(new LatLng (44.4326992,26.1229526));\n listOfpoints.get(33).add(new LatLng (44.4328861,26.1207289));\n listOfpoints.get(33).add(new LatLng (44.4300024, 26.1205493));\n listOfpoints.get(33).add(new LatLng (44.4288684,26.1196481));\n listOfpoints.get(33).add(new LatLng (44.4275797,26.1191541));\n listOfpoints.get(33).add(new LatLng (44.4261929,26.1191112));\n\n\n listOfpoints.get(34).add(new LatLng (44.4202782, 26.1364709));\n listOfpoints.get(34).add(new LatLng (44.4204314,26.1366855));\n listOfpoints.get(34).add(new LatLng (44.4255806,26.1375009));\n listOfpoints.get(34).add(new LatLng (44.4293579,26.1390888));\n listOfpoints.get(34).add(new LatLng (44.4303615,26.139196));\n listOfpoints.get(34).add(new LatLng (44.4317406,26.1386596));\n listOfpoints.get(34).add(new LatLng (44.4266686,26.1303877));\n listOfpoints.get(34).add(new LatLng (44.4255882,26.128596));\n listOfpoints.get(34).add(new LatLng (44.4250212,26.1291968));\n listOfpoints.get(34).add(new LatLng (44.4230214, 26.1315571));\n listOfpoints.get(34).add(new LatLng (44.4227685,26.1316644));\n listOfpoints.get(34).add(new LatLng (44.4217877,26.1315678));\n listOfpoints.get(34).add(new LatLng (44.4207762,26.1334668));\n listOfpoints.get(34).add(new LatLng (44.4202782,26.1364709));\n\n\n listOfpoints.get(35).add(new LatLng (44.4438143,26.1191764));\n listOfpoints.get(35).add(new LatLng (44.4437985,26.1194425));\n listOfpoints.get(35).add(new LatLng (44.4469926,26.1222749));\n listOfpoints.get(35).add(new LatLng (44.4492443, 26.1240881));\n listOfpoints.get(35).add(new LatLng (44.4504315,26.123144));\n listOfpoints.get(35).add(new LatLng (44.4512893,26.1217492));\n listOfpoints.get(35).add(new LatLng (44.451421, 26.1212347));\n listOfpoints.get(35).add(new LatLng (44.4523401, 26.1180161));\n listOfpoints.get(35).add(new LatLng (44.4527077, 26.1145399));\n listOfpoints.get(35).add(new LatLng (44.452944, 26.1009052));\n listOfpoints.get(35).add(new LatLng (44.4516573,26.1013558));\n listOfpoints.get(35).add(new LatLng (44.4510217,26.1016777));\n listOfpoints.get(35).add(new LatLng (44.4500413,26.1025574));\n listOfpoints.get(35).add(new LatLng (44.449712,26.1027291));\n listOfpoints.get(35).add(new LatLng (44.4477666,26.1031153));\n listOfpoints.get(35).add(new LatLng (44.4479198,26.1042526));\n listOfpoints.get(35).add(new LatLng (44.448027,26.1051967));\n listOfpoints.get(35).add(new LatLng (44.4481419,26.1058619));\n listOfpoints.get(35).add(new LatLng (44.4481189, 26.1070206));\n listOfpoints.get(35).add(new LatLng (44.448004,26.1073425));\n listOfpoints.get(35).add(new LatLng (44.4473836,26.1088338));\n listOfpoints.get(35).add(new LatLng (44.4472917,26.1100569));\n listOfpoints.get(35).add(new LatLng (44.4471385, 26.1102929));\n listOfpoints.get(35).add(new LatLng (44.4469241,26.1116877));\n listOfpoints.get(35).add(new LatLng (44.4469394,26.1122456));\n listOfpoints.get(35).add(new LatLng (44.4467403,26.1136403));\n listOfpoints.get(35).add(new LatLng (44.445959,26.1161938));\n listOfpoints.get(35).add(new LatLng (44.4448254,26.1176744));\n listOfpoints.get(35).add(new LatLng (44.4438143,26.1191764));\n\n\n listOfpoints.get(36).add(new LatLng (44.4391967, 26.1225882));\n listOfpoints.get(36).add(new LatLng (44.4372662,26.123983));\n listOfpoints.get(36).add(new LatLng (44.4356115, 26.1252275));\n listOfpoints.get(36).add(new LatLng (44.4344471, 26.1254207));\n listOfpoints.get(36).add(new LatLng (44.4324705,26.1258069));\n listOfpoints.get(36).add(new LatLng (44.4315052, 26.1327377));\n listOfpoints.get(36).add(new LatLng (44.432256,26.1385742));\n listOfpoints.get(36).add(new LatLng (44.4351059,26.1373511));\n listOfpoints.get(36).add(new LatLng (44.4376339, 26.1363641));\n listOfpoints.get(36).add(new LatLng (44.4389822, 26.1353985));\n listOfpoints.get(36).add(new LatLng (44.4401772,26.1345402));\n listOfpoints.get(36).add(new LatLng (44.4411883, 26.1334458));\n listOfpoints.get(36).add(new LatLng (44.4402231, 26.1281458));\n listOfpoints.get(36).add(new LatLng (44.4398861,26.126279));\n listOfpoints.get(36).add(new LatLng (44.4391967, 26.1225882));\n\n\n\n listOfpoints.get(37).add(new LatLng (44.3978822,26.1102715));\n listOfpoints.get(37).add(new LatLng (44.3977135, 26.1097995));\n listOfpoints.get(37).add(new LatLng (44.3909519,26.1099282));\n listOfpoints.get(37).add(new LatLng (44.3874558, 26.1100784));\n listOfpoints.get(37).add(new LatLng (44.3877779, 26.1129538));\n listOfpoints.get(37).add(new LatLng (44.3881766, 26.1154428));\n listOfpoints.get(37).add(new LatLng (44.3886059, 26.1165586));\n listOfpoints.get(37).add(new LatLng (44.3894799, 26.1180178));\n listOfpoints.get(37).add(new LatLng (44.3906606, 26.1193052));\n listOfpoints.get(37).add(new LatLng (44.3927152, 26.1205927));\n listOfpoints.get(37).add(new LatLng (44.3936352, 26.1206785));\n listOfpoints.get(37).add(new LatLng (44.3940339, 26.1202279));\n listOfpoints.get(37).add(new LatLng (44.3978822,26.1102715));\n\n\n\n listOfpoints.get(38).add(new LatLng (44.389256,26.0917973));\n listOfpoints.get(38).add(new LatLng (44.3892556,26.0920523));\n listOfpoints.get(38).add(new LatLng (44.4003643, 26.0970731));\n listOfpoints.get(38).add(new LatLng (44.4008548, 26.0971482));\n listOfpoints.get(38).add(new LatLng (44.4030625, 26.0971601));\n listOfpoints.get(38).add(new LatLng (44.4043195,26.0965593));\n listOfpoints.get(38).add(new LatLng (44.4019587, 26.0920531));\n listOfpoints.get(38).add(new LatLng (44.4005636,26.0883195));\n listOfpoints.get(38).add(new LatLng (44.3987104,26.0864919));\n listOfpoints.get(38).add(new LatLng (44.3972443, 26.0851884));\n listOfpoints.get(38).add(new LatLng (44.3961557,26.0851884));\n listOfpoints.get(38).add(new LatLng (44.3946992,26.0841584));\n listOfpoints.get(38).add(new LatLng (44.3918473,26.0856819));\n listOfpoints.get(38).add(new LatLng (44.3912493,26.08639));\n listOfpoints.get(38).add(new LatLng (44.389256, 26.0917973));\n\n\n\n listOfpoints.get(39).add(new LatLng (44.4029942,26.0973363));\n listOfpoints.get(39).add(new LatLng (44.4011008,26.0974224));\n listOfpoints.get(39).add(new LatLng (44.399997,26.0972078));\n listOfpoints.get(39).add(new LatLng (44.389065,26.0922189));\n listOfpoints.get(39).add(new LatLng (44.3863339,26.0922418));\n listOfpoints.get(39).add(new LatLng (44.387806,26.0981212));\n listOfpoints.get(39).add(new LatLng (44.3887261,26.1004386));\n listOfpoints.get(39).add(new LatLng (44.3889714,26.1023269));\n listOfpoints.get(39).add(new LatLng (44.3887567,26.1040435));\n listOfpoints.get(39).add(new LatLng (44.3875607,26.1097513));\n listOfpoints.get(39).add(new LatLng (44.3977341,26.1097306));\n listOfpoints.get(39).add(new LatLng (44.3979142,26.1101973));\n listOfpoints.get(39).add(new LatLng (44.397964,26.1101222));\n listOfpoints.get(39).add(new LatLng (44.3996198,26.1059165));\n listOfpoints.get(39).add(new LatLng (44.4016128,26.0990715));\n listOfpoints.get(39).add(new LatLng (44.4030402,26.0978593));\n listOfpoints.get(39).add(new LatLng (44.4029942,26.0973363));\n\n\n\n listOfpoints.get(40).add(new LatLng (44.4496116, 26.1241839));\n listOfpoints.get(40).add(new LatLng (44.4494277,26.1245701));\n listOfpoints.get(40).add(new LatLng (44.4610682, 26.1325953));\n listOfpoints.get(40).add(new LatLng (44.4618646,26.1326811));\n listOfpoints.get(40).add(new LatLng (44.4644374, 26.1345265));\n listOfpoints.get(40).add(new LatLng (44.4660607, 26.1368439));\n listOfpoints.get(40).add(new LatLng (44.4665813,26.1365435));\n listOfpoints.get(40).add(new LatLng (44.4663976,26.1354277));\n listOfpoints.get(40).add(new LatLng (44.4667345, 26.1349985));\n listOfpoints.get(40).add(new LatLng (44.4681739, 26.1354277));\n listOfpoints.get(40).add(new LatLng (44.4701952, 26.1371014));\n listOfpoints.get(40).add(new LatLng (44.4719714, 26.1368868));\n listOfpoints.get(40).add(new LatLng (44.4730739, 26.1358998));\n listOfpoints.get(40).add(new LatLng (44.4731964,26.1346981));\n listOfpoints.get(40).add(new LatLng (44.4687252,26.1305783));\n listOfpoints.get(40).add(new LatLng (44.466857,26.1310932));\n listOfpoints.get(40).add(new LatLng (44.4662751, 26.1310932));\n listOfpoints.get(40).add(new LatLng (44.4658769, 26.1300633));\n listOfpoints.get(40).add(new LatLng (44.4666426, 26.129162));\n listOfpoints.get(40).add(new LatLng (44.4689089,26.1285183));\n listOfpoints.get(40).add(new LatLng (44.4697971, 26.1290333));\n listOfpoints.get(40).add(new LatLng (44.4723389, 26.1319945));\n listOfpoints.get(40).add(new LatLng (44.4743294,26.1327669));\n listOfpoints.get(40).add(new LatLng (44.4750338,26.1320374));\n listOfpoints.get(40).add(new LatLng (44.4756462,26.1297199));\n listOfpoints.get(40).add(new LatLng (44.4742376,26.1249563));\n listOfpoints.get(40).add(new LatLng (44.4742988, 26.1238835));\n listOfpoints.get(40).add(new LatLng (44.4741457,26.1231968));\n listOfpoints.get(40).add(new LatLng (44.4676533,26.1269734));\n listOfpoints.get(40).add(new LatLng (44.4668876,26.1267588));\n listOfpoints.get(40).add(new LatLng (44.4649275,26.1207506));\n listOfpoints.get(40).add(new LatLng (44.4648662,26.120064));\n listOfpoints.get(40).add(new LatLng (44.4674389,26.118562));\n listOfpoints.get(40).add(new LatLng (44.4689089,26.1177895));\n listOfpoints.get(40).add(new LatLng (44.4710833,26.1160729));\n listOfpoints.get(40).add(new LatLng (44.4714202,26.1163304));\n listOfpoints.get(40).add(new LatLng (44.4722777,26.116502));\n listOfpoints.get(40).add(new LatLng (44.4729208,26.1131117));\n listOfpoints.get(40).add(new LatLng (44.4723083,26.1107084));\n listOfpoints.get(40).add(new LatLng (44.4725227,26.1095926));\n listOfpoints.get(40).add(new LatLng (44.4733801,26.1087343));\n listOfpoints.get(40).add(new LatLng (44.4735945, 26.1082194));\n listOfpoints.get(40).add(new LatLng (44.4700727,26.1101076));\n listOfpoints.get(40).add(new LatLng (44.4533184,26.1047861));\n listOfpoints.get(40).add(new LatLng (44.4531039,26.105344));\n listOfpoints.get(40).add(new LatLng (44.4528589,26.1152146));\n listOfpoints.get(40).add(new LatLng (44.4526138,26.1174891));\n listOfpoints.get(40).add(new LatLng (44.452093,26.1197207));\n listOfpoints.get(40).add(new LatLng (44.4508982,26.1229822));\n listOfpoints.get(40).add(new LatLng (44.4496116, 26.1241839));\n\n\n listOfpoints.get(41).add(new LatLng (44.4531249,26.1045259));\n listOfpoints.get(41).add(new LatLng (44.4550165,26.1051764));\n listOfpoints.get(41).add(new LatLng (44.4698103,26.1097469));\n listOfpoints.get(41).add(new LatLng (44.4709588,26.1093392));\n listOfpoints.get(41).add(new LatLng (44.4739216,26.1077299));\n listOfpoints.get(41).add(new LatLng (44.4734929,26.1050262));\n listOfpoints.get(41).add(new LatLng (44.4721455,26.105155));\n listOfpoints.get(41).add(new LatLng (44.4701242,26.1040392));\n listOfpoints.get(41).add(new LatLng (44.467521, 26.101593));\n listOfpoints.get(41).add(new LatLng (44.4673067, 26.1001768));\n listOfpoints.get(41).add(new LatLng (44.4664185,26.099061));\n listOfpoints.get(41).add(new LatLng (44.4660816,26.0979023));\n listOfpoints.get(41).add(new LatLng (44.4662041,26.0968294));\n listOfpoints.get(41).add(new LatLng (44.4671535,26.0960569));\n listOfpoints.get(41).add(new LatLng (44.4677661,26.0958853));\n listOfpoints.get(41).add(new LatLng (44.4680723,26.0951986));\n listOfpoints.get(41).add(new LatLng (44.4691748,26.0952415));\n listOfpoints.get(41).add(new LatLng (44.4720536,26.0967865));\n listOfpoints.get(41).add(new LatLng (44.4742278,26.0964861));\n listOfpoints.get(41).add(new LatLng (44.4749015, 26.0951986));\n listOfpoints.get(41).add(new LatLng (44.4747178,26.0948124));\n listOfpoints.get(41).add(new LatLng (44.4719617,26.0923662));\n listOfpoints.get(41).add(new LatLng (44.4714717,26.0908642));\n listOfpoints.get(41).add(new LatLng (44.4717167,26.0897913));\n listOfpoints.get(41).add(new LatLng (44.4723598,26.0888901));\n listOfpoints.get(41).add(new LatLng (44.4732479,26.0894909));\n listOfpoints.get(41).add(new LatLng (44.4732785,26.0900917));\n listOfpoints.get(41).add(new LatLng (44.4732479,26.0907783));\n listOfpoints.get(41).add(new LatLng (44.4735235,26.0912075));\n listOfpoints.get(41).add(new LatLng (44.4740135,26.0907354));\n listOfpoints.get(41).add(new LatLng (44.4734316,26.0891046));\n listOfpoints.get(41).add(new LatLng (44.4724211,26.0881176));\n listOfpoints.get(41).add(new LatLng (44.4661428,26.0866585));\n listOfpoints.get(41).add(new LatLng (44.4639989,26.09095));\n listOfpoints.get(41).add(new LatLng (44.4621305,26.0931387));\n listOfpoints.get(41).add(new LatLng (44.4558053,26.0973375));\n listOfpoints.get(41).add(new LatLng (44.4531632,26.0985928));\n listOfpoints.get(41).add(new LatLng (44.4531249,26.1045259));\n\n\n\n listOfpoints.get(42).add(new LatLng (44.4386598, 26.0701274));\n listOfpoints.get(42).add(new LatLng (44.4404676, 26.072638));\n listOfpoints.get(42).add(new LatLng (44.4426125, 26.0786676));\n listOfpoints.get(42).add(new LatLng (44.4427656, 26.0791182));\n listOfpoints.get(42).add(new LatLng (44.4429801, 26.0806202));\n listOfpoints.get(42).add(new LatLng (44.4461972, 26.0758781));\n listOfpoints.get(42).add(new LatLng ( 44.4465955, 26.0753846));\n listOfpoints.get(42).add(new LatLng ( 44.4468405, 26.0753202));\n listOfpoints.get(42).add(new LatLng (44.4474227, 26.0759639));\n listOfpoints.get(42).add(new LatLng (44.4501186, 26.0695052));\n listOfpoints.get(42).add(new LatLng ( 44.4472848, 26.063776));\n listOfpoints.get(42).add(new LatLng ( 44.4461972,26.0623597));\n listOfpoints.get(42).add(new LatLng (44.4454925, 26.0618233));\n listOfpoints.get(42).add(new LatLng ( 44.4442057,26.0612654));\n listOfpoints.get(42).add(new LatLng (44.4432099,26.0609435));\n listOfpoints.get(42).add(new LatLng ( 44.4429035,26.062467));\n listOfpoints.get(42).add(new LatLng (44.4385679, 26.0699558));\n listOfpoints.get(42).add(new LatLng (44.4386598, 26.0701274));\n\n\n\n listOfpoints.get(43).add(new LatLng ( 44.4430787,26.0806953));\n listOfpoints.get(43).add(new LatLng ( 44.443126, 26.0810753));\n listOfpoints.get(43).add(new LatLng ( 44.4455924,26.0813757));\n listOfpoints.get(43).add(new LatLng (44.4467107,26.0816761));\n listOfpoints.get(43).add(new LatLng (44.4514593,26.0842939));\n listOfpoints.get(43).add(new LatLng (44.4518575,26.0844441));\n listOfpoints.get(43).add(new LatLng (44.4519188,26.0818906));\n listOfpoints.get(43).add(new LatLng (44.4520107,26.0813971));\n listOfpoints.get(43).add(new LatLng (44.452026,26.0767193));\n listOfpoints.get(43).add(new LatLng (44.4527, 26.0732861));\n listOfpoints.get(43).add(new LatLng ( 44.4511682,26.0706039));\n listOfpoints.get(43).add(new LatLng (44.4503219, 26.069692));\n listOfpoints.get(43).add(new LatLng (44.4502719,26.0698017));\n listOfpoints.get(43).add(new LatLng (44.4475595, 26.0760068));\n listOfpoints.get(43).add(new LatLng (44.447414, 26.0761356));\n listOfpoints.get(43).add(new LatLng (44.4468242, 26.0754811));\n listOfpoints.get(43).add(new LatLng (44.4465485, 26.0755562));\n listOfpoints.get(43).add(new LatLng (44.4462728, 26.0759746));\n listOfpoints.get(43).add(new LatLng (44.4430787,26.0806953));\n\n\n\n listOfpoints.get(44).add(new LatLng (44.4283234, 26.0653913));\n listOfpoints.get(44).add(new LatLng (44.4299706,26.0672689));\n listOfpoints.get(44).add(new LatLng (44.431342,26.068213));\n listOfpoints.get(44).add(new LatLng (44.4358314, 26.0745752));\n listOfpoints.get(44).add(new LatLng (44.4382828,26.0698974));\n listOfpoints.get(44).add(new LatLng (44.4353105,26.0630095));\n listOfpoints.get(44).add(new LatLng (44.435096,26.0616792));\n listOfpoints.get(44).add(new LatLng (44.4344678, 26.0595763));\n listOfpoints.get(44).add(new LatLng (44.4320315, 26.0595334));\n listOfpoints.get(44).add(new LatLng (44.4316178, 26.0600913));\n listOfpoints.get(44).add(new LatLng (44.4291968, 26.0639));\n listOfpoints.get(44).add(new LatLng (44.4283234, 26.0653913));\n\n\n listOfpoints.get(45).add(new LatLng (44.4413922,26.133057));\n listOfpoints.get(45).add(new LatLng (44.441285, 26.1333359));\n listOfpoints.get(45).add(new LatLng (44.4414535,26.1345376));\n listOfpoints.get(45).add(new LatLng (44.4428936,26.1475195));\n listOfpoints.get(45).add(new LatLng (44.443154,26.1493863));\n listOfpoints.get(45).add(new LatLng (44.4434451, 26.149794));\n listOfpoints.get(45).add(new LatLng (44.4437515,26.1497082));\n listOfpoints.get(45).add(new LatLng (44.4445175,26.1494721));\n listOfpoints.get(45).add(new LatLng (44.4454979,26.1488713));\n listOfpoints.get(45).add(new LatLng (44.4459574,26.1481847));\n listOfpoints.get(45).add(new LatLng (44.447091,26.147262));\n listOfpoints.get(45).add(new LatLng (44.448148,26.1456527));\n listOfpoints.get(45).add(new LatLng (44.4520847, 26.1353101));\n listOfpoints.get(45).add(new LatLng (44.4529577,26.1321129));\n listOfpoints.get(45).add(new LatLng (44.4531262,26.1316623));\n listOfpoints.get(45).add(new LatLng (44.4536776, 26.1311473));\n listOfpoints.get(45).add(new LatLng (44.4547192, 26.1298813));\n listOfpoints.get(45).add(new LatLng (44.455148,26.1288513));\n listOfpoints.get(45).add(new LatLng (44.449833, 26.1251177));\n listOfpoints.get(45).add(new LatLng (44.4491437, 26.12471));\n listOfpoints.get(45).add(new LatLng (44.4477038,26.1259545));\n listOfpoints.get(45).add(new LatLng (44.4462332, 26.1266841));\n listOfpoints.get(45).add(new LatLng (44.4447013, 26.1279501));\n listOfpoints.get(45).add(new LatLng (44.4436596, 26.129259));\n listOfpoints.get(45).add(new LatLng (44.4413922,26.133057));\n\n\n\n listOfpoints.get(46).add(new LatLng (44.4322314,26.1388506));\n listOfpoints.get(46).add(new LatLng (44.4335155,26.1535014));\n listOfpoints.get(46).add(new LatLng (44.4338066,26.1552395));\n listOfpoints.get(46).add(new LatLng (44.434971,26.1596598));\n listOfpoints.get(46).add(new LatLng (44.4350966, 26.1598576));\n listOfpoints.get(46).add(new LatLng (44.4421748,26.1571969));\n listOfpoints.get(46).add(new LatLng (44.4425731, 26.1570252));\n listOfpoints.get(46).add(new LatLng (44.4429102, 26.1561669));\n listOfpoints.get(46).add(new LatLng (44.443477, 26.1502231));\n listOfpoints.get(46).add(new LatLng (44.4429255, 26.1494077));\n listOfpoints.get(46).add(new LatLng (44.442328, 26.144215));\n listOfpoints.get(46).add(new LatLng (44.4418837, 26.1404384));\n listOfpoints.get(46).add(new LatLng (44.4412556, 26.1349882));\n listOfpoints.get(46).add(new LatLng (44.4411331, 26.1338295));\n listOfpoints.get(46).add(new LatLng (44.4406428,26.1344732));\n listOfpoints.get(46).add(new LatLng (44.4388656, 26.1357821));\n listOfpoints.get(46).add(new LatLng (44.4374868, 26.1367048));\n listOfpoints.get(46).add(new LatLng (44.4350813, 26.137606));\n listOfpoints.get(46).add(new LatLng (44.4322314, 26.1388506));\n\n\n\n listOfpoints.get(47).add(new LatLng (44.4202257, 26.1368063));\n listOfpoints.get(47).add(new LatLng (44.4179627,26.1463187));\n listOfpoints.get(47).add(new LatLng (44.4227749, 26.149709));\n listOfpoints.get(47).add(new LatLng (44.4231734, 26.1503527));\n listOfpoints.get(47).add(new LatLng (44.4237251, 26.1504386));\n listOfpoints.get(47).add(new LatLng (44.4261157, 26.1495373));\n listOfpoints.get(47).add(new LatLng (44.4262996, 26.1508463));\n listOfpoints.get(47).add(new LatLng (44.4268206, 26.1524341));\n listOfpoints.get(47).add(new LatLng (44.4283937, 26.1547449));\n listOfpoints.get(47).add(new LatLng (44.433251, 26.1534574));\n listOfpoints.get(47).add(new LatLng (44.4320712, 26.1388662));\n listOfpoints.get(47).add(new LatLng (44.430401,26.139467));\n listOfpoints.get(47).add(new LatLng (44.4295736, 26.1393812));\n listOfpoints.get(47).add(new LatLng (44.4254668, 26.137686));\n listOfpoints.get(47).add(new LatLng (44.4241642,26.1374929));\n listOfpoints.get(47).add(new LatLng (44.4202257,26.1368063));\n\n\n\n listOfpoints.get(48).add(new LatLng (44.4234516,26.1510693));\n listOfpoints.get(48).add(new LatLng (44.425076, 26.1630856));\n listOfpoints.get(48).add(new LatLng (44.4292135,26.1619484));\n listOfpoints.get(48).add(new LatLng(44.4286618, 26.1578285));\n listOfpoints.get(48).add(new LatLng (44.4287078,26.156026));\n listOfpoints.get(48).add(new LatLng (44.4286925,26.1557042));\n listOfpoints.get(48).add(new LatLng (44.4269762, 26.1532151));\n listOfpoints.get(48).add(new LatLng (44.4262407, 26.151713));\n listOfpoints.get(48).add(new LatLng (44.4259189, 26.1499535));\n listOfpoints.get(48).add(new LatLng (44.4237122, 26.1506402));\n listOfpoints.get(48).add(new LatLng (44.4234516, 26.1510693));\n\n\n\n listOfpoints.get(49).add(new LatLng (44.4285513, 26.1548459));\n listOfpoints.get(49).add(new LatLng (44.4286925, 26.1557042));\n listOfpoints.get(49).add(new LatLng (44.4287964, 26.1580645));\n listOfpoints.get(49).add(new LatLng (44.4290876, 26.1602317));\n listOfpoints.get(49).add(new LatLng (44.4302981,26.1670124));\n listOfpoints.get(49).add(new LatLng (44.4357222, 26.1692654));\n listOfpoints.get(49).add(new LatLng (44.4362584,26.1689865));\n listOfpoints.get(49).add(new LatLng (44.4366108, 26.1683857));\n listOfpoints.get(49).add(new LatLng (44.4367794,26.1675274));\n listOfpoints.get(49).add(new LatLng (44.433332, 26.1536442));\n listOfpoints.get(49).add(new LatLng (44.4285513, 26.1548459));\n\n\n\n listOfpoints.get(50).add(new LatLng (44.4178742, 26.14650));\n listOfpoints.get(50).add(new LatLng (44.4142265, 26.15554));\n listOfpoints.get(50).add(new LatLng (44.41369, 26.1578359));\n listOfpoints.get(50).add(new LatLng (44.4131842,26.1635008));\n listOfpoints.get(50).add(new LatLng (44.4133221, 26.1636295));\n listOfpoints.get(50).add(new LatLng (44.4154679, 26.1645951));\n listOfpoints.get(50).add(new LatLng (44.4169393, 26.1648526));\n listOfpoints.get(50).add(new LatLng (44.4181654, 26.1648097));\n listOfpoints.get(50).add(new LatLng (44.420403, 26.1642732));\n listOfpoints.get(50).add(new LatLng (44.4248319, 26.1631574));\n listOfpoints.get(50).add(new LatLng (44.4232688, 26.151227));\n listOfpoints.get(50).add(new LatLng (44.4226558, 26.1500253));\n listOfpoints.get(50).add(new LatLng (44.4178742, 26.1465063));\n\n\n listOfpoints.get(51).add(new LatLng (44.409177,26.1228262));\n listOfpoints.get(51).add(new LatLng (44.4079354,26.1261736));\n listOfpoints.get(51).add(new LatLng (44.3993506, 26.1595188));\n listOfpoints.get(51).add(new LatLng (44.4000559,26.1602484));\n listOfpoints.get(51).add(new LatLng (44.407077,26.1638962));\n listOfpoints.get(51).add(new LatLng (44.4081807, 26.1641108));\n listOfpoints.get(51).add(new LatLng (44.4091004, 26.1638104));\n listOfpoints.get(51).add(new LatLng (44.4114916, 26.162995));\n listOfpoints.get(51).add(new LatLng (44.4129018, 26.16351));\n listOfpoints.get(51).add(new LatLng (44.413147, 26.1608063));\n listOfpoints.get(51).add(new LatLng (44.4135762, 26.1567723));\n listOfpoints.get(51).add(new LatLng (44.4148943, 26.1529957));\n listOfpoints.get(51).add(new LatLng (44.4176838,26.1461722));\n listOfpoints.get(51).add(new LatLng (44.4183121,26.1435329));\n listOfpoints.get(51).add(new LatLng (44.4200133, 26.1367523));\n listOfpoints.get(51).add(new LatLng (44.4175152,26.1354433));\n listOfpoints.get(51).add(new LatLng (44.4159825, 26.1342417));\n listOfpoints.get(51).add(new LatLng (44.4146031,26.1324822));\n listOfpoints.get(51).add(new LatLng (44.4113383,26.1266242));\n listOfpoints.get(51).add(new LatLng (44.409177,26.1228262));\n\n\n listOfpoints.get(52).add(new LatLng (44.3988714,26.159323));\n listOfpoints.get(52).add(new LatLng (44.4079468,26.1248191));\n listOfpoints.get(52).add(new LatLng (44.4088665, 26.1225875));\n listOfpoints.get(52).add(new LatLng (44.4080694,26.1217721));\n listOfpoints.get(52).add(new LatLng (44.4065059,26.1213858));\n listOfpoints.get(52).add(new LatLng (44.3941185, 26.120785));\n listOfpoints.get(52).add(new LatLng (44.3862678, 26.1391528));\n listOfpoints.get(52).add(new LatLng (44.3887826,26.1415131));\n listOfpoints.get(52).add(new LatLng (44.3886293, 26.1448605));\n listOfpoints.get(52).add(new LatLng (44.3891813, 26.1464484));\n listOfpoints.get(52).add(new LatLng (44.389304, 26.1472209));\n listOfpoints.get(52).add(new LatLng (44.3927079, 26.155761));\n listOfpoints.get(52).add(new LatLng (44.3941492, 26.1572631));\n listOfpoints.get(52).add(new LatLng (44.3985648, 26.16031));\n listOfpoints.get(52).add(new LatLng (44.3988714, 26.159323));\n\n\n\n listOfpoints.get(53).add(new LatLng (44.3886499, 26.1177499));\n listOfpoints.get(53).add(new LatLng (44.3892939, 26.1179645));\n listOfpoints.get(53).add(new LatLng (44.3881592, 26.1159046));\n listOfpoints.get(53).add(new LatLng (44.3876838,26.1132224));\n listOfpoints.get(53).add(new LatLng (44.3873311, 26.1100895));\n listOfpoints.get(53).add(new LatLng (44.3887879, 26.1032445));\n listOfpoints.get(53).add(new LatLng (44.3888645, 26.1022789));\n listOfpoints.get(53).add(new LatLng (44.3886192, 26.1005838));\n listOfpoints.get(53).add(new LatLng (44.3883738,26.0998542));\n listOfpoints.get(53).add(new LatLng (44.3876225,26.097923));\n listOfpoints.get(53).add(new LatLng (44.3869478, 26.0954554));\n listOfpoints.get(53).add(new LatLng (44.3862577, 26.0924299));\n listOfpoints.get(53).add(new LatLng (44.3860584, 26.0924299));\n listOfpoints.get(53).add(new LatLng (44.3789427, 26.0917003));\n listOfpoints.get(53).add(new LatLng (44.3757526,26.1157758));\n listOfpoints.get(53).add(new LatLng (44.375998,26.1173208));\n listOfpoints.get(53).add(new LatLng (44.3765195,26.1189945));\n listOfpoints.get(53).add(new LatLng (44.3769183,26.1194665));\n listOfpoints.get(53).add(new LatLng (44.3775624, 26.1194236));\n listOfpoints.get(53).add(new LatLng (44.3786973,26.1184366));\n listOfpoints.get(53).add(new LatLng (44.3824393,26.1150248));\n listOfpoints.get(53).add(new LatLng (44.3831447, 26.114939));\n listOfpoints.get(53).add(new LatLng (44.3840802, 26.1151106));\n listOfpoints.get(53).add(new LatLng (44.3879598, 26.1175568));\n listOfpoints.get(53).add(new LatLng (44.3886499,26.1177499));\n\n\n listOfpoints.get(54).add(new LatLng ( 44.3939843, 26.1207857));\n listOfpoints.get(54).add(new LatLng (44.3928679,26.120861));\n listOfpoints.get(54).add(new LatLng (44.3916643, 26.1202602));\n listOfpoints.get(54).add(new LatLng (44.3901386, 26.1189727));\n listOfpoints.get(54).add(new LatLng (44.3894869, 26.1181573));\n listOfpoints.get(54).add(new LatLng (44.3881836, 26.1178784));\n listOfpoints.get(54).add(new LatLng (44.3839589, 26.1153034));\n listOfpoints.get(54).add(new LatLng (44.3830541, 26.1151318));\n listOfpoints.get(54).add(new LatLng (44.382479, 26.1153034));\n listOfpoints.get(54).add(new LatLng (44.3814899, 26.1160544));\n listOfpoints.get(54).add(new LatLng (44.3792585,26.1181466));\n listOfpoints.get(54).add(new LatLng (44.3765793, 26.1204638));\n listOfpoints.get(54).add(new LatLng (44.3792479, 26.1275449));\n listOfpoints.get(54).add(new LatLng (44.379524,26.135098));\n listOfpoints.get(54).add(new LatLng (44.3856888, 26.1398616));\n listOfpoints.get(54).add(new LatLng (44.3939843,26.1207857));\n\n\n listOfpoints.get(55).add(new LatLng (44.3777851, 26.0469458));\n listOfpoints.get(55).add(new LatLng (44.3767422, 26.0507223));\n listOfpoints.get(55).add(new LatLng (44.3901146,26.0632536));\n listOfpoints.get(55).add(new LatLng (44.4006018,26.0712359));\n listOfpoints.get(55).add(new LatLng (44.4064272, 26.0638544));\n listOfpoints.get(55).add(new LatLng (44.4054461,26.0626528));\n listOfpoints.get(55).add(new LatLng (44.3997432, 26.0485766));\n listOfpoints.get(55).add(new LatLng (44.3817726,26.0459158));\n listOfpoints.get(55).add(new LatLng (44.3777851, 26.0469458));\n\n\n listOfpoints.get(56).add(new LatLng (44.406462, 26.0640051));\n listOfpoints.get(56).add(new LatLng (44.4007746, 26.0715552));\n listOfpoints.get(56).add(new LatLng (44.3971564,26.0688944));\n listOfpoints.get(56).add(new LatLng (44.3905634, 26.0639591));\n listOfpoints.get(56).add(new LatLng (44.3862699, 26.078207));\n listOfpoints.get(56).add(new LatLng (44.38124,26.0855027));\n listOfpoints.get(56).add(new LatLng (44.3802585, 26.0858031));\n listOfpoints.get(56).add(new LatLng (44.3797064, 26.0867901));\n listOfpoints.get(56).add(new LatLng (44.3790009,26.091425));\n listOfpoints.get(56).add(new LatLng (44.3848591,26.091897));\n listOfpoints.get(56).add(new LatLng (44.3890301,26.0918541));\n listOfpoints.get(56).add(new LatLng (44.3909928, 26.0865755));\n listOfpoints.get(56).add(new LatLng (44.3915141,26.0856314));\n listOfpoints.get(56).add(new LatLng (44.3946727, 26.0839608));\n listOfpoints.get(56).add(new LatLng (44.3961445,26.0850122));\n listOfpoints.get(56).add(new LatLng (44.3967425,26.0849907));\n listOfpoints.get(56).add(new LatLng (44.4002074, 26.0843041));\n listOfpoints.get(56).add(new LatLng (44.4029362, 26.0816648));\n listOfpoints.get(56).add(new LatLng (44.4055576,26.0799267));\n listOfpoints.get(56).add(new LatLng (44.4070752,26.0791113));\n listOfpoints.get(56).add(new LatLng (44.4130379,26.0732319));\n listOfpoints.get(56).add(new LatLng (44.406462, 26.0640051));\n\n\n listOfpoints.get(57).add(new LatLng (44.4005004, 26.0494378));\n listOfpoints.get(57).add(new LatLng (44.4056207, 26.0623124));\n listOfpoints.get(57).add(new LatLng (44.4131623,26.0729554));\n listOfpoints.get(57).add(new LatLng (44.4204884,26.0654452));\n listOfpoints.get(57).add(new LatLng (44.4181895,26.0583212));\n listOfpoints.get(57).add(new LatLng (44.4005004, 26.0494378));\n\n\n listOfpoints.get(58).add(new LatLng (44.414413, 26.0354062));\n listOfpoints.get(58).add(new LatLng (44.415394, 26.0475512));\n listOfpoints.get(58).add(new LatLng (44.4158231,26.0502978));\n listOfpoints.get(58).add(new LatLng (44.4181221,26.0576363));\n listOfpoints.get(58).add(new LatLng (44.4207888, 26.0658331));\n listOfpoints.get(58).add(new LatLng (44.4237005, 26.0731287));\n listOfpoints.get(58).add(new LatLng (44.4298608,26.0624857));\n listOfpoints.get(58).add(new LatLng (44.4293091,26.0617562));\n listOfpoints.get(58).add(new LatLng (44.4290027,26.0610266));\n listOfpoints.get(58).add(new LatLng (44.4275316, 26.0600825));\n listOfpoints.get(58).add(new LatLng (44.426275, 26.0585375));\n listOfpoints.get(58).add(new LatLng (44.4259379,26.0566922));\n listOfpoints.get(58).add(new LatLng (44.4253862, 26.0520573));\n listOfpoints.get(58).add(new LatLng (44.4242829,26.0473366));\n listOfpoints.get(58).add(new LatLng (44.4229037,26.0406847));\n listOfpoints.get(58).add(new LatLng (44.4221374,26.0347624));\n listOfpoints.get(58).add(new LatLng (44.4165281,26.0346766));\n listOfpoints.get(58).add(new LatLng (44.414413,26.0354062));\n\n\n listOfpoints.get(59).add(new LatLng (44.4224216, 26.0344395));\n listOfpoints.get(59).add(new LatLng (44.422437, 26.0360274));\n listOfpoints.get(59).add(new LatLng (44.423004,26.040276));\n listOfpoints.get(59).add(new LatLng (44.4255632,26.0522065));\n listOfpoints.get(59).add(new LatLng (44.4259156,26.055468));\n listOfpoints.get(59).add(new LatLng (44.42636,26.0583219));\n listOfpoints.get(59).add(new LatLng (44.4274787,26.059781));\n listOfpoints.get(59).add(new LatLng (44.4290264, 26.0608325));\n listOfpoints.get(59).add(new LatLng (44.4293328,26.0616264));\n listOfpoints.get(59).add(new LatLng (44.4299764,26.0623989));\n listOfpoints.get(59).add(new LatLng (44.4319071,26.0594162));\n listOfpoints.get(59).add(new LatLng (44.4345885, 26.0593948));\n listOfpoints.get(59).add(new LatLng (44.4342361, 26.0348472));\n listOfpoints.get(59).add(new LatLng (44.4273254, 26.0330877));\n listOfpoints.get(59).add(new LatLng (44.4237396,26.0342893));\n listOfpoints.get(59).add(new LatLng (44.4224216,26.0344395));\n\n\n listOfpoints.get(60).add(new LatLng (44.4345371,26.034714));\n listOfpoints.get(60).add(new LatLng (44.4343687, 26.0351665));\n listOfpoints.get(60).add(new LatLng (44.4347671,26.059757));\n listOfpoints.get(60).add(new LatLng (44.435334, 26.0617097));\n listOfpoints.get(60).add(new LatLng (44.4355025, 26.0629327));\n listOfpoints.get(60).add(new LatLng (44.4356864,26.0635979));\n listOfpoints.get(60).add(new LatLng (44.4371728, 26.0669608));\n listOfpoints.get(60).add(new LatLng (44.4383602, 26.0697182));\n listOfpoints.get(60).add(new LatLng (44.4427184,26.0621798));\n listOfpoints.get(60).add(new LatLng (44.4429329,26.0609782));\n listOfpoints.get(60).add(new LatLng (44.447161,26.0392201));\n listOfpoints.get(60).add(new LatLng (44.4427491,26.0356152));\n listOfpoints.get(60).add(new LatLng (44.4345371,26.034714));\n\n\n listOfpoints.get(61).add(new LatLng (44.4053059, 26.0112059));\n listOfpoints.get(61).add(new LatLng (44.384914, 26.0334789));\n listOfpoints.get(61).add(new LatLng (44.3778596, 26.0462677));\n listOfpoints.get(61).add(new LatLng (44.3811722,26.0454952));\n listOfpoints.get(61).add(new LatLng (44.399879, 26.0482418));\n listOfpoints.get(61).add(new LatLng (44.4002162, 26.0489714));\n listOfpoints.get(61).add(new LatLng (44.4169858,26.0575115));\n listOfpoints.get(61).add(new LatLng (44.4180893, 26.0579407));\n listOfpoints.get(61).add(new LatLng (44.4156984,26.0508167));\n listOfpoints.get(61).add(new LatLng (44.4151773,26.0472977));\n listOfpoints.get(61).add(new LatLng (44.414135,26.0356247));\n listOfpoints.get(61).add(new LatLng (44.4110082, 26.0104334));\n listOfpoints.get(61).add(new LatLng (44.4061643,26.0117208));\n listOfpoints.get(61).add(new LatLng (44.4053059,26.0112059));\n\n\n listOfpoints.get(62).add(new LatLng (44.4103691, 26.0025379));\n listOfpoints.get(62).add(new LatLng (44.4103304, 26.0034906));\n listOfpoints.get(62).add(new LatLng (44.4127522,26.0228884));\n listOfpoints.get(62).add(new LatLng (44.4144076,26.0351192));\n listOfpoints.get(62).add(new LatLng (44.4167986,26.0343897));\n listOfpoints.get(62).add(new LatLng (44.4221013, 26.0343038));\n listOfpoints.get(62).add(new LatLng (44.4271277, 26.0328018));\n listOfpoints.get(62).add(new LatLng (44.4343295, 26.0347544));\n listOfpoints.get(62).add(new LatLng (44.4344597, 26.0345399));\n listOfpoints.get(62).add(new LatLng (44.436423, 26.0347646));\n listOfpoints.get(62).add(new LatLng (44.4424747, 26.0213321));\n listOfpoints.get(62).add(new LatLng (44.4459215, 26.0171264));\n listOfpoints.get(62).add(new LatLng (44.4457043,26.0167004));\n listOfpoints.get(62).add(new LatLng (44.4252662, 25.9987613));\n listOfpoints.get(62).add(new LatLng (44.4235193, 25.9990188));\n listOfpoints.get(62).add(new LatLng (44.4103691, 26.0025379));\n\n\n listOfpoints.get(63).add(new LatLng (44.450683, 26.0692569));\n listOfpoints.get(63).add(new LatLng (44.4530725,26.0733768));\n listOfpoints.get(63).add(new LatLng (44.4523986, 26.0762092));\n listOfpoints.get(63).add(new LatLng (44.4522454,26.0783979));\n listOfpoints.get(63).add(new LatLng (44.4521842,26.0858652));\n listOfpoints.get(63).add(new LatLng (44.4658762, 26.0861656));\n listOfpoints.get(63).add(new LatLng (44.4661262, 26.0856151));\n listOfpoints.get(63).add(new LatLng (44.4670374, 26.0787379));\n listOfpoints.get(63).add(new LatLng (44.467496, 26.0777089));\n listOfpoints.get(63).add(new LatLng (44.4773875,26.0721728));\n listOfpoints.get(63).add(new LatLng (44.4779387,26.0720012));\n listOfpoints.get(63).add(new LatLng (44.482103,26.0611007));\n listOfpoints.get(63).add(new LatLng (44.4811232,26.0571525));\n listOfpoints.get(63).add(new LatLng (44.4748153, 26.0461661));\n listOfpoints.get(63).add(new LatLng (44.4716917, 26.0438487));\n listOfpoints.get(63).add(new LatLng (44.4690579,26.0436771));\n listOfpoints.get(63).add(new LatLng (44.4667916, 26.0449645));\n listOfpoints.get(63).add(new LatLng (44.4519663, 26.0668513));\n listOfpoints.get(63).add(new LatLng (44.450683,26.0692569));\n\n\n listOfpoints.get(64).add(new LatLng (44.4663308, 26.0857322));\n listOfpoints.get(64).add(new LatLng (44.466193, 26.0862472));\n listOfpoints.get(64).add(new LatLng (44.4723947,26.0878994));\n listOfpoints.get(64).add(new LatLng (44.4731756,26.0883715));\n listOfpoints.get(64).add(new LatLng (44.4739718,26.090131));\n listOfpoints.get(64).add(new LatLng (44.4744158, 26.090882));\n listOfpoints.get(64).add(new LatLng (44.4748292,26.0909678));\n listOfpoints.get(64).add(new LatLng (44.4753498,26.0906889));\n listOfpoints.get(64).add(new LatLng (44.4774321, 26.0888006));\n listOfpoints.get(64).add(new LatLng (44.4801879,26.0864832));\n listOfpoints.get(64).add(new LatLng (44.4868014,26.0859682));\n listOfpoints.get(64).add(new LatLng (44.4880873,26.0854532));\n listOfpoints.get(64).add(new LatLng (44.489618,26.0824491));\n listOfpoints.get(64).add(new LatLng (44.4904753, 26.0788443));\n listOfpoints.get(64).add(new LatLng (44.4890057,26.0784151));\n listOfpoints.get(64).add(new LatLng (44.478167, 26.0727074));\n listOfpoints.get(64).add(new LatLng (44.4678468, 26.0779216));\n listOfpoints.get(64).add(new LatLng (44.467219, 26.0788228));\n listOfpoints.get(64).add(new LatLng (44.4663308, 26.0857322));\n\n\n listOfpoints.get(65).add(new LatLng (44.4432698,26.0604113));\n listOfpoints.get(65).add(new LatLng (44.443222,26.0605852));\n listOfpoints.get(65).add(new LatLng (44.4450067,26.0611538));\n listOfpoints.get(65).add(new LatLng (44.4465463,26.062173));\n listOfpoints.get(65).add(new LatLng (44.4472816,26.0631386));\n listOfpoints.get(65).add(new LatLng (44.448913,26.0666577));\n listOfpoints.get(65).add(new LatLng (44.4502551,26.0690373));\n listOfpoints.get(65).add(new LatLng (44.4664896,26.0448331));\n listOfpoints.get(65).add(new LatLng (44.4688479,26.0434168));\n listOfpoints.get(65).add(new LatLng (44.469491,26.0403269));\n listOfpoints.get(65).add(new LatLng (44.4702566,26.037237));\n listOfpoints.get(65).add(new LatLng (44.4701035,26.0353058));\n listOfpoints.get(65).add(new LatLng (44.4613441,26.0305422));\n listOfpoints.get(65).add(new LatLng (44.4611297,26.0346621));\n listOfpoints.get(65).add(new LatLng (44.4606089,26.0350913));\n listOfpoints.get(65).add(new LatLng (44.4595369,26.0350913));\n listOfpoints.get(65).add(new LatLng (44.458618,26.0354775));\n listOfpoints.get(65).add(new LatLng (44.4545745,26.0376233));\n listOfpoints.get(65).add(new LatLng (44.4501632,26.0417002));\n listOfpoints.get(65).add(new LatLng (44.4494892,26.0417002));\n listOfpoints.get(65).add(new LatLng (44.4485701,26.039297));\n listOfpoints.get(65).add(new LatLng (44.4477429,26.0380953));\n listOfpoints.get(65).add(new LatLng (44.4466093,26.0430306));\n listOfpoints.get(65).add(new LatLng (44.4432698,26.0604113));\n\n\n\n listOfpoints.get(66).add(new LatLng (44.4742952,26.0910108));\n listOfpoints.get(66).add(new LatLng (44.4741016,26.0912642));\n listOfpoints.get(66).add(new LatLng (44.4741016,26.0917148));\n listOfpoints.get(66).add(new LatLng (44.4743313,26.0922513));\n listOfpoints.get(66).add(new LatLng (44.4750816,26.0927019));\n listOfpoints.get(66).add(new LatLng (44.4758471,26.0937962));\n listOfpoints.get(66).add(new LatLng (44.4762758,26.0947189));\n listOfpoints.get(66).add(new LatLng (44.4766127,26.0962853));\n listOfpoints.get(66).add(new LatLng (44.4765514,26.0971436));\n listOfpoints.get(66).add(new LatLng (44.4761227,26.0977444));\n listOfpoints.get(66).add(new LatLng (44.4753878,26.0985169));\n listOfpoints.get(66).add(new LatLng (44.4745457,26.0985384));\n listOfpoints.get(66).add(new LatLng (44.4734585,26.0989675));\n listOfpoints.get(66).add(new LatLng (44.4729073,26.0990104));\n listOfpoints.get(66).add(new LatLng (44.4718508,26.0986671));\n listOfpoints.get(66).add(new LatLng (44.471223,26.0980663));\n listOfpoints.get(66).add(new LatLng (44.469263,26.0970792));\n listOfpoints.get(66).add(new LatLng (44.4689567,26.0971651));\n listOfpoints.get(66).add(new LatLng (44.468773,26.0975728));\n listOfpoints.get(66).add(new LatLng (44.4687424,26.0981092));\n listOfpoints.get(66).add(new LatLng (44.4688955,26.0985169));\n listOfpoints.get(66).add(new LatLng (44.4692017,26.0986886));\n listOfpoints.get(66).add(new LatLng (44.4694774,26.0985598));\n listOfpoints.get(66).add(new LatLng (44.4704268,26.0990319));\n listOfpoints.get(66).add(new LatLng (44.4707483,26.0994396));\n listOfpoints.get(66).add(new LatLng (44.4719733,26.1024651));\n listOfpoints.get(66).add(new LatLng (44.4735963,26.1028943));\n listOfpoints.get(66).add(new LatLng (44.474071,26.1035809));\n listOfpoints.get(66).add(new LatLng (44.4741322,26.1042676));\n listOfpoints.get(66).add(new LatLng (44.4735351,26.1047396));\n listOfpoints.get(66).add(new LatLng (44.474071,26.1077866));\n listOfpoints.get(66).add(new LatLng (44.4738413,26.1079583));\n listOfpoints.get(66).add(new LatLng (44.473826,26.1085591));\n listOfpoints.get(66).add(new LatLng (44.4733667,26.1097822));\n listOfpoints.get(66).add(new LatLng (44.4732595,26.1107478));\n listOfpoints.get(66).add(new LatLng (44.4734432,26.1111555));\n listOfpoints.get(66).add(new LatLng (44.4763087,26.1089172));\n listOfpoints.get(66).add(new LatLng (44.4946789,26.1040249));\n listOfpoints.get(66).add(new LatLng (44.4968217,26.0792198));\n listOfpoints.get(66).add(new LatLng (44.490592,26.0788336));\n listOfpoints.get(66).add(new LatLng (44.4898573,26.0820737));\n listOfpoints.get(66).add(new LatLng (44.4894593,26.0830178));\n listOfpoints.get(66).add(new LatLng (44.4882229,26.0855306));\n listOfpoints.get(66).add(new LatLng (44.4870595,26.0860456));\n listOfpoints.get(66).add(new LatLng (44.4801439,26.0866335));\n listOfpoints.get(66).add(new LatLng (44.4761173,26.090174));\n listOfpoints.get(66).add(new LatLng (44.4751527,26.0912469));\n listOfpoints.get(66).add(new LatLng (44.4742952,26.0910108));\n\n listOfpoints.get(67).add(new LatLng (44.4671287, 26.121282));\n listOfpoints.get(67).add(new LatLng (44.46768,26.1231274));\n listOfpoints.get(67).add(new LatLng (44.4696095,26.1234278));\n listOfpoints.get(67).add(new LatLng (44.4712938,26.1224408));\n listOfpoints.get(67).add(new LatLng (44.4723657,26.1229557));\n listOfpoints.get(67).add(new LatLng (44.4727944, 26.1226553));\n listOfpoints.get(67).add(new LatLng (44.4740193, 26.1226982));\n listOfpoints.get(67).add(new LatLng (44.4745399,26.1236424));\n listOfpoints.get(67).add(new LatLng (44.4743668,26.1243164));\n listOfpoints.get(67).add(new LatLng (44.4747037, 26.1250031));\n listOfpoints.get(67).add(new LatLng (44.4751324,26.1257541));\n listOfpoints.get(67).add(new LatLng (44.4758673,26.1267626));\n listOfpoints.get(67).add(new LatLng (44.4761736, 26.127578));\n listOfpoints.get(67).add(new LatLng (44.491758,26.1285221));\n listOfpoints.get(67).add(new LatLng (44.4931662, 26.1377919));\n listOfpoints.get(67).add(new LatLng (44.494452,26.1444008));\n listOfpoints.get(67).add(new LatLng (44.4947581,26.1462033));\n listOfpoints.get(67).add(new LatLng (44.4958601, 26.1472332));\n listOfpoints.get(67).add(new LatLng (44.4969009, 26.1458599));\n listOfpoints.get(67).add(new LatLng (44.4984926, 26.1450875));\n listOfpoints.get(67).add(new LatLng (44.5000231,26.1446583));\n listOfpoints.get(67).add(new LatLng (44.5006353,26.1435425));\n listOfpoints.get(67).add(new LatLng (44.5012475,26.1424267));\n listOfpoints.get(67).add(new LatLng (44.5057774, 26.144315));\n listOfpoints.get(67).add(new LatLng (44.5070629, 26.137191));\n listOfpoints.get(67).add(new LatLng (44.5066956, 26.1233723));\n listOfpoints.get(67).add(new LatLng (44.502227,26.1044896));\n listOfpoints.get(67).add(new LatLng (44.4952479,26.1044896));\n listOfpoints.get(67).add(new LatLng (44.4782558,26.1086953));\n listOfpoints.get(67).add(new LatLng (44.4765716,26.1090386));\n listOfpoints.get(67).add(new LatLng (44.4734175,26.1114848));\n listOfpoints.get(67).add(new LatLng (44.4739994,26.1124289));\n listOfpoints.get(67).add(new LatLng (44.4744587,26.1137163));\n listOfpoints.get(67).add(new LatLng (44.474275,26.1152613));\n listOfpoints.get(67).add(new LatLng (44.4738156,26.1171067));\n listOfpoints.get(67).add(new LatLng (44.4729582,26.1180937));\n listOfpoints.get(67).add(new LatLng (44.4705695, 26.1195099));\n listOfpoints.get(67).add(new LatLng (44.4677826,26.1202395));\n listOfpoints.get(67).add(new LatLng (44.4671287,26.121282));\n\n\n //Stockholm\n listOfpoints.get(68).add(new LatLng(59.339281, 18.005316));\n listOfpoints.get(68).add(new LatLng(59.263986, 18.253591));\n listOfpoints.get(68).add(new LatLng(59.260869, 17.878596));\n\n //Stockholm\n listOfpoints.get(69).add(new LatLng(59.342841, 18.040179));\n listOfpoints.get(69).add(new LatLng(59.355275, 17.884694));\n listOfpoints.get(69).add(new LatLng(59.423065, 18.075748));\n\n\n for(int i = 0 ; i < listOfpoints.size(); i++){\n listOfPolygons.add( MapsActivity.instance.mMap.addPolygon(new PolygonOptions()\n .addAll(listOfpoints.get(i))\n .strokeWidth(0)\n .fillColor(Color.argb(50, 0, 250, 0))) );\n }\n\n\n\n\n }", "public void addPoints(int i, List<Point2D> points);", "public void drawPolyLineOnMap(List<LatLng> list) {\n PolylineOptions polyOptions = new PolylineOptions();\n polyOptions.color(Color.RED);\n polyOptions.width(5);\n polyOptions.addAll(list);\n\n mMap.clear();\n mMap.addPolyline(polyOptions);\n\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n for (LatLng latLng : list) {\n builder.include(latLng);\n }\n\n //final LatLngBounds bounds = builder.build();\n\n //BOUND_PADDING is an int to specify padding of bound.. try 100.\n //CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, BOUND_PADDING);\n //mMap.animateCamera(cu);\n }", "public void addPoint(java.util.List point)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(POINT$0);\n target.setListValue(point);\n }\n }", "private void addPoint( LatLng point ) {\n \t\tthis.addMarker( point );\n \t\tthis.commitPolygon();\n \t}", "public void afficherPoints(){\n for(Point point : pointArrayList){\n getMapPane().getChildren().add(point.getImageView());\n visualObjects.add(point);\n }\n }", "@Override\n public void onDirectionSuccess(List<Points> point) {\n for (Points points:point){\n PolylineOptions polyLineOptions = new PolylineOptions().geodesic(true).color(Color.BLUE\n ).width(15);\n for (int i = 0; i < points.points.size(); i++)\n polyLineOptions.add(points.points.get(i));\n\n polylinePaths.add(mMap.addPolyline(polyLineOptions));\n\n }\n\n }", "private void updatePolyLine(LatLng latLng) {\n List<LatLng> points = polyLine.getPoints();\n points.add(latLng);\n polyLine.setPoints(points);\n }", "public gov.weather.graphical.xml.dwmlgen.wsdl.ndfdxml_wsdl.GmlLatLonListDocument.GmlLatLonList addNewGmlLatLonList()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.weather.graphical.xml.dwmlgen.wsdl.ndfdxml_wsdl.GmlLatLonListDocument.GmlLatLonList target = null;\n target = (gov.weather.graphical.xml.dwmlgen.wsdl.ndfdxml_wsdl.GmlLatLonListDocument.GmlLatLonList)get_store().add_element_user(GMLLATLONLIST$0);\n return target;\n }\n }", "public void add(int index, float x, float y, String label) {\n\t\tpoints.add(index, new GPoint(x, y, label));\n\t}", "private void plottingMarkers(){\r\n if (nameList.size()==0) {\r\n }\r\n else {\r\n for (int i = 0; i < nameList.size(); i++) {\r\n Loc2LatLng = new LatLng(Double.parseDouble(latList.get(i)), Double.parseDouble(lngList.get(i)));\r\n MarkerOptions markerSavedLocations = new MarkerOptions();\r\n markerSavedLocations.title(nameList.get(i));\r\n markerSavedLocations.position(Loc2LatLng);\r\n map.addMarker(markerSavedLocations);\r\n }\r\n }\r\n }", "public void addPoint(Point p) {\r\n line.add(p);\r\n }", "void drawPointArr(Graphics2D g2d, ArrayList<Point2D.Double> l){\r\n\t\tfor(int i=0; i<l.size()-1; i++){\r\n\t\t\tLine2D.Double line=new Line2D.Double(l.get(i), l.get(i+1));\r\n\t\t\tg2d.draw(line);\r\n\t\t}\r\n\r\n\t}", "private List<GCSPoint> toListOfGCSPoints(List<LatLng> coordinatesLatLng) {\n List<GCSPoint> pathCoordiantesEV = new ArrayList<>();\n for (LatLng latLng : coordinatesLatLng) {\n pathCoordiantesEV.add(new GCSPoint(latLng.latitude, latLng.longitude));\n }\n\n return pathCoordiantesEV;\n }", "void mo195a(List<LatLng> list) throws RemoteException;", "@Override\n public String toString() {\n return \"Liste de \" + this.list.size() + \" polygones\";\n }", "private void addPolyLines(List<LatLng> path) {\n PolylineOptions polyline = new PolylineOptions()\n .geodesic(true)\n .addAll(path)\n .color(Color.BLACK)\n .visible(true);\n\n mGoogleMap.addPolyline(polyline);\n }", "public void add(float x, float y, String label) {\n\t\tpoints.add(new GPoint(x, y, label));\n\t}", "private void drawMarker(Location location){\n LatLng currentPosition = new LatLng(location.getLatitude(),location.getLongitude());\r\n runlist.add(currentPosition);\r\n\r\n\r\n for(int i = 0; i<runlist.size();i++){\r\n\r\n\r\n\r\n Marker marker = mGoogleMap.addMarker(new MarkerOptions()\r\n .position(runlist.get(i))\r\n .title(\"TRACKING\")\r\n .snippet(\"Real Time Locations\"));\r\n\r\n\r\n\r\n }\r\n\r\n AddLines();\r\n //mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(runlist.get(0),13));\r\n mGoogleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(runlist.get(0), 13.9f));\r\n\r\n\r\n }", "public void add(Coord obj) {\n\t\tif (index > itemcount)\n\t\t\tthrow new RuntimeException(\"Liste ist voll\");\n\t\tarray[index++] = obj;\n\t}", "public void addPoint(Point pon)\n {\n poly[size] = pon;\n size++;\n }", "private void addPointsToTimeline(List<Placemark> points)\r\n {\r\n List<TimelineDatum> timelinePoints = New.list();\r\n long id = 0;\r\n for (Placemark mark : points)\r\n {\r\n TimelineDatum datum = new StyledTimelineDatum(id,\r\n KMLSpatialTemporalUtils.timeSpanFromTimePrimitive(mark.getTimePrimitive()),\r\n PlacemarkUtils.getPlacemarkColor(mark), mark.getName(), PlacemarkUtils.getPlacemarkTextColor(mark));\r\n timelinePoints.add(datum);\r\n id++;\r\n }\r\n myTimelineRegistry.addData(ourKey, timelinePoints);\r\n }", "@Override\n \tpublic void onMapClick(final LatLng point) \n \t{\n \t\t\n \t\t AlertDialog.Builder builder = new AlertDialog.Builder(CrearIncidenteGPS.this);\n \t\t builder.setMessage(\"Desea agregar un incidente en este lugar?\")\n \t\t .setCancelable(false)\n \t\t .setPositiveButton(\"Si\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t \t//Agregar el incidente\n// \t\t \tlstLatLngs.add(point);\n \t\t \tinsertarIncidente(point);\n// \t\t \tgMap.addMarker(new MarkerOptions().position(point));\n \t\t }\n \t\t })\n \t\t .setNegativeButton(\"No\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t dialog.cancel();\n \t\t }\n \t\t });\n \t\t AlertDialog alert = builder.create();\n \t\t alert.show();\n \t\t\n \t}", "public void add(Coord c){\r\n\t\tcoords.add(c);\r\n\t}", "public void addPoint(Point point){\n\t\t\tclusterPointsList.add(point);\n\t\t}", "private void updatePolyLine(LatLng latLng) {\n\t\tList<LatLng> points = polyLine.getPoints();\n\t\tpoints.add(latLng);\n\t\tpolyLine.setPoints(points);\n\t}", "public void addPoint(LatLng point, int color) {\n if (currentLine == null) {\n PolylineOptions options = new PolylineOptions()\n .add(point)\n .color(color);\n currentLine = mMap.addPolyline(options);\n } else {\n List<LatLng> allPoints = currentLine.getPoints();\n allPoints.add(point);\n currentLine.setPoints(allPoints);\n }\n }", "public void addPoint(double x, double y) {\n xList.add(x);\n yList.add(y);\n }", "private void addMarkers() {\n\n for (MarkerPropio m : listMarkers) {\n LatLng posicion = new LatLng(m.getLatitud(), m.getLogitud());\n final MarkerOptions marker = new MarkerOptions()\n .position(posicion)\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.marker1))\n .title(m.getTitulo())\n .snippet(m.getDescripcion());\n switch (m.getNumImages()){\n case 1:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker1));\n break;\n case 2:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker2));\n break;\n case 3:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker3));\n break;\n case 4:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker4));\n break;\n case 5:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker5));\n break;\n case 6:\n marker.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker6));\n break;\n\n }\n mMap.addMarker(marker);\n hashMarker.put(posicion, m.getId());\n mMap.setOnInfoWindowClickListener(this);\n }\n }", "public abstract ArrayList<DrawingComponent> getAnnotationList();", "public void addPoint(Point point) {\r\n\t\t\r\n\t\tthis.listOfPoints.add(point);\r\n\t}", "private void addMarker( LatLng point ) {\n \t\tthis.markers.add( this.googleMap.addMarker( this.makeMarkerAt( point ) ) );\n \t}", "public void addDataPoint2( DataPoint dataPoint ) {\n\t\tif ( dataPoint.x < 50.0 ){\n\t\t\tsumX1 += dataPoint.x;\n\t\t\tsumX1X1 += dataPoint.x*dataPoint.x;\n\t\t\tsumX1Y += dataPoint.x*dataPoint.z;\n\t\t\tsumY += dataPoint.z;\n\t\t\tsumYY += dataPoint.z*dataPoint.z;\n\n\t\t\tif ( dataPoint.x > X1Max ) {\n\t\t\t\tX1Max = (int)dataPoint.x;\n\t\t\t}\n\t\t\tif ( dataPoint.z > YMax ) {\n\t\t\t\tYMax = (int)dataPoint.z;\n\t\t\t}\n\n\t\t\t// 把每個點的具體座標存入 ArrayList中,備用。\n\t\t\txyz[0] = (int)dataPoint.x+ \"\";\n\t\t\txyz[2] = (int)dataPoint.z+ \"\";\n\t\t\tif ( dataPoint.x !=0 && dataPoint.z != 0 ) {\n\t\t\t\ttry {\n\t\t\t\t\tlistX.add( numPoint, xyz[0] );\n\t\t\t\t\tlistZ.add( numPoint, xyz[2] );\n\t\t\t\t} \n\t\t\t\tcatch ( Exception e ) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t++numPoint;\n\t\t}\n\t\telse {\n\t\t\t sumX50 += dataPoint.x;\n\t\t \t sumX50X50 += dataPoint.x*dataPoint.x;\n\t\t\t sumX50Y50 += dataPoint.x*dataPoint.z;\n\t\t\t sumY50 += dataPoint.z;\n\t\t\t sumY50Y50 += dataPoint.z*dataPoint.z;\n\n\t\t\t if ( dataPoint.x > X50Max ) {\n\t\t\t\t X50Max = (int)dataPoint.x;\n\t\t\t }\n\t\t\t if ( dataPoint.z > Y50Max ) {\n\t\t\t\t Y50Max = (int)dataPoint.z;\n\t\t\t }\n\n\t\t\t // 把每個點的具體座標存入 ArrayList中,備用。\n\t\t\t xyz50[0] = (int)dataPoint.x+ \"\";\n\t\t\t xyz50[2] = (int)dataPoint.z+ \"\";\n\t\t\t if ( dataPoint.x !=0 && dataPoint.z != 0 ) {\n\t\t\t\t try {\n\t\t\t\t\t listX50.add( numPoint50, xyz50[0] );\n\t\t\t\t\t listZ50.add( numPoint50, xyz50[2] );\n\t\t\t\t } \n\t\t\t\t catch ( Exception e ) {\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t }\n\t\t\t }\n\t\t\t\n\t\t\t ++numPoint50;\n\t\t}\n\t\tcoefsValid = false;\n\t}", "@Action\n public void addLabeledPoint() {\n Point2D p1 = randomPoint();\n LabeledPointGraphic<Point2D, Graphics2D> lpg = new LabeledPointGraphic<>(p1, p1, new ObjectStyler());\n lpg.setRenderer(MarkerRenderer.getInstance());\n lpg.setLabelRenderer(new TextRenderer());\n lpg.getObjectStyler().setLabelDelegate(p -> String.format(\"(%.2f,%.2f)\", p.getX(), p.getY()));\n lpg.getObjectStyler().setLabelStyle(Styles.text(Color.red, 14f, Anchor.SOUTHWEST));\n lpg.setDefaultTooltip(\"<html><b>Labeled Point</b>: <i> \" + p1 + \"</i>\");\n lpg.setDragEnabled(true);\n root1.addGraphic(lpg); \n }", "public void addToPainter(OSMNode node) {\r\n\t\tGeoPosition geoP = new GeoPosition(Double.parseDouble(node.getLat()), Double.parseDouble((node.getLon())));\r\n\t\tgeopoints.add(geoP);\r\n\t\t \r\n\t\t//waypoints.add(new DefaultWaypoint(geoP));\r\n\t}", "void addLine(int index, Coordinate start, Coordinate end);", "public void add(GPoint point) {\n\t\tpoints.add(new GPoint(point));\n\t}", "@SimpleFunction(description = \"Adding a list of YailList for markers. The inner YailList represents a marker \" +\n \"and is composed of lat(Double) [required], long(Double) [required], color(int)[in hue value ranging from 0-360], \" +\n \"title(String), snippet(String), draggable(boolean). Return a list of unique ids for the markers that are added\")\n public YailList AddMarkersHue(YailList markers){\n\n ArrayList<Integer> markerIds = new ArrayList<Integer>();\n\n for (Object marker : markers.toArray()) {\n boolean addOne = true;\n if (marker instanceof YailList) {\n Log.i(TAG, \"Interior YailLiat\");\n if (((YailList) marker).size() < 2){\n // throw an exception with error messages\n form.dispatchErrorOccurredEvent(this, \"AddMarkers\",\n ErrorMessages.ERROR_GOOGLE_MAP_INVALID_INPUT, \"Need more than 2 inputs\");\n addOne = false;\n\n }\n\n // ((YailList) marker).getObject(0) will return type gnu.math.DFloNum\n Object latObj = ((YailList) marker).getObject(0);\n Object lngObj = ((YailList) marker).getObject(1);\n Log.i(TAG, \"Type: \" + latObj.getClass());\n Log.i(TAG, \"Type: \" + lngObj.getClass());\n Double lat = new Double(0);\n Double lng = new Double(0);\n\n\n if (!(latObj instanceof DFloNum && lngObj instanceof DFloNum)){//if one of the lat or lng is not DFloNum\n form.dispatchErrorOccurredEvent(this, \"AddMarkersHue\",\n ErrorMessages.ERROR_GOOGLE_MAP_INVALID_INPUT, \"Not a number for latitude or longitude\");\n addOne = false;\n } else {\n lat = ((DFloNum)latObj).doubleValue();\n lng = ((DFloNum)lngObj).doubleValue();\n }\n\n if (lat < -90 || lat > 90 || lng < -180 || lng > 180 ){\n addOne = false;\n form.dispatchErrorOccurredEvent(this, \"AddMarkers\",\n ErrorMessages.ERROR_GOOGLE_MAP_INVALID_INPUT, \"Range for the latitude or longitude is wrong\");\n }\n\n Integer uniqueId = generateMarkerId();\n float color = BitmapDescriptorFactory.HUE_BLUE;\n String title = \"\";\n String snippet = \"\";\n boolean draggable = mMarkerDraggable;\n\n if (((YailList) marker).size() >= 3) {\n Log.i(TAG, \"Type: \" + ((YailList) marker).getObject(2).getClass());\n Log.i(TAG, \"Value: \" + ((YailList) marker).getObject(2).toString());\n // Integer within Yaillist is of type gnu.math.IntNum\n Object colorObj = ((YailList) marker).getObject(2);\n\n if (colorObj instanceof gnu.math.IntNum)\n color = new Float(((IntNum)((YailList) marker).getObject(2)).intValue());//extract the int val and convert to Float\n else {\n addOne = false;\n form.dispatchErrorOccurredEvent(this, \"AddMarkersHue\",\n ErrorMessages.ERROR_GOOGLE_MAP_INVALID_INPUT, colorObj.toString() + \" is not a number\");\n }\n }\n\n if (((YailList) marker).size() >= 4){\n title = (String) ((YailList) marker).getObject(3);\n Log.i(TAG, \"Type: \" + ((YailList) marker).getObject(3).getClass());\n Log.i(TAG, \"Value: \" + ((YailList) marker).getObject(3).toString());\n }\n\n if (((YailList) marker).size() >= 5){\n snippet = (String) ((YailList) marker).getObject(4);\n Log.i(TAG, \"Type: \" + ((YailList) marker).getObject(4).getClass());\n Log.i(TAG, \"Value: \" + ((YailList) marker).getObject(4).toString());\n }\n\n if (((YailList) marker).size() >= 6) {\n\n Log.i(TAG, \"Type: \" + ((YailList) marker).getObject(5).getClass());\n Log.i(TAG, \"Value: \" + ((YailList) marker).getObject(5).toString());\n\n if (((YailList) marker).getObject(5) instanceof Boolean) {\n draggable = (Boolean) ((YailList) marker).getObject(5);\n }\n else {\n form.dispatchErrorOccurredEvent(this, \"AddMarkers\",\n ErrorMessages.ERROR_GOOGLE_MAP_INVALID_INPUT, \"marker not as a list\");\n addOne = false;\n }\n\n }\n if (addOne){\n markerIds.add(uniqueId);\n addMarkerToMap(lat, lng, uniqueId, color, title, snippet, draggable);\n }\n }\n else {\n // fire exception and throw error messages\n form.dispatchErrorOccurredEvent(this, \"AddMarkersHue\",\n ErrorMessages.ERROR_GOOGLE_MAP_INVALID_INPUT, \"Marker is not represented as list\");\n return YailList.makeList(markerIds); // return an empty markerIds list\n }\n }\n return YailList.makeList(markerIds);\n\n }", "public void addPoint(T p) {\n points.add(p);\n }", "public void convertPixelToLatLng(ArrayList<PointInFloat> pathInPixels){\n for(int i=0; i<pathInPixels.size(); i++){\n LatLng latLng = googleMap.getProjection().\n fromScreenLocation(new Point((int) pathInPixels.get(i).getX(), (int) pathInPixels.get(i).getY()));\n mMapInterface.getPathFrame().add(latLng);\n }\n }", "private void addLine(int number, int x, int y, int z) {\n grid[x][y][z] = \"L\" + number;\n }", "public void append(CPoint cpoint) {\n\tcplist.add(cpoint);\n }", "void addLIfeStoryLines(String personID, HashSet<Event> filteredEvents) {\n ArrayList<Event> personEvents = singleton.retrieveLifeStory(personID);\r\n if(personEvents.size() < 2) {\r\n return;\r\n }\r\n else {\r\n for(int n = 0; n < personEvents.size()-1; n++) {\r\n Event e1 = personEvents.get(n);\r\n Event e2 = personEvents.get(n+1);\r\n if(filteredEvents.contains(e1) && filteredEvents.contains(e2)) {\r\n double lat = e1.getLatitude();\r\n double longit = e1.getLongitude();\r\n LatLng p1 = new LatLng(lat,longit);\r\n lat = e2.getLatitude();\r\n longit = e2.getLongitude();\r\n LatLng p2 = new LatLng(lat,longit);\r\n drawLine(p1,p2,Color.RED,10);\r\n }\r\n }\r\n }\r\n\r\n }", "public void add(GeometricalObject object);", "List<LatLng> mo201i() throws RemoteException;", "void drawMyPoint(double x, double y, MapContent map, String nombre) { \n// SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();\n// builder.setName(\"MyFeatureType\");\n// builder.setCRS( DefaultGeographicCRS.WGS84 ); // set crs \n// builder.add(\"location\", Point.class); // add geometry\n//\n// // build the type\n// SimpleFeatureType TYPE = builder.buildFeatureType();\n//\n// // create features using the type defined\n// SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(TYPE);\n// org.locationtech.jts.geom.GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();\n// org.locationtech.jts.geom.Point point = geometryFactory.createPoint(new Coordinate(x, y));\n// //\n// \n// //\n// featureBuilder.add(point);\n// SimpleFeature feature = featureBuilder.buildFeature(\"FeaturePoint\");\n// DefaultFeatureCollection featureCollection = new DefaultFeatureCollection(\"internal\", TYPE);\n// featureCollection.add(feature); // Add feature 1, 2, 3, etc\n//\n// Style style = SLD.createPointStyle(\"Star\", Color.BLUE, Color.BLUE, 0.3f, 200);\n// Layer layer = new FeatureLayer(featureCollection, style);\n// layer.setTitle(\"NewPointLayer\");\n// map.addLayer(layer);\n// //mapFrame.getMapPane().repaint();// MapPane.repaint();\n//}\n\tSimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();\n builder.setName(\"MyFeatureType\"); // \n builder.setCRS( DefaultGeographicCRS.WGS84 ); // set crs // Definimos las caracteristicas de tipo del punto q vamos a crear\n builder.add(\"location\", Point.class); // add geometry //\n org.locationtech.jts.geom.GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory(); //objeto q usaremos para crear el punto\n Coordinate coord = new Coordinate( x,y ); //creamos la coordenada con los puntos pasados como parametros\n org.locationtech.jts.geom.Point point = geometryFactory.createPoint(coord); // Creamos el punto geometrico\n\nSimpleFeatureType pointtype = null; //definimos el typo de punto que necesitamos apra agregarlo a la capa del mapa\n try {\n pointtype = DataUtilities.createType(\"POINT\", \"geom:Point,name:String\");\n } catch (SchemaException ex) {\n Logger.getLogger(SelectionLab.class.getName()).log(Level.SEVERE, null, ex);\n }\nSimpleFeatureBuilder featureBuilderPoints = new SimpleFeatureBuilder(pointtype); //creamos el constructor de lo que agregaremos\nDefaultFeatureCollection collectionPoints = new DefaultFeatureCollection(\"internal\", pointtype); //creamos el contenedor donde pondremos lo que agregaremos\n//PointString Point=builder.createPointString(Point);\n//LineString Point = builder.createLineString(Point);\nfeatureBuilderPoints.add(point); //agregamos el punto en el constructor\nSimpleFeature featureLine = featureBuilderPoints.buildFeature(null); \n((DefaultFeatureCollection)collectionPoints).add(featureLine); \nStyle PointStyle = SLD.createPointStyle(\"circle\", Color.RED, Color.RED,(float) 0.5,(float) 10); //definimos el estilo del punto (icono, color contorno, color, opacidad y tamaño)\n//Obserervacion: el dibujo del punto siempre se mantiene del mismo tamaño por mas que se use el zoom\nmap.addLayer(new FeatureLayer(collectionPoints, PointStyle)); //agregamos el punto a la capa\n\nguardarCoordenadas(nombre,x,y);\n}", "private static void add(List<Point> points, int param, double value, boolean measured) {\r\n points.add(new Point(param, value, measured));\r\n }", "public ListPolygone() {\n this.list = new ArrayList();\n }", "public void addPoint(Point point)\r\n\t\t{\r\n\t\t\tif (locations.size() == 0) //if no locations just add\r\n\t\t\t\tlocations.add(point);\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//insert in sorted order\r\n\t\t\t\tint i = 0;\r\n\t\t\t\twhile ((i < locations.size()) && (locations.get(i).x <= point.x))\r\n\t\t\t\t{\r\n\t\t\t\t\tif (locations.get(i).x == point.x)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (locations.get(i).y >= point.y)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\tlocations.add(i, point);\r\n\t\t\t}\r\n\r\n\t\t}", "private void DrawDots(List<HashMap<String, String>> result,ArrayList point2) {\n map.clear();\n MarkerOptions options = new MarkerOptions();\n\n // this is the start location marker in green\n options.position(origin);\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n // the is the end location marker in red\n map.addMarker(options);\n options.position(dest);\n\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));\n\n map.addMarker(options);\n ArrayList points = null;\n\n PolylineOptions lineOptions = null;\n\n MarkerOptions markerOptions = new MarkerOptions();\n points = new ArrayList();\n\n\n lineOptions = new PolylineOptions();\n List<HashMap<String, String>> path = result;\n\n for (int j = 1; j < path.size(); j++) {\n HashMap<String, String> point = path.get(j);\n\n double lat = Double.parseDouble(point.get(\"lat\"));\n double lng = Double.parseDouble(point.get(\"lng\"));\n LatLng position = new LatLng(lat, lng);\n points.add(position);\n\n }\n\n lineOptions.addAll(points);\n lineOptions.width(12);\n\n lineOptions.color(Color.RED);\n\n lineOptions.geodesic(true);\n map.addPolyline(lineOptions);\n\n for (Object k : points2) {\n map.addCircle(new CircleOptions()\n .center((LatLng) k)\n .radius(3)\n .strokeColor(Color.BLUE)\n .fillColor(Color.BLUE));\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n// LatLng sydney = new LatLng(-34, 151);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n for(int i=0; i<coordinatesStringList.length; i+=2){\n pont = new LatLng(Double.parseDouble(coordinatesStringList[i]), Double.parseDouble(coordinatesStringList[i+1]));\n latLngList.add(pont);\n MarkerOptions markerOptions=new MarkerOptions();\n mMap.addMarker(new MarkerOptions().position(pont).title(\"Marker in Sydney\").icon(BitmapDescriptorFactory.fromResource(R.drawable.pin)));\n\n// mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n// @Override\n// public boolean onMarkerClick(Marker marker) {\n// Geocoder geocoder = new Geocoder(this, Locale.getDefault());\n// ArrayList<String> addresses = geocoder.getFromLocation(marker.getPosition().latitude(), marker.getPosition().longitude(), 1); //1 num of possible location returned\n// String address = addresses.get(0).getAddressLine(0); //0 to obtain first possible address\n// String city = addresses.get(0).getLocality();\n// String state = addresses.get(0).getAdminArea();\n// String country = addresses.get(0).getCountryName();\n// String postalCode = addresses.get(0).getPostalCode();\n// //create your custom title\n// String title = address +\"-\"+city+\"-\"+state;\n// marker.setTitle(title);\n// marker.showInfoWindow();\n// return true;\n// }\n// });\n }\n\n\n PolylineOptions polylineOptions = new PolylineOptions();\n\n// Create polyline options with existing LatLng ArrayList\n polylineOptions.addAll(latLngList);\n polylineOptions\n .width(5)\n .color(Color.RED);\n\n// Adding multiple points in map using polyline and arraylist\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.addPolyline(polylineOptions);\n }", "public void addMarkers(View view) {\n if (null == hMap) {\n return;\n }\n if (isAdded) {\n Toast.makeText(this, \"Markers has already added.\", Toast.LENGTH_LONG).show();\n return;\n }\n InputStream inputStream = getResources().openRawResource(R.raw.marker_200);\n List<MarkerOptions> markerOptionsList = null;\n try {\n markerOptionsList = new MyItemReader().read(inputStream);\n } catch (JSONException e) {\n Log.e(TAG, \"JSONException.\");\n }\n if (markerOptionsList == null) {\n return;\n }\n for (MarkerOptions item : markerOptionsList) {\n hMap.addMarker(item);\n }\n isAdded = true;\n }", "void add(GeometricalObject object);", "public void agregar_linea(RecyclingImageView c)\n {\n array_lineas.add(c);\n }", "private void drawSegments(List<LatLng> listPoints) {\n\n PolylineOptions rectOptions = new PolylineOptions()\n .width(8)\n .color(context.getResources().getColor(R.color.colorPolylineComplete))\n .addAll(listPoints);\n\n googleMap.addPolyline(rectOptions);\n }", "public void add(PVector v, String label) {\n\t\tpoints.add(new GPoint(v, label));\n\t}", "public void add(Point point) {\n\t\tthis.points.add(point);\n\t}", "public void add(GPointsArray pts) {\n\t\tfor (int i = 0; i < pts.getNPoints(); i++) {\n\t\t\tpoints.add(new GPoint(pts.get(i)));\n\t\t}\n\t}", "static public void addPersona(Persona c) { //metodo para añadir a lista y actualizar la lista en tiempo real\r\n listaPersona.add(c);\r\n listaG.setListaGrafica();\r\n \r\n \r\n \r\n }", "public void drawCircle() {\n mMap.clear();\n // Generate the points\n mMap.addPolygon(new PolygonOptions().addAll(points).strokeWidth(5).strokeColor(Color.RED).fillColor(Color.TRANSPARENT));\n // Create and return the polygon\n for (int i=0;i<points.size();i++){\n Log.v(\"DrawCircle\",\"drwaakmdaskfmlsmn\"+points.get(i));\n }\n\n\n\n }", "public static int addPoint(final DoubleList output, final double... input) {\n for (int i = 0; i < input.length; i++) {\n output.add(input[i]);\n }\n // end add\n return GL.GL_POINTS;\n }", "public void addPricePoint(Prosument prosument, Point point)\n\t{\n\t\t\n\t\tint idListy = prosument.getID()-1;\n\t\tArrayList<Point> pointList = listaFunkcjiUzytecznosci.get(idListy);\t\t\n\t\t\n\t\tif (pointList.size()==0)\n\t\t{\n\t\t\tpointList.add(point);\n\t\t}\n\t\telse\n\t\t{\n\t\t\taddPricePointAndListNotEmpty(prosument, point, pointList);\n\t\t}\n\t\t\n\t\trynekHistory.addPointToHistoryFunkcjaUzytecznosci(idListy, listaFunkcjiUzytecznosci);\n\t\t\n\t}", "public void add(GPoint[] pts) {\n\t\tfor (int i = 0; i < pts.length; i++) {\n\t\t\tpoints.add(new GPoint(pts[i]));\n\t\t}\n\t}", "public void pointsImage(int points){\r\n\t\tint x = 10;\r\n\t\tint y = 30;\r\n\t\t//strPoints are given coordinates, a color, and a font\r\n\t\tString strPoints = \"Points = \";\r\n\t\tpointsImage = new GLabel(strPoints,x,y);\r\n\t\tpointsImage.setColor(Color.green);\r\n\t\tpointsImage.setFont(\"Arial-30\");\r\n\t\t//strPoints added to the canvas\r\n\t\tcanvas.add(pointsImage);\r\n\t\t//points are given coordinates, a unique color, and a font\r\n\t\tpointsImage1 = new GLabel(String.valueOf(points),125,y);\r\n\t\tif(points >= 0){\r\n\t\t\tpointsImage1.setColor(Color.green);\r\n\t\t}if(points < 0){\r\n\t\t\tpointsImage1.setColor(Color.red);\r\n\t\t}\r\n\t\tpointsImage1.setFont(\"Arial-30\");\r\n\t\t//points added to the canvas\r\n\t\tcanvas.add(pointsImage1);\r\n\t}", "public void insertPoint(int i, java.util.List point)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = \n (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(POINT$0, i);\n target.setListValue(point);\n }\n }", "public AnimSVGPointList() {\n\t\t\titemList = new ArrayList<>(1);\n\t\t}", "public void add(Point p) {\n add(p.xyz.x, p.xyz.y, p.xyz.z);\n }", "public void highlightTransportLine(AnchorPane anchor_pane_map, ArrayList<Street> streets_list, ArrayList<Line> all_streets_lines)\r\n {\r\n Line line1 = null;\r\n for (Street s : streets_list) {\r\n if (this.getStreetsMap().get(0).equals(s)) // highlight first street of line\r\n {\r\n int begin_stop_x = this.getStopsMap().get(0).getCoordinate().getX();\r\n int begin_stop_y = this.getStopsMap().get(0).getCoordinate().getY();\r\n\r\n Coordinate begin_street_1 = s.getCoordinates().get(0);\r\n Coordinate begin_street_2 = s.getCoordinates().get(2);\r\n\r\n Coordinate second_street_1 = this.getStreetsMap().get(1).getCoordinates().get(0);\r\n Coordinate second_street_2 = this.getStreetsMap().get(1).getCoordinates().get(2);\r\n\r\n if ((begin_street_1.getX() == second_street_1.getX() && begin_street_1.getY() == second_street_1.getY()) || (begin_street_1.getX() == second_street_2.getX() && begin_street_1.getY() == second_street_2.getY())) {\r\n line1 = new Line(begin_stop_x, begin_stop_y, begin_street_1.getX(), begin_street_1.getY());\r\n line1.setStroke(this.getTransportLineColor());\r\n line1.setStrokeWidth(5);\r\n anchor_pane_map.getChildren().addAll(line1);\r\n } else if ((begin_street_2.getX() == second_street_1.getX() && begin_street_2.getY() == second_street_1.getY()) || (begin_street_2.getX() == second_street_2.getX() && begin_street_2.getY() == second_street_2.getY())) {\r\n line1 = new Line(begin_stop_x, begin_stop_y, begin_street_2.getX(), begin_street_2.getY());\r\n line1.setStroke(this.getTransportLineColor());\r\n line1.setStrokeWidth(5);\r\n anchor_pane_map.getChildren().addAll(line1);\r\n }\r\n } else if (this.getStreetsMap().get(this.getStreetsMap().size() - 1).equals(s)) // end street of line\r\n {\r\n int end_stop_x = this.getStopsMap().get(this.getStopsMap().size() - 1).getCoordinate().getX();\r\n int end_stop_y = this.getStopsMap().get(this.getStopsMap().size() - 1).getCoordinate().getY();\r\n\r\n Coordinate end_street_1 = s.getCoordinates().get(0);\r\n Coordinate end_street_2 = s.getCoordinates().get(2);\r\n\r\n Coordinate nexttolast_street_1 = this.getStreetsMap().get(this.getStreetsMap().size() - 2).getCoordinates().get(0);\r\n Coordinate nexttolast_street_2 = this.getStreetsMap().get(this.getStreetsMap().size() - 2).getCoordinates().get(2);\r\n\r\n if ((end_street_1.getX() == nexttolast_street_1.getX() && end_street_1.getY() == nexttolast_street_1.getY()) || (end_street_1.getX() == nexttolast_street_2.getX() && end_street_1.getY() == nexttolast_street_2.getY())) {\r\n line1 = new Line(end_stop_x, end_stop_y, end_street_1.getX(), end_street_1.getY());\r\n line1.setStroke(this.getTransportLineColor());\r\n line1.setStrokeWidth(5);\r\n anchor_pane_map.getChildren().addAll(line1);\r\n } else if ((end_street_2.getX() == nexttolast_street_1.getX() && end_street_2.getY() == nexttolast_street_1.getY()) || (end_street_2.getX() == nexttolast_street_2.getX() && end_street_2.getY() == nexttolast_street_2.getY())) {\r\n line1 = new Line(end_stop_x, end_stop_y, end_street_2.getX(), end_street_2.getY());\r\n line1.setStroke(this.getTransportLineColor());\r\n line1.setStrokeWidth(5);\r\n anchor_pane_map.getChildren().addAll(line1);\r\n }\r\n } else if (this.getStreetsMap().contains(s)) { // highlight whole street from line\r\n s.highlightStreet(anchor_pane_map, all_streets_lines, this.getTransportLineColor());\r\n }\r\n }\r\n }", "public void addPoint(double latitude, double longitude) {\n\n // Update the path.\n if (latitudes.isEmpty()) {\n path.moveTo(latitude, longitude);\n }\n else {\n path.lineTo(latitude, longitude);\n }\n\n latitudes.add(latitude);\n longitudes.add(longitude);\n\n\n }", "public void add(GPoint point) {\n\t\tif (point == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tpoints.add(point);\n\t\trepaint();\n\t}", "public void add(int index, float x, float y) {\n\t\tpoints.add(index, new GPoint(x, y));\n\t}", "private static ArrayList<Coordinates> geoPath1() {\n return new ArrayList<Coordinates>() {\n {\n add(new Coordinates(\"-122.19170793,47.77509422,5.156\"));\n add(new Coordinates(\"-122.19171484,47.77509255,5.476\"));\n add(new Coordinates(\"-122.19172476,47.77509815,5.583\"));\n add(new Coordinates(\"-122.19172741,47.77510382,6.077\"));\n add(new Coordinates(\"-122.19172688,47.77510897,6.424\"));\n add(new Coordinates(\"-122.19172704,47.77511101,6.121\"));\n add(new Coordinates(\"-122.19172543,47.77511046,6.235\"));\n add(new Coordinates(\"-122.19172222,47.77511072,6.225\"));\n add(new Coordinates(\"-122.19172067,47.77510953,5.974\"));\n add(new Coordinates(\"-122.19171935,47.77511130,6.508\"));\n add(new Coordinates(\"-122.19171873,47.77511341,6.090\"));\n add(new Coordinates(\"-122.19171924,47.77511293,5.968\"));\n add(new Coordinates(\"-122.19171637,47.77511664,5.461\"));\n add(new Coordinates(\"-122.19171588,47.77511801,5.518\"));\n add(new Coordinates(\"-122.19171639,47.77511835,5.652\"));\n add(new Coordinates(\"-122.19171667,47.77511857,5.647\"));\n add(new Coordinates(\"-122.19171678,47.77511865,5.648\"));\n add(new Coordinates(\"-122.19172518,47.77511628,6.074\"));\n add(new Coordinates(\"-122.19173954,47.77511533,5.472\"));\n add(new Coordinates(\"-122.19175207,47.77511346,5.836\"));\n add(new Coordinates(\"-122.19176251,47.77510782,5.669\"));\n add(new Coordinates(\"-122.19177163,47.77510015,2.049\"));\n add(new Coordinates(\"-122.19177831,47.77509499,2.910\"));\n add(new Coordinates(\"-122.19178524,47.77509168,2.794\"));\n add(new Coordinates(\"-122.19179816,47.77509009,3.440\"));\n add(new Coordinates(\"-122.19181022,47.77508805,3.016\"));\n add(new Coordinates(\"-122.19182115,47.77508458,5.258\"));\n add(new Coordinates(\"-122.19182976,47.77508305,5.820\"));\n add(new Coordinates(\"-122.19183812,47.77508189,5.615\"));\n add(new Coordinates(\"-122.19184640,47.77507857,3.568\"));\n add(new Coordinates(\"-122.19185497,47.77506742,2.922\"));\n add(new Coordinates(\"-122.19186602,47.77506459,3.923\"));\n add(new Coordinates(\"-122.19187867,47.77506429,3.785\"));\n add(new Coordinates(\"-122.19188979,47.77506426,5.388\"));\n add(new Coordinates(\"-122.19190159,47.77506575,4.811\"));\n add(new Coordinates(\"-122.19191428,47.77506995,3.867\"));\n add(new Coordinates(\"-122.19192458,47.77507421,3.806\"));\n add(new Coordinates(\"-122.19193359,47.77507565,5.697\"));\n add(new Coordinates(\"-122.19194828,47.77507599,6.091\"));\n add(new Coordinates(\"-122.19196187,47.77507556,6.160\"));\n add(new Coordinates(\"-122.19197799,47.77507586,5.827\"));\n add(new Coordinates(\"-122.19199669,47.77507708,6.263\"));\n add(new Coordinates(\"-122.19201547,47.77507900,5.519\"));\n add(new Coordinates(\"-122.19203652,47.77508125,5.318\"));\n add(new Coordinates(\"-122.19205394,47.77508798,4.972\"));\n add(new Coordinates(\"-122.19206817,47.77509514,5.112\"));\n add(new Coordinates(\"-122.19208170,47.77510678,5.183\"));\n add(new Coordinates(\"-122.19209617,47.77511995,6.227\"));\n add(new Coordinates(\"-122.19211126,47.77512566,6.331\"));\n add(new Coordinates(\"-122.19212836,47.77513235,6.249\"));\n add(new Coordinates(\"-122.19214476,47.77513787,7.192\"));\n add(new Coordinates(\"-122.19215712,47.77514375,6.008\"));\n add(new Coordinates(\"-122.19216472,47.77514855,5.879\"));\n add(new Coordinates(\"-122.19217137,47.77514377,6.426\"));\n add(new Coordinates(\"-122.19217457,47.77513335,7.248\"));\n add(new Coordinates(\"-122.19217502,47.77511706,7.483\"));\n add(new Coordinates(\"-122.19218040,47.77510219,10.228\"));\n add(new Coordinates(\"-122.19218656,47.77509117,10.560\"));\n add(new Coordinates(\"-122.19219800,47.77508689,10.466\"));\n add(new Coordinates(\"-122.19221646,47.77507476,11.119\"));\n add(new Coordinates(\"-122.19223178,47.77505389,12.674\"));\n add(new Coordinates(\"-122.19223875,47.77504801,14.667\"));\n add(new Coordinates(\"-122.19224629,47.77504536,13.339\"));\n add(new Coordinates(\"-122.19224798,47.77504041,13.908\"));\n add(new Coordinates(\"-122.19224916,47.77503913,14.065\"));\n add(new Coordinates(\"-122.19225069,47.77503675,14.247\"));\n add(new Coordinates(\"-122.19224858,47.77502843,14.488\"));\n add(new Coordinates(\"-122.19224608,47.77502116,15.172\"));\n add(new Coordinates(\"-122.19224071,47.77501315,15.223\"));\n add(new Coordinates(\"-122.19223317,47.77500694,14.840\"));\n add(new Coordinates(\"-122.19222227,47.77500383,13.775\"));\n add(new Coordinates(\"-122.19221226,47.77499910,12.827\"));\n add(new Coordinates(\"-122.19220317,47.77499372,13.307\"));\n add(new Coordinates(\"-122.19219567,47.77498511,13.107\"));\n add(new Coordinates(\"-122.19219183,47.77497813,13.144\"));\n add(new Coordinates(\"-122.19218998,47.77497165,14.620\"));\n add(new Coordinates(\"-122.19219011,47.77496235,9.166\"));\n add(new Coordinates(\"-122.19218887,47.77495353,8.299\"));\n add(new Coordinates(\"-122.19218520,47.77494321,9.052\"));\n add(new Coordinates(\"-122.19218124,47.77493245,9.915\"));\n add(new Coordinates(\"-122.19218070,47.77492023,9.391\"));\n add(new Coordinates(\"-122.19217970,47.77490970,10.372\"));\n add(new Coordinates(\"-122.19217945,47.77490501,7.722\"));\n add(new Coordinates(\"-122.19217823,47.77489981,8.715\"));\n add(new Coordinates(\"-122.19218090,47.77489589,8.714\"));\n add(new Coordinates(\"-122.19218635,47.77488849,11.030\"));\n add(new Coordinates(\"-122.19219339,47.77487849,13.062\"));\n add(new Coordinates(\"-122.19219717,47.77486996,13.102\"));\n add(new Coordinates(\"-122.19219654,47.77486340,13.562\"));\n add(new Coordinates(\"-122.19219260,47.77485669,14.090\"));\n add(new Coordinates(\"-122.19218765,47.77484862,12.973\"));\n add(new Coordinates(\"-122.19218777,47.77484328,13.137\"));\n add(new Coordinates(\"-122.19218893,47.77483642,13.518\"));\n add(new Coordinates(\"-122.19218715,47.77483230,13.557\"));\n add(new Coordinates(\"-122.19218676,47.77482973,13.560\"));\n add(new Coordinates(\"-122.19218203,47.77482544,12.554\"));\n add(new Coordinates(\"-122.19217214,47.77482073,12.209\"));\n add(new Coordinates(\"-122.19216229,47.77481373,12.975\"));\n add(new Coordinates(\"-122.19215766,47.77481203,10.715\"));\n add(new Coordinates(\"-122.19214837,47.77480695,10.188\"));\n add(new Coordinates(\"-122.19213505,47.77480208,9.988\"));\n add(new Coordinates(\"-122.19212451,47.77479761,10.080\"));\n add(new Coordinates(\"-122.19211571,47.77479427,11.799\"));\n add(new Coordinates(\"-122.19210976,47.77478996,12.827\"));\n add(new Coordinates(\"-122.19211063,47.77478275,12.455\"));\n add(new Coordinates(\"-122.19210867,47.77477966,11.972\"));\n add(new Coordinates(\"-122.19209880,47.77477701,11.224\"));\n add(new Coordinates(\"-122.19208860,47.77477571,11.174\"));\n add(new Coordinates(\"-122.19208772,47.77477829,10.066\"));\n add(new Coordinates(\"-122.19208174,47.77477082,9.116\"));\n add(new Coordinates(\"-122.19207288,47.77476146,6.540\"));\n add(new Coordinates(\"-122.19206631,47.77474937,5.343\"));\n add(new Coordinates(\"-122.19206107,47.77474020,7.509\"));\n add(new Coordinates(\"-122.19205903,47.77473648,7.923\"));\n add(new Coordinates(\"-122.19206261,47.77474166,6.203\"));\n add(new Coordinates(\"-122.19206450,47.77474194,5.918\"));\n add(new Coordinates(\"-122.19205951,47.77473670,4.994\"));\n add(new Coordinates(\"-122.19204892,47.77472567,2.787\"));\n }\n };\n }", "public void addPolyLine() {\n abstractEditor.drawNewShape(new ELineDT());\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) \n\t\t\t{\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tTreeMap<String, String> map2 = (TreeMap<String, String>) mylistView.getAdapter().getItem(position);\n\t\t\t\tfloat Lat = Float.parseFloat(map2.get(\"Latitude\"));\n\t\t\t\tfloat Long = Float.parseFloat(map2.get(\"Longitude\"));\n\n\t\t\t\tint myPoint = Integer.parseInt(map2.get(\"Id\"));\n\t\t\t\tSystem.out.println(myPoint);\n\n\t\t\t\ttry {\n\t\t\t\t\tOnePoint = (Object)client.call(\"place.fetchOne\", myPoint);\n\t\t\t\t\t//System.out.println(Arrays.toString(OnePoint));\n\t\t\t\t\tSystem.out.println(OnePoint);\n\t\t\t\t} catch (XMLRPCException e1) {\n\t\t\t\t\tSendAlert(\"place.fetchOne\");\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\t\tHashMap MojaMapa = (HashMap) OnePoint;\n\t\t\t\tMojaMapa.get(\"description\");\n\n\t\t\t\tString myString = \"\"\n\t\t\t\t\t\t+\"<br>\"+\"<br>\"+\"<br>\"\n\t\t\t\t\t\t+\"Category: \"+category+\"<p>\"\n\t\t\t\t\t\t+\"Address: \"+map2.get(\"Address\")+\"<p>\"\n\t\t\t\t\t\t+\"City: \"+map2.get(\"City\")+\"<p>\"\n\t\t\t\t\t\t+\"Zip Code: \"+map2.get(\"Zip\")+\"<p>\"\n\t\t\t\t\t\t+\"Country: \"+map2.get(\"Country\")+\"<p>\"\n\t\t\t\t\t\t+\"Distance: \"+String.format(\"%.2f\", Float.parseFloat(map2.get(\"Distance\").toString()))+\"km\"+\"<p>\"\n\t\t\t\t\t\t+\"Latitude: \"+map2.get(\"Latitude\")+\"<p>\"\n\t\t\t\t\t\t+\"Longitude: \"+map2.get(\"Longitude\")+\"<p>\"\n\t\t\t\t\t\t+\"Opis: \" + MojaMapa.get(\"description\");\n\n\t\t\t\tint MicroLat = (int) (Lat*1e6);\n\t\t\t\tint MicroLong = (int) (Long*1e6);\n\n\t\t\t\tmapView.getOverlays().clear();\n\t\t\t\tmapOverlays.clear();\n\t\t\t\titemizedoverlay.clear();\n\n\t\t\t\tGeoPoint point = new GeoPoint(MicroLat, MicroLong);\n\t\t\t\tMyOverlayItem overlayitem = new MyOverlayItem(point, map2.get(\"i\"), \n\t\t\t\t\t\t\"\"+category, \n\t\t\t\t\t\t\"\"+map2.get(\"Address\"),\n\t\t\t\t\t\t\"\"+map2.get(\"City\"),\n\t\t\t\t\t\t\"\"+map2.get(\"Zip\"),\n\t\t\t\t\t\t\"\"+map2.get(\"Country\"),\n\t\t\t\t\t\tString.format(\"%.2f\", Float.parseFloat(map2.get(\"Distance\").toString())),\n\t\t\t\t\t\t\"\"+map2.get(\"Latitude\"),\n\t\t\t\t\t\t\"\"+map2.get(\"Color\"),\n\t\t\t\t\t\t\"\"+map2.get(\"Icon\"), Lat+\",\"+Long);\n\n\t\t\t\tSetDrawable(\"\"+map2.get(\"Icon\"), \"\"+map2.get(\"Color\"));\n\n\t\t\t\tHelloItemizedOverlay singleitemizedoverlay = new HelloItemizedOverlay(drawable, ProjektLokalizacjaActivity.this); \n\t\t\t\tsingleitemizedoverlay.clear();\n\t\t\t\tsingleitemizedoverlay.addOverlay(overlayitem);\n\t\t\t\tmapOverlays.add(singleitemizedoverlay);\n\n\t\t\t\t// add this overlay to the MapView and refresh it\n\t\t\t\tmapView.getOverlays().add(myLocationOverlay);\n\t\t\t\tmapView.postInvalidate();\n\t\t\t\tmyLocationOverlay.enableMyLocation();\n\t\t\t\tif (isThisTablet == false)\n\t\t\t\t{\n\t\t\t\t\tmylistView.setVisibility(View.GONE);\n\t\t\t\t\tmapView.setVisibility(View.GONE);\n\n\t\t\t\t\tWebView webView = (WebView) findViewById(R.id.webView);\n\t\t\t\t\twebView.setVisibility(View.VISIBLE);\n\n\t\t\t\t\twebView.clearView();\n\t\t\t\t\twebView.clearCache(true);\n\t\t\t\t\twebView.loadDataWithBaseURL(null, myString, \"text/html\", \"utf-8\", null);\n\n\t\t\t\t\tButton Mapbutton = (Button) findViewById(R.id.map_button);\n\t\t\t\t\tMapbutton.setBackgroundColor(Color.rgb(192, 192, 192));\n\n\t\t\t\t\tButton ListButton = (Button) findViewById(R.id.list_button);\n\t\t\t\t\tListButton.setBackgroundColor(Color.rgb(192, 192, 192));\n\n\t\t\t\t\tButton SzczeButton = (Button) findViewById(R.id.szczegoly_button);\n\t\t\t\t\tSzczeButton.setBackgroundColor(Color.BLUE);\n\t\t\t\t\t//SearchItemOnMap(Lat, Long, MicroLat, MicroLong);\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tWebView webView = (WebView) findViewById(R.id.webView);\n\t\t\t\t\twebView.setVisibility(View.VISIBLE);\n\t\t\t\t\tmapView.setVisibility(View.GONE);\n\n\t\t\t\t\twebView.clearView();\n\t\t\t\t\twebView.clearCache(true);\n\t\t\t\t\twebView.loadDataWithBaseURL(null, myString, \"text/html\", \"utf-8\", null);\n\n\t\t\t\t}\n\t\t\t}", "ArrayList<Float> znajdzOstatecznaCeneCenaNaNajblizszeSloty()\n\t{\n\t\t//getInput(\"znajdzOstatecznaCeneCenaNaNajblizszeSloty -start\");\n\t\t\n\t\t\n\t\t//wez wszystkie ceny \n\t\t//moze byc brane od dowolnego prosumenta wiec 0 tez jest ok\n\t\tArrayList<Point> L1 = listaFunkcjiUzytecznosci.get(0);\n\t\t\n\t\tArrayList<Float> L2 = new ArrayList<Float>();\n\t\t\n\t\tint i=0;\n\t\twhile (i<L1.size())\n\t\t{\n\t\t\tfloat cena = L1.get(i).getPrice();\n\t\t\tL2.add(cena);\n\t\t\t//print(cena);\n\t\t\ti++;\n\t\t}\n\t\t\n\t\t//print (Arrays.toString(L2.toArray()));\n\t\t\n\t\t//getInput(\"znajdzOstatecznaCeneCenaNaNajblizszeSloty -end\");\n\t\t\n\t\treturn L2;\n\t}", "public void addLVA(LV l) {\r\n ZugewieseneLV.add(l);\r\n }", "public void limpaPontos() {\n\t\tthis.pontos = new ArrayList<Point>();\n\t}", "private void addSingleGeoJsonSource(@NonNull Style loadedMapStyle) {\n loadedMapStyle.getLayer(\"unclustered-points\").setProperties(visibility(Property.NONE));\n loadedMapStyle.getLayer(\"cluster-0\").setProperties(visibility(Property.NONE));\n loadedMapStyle.getLayer(\"count\").setProperties(visibility(Property.NONE));\n\n loadedMapStyle.addSource(\n new GeoJsonSource(\"single_ad\",\n singleGeoJSON.toString(),\n new GeoJsonOptions()\n .withCluster(true)\n .withClusterMaxZoom(14)\n .withClusterRadius(50)\n )\n );\n\n //Creating a marker layer for single data points\n SymbolLayer unclustered = new SymbolLayer(\"single-point\", \"single_ad\");\n\n unclustered.setProperties(\n iconImage(\"cross-icon-id\"),\n iconSize(\n division(\n get(\"mag\"), literal(1.0f)\n )\n )\n\n );\n loadedMapStyle.addLayer(unclustered);\n }", "private void addMarkers(List<LatLng> path) {\n MarkerOptions startMarker = new MarkerOptions()\n .title(getString(R.string.session_marker_start))\n .position(path.get(0))\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n MarkerOptions endMarker = new MarkerOptions()\n .title(getString(R.string.session_marker_end))\n .position(path.get(path.size() - 1))\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));\n\n mGoogleMap.addMarker(startMarker);\n mGoogleMap.addMarker(endMarker);\n }", "public void createList () {\n imageLocs = new ArrayList <Location> ();\n for (int i = xC; i < xLength * getPixelSize() + xC; i+=getPixelSize()) {\n for (int j = yC; j < yLength * getPixelSize() + yC; j+=getPixelSize()) {\n Location loc = new Location (i, j, LocationType.POWERUP, true);\n\n imageLocs.add (loc);\n getGridCache().add(loc);\n \n }\n }\n }", "public OpenPolyLine(List<Point> points) \n\t{\n\t\tsuper(points);\n\t}", "public void addLocations(List<Location> listOfLocation)\n {\n this.locationLst.addAll(listOfLocation);\n }", "public void addPoint() {\n points += 1;\n }", "public void addMarker(int iX,int iY,String sLabelJS,String sWorld)\n \t{\n \t\tMarker m=new Marker();\n \t\tm.iX=iX;\n \t\tm.iY=iY;\n \t\tm.sLabelJS=sLabelJS==null ? \"\" : sLabelJS;\n \t\tm.sWorld=sWorld;\n \t\tlMarkers.add(m);\n \t}", "public void addCsgList() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"csg-list\",\n null,\n childrenNames());\n }", "private void addPositionToJumpList(String url, Line l, int column) {\n DataObject dataObject = getDataObject (url);\n if (dataObject != null) {\n EditorCookie ec = dataObject.getLookup().lookup(EditorCookie.class);\n if (ec != null) {\n try {\n StyledDocument doc = ec.openDocument();\n JEditorPane[] eps = ec.getOpenedPanes();\n if (eps != null && eps.length > 0) {\n JumpList.addEntry(eps[0], NbDocument.findLineOffset(doc, l.getLineNumber()) + column);\n }\n } catch (java.io.IOException ioex) {\n ErrorManager.getDefault().notify(ioex);\n }\n }\n }\n }", "public void addPoints(int point){\n\t\tthis.points += point;\n\t}", "private void loadMarkers(){\n if (partnerLocs){\n latLngs = dataStorage.getPartnerLatLngList();\n locationNames = dataStorage.getPartnerLocNameList();\n }else{\n String favLatLngFromJson = dataStorage.getLatLngList();\n String favNamesFromJson = dataStorage.getLocNameList();\n\n if(favNamesFromJson != null && favLatLngFromJson != null){\n String[] favNames = new Gson().fromJson(favNamesFromJson, String[].class);\n LatLng[] favLatLng = new Gson().fromJson(favLatLngFromJson, LatLng[].class);\n\n //Convert json to the actual ArrayLists\n latLngs = Arrays.asList(favLatLng);\n latLngs = new ArrayList<LatLng>(latLngs);\n locationNames = Arrays.asList(favNames);\n locationNames = new ArrayList<String>(locationNames);\n }\n }\n\n\n\n\n //Add the markers back onto the map\n for (int i = 0; i < latLngs.size(); i++) {\n LatLng point = latLngs.get(i);\n String name = locationNames.get(i);\n Marker addedMarker = mMap.addMarker(new MarkerOptions().position(new LatLng\n (point.latitude, point.longitude)).title(name));\n if(partnerLocs){\n addedMarker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n }\n\n if(name.equals(locClicked)){\n markerClicked = addedMarker;\n }\n }\n }", "public java.lang.String getListLatLon()\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(LISTLATLON$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "private void drawLinesFromClickPointToNearbyWifi(List<Feature> featureList, GeoJsonSource wifiLineSource) {\n\n List<Feature> lineFeatureList = new ArrayList<>();\n\n for (Feature singleFeature : featureList) {\n List<Point> singleLineStringPointList = new ArrayList<>();\n\n // Cast the Tilequery response Feature to a Point\n Point singleFeaturePoint = (Point) singleFeature.geometry();\n\n // Add the Point to the Point list\n singleLineStringPointList.add(singleFeaturePoint);\n\n // Add the last map click Point to the Point list\n singleLineStringPointList.add(lastMapClickPoint);\n\n // Create a Feature from the LineString and add the Feature to the\n // Feature list.\n LineString singleLineString = LineString.fromLngLats(singleLineStringPointList);\n\n lineFeatureList.add(Feature.fromGeometry(singleLineString));\n }\n\n // Use the Feature list to create a FeatureCollection and update\n // the LineLayer source with the FeatureCollection\n if (wifiLineSource != null) {\n wifiLineSource.setGeoJson(FeatureCollection.fromFeatures(lineFeatureList));\n }\n }", "void setLocationCells(ArrayList<String> loc){\r\n locationCells = loc;\r\n }", "private void addToPT(int n, T x) {\n\t\twhile (pT.size() < n + 1)\n\t\t\tpT.add(new ArrayList<String>());\n\t\tpT.get(n).add(x.toString() + \" (\" + findNode(x).colour + \")\");\n\t}", "public void addPoint(double[] point);", "public TrazoLibre(Point2D punto) {\n this.linea = new ArrayList();\n this.linea.add(punto);\n }", "public void add(float[] x, float[] y, String[] labels) {\n\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\tpoints.add(new GPoint(x[i], y[i], labels[i]));\n\t\t}\n\t}", "public static void locationToListTags(Location loc, CompoundTag tag) {\n tag.putDoubleList(\"Pos\", Arrays.asList(loc.getX(), loc.getY(), loc.getZ()));\n tag.putFloatList(\"Rotation\", Arrays.asList(loc.getYaw(), loc.getPitch()));\n }", "private static List<Point> genererPointsAlea(int nbPoints) {\n /*List<Point> points = new ArrayList<>();\n Random rand = new Random(0);\n for(int i=0; i<nbPoints; i++) {\n Point p = new Point(rand.nextDouble(), rand.nextDouble());\n points.add(p);\n }\n return points;*/\n return null;\n }", "public void addPoint(int points){\n\t\tthis.fidelityCard.point += points;\t\t\n\t}", "public void addPointList(final String name, final PointListPanel plp) {\n\t\tif (!containsPointList(plp)) {\n\t\t\tplp.setName(name);\n\t\t\tgridbag.setConstraints(plp, c);\n\t\t\tpanel.add(plp);\n\t\t\tc.gridx++;\n\t\t\t// if not displayed yet, do so now.\n\t\t\tif (!isVisible()) {\n\t\t\t\tsetSize(250, 200);\n\t\t\t\tsetVisible(true);\n\t\t\t}\n\t\t}\n\t}", "public void addLocation(Location location)\n {\n locationLst.add(location);\n }" ]
[ "0.60795105", "0.5917921", "0.5914786", "0.5784058", "0.5780689", "0.5766017", "0.56867194", "0.56359226", "0.5635187", "0.5628003", "0.55878323", "0.55816597", "0.55652285", "0.5554952", "0.5550927", "0.5536687", "0.552538", "0.54986954", "0.5493125", "0.5428747", "0.5402457", "0.5399305", "0.5390913", "0.5380756", "0.5372813", "0.53491247", "0.53455573", "0.53175896", "0.5316915", "0.53065974", "0.53003246", "0.52911884", "0.5288422", "0.528374", "0.52784413", "0.52586055", "0.5250593", "0.5245076", "0.52373344", "0.5235474", "0.5221029", "0.5215156", "0.52138424", "0.5212199", "0.51743233", "0.5159116", "0.5158744", "0.5158166", "0.51569986", "0.51559854", "0.5147558", "0.5145123", "0.5142178", "0.51279795", "0.5121553", "0.51209754", "0.5120152", "0.5104729", "0.50977933", "0.50929236", "0.5092776", "0.50863254", "0.5086268", "0.5085345", "0.5077393", "0.5077202", "0.5074647", "0.5067441", "0.5060558", "0.50592536", "0.5057031", "0.5053029", "0.5043277", "0.5038774", "0.50304157", "0.50287455", "0.5028301", "0.5022078", "0.5019783", "0.5018368", "0.50131303", "0.5012588", "0.4996834", "0.49948868", "0.49943244", "0.4993887", "0.49840945", "0.4983241", "0.4981777", "0.49809915", "0.49804223", "0.4978123", "0.4977729", "0.49749026", "0.49672198", "0.49641982", "0.49615484", "0.49522087", "0.49447727", "0.49419668", "0.4934538" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onStatusChanged(String provider, int status, Bundle extras) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onProviderEnabled(String provider) { Toast.makeText(this, "Enabled new provider " + provider, Toast.LENGTH_SHORT).show(); }
{ "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 onProviderDisabled(String provider) { Toast.makeText(this, "Disabled provider " + provider, Toast.LENGTH_SHORT).show(); }
{ "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
ESTO SIEMPRE SE EJECUTA CUANDO SE CONSUME EJB
public Date getVersionRow(){ return this.versionRow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetOrcamentos() throws Exception {\n System.out.println(\"getOrcamentos\");\n Integer idOfCostumer = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext().lookup(\"java:global/classes/OrcamentoService\");\n List<Orcamento> expResult = null;\n List<Orcamento> result = instance.getOrcamentos(idOfCostumer);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testSetOrcamento() throws Exception {\n System.out.println(\"setOrcamento\");\n Orcamento orc = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext().lookup(\"java:global/classes/OrcamentoService\");\n Orcamento expResult = null;\n Orcamento result = instance.setOrcamento(orc);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Override\n public void beforeCompletion() throws EJBException, RemoteException {\n \tSystem.out.println(\"taskerBean transaction almost done\");\n }", "@Test\n public void testExecutarAcao() {\n try {\n SBCore.configurar(new ConfiguradorCoreShortMessageService(), SBCore.ESTADO_APP.DESENVOLVIMENTO);\n ItfResposta resposta = FabIntegracaoSMS.ENVIAR_MENSAGEM.getAcao(\"+5531971125577\", \"Teste\").getResposta();\n Assert.notNull(resposta, \"A resposta foi nula\");\n\n if (!resposta.isSucesso()) {\n resposta.dispararMensagens();\n }\n Assert.isTrue(resposta.isSucesso(), \"Falha enviando SMS\");\n\n } catch (Throwable t) {\n SBCore.RelatarErro(FabErro.SOLICITAR_REPARO, \"Erro \" + t.getMessage(), t);\n }\n }", "@Test\n public void testGetItens() throws Exception {\n System.out.println(\"getItens\");\n Integer idOfOrcamento = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext().lookup(\"java:global/classes/OrcamentoService\");\n List<Orcamentoitem> expResult = null;\n List<Orcamentoitem> result = instance.getItens(idOfOrcamento);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void realiserAcahatProduit() {\n\t\t\n\t}", "@Local\r\npublic interface ComercioNacionalEJBLocal {\r\n\r\n /**\r\n *\r\n * @param idCliente\r\n * @param idPuntoVenta\r\n * @return\r\n */\r\n List<ProductosXCliente> consultarProductosXCliente(Long idCliente, Long idPuntoVenta);\r\n\r\n /**\r\n *\r\n * @param solicitud\r\n * @param productosXDocumento\r\n * @param log\r\n * @return\r\n */\r\n Documento ingresarSolicitudComercioNacional(Documento solicitud, List<ProductosXDocumento> productosXDocumento, LogAuditoria log);\r\n}", "@Test\n public void testAddOrcamento() throws Exception {\n System.out.println(\"addOrcamento\");\n Orcamento orc = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext().lookup(\"java:global/classes/OrcamentoService\");\n Orcamento expResult = null;\n Orcamento result = instance.addOrcamento(orc);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetCrenauxSpecialite() throws Exception {\n System.out.println(\"getCrenauxSpecialite\");\n String wscaller = \"\";\n String specialite = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MonWebService instance = (MonWebService)container.getContext().lookup(\"java:global/classes/MonWebService\");\n List<MedecinCrenaux> expResult = null;\n List<MedecinCrenaux> result = instance.getCrenauxSpecialite(wscaller, specialite);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Ignore\n @Test\n public void testDajLokaciju() throws Exception {\n System.out.println(\"dajLokaciju\");\n String adresa = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MeteoIoTKlijent instance = (MeteoIoTKlijent)container.getContext().lookup(\"java:global/classes/MeteoIoTKlijent\");\n Lokacija expResult = null;\n Lokacija result = instance.dajLokaciju(adresa);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testDajMeteoPrognoze() throws Exception {\n System.out.println(\"dajMeteoPrognoze\");\n int id = 0;\n String adresa = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MeteoIoTKlijent instance = (MeteoIoTKlijent)container.getContext().lookup(\"java:global/classes/MeteoIoTKlijent\");\n MeteoPrognoza[] expResult = null;\n MeteoPrognoza[] result = instance.dajMeteoPrognoze(id, adresa);\n assertArrayEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n }", "public void execProInventarioCarga(CatalogoBean catalogoBean) throws Exception;", "@PostConstruct\n public void SolicitudCajaCHMB() {\n long a = System.currentTimeMillis();\n try {\n System.out.println(\"@PostConstruct SolicitudCajaCHMB\");\n usuarioLogin = (UsuarioBean) new MaristaUtils().sesionObtenerObjeto(\"usuarioLogin\");\n getSolicitudCajaCHBean();\n TipoConceptoService conceptoCategoriaService = BeanFactory.getTipoConceptoService();\n getTipoConceptoBean();\n listaTipoConceptoBean = conceptoCategoriaService.obtenerTipoConcepto();\n\n ConceptoUniNegService conceptoUniNegService = BeanFactory.getConceptoUniNegService();\n getListaConceptoUniNegBean();\n\n listaConceptoUniNegBean = conceptoUniNegService.obtenerConceptoUniNegPorUni(usuarioLogin.getPersonalBean().getUnidadNegocioBean().getUniNeg());\n// listaConceptoUniNegBean = conceptoUniNegService.obtenerConceptoUniNegActivos();\n\n UniNegUniOrgService uniNegUniOrgService = BeanFactory.getUniNegUniOrgService();\n getListaUnidadOrganicaBean();\n listaUnidadOrganicaBean = uniNegUniOrgService.obtenerUniOrgPorUniNeg(usuarioLogin.getPersonalBean().getUnidadNegocioBean().getUniNeg());\n\n TipoSolicitudService tipoSolicitudService = BeanFactory.getTipoSolicitudService();\n getListaTipoSolicitudBean();\n listaTipoSolicitudBean = tipoSolicitudService.obtenerSolGenCajaCH(MaristaConstantes.TIP_SOL_GEN, MaristaConstantes.A_RENDIR, usuarioLogin.getPersonalBean().getUnidadNegocioBean().getUniNeg());\n for (TipoSolicitudBean lista : listaTipoSolicitudBean) {\n System.out.println(\"tip \" + lista.getNombre());\n if (lista.getNombre().equals(MaristaConstantes.TIP_SOL_GEN)) {\n lista.setNombre(MaristaConstantes.TIP_SOL_GEN + \" - \" + \"Pago Proveedores \");\n }\n break;\n }\n\n CentroResponsabilidadService centroResponsabilidadService = BeanFactory.getCentroResponsabilidadService();\n getListaCentroResponsabilidadBean();\n listaCentroResponsabilidadBean = centroResponsabilidadService.obtenerCentroResponsabilidad();\n PlanContableService planContableService = BeanFactory.getPlanContableService();\n listaPlanContableBean = planContableService.obtenerPlanContable();\n CodigoService codigoService = BeanFactory.getCodigoService();\n getListTipoMoneda();\n listTipoMoneda = codigoService.obtenerPorTipo(new TipoCodigoBean(MaristaConstantes.TIP_MON));\n// getListTipoSolicitud();\n// listTipoSolicitud = codigoService.obtenerPorTipo(new TipoCodigoBean(MaristaConstantes.TIP_STA_CCH));\n\n getListTipoPrioridad();\n listTipoPrioridad = codigoService.obtenerPorTipo(new TipoCodigoBean(MaristaConstantes.TIP_PRIORIDAD));\n\n //Validar perfil gestor solicitudes\n PerfilService perfilService = BeanFactory.getPerfilService();\n getListaPerfilBean();\n listaPerfilBean = perfilService.obtenerUsarioPerfil(usuarioLogin);\n for (int i = 0; i < listaPerfilBean.size(); i++) {\n if (listaPerfilBean.get(i).getNombre().equals(MaristaConstantes.GESTOR_SOLI)) {\n this.flgGestorSoli = true;\n this.flgMostarListSoli = false;\n break;\n } else {\n this.flgGestorSoli = false;\n this.flgMostarListSoli = true;\n }\n }\n// if (this.flgGestorSoli == false) {\n solicitudCajaCHBean.setNombreSolicitante(usuarioLogin.getPersonalBean().getNombreCompleto());\n solicitudCajaCHBean.setPersonalBean(usuarioLogin.getPersonalBean());\n\n// }\n cargarUniOrgUniNeg();\n\n getListTipoStatusSolCajaCh();\n fechaActual = new GregorianCalendar();\n getSolicitudCajaCHBean().setFechaSol(fechaActual.getTime());\n getSolicitudCajaCHFiltroBean().setFechaInicio(fechaActual.getTime());\n getSolicitudCajaCHFiltroBean().setFechaFin(fechaActual.getTime());\n listTipoStatusSolCajaCh = codigoService.obtenerPorTipo(new TipoCodigoBean(MaristaConstantes.TIP_STA_CCH));\n getSolicitudCajaCHFiltroBean().setUnidadNegocioBean(usuarioLogin.getPersonalBean().getUnidadNegocioBean());\n getSolicitudCajaCHFiltroBean().setCreaPor(usuarioLogin.getUsuario());\n listaTipoDistribucionCRBean = codigoService.obtenerPorTipo(new TipoCodigoBean(\"TipoDistribucionCR\"));\n dualCentroResponsabilidadBean = new DualListModel<>(listaCentroResponsabilidadBean, getListaCentroResponsabilidadBeanB());\n listaTipoCajaChica = codigoService.funcionObtenerPorTipo(new TipoCodigoBean(MaristaConstantes.TIPO_CAJACH));\n\n CodigoBean codigoPrioridad = new CodigoBean();\n codigoPrioridad = codigoService.obtenerPorCodigo(new CodigoBean(0, \"Media\", new TipoCodigoBean(MaristaConstantes.TIP_PRIORIDAD)));\n getSolicitudCajaCHBean().setTipoPrioridadBean(codigoPrioridad);\n setIdTipoSol(\"COL\");\n solicitudCajaCHBean.setIdTipoSolicitante(idTipoSol);\n changeTipo(\"soli\");\n getListaSolicitudCajaDocEgresoBean();\n// Double i = 0.00;\n } catch (Exception ex) {\n new MensajePrime().addErrorGeneralMessage();\n GLTLog.writeError(this.getClass(), ex);\n }\n long b = System.currentTimeMillis();\n System.out.println(\"time out: \" + (b - a));\n }", "@Test\n public void testGetPatientByNumeroSecu() throws Exception {\n System.out.println(\"getPatientByNumeroSecu\");\n String wscaller = \"\";\n Integer num_secu = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MonWebService instance = (MonWebService)container.getContext().lookup(\"java:global/classes/MonWebService\");\n PatientByNumeroSecuResponse expResult = null;\n PatientByNumeroSecuResponse result = instance.getPatientByNumeroSecu(wscaller, num_secu);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void ejbActivate() {\n }", "@Test\n public void testCreateMedecin() throws Exception {\n System.out.println(\"createMedecin\");\n String wscaller = \"\";\n String nom = \"\";\n Integer num_secu = null;\n String adresse = \"\";\n String email = \"\";\n String telephone = \"\";\n String code_postal = \"\";\n String cabinet = \"\";\n String specialite = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MonWebService instance = (MonWebService)container.getContext().lookup(\"java:global/classes/MonWebService\");\n String expResult = \"\";\n String result = instance.createMedecin(wscaller, nom, num_secu, adresse, email, telephone, code_postal, cabinet, specialite);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void Pedircarnet() {\n\t\tSystem.out.println(\"solicitar carnet para verificar si es cliente de ese consultorio\");\r\n\t}", "public void salvar() {\n\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Salvar(cliente);\n\n cliente = new Cliente();\n//mesagem para saber se foi salvo com sucesso\n JSFUtil.AdicionarMensagemSucesso(\"Clente salvo com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }", "public void anularEquiparacion() {\n\n\n try {\n\n if (!equiparacionBeanSelected.getEqp_estado().equals(\"2\")) {\n EquiparacionesDao equiparacionDAo = new EquiparacionesDao();\n equiparacionBeanSelected.setEqp_estado(\"3\");\n\n equiparacionDAo.dmlDr_regt_equiparaciones(2, equiparacionBeanSelected);\n\n MateriasSolicitudDao materiaDao = new MateriasSolicitudDao();\n\n addMessage(\"Registro anulado satisfactoriamente\", 1);\n FacesContext facesContext = FacesContext.getCurrentInstance(); \n Dr_siseg_usuarioBean usuario= new Dr_siseg_usuarioBean();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n \n BitacoraSolicitudDao bitacoraSolicitudDao=new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean=new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(equiparacionBeanSelected.getEqp_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"E\");\n bitacoraSolicitudBean.setBit_detalle(\"La Equiparacion fue Eliminada\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n \n \n listaEquiparaciones();\n }else{\n addMessage(\"Equiparacion NO puede ser Eliminada\", 1);\n }\n\n } catch (ExceptionConnection ex) {\n /* Logger.getLogger(EquivalenciaController.class\n .getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al anular el registro, contacte al administrador del sistema\", 2);\n */ }\n\n }", "@Test\n\tpublic void testIrParaCarrinho_InformacoesPersistidas() {\n\t\ttestIncluirProdutoNoCarrinho_ProdutoIncluidoComSucesso();\n\t\tcarrinhoPage = modalProdutoPage.clicarBotaoProceedToCheckout();\n\t\t\t\n\t\tassertEquals(esperado_nomeDoProduto, carrinhoPage.obter_nomeDoProduto());\n\t\tassertEquals(esperado_precoDoProduto, Funcoes.removeCifraoDevolveDouble(carrinhoPage.obter_precoDoProduto()));\n\t\tassertEquals(esperado_tamanhoDoProduto, carrinhoPage.obter_tamanhoDoProduto());\n\t\tassertEquals(esperado_corDoProduto, carrinhoPage.obter_corDoProduto());\n\t\tassertEquals(esperado_inputQuantidadeDoProduto, Integer.parseInt(carrinhoPage.obter_inputQuantidadeDoProduto()));\n\t\tassertEquals(esperado_subTotalDoProduto, Funcoes.removeCifraoDevolveDouble(carrinhoPage.obter_subTotalDoProduto()));\n\t\t\n\t\tassertEquals(esperado_numeroItensTotal, Funcoes.removeTextoItemsDevolveInt(carrinhoPage.obter_numeroItensTotal()));\n\t\tassertEquals(esperado_subtotalTotal, Funcoes.removeCifraoDevolveDouble(carrinhoPage.obter_subtotalTotal()));\n\t\tassertEquals(esperado_shippingTotal, Funcoes.removeCifraoDevolveDouble(carrinhoPage.obter_shippingTotal()));\n\t\tassertEquals(esperado_totalTaxExclTotal, Funcoes.removeCifraoDevolveDouble(carrinhoPage.obter_totalTaxExclTotal()));\n\t\tassertEquals(esperado_totalTaxInclTotal, Funcoes.removeCifraoDevolveDouble(carrinhoPage.obter_totalTaxInclTotal()));\n\t\tassertEquals(esperado_taxesTotal, Funcoes.removeCifraoDevolveDouble(carrinhoPage.obter_taxesTotal()));\n\t\t\n\t}", "@Override\n\tpublic void ejecutarActividadesConProposito() {\n\t\t\n\t}", "public void registrarPagoFacturaCredito(){\n if(facturaCredito != null){\n try{\n //NUEVA TRANSACCION\n Transaccion transac = new Transaccion();\n transac.setFechaTransac(new funciones().getTime());\n transac.setHoraTransac(new funciones().getTime());\n transac.setResponsableTransac(new JsfUtil().getEmpleado());\n transac.setTipoTransac(4); //REGISTRO DE PAGO\n transac.setIdtransac(ejbFacadeTransac.getNextIdTransac());\n ejbFacadeTransac.create(transac);\n //REGISTRAR PAGO\n PagoCompra pagoCompra = new PagoCompra();\n pagoCompra.setFacturaIngreso(facturaCredito);\n pagoCompra.setIdtransac(transac);\n pagoCompra.setInteresPagoCompra(new BigDecimal(intereses));\n pagoCompra.setMoraPagoCompra(new BigDecimal(mora));\n pagoCompra.setAbonoPagoCompra(new BigDecimal(pago));\n BigDecimal total = pagoCompra.getAbonoPagoCompra().add(pagoCompra.getInteresPagoCompra()).add(pagoCompra.getMoraPagoCompra());\n pagoCompra.setTotalPagoCompra(new BigDecimal(new funciones().redondearMas(total.floatValue(), 2)));\n pagoCompra.setIdpagoCompra(ejbFacadePagoCompra.getNextIdPagoCompra());\n ejbFacadePagoCompra.create(pagoCompra); // Registrar Pago en la BD\n //Actualizar Factura\n facturaCredito.getPagoCompraCollection().add(pagoCompra); //Actualizar Contexto\n BigDecimal saldo = facturaCredito.getSaldoCreditoCompra().subtract(pagoCompra.getAbonoPagoCompra());\n facturaCredito.setSaldoCreditoCompra(new BigDecimal(new funciones().redondearMas(saldo.floatValue(), 2)));\n if(facturaCredito.getSaldoCreditoCompra().compareTo(BigDecimal.ZERO)==0){\n facturaCredito.setEstadoCreditoCompra(\"CANCELADO\");\n facturaCredito.setFechaCancelado(transac.getFechaTransac());\n }\n facturaCredito.setUltimopagoCreditoCompra(transac.getFechaTransac());\n ejbFacadeFacturaIngreso.edit(facturaCredito);\n new funciones().setMsj(1, \"PAGO REGISTRADO CORRECTAMENTE\");\n if(facturaCredito.getEstadoCreditoCompra().equals(\"CANCELADO\")){\n RequestContext context = RequestContext.getCurrentInstance(); \n context.execute(\"alert('FACTURA CANCELADA POR COMPLETO');\");\n }\n prepararPago();\n }catch(Exception e){\n new funciones().setMsj(3, \"ERROR AL REGISTRAR PAGO\");\n }\n }\n }", "public ColaProdAndes() {\n\t\tdinamicos = new ArrayList();\n\t\tdao = new ConsultaDAO();\n\t\ttry {\n\t\t\t// Inicia el contexto seg�n la interfaz dada por JBOSS.\n\t\t\tHashtable<String, String> env = new Hashtable<String, String>();\n\t\t\tenv.put(Context.INITIAL_CONTEXT_FACTORY,\n\t\t\t\t\t\"org.jnp.interfaces.NamingContextFactory\");\n\t\t\tSystem.out.println(\"CONTEXT FACTORY\");\n\t\t\tenv.put(Context.PROVIDER_URL, \"jnp://localhost:1099\");\n\t\t\tenv.put(Context.URL_PKG_PREFIXES,\n\t\t\t\t\t\"org.jboss.naming:org.jnp.interfaces\");\n\t\t\tSystem.out.println(\"LOCALHOST\");\n\t\t\tctx = new InitialContext(env);\n\t\t\tSystem.out.println(\"CTX \" + ctx);\n\t\t\t// Inicializa los datasource por JNDI.\n\t\t\tds = (DataSource) ctx.lookup(\"java:XAProd\");\n\t\t\tSystem.out.println(\"PASOOOOOO \");\n\t\t\t// Inicializa la fabrica de conexiones JMS.\n\t\t\tconnectionFactory = (SpyConnectionFactory) ctx\n\t\t\t\t\t.lookup(\"ConnectionFactory\");\n\t\t\tSystem.out.println(\"CONNECTION FACTORY\");\n\t\t\t// inicializa la coneccion\n\t\t\tconn = connectionFactory.createConnection();\n\t\t\tSystem.out.println(\"HIZO CONN\");\n\n\t\t\t// inicializa la sesion\n\t\t\tSession session = conn.createSession(false,\n\t\t\t\t\tSession.AUTO_ACKNOWLEDGE);\n\t\t\tSystem.out.println(\"SESSION \");\n\t\t\t// inicializa las colas\n\t\t\tcolaRequests1 = (Queue) ctx.lookup(\"queue/Requests1\");\n\t\t\tMessageConsumer consumer2 = session.createConsumer(colaRequests1);\n\t\t\tconsumer2.setMessageListener(this);\n\n\t\t\tcolaReplies1 = (Queue) ctx.lookup(\"queue/Replies1\");\n\t\t\tMessageConsumer consumer = session.createConsumer(colaReplies1);\n\t\t\tconsumer.setMessageListener(this);\n\n\t\t\tconn.start();\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"ProdAndes - Se cargo el data source & la fabrica de conexiones de forma adecuada..\");\n\n\t\t} catch (Exception e) {\n\t\t\t// Ocurrio un error y se imprimira por consola\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test\n public void testNoServicesQuiesce() throws Exception {\n\t \n System.out.println(\"In testNoServicesQuiesce\");\n\tObject obj = context().getService(TestBean.class);\n\t\n\tif (obj != null)\n\t{ \n\t\tQuiesceParticipant participant = getParticipant(\"org.apache.aries.blueprint.core\");\n\t\t\n\t\tif (participant != null)\n\t\t{\n\t\t\tTestQuiesceCallback callbackA = new TestQuiesceCallback();\n\t\t\tTestQuiesceCallback callbackB = new TestQuiesceCallback();\n\t\t \n\t\t\t//bundlea provides the ns handlers, bean processors, interceptors etc for this test.\n\t Bundle bundlea = getBundle(\"org.apache.aries.blueprint.testbundlea\");\n\t assertNotNull(bundlea);\n\t bundlea.start();\n\t \n\t //bundleb has no services and makes use of the extensions provided by bundlea\n\t Bundle bundleb = getBundle(\"org.apache.aries.blueprint.testbundleb\");\n\t assertNotNull(bundleb);\n\t bundleb.start();\n\t \n\t Helper.getBlueprintContainerForBundle(context(), \"org.apache.aries.blueprint.testbundleb\");\n\t \n\t\t\tparticipant.quiesce(callbackB, Collections.singletonList(getBundle(\n\t\t\t\t\"org.apache.aries.blueprint.testbundleb\")));\n\t\t\t\n\t\t System.out.println(\"Called Quiesce\");\n\t\t \n\t\t Thread.sleep(200);\n\t\t \n\t\t Assert.assertTrue(\"Quiesce callback B should have occurred; calls should be 1, but it is \"+callbackB.getCalls(), callbackB.getCalls()==1);\n\t\t Assert.assertTrue(\"Quiesce callback A should not have occurred yet; calls should be 0, but it is \"+callbackA.getCalls(), callbackA.getCalls()==0);\n\t\t \n\t\t bundleb.stop();\n\t\t \n\t\t participant.quiesce(callbackA, Collections.singletonList(getBundle(\n\t\t\t\"org.apache.aries.blueprint.testbundlea\")));\n\t\t\t\t \n\t\t Thread.sleep(1000);\n\t\t \n\t\t System.out.println(\"After second sleep\");\n\t\t \n\t\t Assert.assertTrue(\"Quiesce callback A should have occurred once; calls should be 1, but it is \"+callbackA.getCalls(), callbackA.getCalls()==1);\n\t\t Assert.assertTrue(\"Quiesce callback B should have occurred once; calls should be 1, but it is \"+callbackB.getCalls(), callbackB.getCalls()==1);\n\t\t \n\t\t}else{\n\t\t\tthrow new Exception(\"No Quiesce Participant found for the blueprint service\");\n\t\t}\n\t}else{\n\t\tthrow new Exception(\"No Service returned for \" + TestBean.class);\n\t}\n }", "@Override\n public void afterBegin() throws EJBException, RemoteException {\n \tSystem.out.println(\"taskerBean transaction began\");\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 void cargarInformacion()\r\n/* 159: */ {\r\n/* 160:168 */ if (this.indicadorFactura != null)\r\n/* 161: */ {\r\n/* 162:170 */ if (getTipoAnexoSRI().equals(TipoAnexoSRI.ATS.getNombreAbreviado()))\r\n/* 163: */ {\r\n/* 164:171 */ setMostrarBaseImponible(true);\r\n/* 165:172 */ setMostrarBasesDetalle(false);\r\n/* 166: */ }\r\n/* 167: */ else\r\n/* 168: */ {\r\n/* 169:174 */ setMostrarBaseImponible(false);\r\n/* 170:175 */ setMostrarBasesDetalle(true);\r\n/* 171: */ }\r\n/* 172: */ try\r\n/* 173: */ {\r\n/* 174:179 */ this.mensaje = null;\r\n/* 175: */ \r\n/* 176: */ \r\n/* 177:182 */ ExternalContext context = FacesContext.getCurrentInstance().getExternalContext();\r\n/* 178:183 */ HttpSession session = (HttpSession)context.getSession(true);\r\n/* 179:184 */ CompraCajaChica compraCajaChica = (CompraCajaChica)session.getAttribute(\"compraCajaChica\");\r\n/* 180:185 */ FacturaProveedor facturaProveedor = (FacturaProveedor)session.getAttribute(\"facturaProveedor\");\r\n/* 181:186 */ Empresa empresa = null;\r\n/* 182:187 */ if (!this.indicadorFactura.booleanValue())\r\n/* 183: */ {\r\n/* 184:188 */ this.corrigeDatosRetencion = compraCajaChica.getFacturaProveedorSRI().isTraCorregirDatos();\r\n/* 185:189 */ CompraCajaChica ccc = this.servicioCompraCajaChica.cargarDetalle(compraCajaChica.getIdCompraCajaChica());\r\n/* 186:190 */ empresa = ccc.getEmpresa();\r\n/* 187:191 */ this.facturaProveedorSRI = ccc.getFacturaProveedorSRI();\r\n/* 188: */ }\r\n/* 189: */ else\r\n/* 190: */ {\r\n/* 191:193 */ this.corrigeDatosRetencion = facturaProveedor.getFacturaProveedorSRI().isTraCorregirDatos();\r\n/* 192:194 */ FacturaProveedor facProveedor = this.servicioFacturaProveedor.cargarDetalle(Integer.valueOf(facturaProveedor.getId()));\r\n/* 193:195 */ empresa = facProveedor.getEmpresa();\r\n/* 194:196 */ this.facturaProveedorSRI = facProveedor.getFacturaProveedorSRI();\r\n/* 195: */ }\r\n/* 196:200 */ if (empresa != null)\r\n/* 197: */ {\r\n/* 198:201 */ empresa = this.servicioEmpresa.cargarDetalle(empresa);\r\n/* 199:202 */ if (this.facturaProveedorSRI != null)\r\n/* 200: */ {\r\n/* 201:204 */ String email = \"\";\r\n/* 202:205 */ boolean tieneEmail = false;\r\n/* 203:206 */ if ((empresa.getListaContacto() != null) && (!empresa.getListaContacto().isEmpty()))\r\n/* 204: */ {\r\n/* 205:207 */ for (Contacto contacto : empresa.getListaContacto()) {\r\n/* 206:208 */ if ((contacto.getTipoContacto() != null) && (contacto.getTipoContacto().isIndicadorNotificarRetencion()))\r\n/* 207: */ {\r\n/* 208:209 */ if ((contacto.getEmail1() != null) && (!contacto.getEmail1().equals(\"\"))) {\r\n/* 209:210 */ email = email + contacto.getEmail1() + \";\";\r\n/* 210: */ }\r\n/* 211:212 */ if ((contacto.getEmail2() != null) && (!contacto.getEmail2().equals(\"\"))) {\r\n/* 212:213 */ email = email + contacto.getEmail2() + \";\";\r\n/* 213: */ }\r\n/* 214: */ }\r\n/* 215: */ }\r\n/* 216:217 */ if (!email.equals(\"\"))\r\n/* 217: */ {\r\n/* 218:218 */ email = email.substring(0, email.trim().length() - 1).trim();\r\n/* 219:219 */ tieneEmail = true;\r\n/* 220: */ }\r\n/* 221: */ }\r\n/* 222:223 */ if (!tieneEmail)\r\n/* 223: */ {\r\n/* 224:224 */ if ((empresa.getEmail1() != null) && (!empresa.getEmail1().equals(\"\"))) {\r\n/* 225:225 */ email = email + empresa.getEmail1();\r\n/* 226: */ }\r\n/* 227:227 */ if ((empresa.getEmail2() != null) && (!empresa.getEmail2().equals(\"\")))\r\n/* 228: */ {\r\n/* 229:228 */ if (!email.equals(\"\")) {\r\n/* 230:229 */ email = email + \";\";\r\n/* 231: */ }\r\n/* 232:231 */ email = email + empresa.getEmail2();\r\n/* 233: */ }\r\n/* 234: */ }\r\n/* 235:235 */ this.facturaProveedorSRI = this.servicioFacturaProveedorSRI.cargarDetalle(this.facturaProveedorSRI.getIdFacturaProveedorSRI());\r\n/* 236:236 */ this.facturaProveedorSRI.setEmail(email);\r\n/* 237:237 */ this.servicioFacturaProveedorSRI.cargarConceptosRetencion(this.facturaProveedorSRI, empresa);\r\n/* 238:238 */ this.facturaProveedorSRI.setTraCorregirDatos(this.corrigeDatosRetencion);\r\n/* 239:239 */ if ((this.facturaProveedorSRI.getDocumento() == null) && (getListaDocumento().size() > 0)) {\r\n/* 240:240 */ this.facturaProveedorSRI.setDocumento((Documento)this.listaDocumento.get(0));\r\n/* 241: */ }\r\n/* 242:242 */ cargarSecuencia(this.facturaProveedorSRI, AppUtil.getPuntoDeVenta());\r\n/* 243: */ }\r\n/* 244: */ }\r\n/* 245:246 */ if (this.facturaProveedorSRI != null)\r\n/* 246: */ {\r\n/* 247:247 */ this.facturaProveedorSRI.setTraCorregirDatos(this.corrigeDatosRetencion);\r\n/* 248:248 */ if ((!this.corrigeDatosRetencion) && (FuncionesUtiles.getAnio(this.facturaProveedorSRI.getFechaRegistro()) != 9999)) {\r\n/* 249:249 */ this.facturaProveedorSRI.setFechaEmisionRetencion(this.facturaProveedorSRI.getFechaRegistro());\r\n/* 250: */ }\r\n/* 251: */ }\r\n/* 252:252 */ if ((this.facturaProveedorSRI.isIndicadorRetencionEmitida()) && (!this.facturaProveedorSRI.isTraCorregirDatos())) {\r\n/* 253:253 */ this.mensaje = getLanguageController().getMensaje(\"msg_accion_implica_anulacion_previa\");\r\n/* 254: */ }\r\n/* 255: */ }\r\n/* 256: */ catch (ExcepcionAS2 e)\r\n/* 257: */ {\r\n/* 258:256 */ addErrorMessage(getLanguageController().getMensaje(e.getCodigoExcepcion()) + e.getMessage());\r\n/* 259:257 */ LOG.info(\"ERROR ExcepcionAS2 AL CARGAR DATOS EN FACTURAPROVEEDORSRIBEAN\", e);\r\n/* 260: */ }\r\n/* 261: */ catch (Exception e)\r\n/* 262: */ {\r\n/* 263:260 */ LOG.error(\"ERROR Exception AL CARGAR DATOS EN FACTURAPROVEEDORSRIBEAN \", e);\r\n/* 264:261 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_cargar_datos\"));\r\n/* 265: */ }\r\n/* 266: */ finally\r\n/* 267: */ {\r\n/* 268:264 */ cargarListaTipoComprobanteSRI();\r\n/* 269: */ \r\n/* 270:266 */ cargarListaCreditoTributarioSRI();\r\n/* 271: */ }\r\n/* 272:268 */ this.indicadorFactura = null;\r\n/* 273: */ }\r\n/* 274: */ }", "private void ingresarReserva() throws Exception {\r\n\t\tif (mngRes.existeReservaPeriodo(getSitio().getId())) {\r\n\t\t\tif (mayorEdad) {\r\n\t\t\t\tmngRes.crearReserva(getEstudiante(), getSitio(), periodo.getPrdId(), null);\r\n\t\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\t} else {\r\n\t\t\t\tmngRes.crearReserva(getEstudiante(), getSitio(), periodo.getPrdId(),\r\n\t\t\t\t\t\tgetDniRepresentante() + \";\" + getNombreRepresentante());\r\n\t\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\t}\r\n\t\t\tMensaje.crearMensajeINFO(\"Reserva realizada correctamente, no olvide descargar su contrato.\");\r\n\t\t} else {\r\n\t\t\tMensaje.crearMensajeWARN(\"El sitio seleccionado ya esta copado, favor eliga otro.\");\r\n\t\t}\r\n\t}", "public void afterBegin() throws EJBException, RemoteException;", "public void ejbPassivate() {\n }", "public void inicia() { \r\n\t\tventana=new VentanaMuestraServicios(this);\r\n\t\tventana.abre();\r\n\t}", "@Test\n\tpublic void testAfficher() {\n\t\tprofesseurServiceEmp.afficher(prof);\n\t}", "public boolean deposito(int idConta, double quantia) {\n try {\n Conta conta = new Conta(idConta); //deveria poder fazer isto\n boolean executado = conta.depositoConta(quantia);\n System.out.println(executado ? \"Deposito efetuado com sucesso.\" : \"Erro ao Efeuar o Deposito\" );\n return executado;\n } catch (Exception e) {\n System.out.println(\"Erro no serviço deposito: \" + e.getMessage());\n return false;\n } \n}", "public static int BuscarPorcentajeConvenio(int pac, int idempresa, int idservicio, Session sesion) {\n String hql;\n int porc = 0;\n try{ \n //sesion = NewHibernateUtil.getSessionFactory().openSession();\n //tr = sesion.beginTransaction();\n hql = \"SELECT porcentaje FROM Convenio WHERE estado = 'Activo' AND paciente = \"+pac+\" AND empresa = \"+idempresa+\" AND servicio = \"+idservicio;\n Query query = sesion.createQuery(hql); \n Iterator it = query.iterate();\n if(it.hasNext()){\n porc = (int)it.next();\n }\n }catch(HibernateException ex){\n JOptionPane.showMessageDialog(null, \"Error al conectarse con Base de Datos\", \"Convenio Controlador\", JOptionPane.INFORMATION_MESSAGE);\n }\n return porc;\n }", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "@Override\n @Test(groups = {\"EJB access\"})\n public void testEJB00() throws Exception {\n super.testEJB00();\n }", "public void cargaDatosInicialesSoloParaAdicionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n //Obtien Ajuste Fin\n //Activa formulario para automatico modifica \n if (selectedEntidad.getNivel() >= 3) {\n numeroEspaciadorAdicionar = 260;\n }\n\n if (selectedEntidad.getNivel() == 3) {\n swParAutomatico = false;\n numeroEspaciadorAdicionar = 230;\n }\n if (selectedEntidad.getNivel() == 2) {\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciadorAdicionar = 200;\n }\n if (selectedEntidad.getNivel() == 1) {\n swParAutomatico = true;\n numeroEspaciadorAdicionar = 130;\n cntParametroAutomaticoDeNivel2 = cntParametroAutomaticoService.obtieneObjetoDeParametroAutomatico(selectedEntidad);\n }\n\n mascaraNuevoOpcion = \"N\";\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n mascaraNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"N\");\n mascaraSubNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"S\");\n longitudNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"N\");\n longitudSubNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"S\");\n }", "public void selecao () {}", "public void ejbLoad() {\n }", "public void ejbLoad() {\n }", "public void act() \n {\n verificaClique();\n }", "@Test\n public void testBasicQuieseEmptyCounter() throws Exception \n {\n\t \n\tSystem.out.println(\"In testBasicQuieseEmptyCounter\");\n\tObject obj = context().getService(TestBean.class);\n\t\n\tif (obj != null)\n\t{\n\t QuiesceParticipant participant = getParticipant(\"org.apache.aries.blueprint.core\");\n\t \n\t if (participant != null)\n\t {\n\t System.out.println(obj.getClass().getName());\n\n\t TestQuiesceCallback callback = new TestQuiesceCallback();\n\t \n\t Bundle bundle = getBundle(\"org.apache.aries.blueprint.testquiescebundle\");\n\t \n\t System.out.println(\"Got the bundle\");\n\t \n\t List<Bundle> bundles = new ArrayList<Bundle>();\n\t bundles.add(bundle);\n\t \n\t Thread t = new Thread(new TestBeanClient((TestBean)obj, 2000));\n\t t.start();\n\n\t System.out.println(\"Thread Started\");\n\t \n\t participant.quiesce(callback, bundles);\n\t \n\t System.out.println(\"Called Quiesce\");\n\t \n\t Thread.sleep(1000);\n\t \n\t Assert.assertTrue(\"Quiesce callback should not have occurred yet; calls should be 0, but it is \"+callback.getCalls(), callback.getCalls()==0);\n\t \n\t t.join();\n\t \n\t System.out.println(\"After join\");\n\t \n\t Assert.assertTrue(\"Quiesce callback should have occurred once; calls should be 1, but it is \"+callback.getCalls(), callback.getCalls()==1);\n\t \n \t }\n \t else\n\t {\n\t\tthrow new Exception(\"No Quiesce Participant found for the blueprint service\");\n\t }\n \n\t System.out.println(\"done\");\n\t}\n\telse\n\t{\n\t\tthrow new Exception(\"No Service returned for \" + TestBean.class);\n\t}\n }", "public interface Bitacora_peticionLocalHome extends javax.ejb.EJBLocalHome {\n\t/**\n\t * Creates an instance from a key for Entity Bean: Bitacora_peticion\n\t */\n\t static final String JNDI_NAME=\"ejb/co/com/telefonica/atiempo/ejb/eb/Bitacora_peticionLocalHome\";\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal create(\n\t\tjava.lang.Long bipe_id)\n\t\tthrows javax.ejb.CreateException;\n\t/**\n\t * Finds an instance using a key for Entity Bean: Bitacora_peticion\n\t */\n\tpublic co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.ejb\n\t\t.eb\n\t\t.Bitacora_peticionLocal findByPrimaryKey(\n\t\tco.com.telefonica.atiempo.ejb.eb.Bitacora_peticionKey primaryKey)\n\t\tthrows javax.ejb.FinderException;\n\t/**\n\t * Creates an instance from a key for Entity Bean: Bitacora_peticion\n\t */\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal create(\n\t\tjava.lang.Long bipe_id,\n\t\tjava.lang.Long usua_id,\n\t\tjava.sql.Timestamp bipe_fecha_inicio,\n\t\tco.com.telefonica.atiempo.ejb.eb.ActividadLocal argFk_acti_2_bipe,\n\t\tco.com.telefonica.atiempo.ejb.eb.PeticionLocal argFk_peticion)\n\t\tthrows javax.ejb.CreateException;\n\n\t/**\n\t * @param idActividad\n\t * @param object\n\t * @param idPeticion\n\t * @param idUsuario\n\t * @param date\n\t * @param object2\n\t * @param object3\n\t * @param esReversa\n\t * @return\n\t */\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal create(\n\t\tLong idActividad,\n\t\tLong idCausa,\n\t\tLong peticion,\n\t\tLong usuaId,\n\t\tDate bipeFechaInicio,\n\t\tDate bipeFechaFin,\n\t\tString bipeObservacion,\n\t\tShort esReversa)\n\t\tthrows CreateException;\n\n\tpublic java.util.Collection findbyNumeroPeticion(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n//\tpublic java.util.Collection findFechaFin(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n//\n\tpublic java.util.Collection findByPetiOrden(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n\tpublic Bitacora_peticionLocal findByPeticionActividad(java.lang.Long idPeticion, java.lang.Long idActividad) throws javax.ejb.FinderException;\n\tpublic Bitacora_peticionLocal findByPeticionActividadUsuario(java.lang.Long idPeticion, java.lang.Long idActividad, java.lang.Long idUsuario)\n\t\tthrows javax.ejb.FinderException;\n//\t//public Bitacora_peticionLocal findNumPeticionActividad(java.lang.Long numPeticion) throws javax.ejb.FinderException;\n//\tpublic java.util.Collection findByPeticionFechaTerminoNula(java.lang.Long nroPeticion) throws javax.ejb.FinderException;\n//\tpublic Bitacora_peticionLocal findObsPeticionActividad(java.lang.Long numeroPeticion, java.lang.Long numeroActividad)\n//\t\tthrows javax.ejb.FinderException;\n//\tpublic Bitacora_peticionLocal findByCodigoObservacionPeticion(java.lang.Long peticion) throws javax.ejb.FinderException;\n//\tpublic Bitacora_peticionLocal findByIdPeticionAndMdfTerminada(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n//\t\n\tpublic java.util.Collection findbyPeticionRol(java.lang.Long idPeticion, java.lang.Long idRol) throws javax.ejb.FinderException;\n//\tpublic java.util.Collection findByPeticionActividadNoNula(java.lang.Long idPeticion, java.lang.Long idActividad) throws javax.ejb.FinderException;\n\tpublic java.util.Collection findByPeticionActividadCerrada(java.lang.Long petiNumero, java.lang.Long actId) throws javax.ejb.FinderException;\n\tpublic java.util.Collection findPreviuosActivity(java.lang.Long petiNumero)\n\t\tthrows javax.ejb.FinderException;\n\tpublic java.util.Collection findbypeticionfechafin(java.lang.Long idPeticion)\n\t\tthrows javax.ejb.FinderException;\n\tpublic java.util.Collection findByOpenAct(java.lang.Long idActividad)\n\t\tthrows javax.ejb.FinderException;\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal findbyMaxActivity(java.lang.Long idPeticion, java.lang.Long idActividad) throws javax.ejb.FinderException;\n}", "public interface Mensaje_SMS_ACSLocal extends javax.ejb.EJBLocalObject {\n\t/**\n\t * Get accessor for persistent attribute: id\n\t */\n\tpublic java.lang.Long getId();\n\t/**\n\t * Set accessor for persistent attribute: id\n\t */\n\tpublic void setId(java.lang.Long newId);\n\t/**\n\t * Get accessor for persistent attribute: xml\n\t */\n\tpublic java.lang.String getXml();\n\t/**\n\t * Set accessor for persistent attribute: xml\n\t */\n\tpublic void setXml(java.lang.String newXml);\n\t/**\n\t * Get accessor for persistent attribute: peti_numero\n\t */\n\tpublic java.lang.Long getPeti_numero();\n\t/**\n\t * Set accessor for persistent attribute: peti_numero\n\t */\n\tpublic void setPeti_numero(java.lang.Long newPeti_numero);\n\t/**\n\t * Get accessor for persistent attribute: fecha_envio\n\t */\n\tpublic java.sql.Timestamp getFecha_envio();\n\t/**\n\t * Set accessor for persistent attribute: fecha_envio\n\t */\n\tpublic void setFecha_envio(java.sql.Timestamp newFecha_envio);\n\t/**\n\t * Get accessor for persistent attribute: usuario\n\t */\n\tpublic java.lang.String getUsuario();\n\t/**\n\t * Set accessor for persistent attribute: usuario\n\t */\n\tpublic void setUsuario(java.lang.String newUsuario);\n}", "public void testbusquedaAvanzada() {\n// \ttry{\n\t \t//indexarODEs();\n\t\t\tDocumentosVO respuesta =null;//this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"agregatodos identificador:es-ma_20071119_1_9115305\", \"\"));\n\t\t\t/*\t\tObject [ ] value = { null } ;\n\t\t\tPropertyDescriptor[] beanPDs = Introspector.getBeanInfo(ParamAvanzadoVO.class).getPropertyDescriptors();\n\t\t\tString autor=autor\n\t\t\tcampo_ambito=ambito\n\t\t\tcampo_contexto=contexto\n\t\t\tcampo_descripcion=description\n\t\t\tcampo_edad=edad\n\t\t\tcampo_fechaPublicacion=fechaPublicacion\n\t\t\tcampo_formato=formato\n\t\t\tcampo_idiomaBusqueda=idioma\n\t\t\tcampo_nivelEducativo=nivelesEducativos\n\t\t\tcampo_palabrasClave=keyword\n\t\t\tcampo_procesoCognitivo=procesosCognitivos\n\t\t\tcampo_recurso=tipoRecurso\n\t\t\tcampo_secuencia=conSinSecuencia\n\t\t\tcampo_titulo=title\n\t\t\tcampo_valoracion=valoracion\n\t\t\tfor (int j = 0; j < beanPDs.length; j++) {\n\t\t\t\tif(props.getProperty(\"campo_\"+beanPDs[j].getName())!=null){\n\t\t\t\t\tvalue[0]=\"valor a cargar\";\n\t\t\t\t\tsetPropValue(Class.forName(ParamAvanzadoVO.class.getName()).newInstance(), beanPDs[j],value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t*/\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\tcomprobarRespuesta(respuesta.getResultados()[0]);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pruebatitulo\", \"\"));\n//\t\t\tSystem.err.println(\"aparar\");\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pclave\", \"nivel*\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pclave\", \"nived*\"));\n//\t\t\tassertNull(respuesta.getResultados());\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pclave\", \"nivel\"));\n//\t\t\tassertNotNull(respuesta.getResultados());\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"\", \"nivel\"));\n//\t\t\tassertNull(respuesta.getResultados());\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pclave\", \"}f2e_-i3299(--5\"));\n//\t\t\tassertNull(respuesta.getResultados());\n\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"verso estrofa\", \"universal pepito\",\"\"));\n//\t\t\tassertNull(respuesta.getResultados());\n\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"descwildcard\", \"ambito0\",\"\"));\n//\t\t\tassertEquals(respuesta.getSugerencias().length, 1);\n//\t\t\t\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"desc*\", \"\",\"\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 2);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"keywordAvanzado\", \"ambito0\",\"descripcion\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"keywordAvanzado\", \"ambito0\",\"descripcion compuesta\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"keywordAvanzado\", \"ambito0\",\"descripcion pru*\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"descwild*\", \"\",\"\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n// \t}catch(Exception e){\n//\t\t \tlogger.error(\"ERROR: fallo en test buscador-->\",e);\n//\t\t\tthrow new RuntimeException(e);\n// \t}finally{\n// \t\teliminarODE(new String [] { \"asdf\",\"hjkl\"});\n// \t}\n\t\t\tassertNull(respuesta);\n }", "public static void main(String[] args) {\r\n\r\n System.out.println(\"\\n INICIANDO SISTEMA\");\r\n \r\n Vendas venda = new Vendas();\r\n Projeto projeto = new Projeto();\r\n Producao producao = new Producao();\r\n Rh rh = new Rh();\r\n Cliente cliente = new Cliente();\r\n ItensPedido itens = new ItensPedido();\r\n Pedido pedido = new Pedido(0,cliente,itens);\r\n int controle =0;\r\n \r\n while (controle ==0){\r\n int decisao = 1;\r\n System.out.println(\" Para realizar vendas digite 1 e 2 para sair do sistema:\");\r\n Scanner teclado = new Scanner(System.in);\r\n decisao = teclado.nextInt();\r\n switch (decisao){\r\n case 1:\r\n // TODO code application logic here\r\n \r\n \r\n System.out.println(\" ABRINDO VENDA\\n \");\r\n \r\n \r\n \r\n rh.liberarFuncionarios(producao.contruir(rh.verificaFuncionario(producao.adicionaProjeto(projeto.recebePedido(venda.fazerVenda(pedido))))));\r\n \r\n // aloca recursos no estoque e finaliza com a liberacao do financeiro\r\n\r\n //compara se ja existe um projeto existente\r\n \r\n \r\n\r\n //chamadada estoque \r\n \r\n \r\n // realizar o teste no setor de teste no projeto\r\n Teste teste = new Teste();\r\n if (teste.realizarTeste()== true){\r\n // libera os funcionarios para modo de espera \r\n\r\n //rh.liberarFuncionarios(listaprojeto.get(entrada));\r\n }\r\n \r\n System.out.println(\" \");\r\n System.out.println(\"************ ENCERRADA VENDA ************\");\r\n \r\n break;\r\n case 2:\r\n controle = 1;\r\n break;\r\n default:\r\n System.out.println(\"OPCAO INVALIDA \\n\");\r\n }}\r\n }", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n Dati dati;\n\n try { // prova ad eseguire il codice\n\n this.setMessaggio(\"Analisi in corso\");\n this.setBreakAbilitato(true);\n\n /* recupera e registra i dati delle RMP da elaborare */\n dati = getDatiRMP();\n this.setDati(dati);\n\n /* regola il fondo scala dell'operazione */\n this.setMax(dati.getRowCount());\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "private void inizia() throws Exception {\n this.setAllineamento(Layout.ALLINEA_CENTRO);\n this.creaBordo(\"Coperti serviti\");\n\n campoPranzo=CampoFactory.intero(\"a pranzo\");\n campoPranzo.setLarghezza(60);\n campoPranzo.setModificabile(false);\n campoCena=CampoFactory.intero(\"a cena\");\n campoCena.setLarghezza(60);\n campoCena.setModificabile(false);\n campoTotale=CampoFactory.intero(\"Totale\");\n campoTotale.setLarghezza(60); \n campoTotale.setModificabile(false);\n\n this.add(campoPranzo);\n this.add(campoCena);\n this.add(campoTotale);\n }", "public interface Compromiso_peticionLocal extends javax.ejb.EJBLocalObject {\n\t/**\n\t * Get accessor for persistent attribute: tiag_id\n\t */\n\tpublic java.lang.Long getTiag_id();\n\t/**\n\t * Set accessor for persistent attribute: tiag_id\n\t */\n\tpublic void setTiag_id(java.lang.Long newTiag_id);\n\t/**\n\t * Get accessor for persistent attribute: id_rango\n\t */\n\tpublic java.lang.Integer getId_rango();\n\t/**\n\t * Set accessor for persistent attribute: id_rango\n\t */\n\tpublic void setId_rango(java.lang.Integer newId_rango);\n\t/**\n\t * Get accessor for persistent attribute: peti_numero\n\t */\n\tpublic java.lang.Long getPeti_numero();\n\t/**\n\t * Set accessor for persistent attribute: peti_numero\n\t */\n\tpublic void setPeti_numero(java.lang.Long newPeti_numero);\n\t/**\n\t * Get accessor for persistent attribute: codigo_pcom\n\t */\n\tpublic java.lang.String getCodigo_pcom();\n\t/**\n\t * Set accessor for persistent attribute: codigo_pcom\n\t */\n\tpublic void setCodigo_pcom(java.lang.String newCodigo_pcom);\n\t/**\n\t * Get accessor for persistent attribute: dia_especifico\n\t */\n\tpublic java.sql.Timestamp getDia_especifico();\n\t/**\n\t * Set accessor for persistent attribute: dia_especifico\n\t */\n\tpublic void setDia_especifico(java.sql.Timestamp newDia_especifico);\n\t/**\n\t * Get accessor for persistent attribute: id_tecnico\n\t */\n\tpublic java.lang.Long getId_tecnico();\n\t/**\n\t * Set accessor for persistent attribute: id_tecnico\n\t */\n\tpublic void setId_tecnico(java.lang.Long newId_tecnico);\n\t/**\n\t * Get accessor for persistent attribute: user_mac\n\t */\n\tpublic java.lang.String getUser_mac();\n\t/**\n\t * Set accessor for persistent attribute: user_mac\n\t */\n\tpublic void setUser_mac(java.lang.String newUser_mac);\n\t/**\n\t * Get accessor for persistent attribute: hora_desde\n\t */\n\tpublic java.lang.String getHora_desde();\n\t/**\n\t * Set accessor for persistent attribute: hora_desde\n\t */\n\tpublic void setHora_desde(java.lang.String newHora_desde);\n\t/**\n\t * Get accessor for persistent attribute: hora_hasta\n\t */\n\tpublic java.lang.String getHora_hasta();\n\t/**\n\t * Set accessor for persistent attribute: hora_hasta\n\t */\n\tpublic void setHora_hasta(java.lang.String newHora_hasta);\n\t/**\n\t * Get accessor for persistent attribute: codigo_agencia\n\t */\n\tpublic java.lang.String getCodigo_agencia();\n\t/**\n\t * Set accessor for persistent attribute: codigo_agencia\n\t */\n\tpublic void setCodigo_agencia(java.lang.String newCodigo_agencia);\n\t/**\n\t * Get accessor for persistent attribute: estado\n\t */\n\tpublic java.lang.Short getEstado();\n\t/**\n\t * Set accessor for persistent attribute: estado\n\t */\n\tpublic void setEstado(java.lang.Short newEstado);\n\t/**\n\t * Get accessor for persistent attribute: grse_id\n\t */\n\tpublic java.lang.Integer getGrse_id();\n\t/**\n\t * Set accessor for persistent attribute: grse_id\n\t */\n\tpublic void setGrse_id(java.lang.Integer newGrse_id);\n\t/**\n\t * Get accessor for persistent attribute: fecha\n\t */\n\tpublic java.sql.Timestamp getFecha();\n\t/**\n\t * Set accessor for persistent attribute: fecha\n\t */\n\tpublic void setFecha(java.sql.Timestamp newFecha);\n\t/**\n\t * Get accessor for persistent attribute: care_id\n\t */\n\tpublic java.lang.Integer getCare_id();\n\t/**\n\t * Set accessor for persistent attribute: care_id\n\t */\n\tpublic void setCare_id(java.lang.Integer newCare_id);\n\t/**\n\t * Get accessor for persistent attribute: usua_id\n\t */\n\tpublic java.lang.Long getUsua_id();\n\t/**\n\t * Set accessor for persistent attribute: usua_id\n\t */\n\tpublic void setUsua_id(java.lang.Long newUsua_id);\n\t/**\n\t * Get accessor for persistent attribute: id_cita_previa\n\t */\n\tpublic java.lang.Long getId_cita_previa();\n\t/**\n\t * Set accessor for persistent attribute: id_cita_previa\n\t */\n\tpublic void setId_cita_previa(java.lang.Long newId_cita_previa);\n}", "private void afficheSuiv(){\n\t\ttry{ // Essayer ceci\n\t\t\tif(numCourant <= rep.taille()){\n\t\t\t\tnumCourant ++;\n\t\t\t\tPersonne e = rep.recherchePersonne(numCourant); // Rechercher la personne en fonction du numCourant\n\t\t\t\tafficherPersonne(e);\n\t\t\t}else{\n\t\t\t\tafficherMessageErreur();\n\t\t\t}\n\t\t}catch(Exception e){ // Permet de voir s'il y a cette exception\n\t\t\tafficherMessageErreur();\n\t\t\tnumCourant --;\n\t\t}\n\t}", "public void abrirCerradura(){\n cerradura.abrir();\r\n }", "@Test\r\n public void prueba() throws Exception {\r\n // Creates an instance of book\r\n Book book = new Book();\r\n book.setTitle(\"The Hitchhiker's Guide to the Galaxy\");\r\n book.setPrice(12.5F);\r\n book.setDescription(\"Science fiction comedy series created by Douglas Adams.\");\r\n book.setIsbn(\"1-84023-742-2\");\r\n book.setNbOfPage(354);\r\n book.setIllustrations(false);\r\n \r\n BookFacade bookEJB = (BookFacade) ctx.lookup(\"java:global/classes/BookFacade!miEjB.BookFacade\");\r\n book = bookEJB.createBook(book);\r\n book = bookEJB.find(book.getId());\r\n\r\n assertTrue(book.getPrice()== 12.5F);\r\n\r\n System.out.println(\"### Book created : \" + book);\r\n System.out.println(\"### \"+ bookEJB.findAll().size() + \" books in the db\" );\r\n bookEJB.remove(book);\r\n System.out.println(\"### Book deleted\");\r\n book = bookEJB.find(book.getId());\r\n assertTrue(book== null);\r\n\r\n }", "@Override\r\n /* OSINE791 - RSIS1 - Inicio */\r\n //public ExpedienteDTO generarExpedienteOrdenServicio(ExpedienteDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO) throws ExpedienteException{\r\n public ExpedienteGSMDTO generarExpedienteOrdenServicio(ExpedienteGSMDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO,String sigla) throws ExpedienteException{\r\n LOG.error(\"generarExpedienteOrdenServicio\");\r\n ExpedienteGSMDTO retorno= new ExpedienteGSMDTO();\r\n try{\r\n expedienteDTO.setEstado(Constantes.ESTADO_ACTIVO);\r\n PghExpediente pghExpediente = ExpedienteGSMBuilder.toExpedienteDomain(expedienteDTO);\r\n pghExpediente.setFechaEstadoProceso(new Date());\r\n pghExpediente.setDatosAuditoria(usuarioDTO);\r\n crud.create(pghExpediente);\r\n retorno=ExpedienteGSMBuilder.toExpedienteDto(pghExpediente);\r\n \r\n //reg historicoEstado\r\n MaestroColumnaDTO tipoHistorico=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_EXPEDIENTE).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstado=historicoEstadoDAO.registrar(pghExpediente.getIdExpediente(), null, pghExpediente.getIdEstadoProceso().getIdEstadoProceso(), pghExpediente.getIdPersonal().getIdPersonal(), pghExpediente.getIdPersonal().getIdPersonal(), tipoHistorico.getIdMaestroColumna(),null,null, null, usuarioDTO);\r\n LOG.info(\"historicoEstado-->\"+historicoEstado);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n //inserta ordenServicio\r\n Long idLocador=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)?expedienteDTO.getOrdenServicio().getLocador().getIdLocador():null;\r\n Long idSupervisoraEmpresa=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)?expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa():null;\r\n OrdenServicioDTO OrdenServicioDTO=ordenServicioDAO.registrar(retorno.getIdExpediente(), \r\n expedienteDTO.getOrdenServicio().getIdTipoAsignacion(), expedienteDTO.getOrdenServicio().getEstadoProceso().getIdEstadoProceso(), \r\n /* OSINE791 - RSIS1 - Inicio */\r\n //codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO);\r\n codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO,sigla);\r\n /* OSINE791 - RSIS1 - Fin */\r\n LOG.info(\"OrdenServicioDTO:\"+OrdenServicioDTO.getNumeroOrdenServicio());\r\n //busca idPersonalDest\r\n PersonalDTO personalDest=null;\r\n List<PersonalDTO> listPersonalDest=null;\r\n if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)){\r\n //personalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null)).get(0);\r\n listPersonalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null));\r\n }else if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)){\r\n //personalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa())).get(0);\r\n listPersonalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa()));\r\n }\r\n if(listPersonalDest==null || listPersonalDest.isEmpty()){\r\n throw new ExpedienteException(\"La Empresa Supervisora no tiene un Personal asignado\",null);\r\n }else{\r\n personalDest=listPersonalDest.get(0);\r\n }\r\n //inserta historico Orden Servicio\r\n EstadoProcesoDTO estadoProcesoDto=estadoProcesoDAO.find(new EstadoProcesoFilter(Constantes.IDENTIFICADOR_ESTADO_PROCESO_OS_REGISTRO)).get(0);\r\n MaestroColumnaDTO tipoHistoricoOS=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_ORDEN_SERVICIO).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstadoOS=historicoEstadoDAO.registrar(null, OrdenServicioDTO.getIdOrdenServicio(), estadoProcesoDto.getIdEstadoProceso(), expedienteDTO.getPersonal().getIdPersonal(), personalDest.getIdPersonal(), tipoHistoricoOS.getIdMaestroColumna(),null,null, null, usuarioDTO); \r\n LOG.info(\"historicoEstadoOS:\"+historicoEstadoOS);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n retorno.setOrdenServicio(new OrdenServicioDTO(OrdenServicioDTO.getIdOrdenServicio(),OrdenServicioDTO.getNumeroOrdenServicio()));\r\n }catch(Exception e){\r\n LOG.error(\"error en generarExpedienteOrdenServicio\",e);\r\n throw new ExpedienteException(e.getMessage(), e);\r\n }\r\n return retorno;\r\n }", "public interface ServeurCORBA {\n\t\n\t// ################################ METHODE DE CREATION / ENVOI / SUPPRESSION ################################ \n\t\n\t/**\n\t * @param idee\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void creerIdee(final IIdee idee, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param idee\n\t * @param mode\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void envoyerIdee(final IIdee idee, final ModeDeMiseAJour mode, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param idee\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void supprimerIdee(final IIdee idee, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param idee\n\t * @param tache\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void creerTache(final IIdee idee, final ITache tache, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param tache\n\t * @param mode\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void envoyerTache(final ITache tache, final ModeDeMiseAJour mode, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param tache\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void supprimerTache(final ITache tache, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param idee\n\t * @param projet\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void creerProjet(final IIdee idee, final IProjet projet, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param projet\n\t * @param mode\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void envoyerProjet(final IProjet projet, final ModeDeMiseAJour mode, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param projet\n\t * @param identification\n\t * @param callback\n\t */\n\tpublic void supprimerProjet(final IProjet projet, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param contexte\n\t * @param identification\n\t * @param callback\n\t * @throws RemoteException\n\t */\n\tpublic void creerContexte(final IObjetServeur contexte, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param contexte\n\t * @param mode\n\t * @param identification\n\t * @param callback\n\t * @throws RemoteException\n\t */\n\tpublic void envoyerContexte(final IObjetServeur contexte, final ModeDeMiseAJour mode, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param contexte\n\t * @param identification\n\t * @param callback\n\t * @throws RemoteException\n\t */\n\tpublic void supprimerContexte(final IObjetServeur contexte, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param tag\n\t * @param identification\n\t * @param callback\n\t * @throws RemoteException\n\t */\n\tpublic void creerTag(final ITag tag, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param tag\n\t * @param mode\n\t * @param identification\n\t * @param callback\n\t * @throws RemoteException\n\t */\n\tpublic void envoyerTag(final ITag tag, final ModeDeMiseAJour mode, final String identification, final CallBack<String> callback);\n\t\n\t/**\n\t * @param tag\n\t * @param identification\n\t * @param callback\n\t * @throws RemoteException\n\t */\n\tpublic void supprimerTag(final ITag tag, final String identification, final CallBack<String> callback);\n\t\n\t\n\t// ################################ METHODE DE MODIFICATION ################################\n\t\n\t\n\tpublic void ajouterTacheAProjet(final ITache tache, final IProjet projet, final String identification, CallBack<String> callback);\n\tpublic void retirerTacheDuProjet(final ITache tache, final IProjet projet, final String identification, CallBack<String> callback);\n\n\tpublic void ajouterParticipantAuProjet(final IProjet projet, final IParticipant nom, final String identification, final CallBack<String> callback);\n\tpublic void supprimerParticipantDuProjet(final IProjet projet, final IParticipant nom, final String identification, final CallBack<String> callback);\n\n\tpublic void ajouterParticipantDuProjetATache(final IProjet projet, final IParticipant nom, final ITache tache, final String identification, final CallBack<String> callback);\n\tpublic void retirerParticipantDeLaTache(final IParticipant nom, final ITache tache, final String identification, final CallBack<String> callback);\n\t\n\t\n\t// ################################ METHODE DE RECUPERATION ################################\n\t\n\t\n\tpublic void downloadInbox(final Date date, final String identification, final CallBack<String> callback);\n\tpublic void downloadInbox(final String identification, final CallBack<String> callback);\n\n\n\tpublic void downloadPoubelle(final Date date, final String identification, final CallBack<String> callback);\n\tpublic void downloadPoubelle(final String identification, final CallBack<String> callback);\n\n\n\tpublic void downloadArchive(final Date date, final String identification, final CallBack<String> callback);\n\tpublic void downloadArchive(final String identification, final CallBack<String> callback);\n\n\n\tpublic void downloadProchainesTaches(final Date date, final String identification, final CallBack<String> callback);\n\tpublic void downloadProchainesTaches(final String identification, final CallBack<String> callback);\n\n\n\tpublic void downloadProchainesTaches(final IObjetServeur contexte, final Date date, final String identification, final CallBack<String> callback);\n\tpublic void downloadProchainesTaches(final IObjetServeur contexte, final String identification, final CallBack<String> callback);\n\n\n\tpublic void downloadCalendrier(final Date date, final String identification, final CallBack<String> callback);\n\tpublic void downloadCalendrier(final String identification, final CallBack<String> callback);\n\n\n\tpublic void downloadTacheParTag(final Date date, final ITag tag, final String identification, final CallBack<String> callback);\n\tpublic void downloadTacheParTag(final ITag tag, final String identification, final CallBack<String> callback);\n\t\n\t\n\t// ################################ METHODE DE GESTION DE COMPTE ################################\n\t\n\t\n\tpublic void creerCompte(final String username, final String password, final String pseudo, final String identification, final CallBack<String> callback);\n\tpublic void supprimerCompte(final String username, final String password, final String identification, final CallBack<String> callback);\n\n\tpublic void modifierPseudo(final String pseudo, final String identification, final CallBack<String> callback);\n\tpublic void modifierUsername(final String username, final String identification, final CallBack<String> callback);\n\tpublic void modifierMotDePasse(final String oldpPassword, final String newPassword, final String identification, final CallBack<String> callback);\n\n\tpublic void login(final String username, final String password, final String identification, final CallBack<String> callback);\n\tpublic void disconnect(final String identification, final CallBack<String> callback);\n\t\n\tpublic void downloadListeParticipant(final String identification, final CallBack<List<AbstractParticipant>> callback);\n\t\n\tpublic void downloadLog(final Date date, final String identification, final CallBack<List<String>> callback);\n\tpublic void downloadLog(final String identification, final CallBack<List<String>> callback);\n\t\n\t\n\t// ################################ METHODE ADMINISTRATEUR ################################\n\t\n\t\n\tpublic void downloadLogAdmin(final String identification, final CallBack<List<String>> callback);\n\tpublic void downloadInbox(final String username, final String identification, final CallBack<List<String>> callback);\n\tpublic void downloadTaches(final String username, final String identification, final CallBack<List<String>> callback);\n\tpublic void downloadProjets(final String username, final String identification, final CallBack<List<String>> callback);\n\tpublic void downloadLog(final String username, final String identification, final CallBack<List<String>> callback);\n}", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\n @Override\n public void descontarValorCompraTarjeta(ArrayList<Mueble> muebles, Usuario cliente)throws CupoInsuficienteException{\n double valor = calcularValorCompra(muebles);\n \n TarjetaCreditoAlpes tarjeta = (TarjetaCreditoAlpes) entityManagerDerby.createNamedQuery(\"TarjetaCreditoAlpes.findByNombretitular\").setParameter(\"nombreTitular\", cliente.getLogin()).getSingleResult();\n \n // Se valida que la tarjeta exista\n if(tarjeta == null){\n throw new CupoInsuficienteException(\"La tarjeta no existe!!\");\n }\n \n // Se valida el cupo de la tarjeta para realizar la transacción\n if(tarjeta.getCupo()< valor){\n throw new CupoInsuficienteException(\"El cliente no tiene cupo disponible en la tarjeta para realizar la compra.\\n\"\n + \"En el cupo de la tarjeta tiene: \" + tarjeta.getCupo() + \" y la compra es de : \" + valor);\n } else {\n tarjeta.setCupo(tarjeta.getCupo() - valor);\n entityManagerDerby.merge(tarjeta);\n System.out.println(\"Se actualizó el valor del cupo de la tarjeta\");\n }\n \n }", "@Test\n public void testRemoveOrcamento() throws Exception {\n System.out.println(\"removeOrcamento\");\n Orcamento orc = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext().lookup(\"java:global/classes/OrcamentoService\");\n instance.removeOrcamento(orc);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public interface ProcesoVENService extends Service {\n\n\t/**\n\t * Ejecuta procedimiento generico\n\t * @param nombreExecute\n\t * @param criteria\n\t */\n\tpublic void executeGenerico(String nombreExecute, Map criteria) ;\n\t\n\t/**Actualiza calensarios\n\t * @param calendario\n\t * @param usuario\n\t */\n\tpublic void updateCalendario(Calendario calendario, Usuario usuario);\n\t\n\t/**devuelve lista de calendarios\n\t * @param criteria\n\t * @return\n\t */\n\tpublic List getCalendarios(Map criteria);\n\t\n\t/**\n\t * devuelve el calendario\n\t * @param criteria\n\t * @return\n\t */\n\tpublic Calendario getCalendario(Map criteria);\n\t\n /**\n * devuelve los feriados d euna zona\n * @param criteria\n * @return\n */\n public List getFeriadoZona(Map criteria);\n\t\n\t/**\n\t * Actualiza feriados de una zona\n\t * @param feriadoZona\n\t * @param usuario\n\t */\n\tpublic void updateFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);\n\t\n\t/**\n\t * Inserta los feriados de una zona\n\t * @param feriadoZona\n\t * @param usuario\n\t */\n\tpublic void insertFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);\n\t\n\t/**\n\t * elimina los feriados d euna zona\n\t * @param feriadoZona\n\t * @param usuario\n\t */\n\tpublic void deleteFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);\n\n\t/**\n\t * Metodo que trae las zonas de una region\n\t * @param feriadoRegion\n\t * @return\n\t */\n\tpublic List getZonasRegion(String feriadoRegion);\n\n\t/**\n\t * Retorna el indicador de habilitacion RUV\n\t * @param criteria\n\t * @return\n\t */\n\tpublic String getIndicadorHabilitacionRuv(Map criteria);\n\n\t/**\n\t * Genera la informacion para el reporte RUV\n\t * @param map\n\t */\n\tpublic void executeGeneracionReporteRUV(Map map);\n\t\n\t/**\n\t * Genera los archivos de libro de ventas - detalles SII\n\t * @param map\n\t */\n\tpublic void executeGenerarArchivosLibroVentasDetalleSII(Map map);\n\t\n}", "@Override\r\n public ExpedienteGSMDTO veriActuFlgTramFinalizadoDsr(Long idExpediente,Long idOrdenServicio,Long idResultadoSupervision,UsuarioDTO usuarioDTO) throws ExpedienteException{\r\n LOG.info(\"veriActuFlgTramFinalizadoDsr\");\r\n ExpedienteGSMDTO retorno=null;\r\n try{\r\n PghResultadoSupervision resSup = crud.find(idResultadoSupervision, PghResultadoSupervision.class);\r\n \r\n PghExpediente expe = crud.find(idExpediente, PghExpediente.class);\r\n if(resSup.getCodigo().equals(Constantes.CODIGO_RESULTADO_SUPERVISION_CUMPLE) || resSup.getCodigo().equals(Constantes.CODIGO_RESULTADO_SUPERVISION_CUMPLE_OBSTACULIZADO)){\r\n expe.setFlagTramiteFinalizado(Constantes.ESTADO_ACTIVO);\r\n }else if(resSup.getCodigo().equals(Constantes.CODIGO_RESULTADO_SUPERVISION_NOCUMPLE) || resSup.getCodigo().equals(Constantes.CODIGO_RESULTADO_SUPERVISION_NOCUMPLE_OBSTACULIZADO)){\r\n expe.setFlagTramiteFinalizado(Constantes.ESTADO_INACTIVO);\r\n }else{\r\n throw new ExpedienteException(\"Casuistica no encontrada para Finalizar la Orden de Servicio. Revisar Supervision.\",null);\r\n }\r\n expe.setDatosAuditoria(usuarioDTO);\r\n crud.update(expe);\r\n retorno=ExpedienteGSMBuilder.toExpedienteDto(expe);\r\n }catch(Exception e){\r\n LOG.error(\"error en veriActuFlgTramFinalizadoDsr\",e);\r\n ExpedienteException ex = new ExpedienteException(e.getMessage(), e);\r\n throw ex;\r\n }\r\n return retorno;\r\n }", "public boolean buy() throws Exception {\n\n int jogador = this.jogadorAtual();\n\n String lugar = this.tabuleiro.getPlaceName(posicoes[jogador]);\n // System.out.println(\"lugar[jogador]\" + lugar);\n boolean posicaoCompravel = this.posicaoCompravel(posicoes[jogador]);\n boolean isEstatal = this.isPosicaoEstatal(this.posicoes[jogador]);\n\n if (posicaoCompravel || (isEstatal && this.publicServices == true && verificaSeServicoPublicoFoiComprado(this.posicoes[jogador]))) {\n\n if (posicaoCompravel || (isEstatal && this.publicServices == true)) {\n this.listaJogadores.get(jogadorAtual()).addQuantidadeCompanhias();\n\n }\n int posicaoTabuleiro = posicoes[jogador];\n int preco = this.tabuleiro.getLugarPrecoCompra(posicaoTabuleiro);\n Jogador j = listaJogadores.get(jogador);\n this.terminarAVez();\n if (preco <= j.getDinheiro()) {\n this.print(\"\\tPossui dinheiro para a compra!\");\n j.retirarDinheiro(preco);\n this.Donos.put(posicaoTabuleiro, j.getNome());\n\n String nomeLugar = this.tabuleiro.getPlaceName(posicaoTabuleiro);\n j.addPropriedade(nomeLugar);\n if (nomeLugar.equals(\"Reading Railroad\") || nomeLugar.equals(\"Pennsylvania Railroad\") ||\n nomeLugar.equals(\"B & O Railroad\") || nomeLugar.equals(\"Short Line Railroad\")) {\n DonosFerrovias[jogador]++;\n }\n this.print(\"\\tVocê adquiriu \" + nomeLugar + \" por \" + preco);\n this.print(\"\\tAtual dinheiro: \" + j.getDinheiro());\n if (j.temPropriedades() && hipotecaAtiva) {\n j.adicionarComandoHipotecar();\n }\n if (j.verificaSeTemGrupo(posicaoTabuleiro)) {\n if (this.build == true) {\n j.adicionarComandoBuild();\n }\n\n this.tabuleiro.duplicarAluguelGrupo(posicaoTabuleiro);\n\n }\n } else {\n this.print(\"\\tNão possui dinheiro para realizar a compra!\");\n throw new Exception(\"Not enough money\");\n }\n\n } else {\n\n if (this.jaTemDono(posicoes[jogador])) {\n throw new Exception(\"Deed for this place is not for sale\");\n }\n\n if (isEstatal && this.publicServices == false) {\n throw new Exception(\"Deed for this place is not for sale\");\n }\n if (!posicaoCompravel) {\n throw new Exception(\"Place doesn't have a deed to be bought\");\n }\n }\n\n\n\n return false;\n\n\n\n }", "@PostConstruct\r\n void init() {\n UsuarioDAO u = new UsuarioDAO();\r\n HttpSession session = SessionUtils.getSession();\r\n\r\n long id;\r\n int perfil;\r\n try {\r\n perfil = (int) session.getAttribute(\"perfil\");\r\n id = (long) session.getAttribute(\"id\");\r\n\r\n UsuarioDAO uDAO = new UsuarioDAO();\r\n usuario = uDAO.findUsuario(id);\r\n\r\n // COMPRUEBO SI EL ESTUDIANTE YA INGRESO DATOS DE SU PASANTIA PREVIAMENTE\r\n PasantiaDAO passDAO = new PasantiaDAO();\r\n existe = passDAO.existePasantia(id);\r\n\r\n if (existe) {\r\n p = passDAO.findPasantia(id);\r\n EncargadoDAO encarDAO = new EncargadoDAO();\r\n enc = encarDAO.findEncargado(p.getEncargado().getId_encargado());\r\n EmpresaDAO empreDAO = new EmpresaDAO();\r\n emp = empreDAO.findEmpresa(enc.getEmpresa().getId_empresa());\r\n //Encuentro la pasantia PERO QUE SEA DE IDPROCESO = 1 OSEA DATOSBASICOS\r\n DetallePasantiaDAO dpDAO = new DetallePasantiaDAO();\r\n dpp = dpDAO.findDetallePasantiaPorProceso(p.getTipo_ppp(), p.getCod_ppp(),1);\r\n \r\n //Obtengo la observacion hecha por el gestor\r\n texto_alerta = dpp.getObservacion();\r\n \r\n //Compruebo que no sea null\r\n if (texto_alerta != null && !texto_alerta.trim().equalsIgnoreCase(\"\")){\r\n existeTexto = true;\r\n }else{\r\n existeTexto = false;\r\n }\r\n \r\n //Traer el listado de los datos guardados\r\n DatosDAO dDbDAO = new DatosDAO();\r\n dDbObtenidos = dDbDAO.datosPorDetallePasantia(dpp.getIdDetallePasantia());\r\n llenarDatosAPintar(dDbObtenidos);\r\n System.out.println(\"\");\r\n //\r\n \r\n }else{\r\n Arrays.fill(datosAPintar, true);\r\n }\r\n \r\n \r\n } catch (Exception e) {\r\n //p = null;\r\n System.out.println(\"========== ERROR AL TRAER INFO DE USUARIO ==============0\");\r\n }\r\n\r\n }", "@Remote\npublic interface IRClienteWSAXIS {\n\n /**\n * Realiza la invocacion con el WebService para realizar la registrar la financiacion y obtener el id del convenio\n * \n * @param financiacion\n * datos de la financiacion\n * @return Financiacion con el Numero de axis para Wla financiacion\n * @author julio.pinzon(2016-08-12)\n * @throws CirculemosNegocioException\n */\n public FinanciacionDTO registrarFinanciacion(FinanciacionDTO financiacion) throws CirculemosNegocioException;\n\n /**\n * Realiza la invocacion con el WebService para anular la financiacion\n * \n * @param numeroFinanciacion\n * numero del convenio\n * @author julio.pinzon(2016-08-17)\n * @throws CirculemosNegocioException\n */\n public void anularFinanciacion(String numeroFinanciacion) throws CirculemosNegocioException;\n\n /**\n * Realiza la invocacion con el WebService para realizar la impugnacion de un comparendo\n * \n * @param comparendo\n * datos del comparendo\n * @param impugnacion\n * datos de la impugnacion\n * @author julio.pinzon(2016-08-17)\n * @throws CirculemosNegocioException\n */\n public void impugnarComparendo(ComparendoDTO comparendo, ProcesoDTO impugnacion) throws CirculemosNegocioException;\n\n /**\n * Realiza la invocacion con el WebService para realizar el registro del fallo sobre la impugnacion previa\n * \n * @param fallo\n * datos del fallo\n * @return Nuevo numero de factura\n * @author julio.pinzon(2016-08-17)\n * @param idProceso\n * @param comparendoDTO\n * @throws CirculemosNegocioException\n */\n public Long registrarFalloImpugnacion(FalloImpugnacionDTO fallo, ComparendoDTO comparendoDTO, Long idProceso)\n throws CirculemosNegocioException;\n\n /**\n * Realiza la invocacion con el WebService para realizar el registro del numero de coactivo de axis\n * \n * @param coactivoDTO\n * @return CoactivoDTO\n * @throws CirculemosNegocioException\n * @author Jeison.Rodriguez (2016-09-21)\n */\n public CoactivoDTO registarCoactivo(CoactivoDTO coactivoDTO) throws CirculemosNegocioException;\n}", "public void ejbActivate() {\n testAllowedOperations(\"ejbActivate\");\n }", "public void test01_getEJBObject(){\n\n try{\n EJBObject object = ejbHandle.getEJBObject();\n assertNotNull( \"The EJBObject is null\", object );\n // Wait until isIdentical is working.\n //assertTrue(\"EJBObjects are not identical\", object.isIdentical(ejbObject));\n } catch (Exception e){\n fail(\"Received Exception \"+e.getClass()+ \" : \"+e.getMessage());\n }\n }", "public interface CSActsWorkerLocal extends javax.ejb.EJBLocalObject {\n\t/**\n\t * Returns the cdFipsWrkr.\n\t * @return String\n\t */\n\tpublic String getCdFipsWrkr();\n\t/**\n\t * Returns the cdWrkrType.\n\t * @return String\n\t */\n\tpublic String getCdWrkrType();\n\t/**\n\t * Returns the csActsWorkerInquiry.\n\t * @return CSActsWorkerInquiry\n\t */\n\tpublic CSActsWorkerInquiry getCsActsWorkerInquiry();\n\t/**\n\t * getEntityContext\n\t */\n\tpublic javax.ejb.EntityContext getEntityContext();\n\t/**\n\t * Returns the idEmail.\n\t * @return String\n\t */\n\tpublic String getIdEmail();\n\t/**\n\t * Returns the idWrkr.\n\t * @return String\n\t */\n\tpublic String getIdWrkr();\n\t/**\n\t * Returns the idWrkrLogon.\n\t * @return String\n\t */\n\tpublic String getIdWrkrLogon();\n\t/**\n\t * Returns the myEntityCtx.\n\t * @return javax.ejb.EntityContext\n\t */\n\tpublic javax.ejb.EntityContext getMyEntityCtx();\n\t/**\n\t * Returns the nbFaxWorker.\n\t * @return String\n\t */\n\tpublic String getNbFaxWorker();\n\t/**\n\t * Returns the nbTelWorker.\n\t * @return String\n\t */\n\tpublic String getNbTelWorker();\n\t/**\n\t * Returns the nmWrkr.\n\t * @return String\n\t */\n\tpublic String getNmWrkr();\n\t/**\n\t * Returns the tmLunchEnd.\n\t * @return String\n\t */\n\tpublic String getTmLunchEnd();\n\t/**\n\t * Returns the tmLunchStart.\n\t * @return String\n\t */\n\tpublic String getTmLunchStart();\n\t/**\n\t * Returns the tmWorkEnd.\n\t * @return String\n\t */\n\tpublic String getTmWorkEnd();\n\t/**\n\t * Returns the tmWorkStart.\n\t * @return String\n\t */\n\tpublic String getTmWorkStart();\n\t/**\n\t * Sets the cdFipsWrkr.\n\t * @param cdFipsWrkr The cdFipsWrkr to set\n\t */\n\tpublic void setCdFipsWrkr(String cdFipsWrkr);\n\t/**\n\t * Sets the cdWrkrType.\n\t * @param cdWrkrType The cdWrkrType to set\n\t */\n\tpublic void setCdWrkrType(String cdWrkrType);\n\t/**\n\t * Sets the csActsWorkerInquiry.\n\t * @param csActsWorkerInquiry The csActsWorkerInquiry to set\n\t */\n\tpublic void setCsActsWorkerInquiry(CSActsWorkerInquiry csActsWorkerInquiry);\n\t/**\n\t * setEntityContext\n\t */\n\tpublic void setEntityContext(javax.ejb.EntityContext ctx);\n\t/**\n\t * Sets the idEmail.\n\t * @param idEmail The idEmail to set\n\t */\n\tpublic void setIdEmail(String idEmail);\n\t/**\n\t * Sets the idWrkr.\n\t * @param idWrkr The idWrkr to set\n\t */\n\tpublic void setIdWrkr(String idWrkr);\n\t/**\n\t * Sets the idWrkrLogon.\n\t * @param idWrkrLogon The idWrkrLogon to set\n\t */\n\tpublic void setIdWrkrLogon(String idWrkrLogon);\n\t/**\n\t * Sets the myEntityCtx.\n\t * @param myEntityCtx The myEntityCtx to set\n\t */\n\tpublic void setMyEntityCtx(javax.ejb.EntityContext myEntityCtx);\n\t/**\n\t * Sets the nbFaxWorker.\n\t * @param nbFaxWorker The nbFaxWorker to set\n\t */\n\tpublic void setNbFaxWorker(String nbFaxWorker);\n\t/**\n\t * Sets the nbTelWorker.\n\t * @param nbTelWorker The nbTelWorker to set\n\t */\n\tpublic void setNbTelWorker(String nbTelWorker);\n\t/**\n\t * Sets the nmWrkr.\n\t * @param nmWrkr The nmWrkr to set\n\t */\n\tpublic void setNmWrkr(String nmWrkr);\n\t/**\n\t * Sets the tmLunchEnd.\n\t * @param tmLunchEnd The tmLunchEnd to set\n\t */\n\tpublic void setTmLunchEnd(String tmLunchEnd);\n\t/**\n\t * Sets the tmLunchStart.\n\t * @param tmLunchStart The tmLunchStart to set\n\t */\n\tpublic void setTmLunchStart(String tmLunchStart);\n\t/**\n\t * Sets the tmWorkEnd.\n\t * @param tmWorkEnd The tmWorkEnd to set\n\t */\n\tpublic void setTmWorkEnd(String tmWorkEnd);\n\t/**\n\t * Sets the tmWorkStart.\n\t * @param tmWorkStart The tmWorkStart to set\n\t */\n\tpublic void setTmWorkStart(String tmWorkStart);\n\t/**\n\t * Returns the actsWorkerEntityBean.\n\t * @return ActsWorkerEntityBean\n\t */\n\tpublic ActsWorkerEntityBean getActsWorkerEntityBean();\n\t/**\n\t * Sets the actsWorkerEntityBean.\n\t * @param actsWorkerEntityBean The actsWorkerEntityBean to set\n\t */\n\tpublic void setActsWorkerEntityBean(ActsWorkerEntityBean actsWorkerEntityBean);\n}", "public String rechazarInvitacion(){\n \r\n FacesContext context = FacesContext.getCurrentInstance();\r\n User usuario = ((SessionBean)(context.getApplication().evaluateExpressionGet(\r\n context, \"#{sessionBean}\", Object.class))).getUser();\r\n \r\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"SCRUMproyectoPU\");\r\n UserJpaController pjc = new UserJpaController(emf);\r\n usuario.setInvitacion(0);\r\n \r\n \r\n try {\r\n pjc.edit(usuario); // se crea un usuario por defecto que luego es modificado en el registro\r\n return \"Principal?faces-redirect=true\";\r\n \r\n } catch(Exception e) {\r\n System.out.println(e);\r\n return \"Error?faces-redirect=true\";\r\n \r\n }\r\n }", "@Test\r\n\tpublic void CT03ConsultarLivroComRaNulo() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tUsuario usuario;\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comRA_nulo();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"RA inválido\", e.getMessage());\r\n\t\t}\r\n\t}", "public interface GestionAsintomaticosInt extends Remote\n{\n \n public boolean registrarAsintomatico(PacienteCllbckInt objPaciente, int idPaciente) throws RemoteException;\n public boolean enviarIndicador(int id, float ToC) throws RemoteException;\n}", "public static void localVotouEleitor() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tRegistoVoto ans = null;\n\t\tString cc, idEleicao;\n\t\tSystem.out.println(\"Insira o CC do eleitor que pretende pesquisar: \");\n\t\tcc = sc.nextLine();\n\t\tSystem.out.println(\"Insira o ID da eleicao que pretende pesquisar: \");\n\t\tidEleicao = sc.nextLine();\n\t\t\n\t\tint check = 0;\n\t\tint tries = 0;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tans = rmiserver.pesquisaLocalVoto(cc, idEleicao);\n\t\t\t\tif(ans != null) {\n\t\t\t\t\tSystem.out.println(\"\\nCC: \"+ans.cc+\"\\nID Eleicao: \"+idEleicao+\"\\nLocal: \"+ans.nomeDep+\"Data/Hora: \"+ans.dataVoto.toString());\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Voto nao encontrado.\");\n\t\t\t\t}\n\t\t\t\tcheck = 1;\n\t\t\t} catch (RemoteException e1) {\n\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\tif(tries == 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\n\t}", "public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }", "@IgnoreMethodAuthentication\r\n\tpublic void execute() {\n\t\ttry {\r\n\t\t\tString licencaFull = SystemManager.getProperty(\"licenca.sistema\");\r\n\t\t\tlicencaFull = Criptografia.newInstance(SystemManager.getProperty(Constants.Parameters.Licenca.LICENCA_KEY)).decripto(licencaFull);\r\n\t\t\tif (licencaFull != null && licencaFull.equals(\"ENTERPRISE EDITION\")) {\r\n\t\t\t\twrite(\"ok\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tParametroLojaDAO paramDao = new ParametroLojaDAO();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString licenca = paramDao.getStringParametro(Constants.Parameters.Licenca.LICENCA_SISTEMA, empresasessao.getCodigoEmpresa(), lojasessao.getCodigoLoja());\r\n\t\t\t//SystemManager.LICENCA_SISTEMA = licenca;\r\n\t\t\t\r\n\t\t\tString dataSistemaStr = paramDao.getStringParametro(Constants.Parameters.Licenca.DATA_SISTEMA, empresasessao.getCodigoEmpresa(), lojasessao.getCodigoLoja());\r\n\t\t\t\r\n\t\t\tString dados = null;\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tdados = Criptografia.newInstance(SystemManager.getProperty(Constants.Parameters.Licenca.LICENCA_KEY)).decripto(licenca);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (dados == null || dados.trim().equals(\"\")) {\r\n\t\t\t\twriteErrorMessage(\"Sistema não licenciado!\", \"N\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Busca data do sistema \r\n\t\t\ttry {\r\n\t\t\t\tdataSistemaStr = Criptografia.newInstance(SystemManager.getProperty(Constants.Parameters.Licenca.LICENCA_KEY)).decripto(dataSistemaStr);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tdataSistemaStr = \"01/01/1900\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\t\tCalendar dataAtual = Calendar.getInstance();\r\n\t\t\t\r\n\t\t\t// Checa se houve modificacao na data do sistema\r\n\t\t\tif (dataSistemaStr != null) {\r\n\t\t\t\tCalendar dataSistema = Calendar.getInstance();\r\n\t\t\t\tdataSistema.setTime(sdf.parse(dataSistemaStr));\r\n\t\t\t\tif (dataSistema.after(dataAtual)) {\r\n\t\t\t\t\twriteErrorMessage(\"Data do sistema alterada!\", \"N\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (validarDados(dados)) {\r\n\t\t\t\twrite(\"ok\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "Reserva Obtener();", "@Override\n\tpublic void concentrarse() {\n\t\tSystem.out.println(\"Se centra en sacar lo mejor del Equipo\");\n\t\t\n\t}", "@Override\r\n /* OSINE791 - RSIS1 - Inicio */\r\n //public ExpedienteDTO asignarOrdenServicio(ExpedienteDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO) throws ExpedienteException{\r\n public ExpedienteGSMDTO asignarOrdenServicio(ExpedienteGSMDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO,String sigla) throws ExpedienteException{\r\n LOG.error(\"asignarOrdenServicio\");\r\n ExpedienteGSMDTO retorno=expedienteDTO;\r\n try{\r\n //cambiarEstado expediente \r\n \tExpedienteGSMDTO expedCambioEstado=cambiarEstadoProceso(expedienteDTO.getIdExpediente(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getEstadoProceso().getIdEstadoProceso(),null,usuarioDTO);\r\n LOG.info(\"expedCambioEstado:\"+expedCambioEstado);\r\n //update expediente\r\n PghExpediente registroDAO = crud.find(expedienteDTO.getIdExpediente(), PghExpediente.class);\r\n registroDAO.setDatosAuditoria(usuarioDTO);\r\n if(expedienteDTO.getTramite()!=null){\r\n registroDAO.setIdTramite(new PghTramite(expedienteDTO.getTramite().getIdTramite()));\r\n }else if(expedienteDTO.getProceso()!=null){\r\n registroDAO.setIdProceso(new PghProceso(expedienteDTO.getProceso().getIdProceso()));\r\n }\r\n if(expedienteDTO.getObligacionTipo()!=null){\r\n registroDAO.setIdObligacionTipo(new PghObligacionTipo(expedienteDTO.getObligacionTipo().getIdObligacionTipo()));\r\n }\r\n if(expedienteDTO.getObligacionSubTipo()!=null && expedienteDTO.getObligacionSubTipo().getIdObligacionSubTipo()!=null){\r\n registroDAO.setIdObligacionSubTipo(new PghObligacionSubTipo(expedienteDTO.getObligacionSubTipo().getIdObligacionSubTipo()));\r\n }\r\n registroDAO.setIdUnidadSupervisada(new MdiUnidadSupervisada(expedienteDTO.getUnidadSupervisada().getIdUnidadSupervisada()));\r\n crud.update(registroDAO);\r\n //inserta ordenServicio\r\n Long idLocador=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)?expedienteDTO.getOrdenServicio().getLocador().getIdLocador():null;\r\n Long idSupervisoraEmpresa=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)?expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa():null;\r\n OrdenServicioDTO OrdenServicioDTO=ordenServicioDAO.registrar(expedienteDTO.getIdExpediente(), \r\n expedienteDTO.getOrdenServicio().getIdTipoAsignacion(), expedienteDTO.getOrdenServicio().getEstadoProceso().getIdEstadoProceso(), \r\n /* OSINE791 - RSIS1 - Inicio */\r\n //codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO);\r\n codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO,sigla);\r\n /* OSINE791 - RSIS1 - Fin */\r\n LOG.info(\"OrdenServicioDTO:\"+OrdenServicioDTO.getNumeroOrdenServicio());\r\n //busca idPersonalDest\r\n PersonalDTO personalDest=null;\r\n List<PersonalDTO> listPersonalDest=null;\r\n if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)){\r\n listPersonalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null));\r\n }else if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)){\r\n listPersonalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa()));\r\n }\r\n if(listPersonalDest==null || listPersonalDest.isEmpty() || listPersonalDest.get(0).getIdPersonal()==null){\r\n throw new ExpedienteException(\"La Empresa Supervisora no tiene un Personal asignado\",null);\r\n }else{\r\n personalDest=listPersonalDest.get(0);\r\n }\r\n //inserta historico Orden Servicio\r\n EstadoProcesoDTO estadoProcesoDto=estadoProcesoDAO.find(new EstadoProcesoFilter(Constantes.IDENTIFICADOR_ESTADO_PROCESO_OS_REGISTRO)).get(0);\r\n MaestroColumnaDTO tipoHistorico=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_ORDEN_SERVICIO).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstado=historicoEstadoDAO.registrar(null, OrdenServicioDTO.getIdOrdenServicio(), estadoProcesoDto.getIdEstadoProceso(), expedienteDTO.getPersonal().getIdPersonal(), personalDest.getIdPersonal(), tipoHistorico.getIdMaestroColumna(),null,null, null, usuarioDTO); \r\n LOG.info(\"historicoEstado:\"+historicoEstado);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n retorno=ExpedienteGSMBuilder.toExpedienteDto(registroDAO);\r\n retorno.setOrdenServicio(new OrdenServicioDTO(OrdenServicioDTO.getIdOrdenServicio(),OrdenServicioDTO.getNumeroOrdenServicio()));\r\n }catch(Exception e){\r\n LOG.error(\"error en asignarOrdenServicio\",e);\r\n ExpedienteException ex = new ExpedienteException(e.getMessage(), e);\r\n throw ex;\r\n }\r\n return retorno;\r\n }", "@Override\n public Boleto anular(Boleto boleto) throws CRUDException {\n\n Boleto boletoAnular = em.find(Boleto.class, boleto.getIdBoleto());\n\n Optional op = Optional.ofNullable(boletoAnular);\n\n if (!op.isPresent()) {\n throw new CRUDException(\"No existe el Boleto\");\n }\n\n if (boletoAnular.getEstado().equals(Boleto.Estado.ANULADO)) {\n throw new CRUDException(\"El Boleto ya se encuentra anulado\");\n }\n\n //Si el Boleto esta Emitido se deben dar de bajas su contabilidad\n if (boletoAnular.getEstado().equals(Boleto.Estado.EMITIDO)) {\n System.out.println(\"Anulando Boleto:\" + boleto.getIdBoleto());\n System.out.println(\"Anulando Boleto NotaDebito:\" + boleto.getIdNotaDebito());\n System.out.println(\"Anulando Boleto IngresoCaja :\" + boleto.getIdIngresoCaja());\n boletoAnular.setEstado(Boleto.Estado.ANULADO);\n em.merge(boletoAnular);\n\n //anulamos los asientos contables de los asientos. (AD y CI)\n ejbComprobante.anularAsientosContables(boletoAnular);\n\n //anulamos las transacciones de la nota de debito\n //El proceso de Anular la transaccion de la Nota de Debito\n //llama internamente en el Procedimiento Almacenado a un proceso de anulacion \n //las transacciones del Ingreso de Caja. esto debido a mejorar el proceso y no \n //realizar un doble barrido en la tabla de transacciones de \n //la nota dede\n ejbNotaDebito.anularTransaccion(boletoAnular);\n\n //anulamos las transacciones del Ingreso de Caja\n //ejbIngresoCaja.anularTransaccion(boleto) ;\n // si esta en Pendiente solo debe cambiar el estado\n } else if (boletoAnular.getEstado().equals(Boleto.Estado.PENDIENTE)\n || boletoAnular.getEstado().equals(Boleto.Estado.CANCELADO)) {\n boletoAnular.setEstado(Boleto.Estado.ANULADO);\n em.merge(boletoAnular);\n //Si el Boleto es Void, se puede volver a ingresar el boleto.\n }\n return boletoAnular;\n\n }", "public interface AccessSessionLocal\n extends javax.ejb.EJBLocalObject\n{\n /**\n * Business Method\n */\n public boolean authenticateUser( java.security.cert.X509Certificate[] certificates ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public org.emayor.servicehandling.interfaces.ServiceSessionLocal[] getAllServiceSessions( ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public org.emayor.servicehandling.interfaces.ServiceSessionLocal getServiceSession( java.lang.String ssid ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public java.lang.String startServiceSession( java.lang.String serviceId,boolean isForwarded,java.lang.String xmlDoc,java.lang.String docSig ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public java.lang.String startServiceSession( java.lang.String serviceId,java.lang.String requestDocument ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public boolean stopServiceSession( java.lang.String ssid ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public boolean stopAllServiceSessions( ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public org.emayor.servicehandling.kernel.ServiceInfo[] listAvailableServices( ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public boolean stop( ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public org.eMayor.PolicyEnforcement.C_UserProfile getUserProfile( ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public java.lang.String getSessionId( ) throws org.emayor.servicehandling.kernel.SessionException;\n\n /**\n * Business Method\n */\n public java.lang.String getUserId( ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public void setUserId( java.lang.String userId ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public java.util.Date getStartDate( ) throws org.emayor.servicehandling.kernel.SessionException;\n\n}", "public void start() {\n Date dataCorr;\n\n try { // prova ad eseguire il codice\n for (int codConto : codiciConto) {\n quanti++;\n dataCorr = dataInizio;\n while (Lib.Data.isPrecedenteUguale(dataFine, dataCorr)) {\n creaAddebitiGiornoConto(dataCorr, codConto);\n dataCorr = Lib.Data.add(dataCorr, 1);\n\n /* interruzione nella superclasse */\n if (super.isInterrompi()) {\n break;\n }// fine del blocco if\n\n }// fine del blocco while\n }// fine del blocco for\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public void aprova(Orcamento orcamento) {\n\t\tthrow new RuntimeException(\"Orçamento já está em estado finalizado e não pode voltar para aprovado\");\n\t}", "public void run() {\n\t\tMzsCore core = DefaultMzsCore.newInstanceWithoutSpace();\n\t\tcapi = new Capi(core);\n\t\tint anzahlDefekte = (int) (anzahl * fehlerrate);\n\t\tTransactionReference transET = null;\n\t\tTransactionReference transAutos = null;\n\t\tContainerReference idContainer = null;\n\t\tArrayList<Long> ids = null;\n\t\ttry {\n\t\t\ttransAutos = capi.createTransaction(MzsConstants.TransactionTimeout.INFINITE, Config.locAutos);\n\t\t\ttransET = capi.createTransaction(MzsConstants.TransactionTimeout.INFINITE, Config.locET);\n\t\t\tidContainer = capi.lookupContainer(ContainerNames.ID, Config.locAutos, MzsConstants.RequestTimeout.TRY_ONCE, transAutos);\n\t\t\tids = capi.read(idContainer,\n\t\t\t\t\tFifoCoordinator.newSelector(MzsConstants.Selecting.COUNT_ALL),\n\t\t\t\t\tMzsConstants.RequestTimeout.ZERO, transAutos);\n\t\t} catch (MzsCoreException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\t\tthis.id = ids.get(ids.size()-1);\n\t\t}catch(Exception e){\n\t\t\tthis.id = 1;\n\t\t\te.printStackTrace();\n\t\t}\n\t\tlong entryID = id;\n\t\ttry {\n\t\t\tcapi.write(capi.lookupContainer(ContainerNames.ID,Config.locAutos,MzsConstants.RequestTimeout.TRY_ONCE,transAutos), new Entry(id));\n\t\t} catch (MzsCoreException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tfor (int zaehler = 1; zaehler <= anzahl; zaehler++) {\n\t\t\t// Warte 1-3 Sekunden\n\n\t\t\t// Bastel neues Teil\n\t\t\tentryID++;\n\t\t\tboolean defekt = false;\n\t\t\tif (zaehler <= anzahlDefekte)\n\t\t\t\tdefekt = true;\n\t\t\t\t\n\n\t\t\tSystem.err.println(\"Got component id: \" + entryID);\n\n\n\t\t\tEinzelteil teil = null;\n\n\t\t\t// Erstellung eines neuen Objekts von einem generischen Datentypen\n\t\t\ttry {\n\t\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\t\tClass[] argsC = new Class[] { long.class, long.class,\n\t\t\t\t\t\tboolean.class };\n\t\t\t\tConstructor<? extends Einzelteil> constructor = type\n\t\t\t\t\t\t.getConstructor(argsC);\n\t\n\t\t\t\tteil = constructor.newInstance(new Object[] { entryID, id,\n\t\t\t\t\t\tdefekt });\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(\"Houston, we have a problem ...\");\n\t\t\t}\n\n\t\t\tSystem.err.println(\"Created new \" + type.getName());\n\t\t\tString containerName = \"\";\n\t\t\tif (type.getName().contains(\"einzelteile.Achse\")) {\n\t\t\t\tcontainerName = ContainerNames.ACHSEN;\n\t\t\t} else if (type.getName().contains(\"einzelteile.Bodenplatte\")) {\n\t\t\t\tcontainerName = ContainerNames.PLATTEN;\n\t\t\t} else if (type.getName().contains(\"einzelteile.Karosserie\")) {\n\t\t\t\tcontainerName = ContainerNames.KAROSSERIE;\n\t\t\t} else if (type.getName().contains(\"einzelteile.Lenkrad\")) {\n\t\t\t\tcontainerName = ContainerNames.LENKRAD;\n\t\t\t} else if (type.getName().contains(\"einzelteile.ReifenPaar\")){\n\t\t\t\tcontainerName = ContainerNames.REIFEN;\n\t\t\t} else if (type.getName().contains(\"einzelteile.Sitz\")){\n\t\t\t\tcontainerName = ContainerNames.SITZE;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tcapi.write(capi.lookupContainer(containerName,Config.locET,MzsConstants.RequestTimeout.TRY_ONCE,transET), new Entry(teil));\n\t\t\t\tcapi.write(capi.lookupContainer(ContainerNames.ID,Config.locAutos,MzsConstants.RequestTimeout.TRY_ONCE,transAutos), new Entry(entryID));\n\t\t\t} catch (MzsCoreException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tcapi.commitTransaction(transET);\n\t\t\tcapi.commitTransaction(transAutos);\n\t\t} catch (MzsCoreException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected void exibirPacientes(){\n System.out.println(\"--- PACIENTES CADASTRADOS ----\");\r\n String comando = \"select * from paciente order by id\";\r\n ResultSet rs = cb.buscaDados(comando);\r\n try{\r\n while(rs.next()){\r\n int id = rs.getInt(\"id\");\r\n String nome = rs.getString(\"nomepaciente\");\r\n System.out.println(\"[\"+id+\"] \"+nome);\r\n }\r\n }\r\n catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "@Override\n void procesarSalida(Simulacion s, Evento e) {\n e.consulta.estadistEjec_Sentencias.tiempoSalidaModulo = e.tiempo;\n e.consulta.estadistEjec_Sentencias.tiempoEnModulo = e.tiempo - e.consulta.estadistEjec_Sentencias.tiempoLlegadaModulo;\n Evento evento = new Evento(e.consulta);\n evento.tipoE = Evento.TipoEvento.ENTRADA;\n evento.modulo = Evento.TipoModulo.ADM_CONEXIONES;\n evento.tiempo = e.tiempo;\n numServOcupados--;\n s.listaE.add(evento);\n\n if (!colaC.isEmpty()) { //Si despues de una salida hay algo en cola\n Consulta consulta = colaC.remove();\n consulta.estadistEjec_Sentencias.tiempoSalidaCola = e.tiempo - consulta.estadistEjec_Sentencias.tiempoLlegadaModulo;\n s.estadisticasT.promedioColaES += colaC.size();\n Evento eventoS = new Evento(consulta);\n eventoS.tipoE = Evento.TipoEvento.SALIDA;\n eventoS.modulo = Evento.TipoModulo.EJEC_SENTENCIAS;\n ejecucionSentencia(consulta);\n eventoS.tiempo = e.tiempo + tiempoEjecucion;\n s.listaE.add(eventoS);\n numServOcupados++;\n }\n\n }", "public void recargarDatos( ) {\n\t\tPAC_SHWEB_PROVEEDORES llamadaProv = null;\n\t\ttry {\n\t\t\tllamadaProv = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaCom = null;\n\n\t\ttry {\n\t\t\trespuestaCom = llamadaProv.ejecutaPAC_SHWEB_PROVEEDORES__F_COMUNICADOS_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t// Mostramos el estado del expediente\n\t\tPAC_SHWEB_PROVEEDORES llamada = null;\n\t\ttry {\n\t\t\tllamada = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuesta = null;\n\t\ttry {\n\t\t\trespuesta = llamada.ejecutaPAC_SHWEB_PROVEEDORES__F_ESTADO_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t\tMap<String, Object> retorno = new HashMap<String, Object>(respuesta);\n\n\t\t\tUI.getCurrent().getSession().setAttribute(\"estadoExpediente\",retorno.get(\"ESTADO\").toString());\n\t\t\t\n\t\t\tprovPantallaConsultaExpedienteInicial.setCaption(\"GESTIÓN DEL EXPEDIENTE Nº \" + UI.getCurrent().getSession().getAttribute(\"expediente\")\n\t\t\t\t\t+ \" ( \" + \n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\") + \" ) \");\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\t\n\t\t\n\t\t// Maestro comunicados\n\n\t\tWS_AMA llamadaAMA = null;\n\t\ttry {\n\t\t\tllamadaAMA = new WS_AMA(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaMaestro = null;\n\t\t\n\t\t//System.out.println(\"Llamammos maestro comunicados: \" + UI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1));;\n\t\ttry {\n\t\t\t// pPUSUARIO, pORIGEN, pTPCOMUNI, pTPUSUARIO, pESTADO)\n\t\t\t\n\t\t\trespuestaMaestro = llamadaAMA.ejecutaWS_AMA__MAESTRO_COMUNICADOS(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnull,\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\").toString()\n\t\t\t\t\t);\t\t\t\n\n\t\t\t\n\t\t\tMap<String, Object> retornoMaestro = new HashMap<String, Object>(respuestaMaestro);\n\t\t\tList<Map> valorMaestro = (List<Map>) retornoMaestro.get(\"COMUNICADOS\");\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",valorMaestro);\n\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",null);\n\t\t}\n\t\t\n\t\t// \t\n\t\t\n\t\t\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\t\t/*if ( !ValidarComunicado.EsValido(\"CA\") && !ValidarComunicado.EsValido(\"FT\") ) {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(true);\n\n\t\t\t\n\t\t\t\n\t\t}*/\n\t\t// Mostramos botonera de cerrar expediente\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\n\t}", "@WebService\npublic interface BLFacade {\n\t \n\n\t/**\n\t * This method creates a question for an event, with a question text and the minimum bet\n\t * \n\t * @param event to which question is added\n\t * @param question text of the question\n\t * @param betMinimum minimum quantity of the bet\n\t * @return the created question, or null, or an exception\n\t * @throws EventFinished if current data is after data of the event\n \t * @throws QuestionAlreadyExist if the same question already exists for the event\n\t */\n\t@WebMethod Question createQuestion(Event event, String question, double betMinimum) throws EventFinished, QuestionAlreadyExist;\n\t\n\t\n\t/**\n\t * This method retrieves the events of a given date \n\t * \n\t * @param date in which events are retrieved\n\t * @return collection of events\n\t */\n\t@WebMethod public ArrayList<Event> getEvents(LocalDate date);\n\t\n\t/**\n\t * This method retrieves from the database the dates a month for which there are events\n\t * \n\t * @param date of the month for which days with events want to be retrieved \n\t * @return collection of dates\n\t */\n\t@WebMethod public ArrayList<LocalDate> getEventsMonth(LocalDate date);\n\t\n\t/**\n\t * This method calls the data access to initialize the database with some events and questions.\n\t * It is invoked only when the option \"initialize\" is declared in the tag dataBaseOpenMode of resources/config.xml file\n\t */\t\n\t@WebMethod public void initializeBD();\n\t\n\t/**\n\t * Metodo honek erabiltzaile izen eta pasahitz bat jasota, bi hauek dituen pertsona bat bilatzen du datu basean.\n\t * Aurkitzen badu itzuli egiten du bestela null balioa.\n\t * @param erabiltzaileIzena \n\t * @param pasahitza\n\t * @return \n\t */\n\t@WebMethod public Pertsona isLogin(String erabiltzaileIzena, String pasahitza);\n\t\n\t/**\n\t * Metodo honek, erabiltzaile izen gisa erabiltzaileIzena duen Pertsonarik ez badago datu basean, sarrerako datuekin\n\t * bat sortu eta datu-basean gehitzen du\n\t * @param izena\n\t * @param abizena1\n\t * @param abizena2\n\t * @param erabiltzaileIzena\n\t * @param pasahitza\n\t * @param telefonoa\n\t * @param emaila\n\t * @param jaiotzeData\n\t * @param mota\n\t * @return\n\t * @throws UserAlreadyExist\n\t */\n\t@WebMethod public Pertsona register(String izena, String abizena1, String abizena2, String erabiltzaileIzena, String pasahitza, String telefonoa, String emaila, LocalDate jaiotzeData, String mota) throws UserAlreadyExist;\n\t\n\t/**\n\t * Metodo honek description eta eventDate dituen gertaerarik ez badago datu basean, sortu eta gehitu egiten du\n\t * @param description\n\t * @param eventDate\n\t * @throws EventAlreadyExist\n\t */\n\t@WebMethod public void createEvent(String description, LocalDate eventDate) throws EventAlreadyExist;\n\t\n\t@WebMethod public ArrayList<Question> getQuestions(Event event);\n\t\n\t@WebMethod Pronostikoa createPronostic(Question question, String description, double kuota) throws PronosticAlreadyExist;\n\t\n\t@WebMethod public void emaitzaIpini(Question question, Pronostikoa pronostikoa);\n\t\n\t@WebMethod public Bezeroa apustuaEgin(ArrayList<Pronostikoa> pronostikoak, double a, Bezeroa bezero);\n\t\n\t@WebMethod public Bezeroa deleteApustua(Apustua a) throws EventFinished;\n\t\n\t@WebMethod public Bezeroa diruaSartu(double u, Bezeroa bezero);\n\t\n\t@WebMethod public void ezabatuGertaera(Event event);\n\t\n\t@WebMethod public Bezeroa getBezeroa(String ErabiltzaileIzena);\n\t\n\t@WebMethod public Langilea getLangilea(String ErabiltzaileIzena);\n\t\n\t@WebMethod public ArrayList<Bezeroa> getBezeroak(String username, Bezeroa bezeroa);\n\t\n\t@WebMethod public Bezeroa bidaliMezua(Bezeroa nork, Bezeroa nori, String mezua, String gaia, String mota, double zenbatApostatu, double hilabeteanZenbat, double zenbatErrepikatuarentzat);\n\n\t@WebMethod public ArrayList<Mezua> getMezuak(Bezeroa bezeroa);\n\t\n\t@WebMethod public void mezuaIrakurri(Mezua mezua);\n\t\n\t@WebMethod public void removeMezua(Mezua mezua);\n\t\n\t@WebMethod public Bezeroa eguneratuEzarpenak(Bezeroa b, double komisioa, boolean publikoa);\n\t\n\t@WebMethod public void errepikatu(Bezeroa nork, Bezeroa nori, double apustatukoDena, double hilabetekoMax, double komisioa);\n\t\n\t@WebMethod public ArrayList<PronostikoaContainer> getPronostikoak(Apustua a);\n\t\n\t@WebMethod public ArretaElkarrizketa arretaMezuaBidali(ArretaElkarrizketa elkarrizketa, String mezua, boolean langileari);\n\t\n\t@WebMethod public ArretaElkarrizketa bezeroaEsleitu(Langilea langilea);\n\t\n\t@WebMethod public ArretaElkarrizketa arretaElkarrizketaSortu(Bezeroa bezeroa, String gaia, String mezua);\n\t\n\t@WebMethod public BezeroaContainer getBezeroaContainer(Bezeroa b);\n\t\n\t@WebMethod public void geldituElkarrizketa(ArretaElkarrizketa ae);\n\t\n\t@WebMethod public void amaituElkarrizketa(ArretaElkarrizketa ae);\n\t\n\t@WebMethod public void gehituPuntuazioa(ArretaElkarrizketa l, Integer x);\n\t\n\t@WebMethod public void eguneratuErrepikapenak();\n\n\t@WebMethod public ArrayList<Langilea> getLangileak();\n\t\n\t@WebMethod public ArrayList<ErrepikatuakContainer> getErrepikatzaileak(Bezeroa bezeroa);\n\t \n\t@WebMethod public void jarraitzeariUtzi(Errepikapena errepikapena);\n\t\t \n\t@WebMethod public ArrayList<ErrepikatuakContainer> getErrepikapenak(Bezeroa bezeroa);\n\t\n\t@WebMethod public ArretaElkarrizketa getArretaElkarrizketa(ArretaElkarrizketa ae);\n}", "private void RealizarProtocoloDeVendaDeCasasEHoteis(int idLugar) throws Exception {\n Lugar lugar = this.tabuleiro.getLugarById(idLugar);\n\n int nivelDoTerreno = lugar.getNivel();\n if (nivelDoTerreno == 0) {\n throw new Exception(\"Terreno nao possui casa\");\n } else if (nivelDoTerreno == 1) {\n int valorCasaVenda = this.banco.VenderCasa(idLugar);\n lugar.setPrecoAluguel(this.tabuleiro.getPrecoAluguelSemCasa(idLugar));\n lugar.diminuirNumeroDeCasas();\n lugar.diminuirNivel();\n this.banco.addCasas();\n this.listaJogadores.get(jogadorAtual()).diminuirQuantidadeDeCasas();\n this.listaJogadores.get(jogadorAtual()).addDinheiro(valorCasaVenda);\n if (this.listaJogadores.get(jogadorAtual()).getQuantidadeDeCasas() == 0 && this.listaJogadores.get(jogadorAtual()).getQuantidadeDeHoteis() == 0) {\n this.listaJogadores.get(jogadorAtual()).removerComandoSell();\n }\n } else if (nivelDoTerreno == 2) {\n int valorCasaVenda = this.banco.VenderCasa(idLugar);\n lugar.setPrecoAluguel(this.tabuleiro.getPrecoAluguelUmaCasa(idLugar));\n lugar.diminuirNumeroDeCasas();\n lugar.diminuirNivel();\n this.banco.addCasas();\n this.listaJogadores.get(jogadorAtual()).diminuirQuantidadeDeCasas();\n this.listaJogadores.get(jogadorAtual()).addDinheiro(valorCasaVenda);\n } else if (nivelDoTerreno == 3) {\n int valorCasaVenda = this.banco.VenderCasa(idLugar);\n lugar.setPrecoAluguel(this.tabuleiro.getPrecoAluguelDuasCasas(idLugar));\n lugar.diminuirNumeroDeCasas();\n lugar.diminuirNivel();\n this.banco.addCasas();\n this.listaJogadores.get(jogadorAtual()).diminuirQuantidadeDeCasas();\n this.listaJogadores.get(jogadorAtual()).addDinheiro(valorCasaVenda);\n\n } else if (nivelDoTerreno == 4) {\n int valorCasaVenda = this.banco.VenderCasa(idLugar);\n lugar.setPrecoAluguel(this.tabuleiro.getPrecoAluguelTresCasas(idLugar));\n lugar.diminuirNumeroDeCasas();\n lugar.diminuirNivel();\n this.banco.addCasas();\n this.listaJogadores.get(jogadorAtual()).diminuirQuantidadeDeCasas();\n this.listaJogadores.get(jogadorAtual()).addDinheiro(valorCasaVenda);\n\n } else if (nivelDoTerreno == 5) {\n if (this.banco.getCasas() < 4) {\n throw new Exception(\"Not enough houses on the bank\");\n }\n int valorCasaVenda = this.banco.VenderCasa(idLugar);\n lugar.setPrecoAluguel(this.tabuleiro.getPrecoAluguelQuatroCasas(idLugar));\n this.banco.BancoPerder4Casas();\n lugar.addNumeroDeCasas();\n lugar.addNumeroDeCasas();\n lugar.addNumeroDeCasas();\n lugar.addNumeroDeCasas();\n lugar.diminuirNivel();\n this.banco.addHoteis();\n this.listaJogadores.get(jogadorAtual()).diminuirQuantidadeDeHoteis();\n this.listaJogadores.get(jogadorAtual()).addQuantidadeDeCasas();\n this.listaJogadores.get(jogadorAtual()).addQuantidadeDeCasas();\n this.listaJogadores.get(jogadorAtual()).addQuantidadeDeCasas();\n this.listaJogadores.get(jogadorAtual()).addQuantidadeDeCasas();\n this.listaJogadores.get(jogadorAtual()).addDinheiro(valorCasaVenda);\n\n }\n }", "public void aplicarDescuento();", "static void executa() {\n\t\tlistaProdutos = LoaderUtils.loadProdutos();\n\n\t\t// imprime lista de produtos cadastrados\n\t\tSystem.out.println(\"----------------------------------------------\");\n\t\tloadEstoque();\n\t\t\n\t\t// imprime estoque\n\t\tSystem.out.println(\"----------------------------------------------\");\n\t\tprintEstoque(listaEstoque);\n\t}", "public void cargarSecuencia(FacturaProveedorSRI facturaProveedorSRI, PuntoDeVenta puntoDeVenta)\r\n/* 277: */ throws ExcepcionAS2\r\n/* 278: */ {\r\n/* 279:280 */ AutorizacionDocumentoSRI autorizacionDocumentoSRI = null;\r\n/* 280:283 */ if (puntoDeVenta != null) {\r\n/* 281:284 */ autorizacionDocumentoSRI = this.servicioDocumento.cargarDocumentoConAutorizacion(getFacturaProveedorSRI().getDocumento(), puntoDeVenta, facturaProveedorSRI\r\n/* 282:285 */ .getFechaEmisionRetencion());\r\n/* 283: */ }\r\n/* 284:287 */ if ((Integer.parseInt(facturaProveedorSRI.getNumeroRetencion()) == 0) || (\r\n/* 285:288 */ (facturaProveedorSRI.getDocumento() != null) && (facturaProveedorSRI.getDocumento().isIndicadorDocumentoElectronico()) && \r\n/* 286:289 */ (!facturaProveedorSRI.isTraCorregirDatos())))\r\n/* 287: */ {\r\n/* 288:290 */ String numero = this.servicioSecuencia.obtenerSecuencia(getFacturaProveedorSRI().getDocumento().getSecuencia(), facturaProveedorSRI\r\n/* 289:291 */ .getFechaEmisionRetencion());\r\n/* 290: */ \r\n/* 291:293 */ facturaProveedorSRI.setNumeroRetencion(numero);\r\n/* 292:294 */ facturaProveedorSRI.setAutorizacionRetencion(autorizacionDocumentoSRI.getAutorizacion());\r\n/* 293: */ }\r\n/* 294: */ }", "public void cargaDatosInicialesSoloParaModificacionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n selectAuxiliarParaAsignacionModificacion = cntEntidadesService.listaDeAuxiliaresPorEntidad(selectedEntidad);\n //Obtien Ajuste Fin\n\n //Activa formulario para automatico modifica \n switch (selectedEntidad.getNivel()) {\n case 1:\n swParAutomatico = true;\n numeroEspaciador = 200;\n break;\n case 2:\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciador = 200;\n break;\n case 3:\n swParAutomatico = false;\n numeroEspaciador = 1;\n break;\n default:\n break;\n }\n\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n }", "public void firstTest() throws SQLException, ServicesException{\n Connection conn=getConnection();\n Statement stmt=conn.createStatement();\n Services servicios = Services.getInstance(\"h2-applicationconfig.properties\");\n PrestamoUsuario prestamo =null;\n try {\n //Insercion en BD\n stmt.execute(\"INSERT INTO ROLES(rol) values ('estudiante')\");\n stmt.execute(\"INSERT INTO USUARIOS (id,nombre,correo,contrasena) VALUES (124,'PEDRO PEREZ','pedro.perez@mail.escuelaing.edu.co','1test1')\");\n stmt.execute(\"INSERT INTO ROLES_USUARIOS(USUARIOS_id,ROLES_rol) values (124,'estudiante')\");\n stmt.execute(\"INSERT INTO MODELOS (nombre,clase,vidaUtil,valor,seguro,foto) values ('modelo1','abcd',100,200000,true,null)\"); \n stmt.execute(\"INSERT INTO EQUIPOS (serial,nombre,placa,marca,descripcion,estado,subestados,proveedor,Modelos_nombre) VALUES (123,'Multimetro',456,'falsa','Equipo funcional y de buena calidad','activo','almacen','Leonardo Herrera','modelo1')\");\n stmt.execute(\"INSERT INTO PRESTAMOS (USUARIOS_id,EQUIPOS_serial,fechaExpedicion,fechaVencimiento,tipoPrestamo) VALUES (124,123,'2015-01-01 00:00:00',null,'prestamo diario')\");\n conn.commit();\n conn.close(); \n } catch (SQLException ex) {\n Logger.getLogger(DevolucionTest.class.getName()).log(Level.SEVERE, null, ex);\n conn.rollback();\n conn.close();\n }\n Set<PrestamoUsuario> prestamos = servicios.loadPrestamos();\n for (PrestamoUsuario p:prestamos){\n \n }\n }", "@Override\r\n public void salir() {\n }", "@Test\n public void testConfirmarCompra() {\n System.out.println(\"confirmarCompra\");\n ControleCompra instance = new ControleCompra();\n int id = 1;\n String nome = \"Adidas\";\n float total = 150;\n Fornecedor forn = fornecedor;\n Date d = new Date();\n Calendar cal = new GregorianCalendar();\n cal.setTime(d);\n Date dataCompra = d;\n Date dataRecebimento = d;\n instance.confirmarCompra(id, nome, total, forn, dataCompra, dataRecebimento);\n }", "public void executar() {\n\t\tSystem.out.println(dao.getListaPorNome(\"abacatão\"));\n\t}", "public static void main(String[] args){\n\tEntityManagerFactory fabrica = \n\t\t\tPersistence.createEntityManagerFactory(\"CLIENTE_ORACLE\");\n\tEntityManager em = fabrica.createEntityManager();\n\t\t\t//Obter uma instancia entitymanager\n\t\n\t//Instanciar uma cerveja/refrigerante.\n\tCerveja cerv = new Cerveja(0, \"Krill\", 0.05f, 1, Calendar.getInstance(),\n\tnew GregorianCalendar(2020, Calendar.JANUARY,1), TipoCerveja.PILSEN, null, false);\n\t\n\t// Intanciar um refri\n\tRefrigerante refri = new Refrigerante(0, \"Tubaina\", SaborRefrigerante.COLA, Calendar.getInstance(), 0.05f, null);\n\t\n\t//Cadastrar a cerveja e o refri\n\tem.persist(cerv);\n\tem.persist(refri);\n\t\n\t//Transaçao\n\t//Inicializa uma transação\n\tem.getTransaction().begin();\n\tem.getTransaction().commit();\n\tem.close();\n\t\n\tSystem.out.println(\"Cerveja e refrigerante registrado\");\n\tSystem.exit(0);;\n\n}", "@Test\r\n\tpublic void CT05ConsultarLivroComNomeNulo() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tUsuario usuario;\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comNome_nulo();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"Nome inválido\", e.getMessage());\r\n\t\t}\r\n\t}", "public ConfiguracionStatelessEJB(String orden){\n\t\tthis.ordenpordefecto = orden;\n\t}", "public void sincronizza() {\n boolean abilita;\n\n super.sincronizza();\n\n try { // prova ad eseguire il codice\n\n /* abilitazione bottone Esegui */\n abilita = false;\n if (!Lib.Data.isVuota(this.getDataInizio())) {\n if (!Lib.Data.isVuota(this.getDataFine())) {\n if (Lib.Data.isSequenza(this.getDataInizio(), this.getDataFine())) {\n abilita = true;\n }// fine del blocco if\n }// fine del blocco if\n }// fine del blocco if\n this.getBottoneEsegui().setEnabled(abilita);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "@Override\r\n\tpublic void realizarTransacción() {\n\t\tSystem.out.println(\"Transaccion en progreso\");\r\n\t}", "public void ejbPassivate() {\n testAllowedOperations(\"ejbPassivate\");\n }", "public void inativarMovimentacoes() {\n\n\t\ttry {\n\n\t\t\tif (((auxMovimentacao.getDataMovimentacao())\n\t\t\t\t\t.before(permitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao()))\n\t\t\t\t\t|| (auxMovimentacao.getDataMovimentacao()).equals(\n\t\t\t\t\t\t\tpermitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao())\n\t\t\t\t\t) {\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.MOVIMENTACOES_ANTERIORES);\n\t\t\t} else {\n\n\t\t\t\tDate dataFinal = auxMovimentacao.getDataMovimentacao();\n\t\t\t\tCalendar calendarData = Calendar.getInstance();\n\t\t\t\tcalendarData.setTime(dataFinal);\n\t\t\t\tcalendarData.add(Calendar.DATE, -1);\n\t\t\t\tDate dataInicial = calendarData.getTime();\n\n\t\t\t\tMovimentacao mov = new Movimentacao();\n\t\t\t\tmov = (Movimentacao) movimentacaoAlunoDAO.listarTodos(Movimentacao.class,\n\t\t\t\t\t\t\" a.dataMovimentacao = (select max(b.dataMovimentacao) \"\n\t\t\t\t\t\t\t\t+ \" from Movimentacao b where b.alunoTurma = a.alunoTurma) \"\n\t\t\t\t\t\t\t\t+ \" and a.status is true and a.alunoTurma.status = true and dataMovimentacaoFim = null and a.alunoTurma = \"\n\t\t\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId())\n\t\t\t\t\t\t.get(0);\n\n\t\t\t\tmov.setControle(false);\n\t\t\t\tmov.setDataMovimentacaoFim(dataInicial);\n\t\t\t\tmovimentacaoService.inserirAlterar(mov);\n\n\t\t\t\tAlunoTurma aluno = new AlunoTurma();\n\t\t\t\taluno = daoAlunoTurma.buscarPorId(AlunoTurma.class, movimentacao.getAlunoTurma().getId());\n\t\t\t\taluno.setControle(0);\n\t\t\t\t\n\n\t\t\t\tauxMovimentacao.setAlunoTurma(movimentacao.getAlunoTurma());\n\t\t\t\tauxMovimentacao.setStatus(true);\n\t\t\t\tauxMovimentacao.setControle(false);\n\n\t\t\t\tmovimentacaoService.inserirAlterar(auxMovimentacao);\n\t\t\t\t\n\t\t\t\tif(auxMovimentacao.getSituacao()==5){\n//\t\t\t\t\t\n//\t\t\t\t\tCurso cursoAluno = new Curso();\n//\t\t\t\t\tcursoAluno = daoCurso.buscarPorId(Curso.class, auxMovimentacao.getAlunoTurma().getTurma().getCurso().getId());\n\t\t\t\t\t\n\t\t\t\t\taluno.setSituacao(5);\n\t\t\t\t\taluno.setLiberado(false);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t\t\n\t\t\t\t\t//liberar para responder o questionário\n\t\t\t\t\tAluno alunoResponde = new Aluno(); \n\t\t\t\t\talunoResponde = daoAluno.buscarPorId(Aluno.class, aluno.getAluno().getId());\n\t\t\t\t\t \n\t\t\t\t // email.setCursos(auxMovimentacao.getAlunoTurma().getTurma().getCurso());\n\t\t\t\t\t//email.setTurma(auxMovimentacao.getAlunoTurma().getTurma());\n\t\t\t\t\temail.setEnviado(false);\n\t\t\t\t\temail.setStatus(true);\n\t\t\t\t\temail.setAlunoTurma(auxMovimentacao.getAlunoTurma());\n\t\t\t\t\t\n\t\t\t\t\t//email.setAluno(alunoResponde);\n\t\t\t\t\temailService.inserirAlterar(email);\n\t\t\t\t\t//enviar o email para responder \n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\taluno.setSituacao(0);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t}\n\t\t\t\taluno = new AlunoTurma();\n\t\t\t\temail = new Email();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tFecharDialog.fecharDialogAlunoCursoEditar();\n\t\t\t\tFecharDialog.fecharDialogAlunoEditarCurso();\n\t\t\t\tFecharDialog.fecharDialogAlunoTrancamento();\n\t\t\t\talterar(movimentacao);\n\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\t\t\tauxMovimentacao = new Movimentacao();\n\n\t\t\t\talunoTurmaService.update(\" AlunoTurma set permiteCadastroCertificado = 2 where id = \"\n\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId());\n\n\t\t\t\n\t\t\t\tcriarNovoObjetoAluno();\n\t\t\t\tatualizarListas();\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tExibirMensagem.exibirMensagem(Mensagem.ERRO);\n\t\t}\n\n\t}", "private void grabarProyectoCarrerasOferta() {\r\n try {\r\n if (!sessionProyecto.getEstadoActual().getCodigo().equalsIgnoreCase(EstadoProyectoEnum.INICIO.getTipo())) {\r\n return;\r\n }\r\n for (ProyectoCarreraOferta proyectoCarreraOferta : sessionProyecto.getCarrerasSeleccionadasTransfer()) {\r\n Carrera c = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n List<ProyectoCarreraOferta> proyectoCarreraOfertas = proyectoCarreraOfertaService.buscar(\r\n new ProyectoCarreraOferta(sessionProyecto.getProyectoSeleccionado(), null, null, Boolean.TRUE));\r\n \r\n Long pcoId = devuelveProyectoCarreraId(proyectoCarreraOfertas, proyectoCarreraOferta);\r\n proyectoCarreraOferta = proyectoCarreraOfertaService.buscarPorId(new ProyectoCarreraOferta(pcoId));\r\n if (proyectoCarreraOferta == null) {\r\n proyectoCarreraOferta = new ProyectoCarreraOferta(sessionProyecto.getProyectoSeleccionado(), c.getId(), sessionProyecto.getOfertaAcademicaSeleccionada().getId(),\r\n Boolean.TRUE);\r\n if (contieneCarrera(proyectoCarreraOfertas, proyectoCarreraOferta) == false) {\r\n proyectoCarreraOfertaService.guardar(proyectoCarreraOferta);\r\n this.grabarIndividuoPCO(proyectoCarreraOferta);\r\n logDao.create(logDao.crearLog(\"ProyectoCarreraOferta\", proyectoCarreraOferta.getId() + \"\", \"CREAR\", \"Carrera=\"\r\n + proyectoCarreraOferta.getCarreraId() + \"|Oferta=\" + proyectoCarreraOferta.getOfertaAcademicaId() + \"|Proyecto= \"\r\n + proyectoCarreraOferta.getProyectoId().getId(), sessionUsuario.getUsuario()));\r\n }\r\n }\r\n proyectoCarreraOferta.setEsActivo(true);\r\n proyectoCarreraOfertaService.actualizar(proyectoCarreraOferta);\r\n logDao.create(logDao.crearLog(\"ProyectoCarreraOferta\", proyectoCarreraOferta.getId() + \"\", \"EDITAR\", \"Carrera=\"\r\n + proyectoCarreraOferta.getCarreraId() + \"|Oferta=\" + proyectoCarreraOferta.getOfertaAcademicaId()\r\n + \"|Proyecto= \" + proyectoCarreraOferta.getProyectoId().getId(), sessionUsuario.getUsuario()));\r\n }\r\n } catch (Exception e) {\r\n LOG.info(e.getMessage());\r\n }\r\n }", "private boolean solicitarAutorizacionCxC(int intCodEmp, int intCodLoc, int intCodCot){\n boolean blnRes=false;\n try{\n java.sql.Connection conLoc;\n conLoc=DriverManager.getConnection(objParSis.getStringConexion(),objParSis.getUsuarioBaseDatos(),objParSis.getClaveBaseDatos());\n if(conLoc!=null){\n int EstAut = 1;\n EstAut = objAutPrg.checkCtlsCot(\"tbm_cabautcotven\", \"tbm_detautcotven\",intCodEmp,intCodLoc, intCodCot, conLoc,true);\n switch (EstAut) {\n case 1: // Todo Correcto\n //System.out.println(\"No necesita autorizaciones....\");\n blnRes=true;\n break;\n case 2:\n //System.out.println(\"Autorizacion....\");\n conLoc.setAutoCommit(false);\n \n if (objAutPrg.insertarCabDetAut(conLoc, intCodEmp, intCodLoc, intCodCot, 3)) {\n if(colocarCotizacionComoNecesitaAutorizacion(conLoc, intCodEmp, intCodLoc, intCodCot)){\n conLoc.commit();\n blnRes=true;\n }else{conLoc.rollback();}\n } else { conLoc.rollback();}\n \n break; \n };\n }\n \n }\n catch(Exception Evt){ \n objUti.mostrarMsgErr_F1(this, Evt);\n } \n return blnRes;\n }", "@PostConstruct\n\tpublic void inicia() {\n\t\t\n\t\tinicializaBD();\n\t\tcontrolPrincipal.inicia();\n\t}" ]
[ "0.62473017", "0.6118646", "0.60525715", "0.60170615", "0.6016947", "0.6015204", "0.5990267", "0.5945225", "0.59263813", "0.59006315", "0.586391", "0.58629686", "0.5860923", "0.58541286", "0.5823571", "0.5741638", "0.57288766", "0.57220244", "0.57192785", "0.5715607", "0.5696468", "0.5694335", "0.5692354", "0.5685586", "0.5681292", "0.5677063", "0.5675642", "0.567226", "0.5657139", "0.5656977", "0.5656683", "0.5655059", "0.56506485", "0.56493783", "0.56438327", "0.56405616", "0.56211984", "0.56162167", "0.56153023", "0.56153023", "0.5611621", "0.5607219", "0.5600199", "0.55879045", "0.5582256", "0.5581365", "0.55756474", "0.55652386", "0.55638963", "0.5559237", "0.5556463", "0.55564326", "0.55478734", "0.5538898", "0.55373764", "0.55309695", "0.5514123", "0.5508334", "0.55077845", "0.5504729", "0.55021477", "0.5493281", "0.5492977", "0.54877156", "0.54875284", "0.5485285", "0.5478186", "0.5477212", "0.5474908", "0.5474311", "0.54735947", "0.5472782", "0.5467896", "0.5465801", "0.54603237", "0.5457889", "0.5455008", "0.5454804", "0.5453098", "0.5453067", "0.54439396", "0.54411095", "0.543974", "0.54353535", "0.5434838", "0.54279566", "0.54269534", "0.542632", "0.54051465", "0.54037344", "0.5403135", "0.53987116", "0.53985006", "0.53943545", "0.5389464", "0.53763306", "0.53742105", "0.5373956", "0.53705674", "0.5369479", "0.53671414" ]
0.0
-1
Crida la funcio de crearHidatoManual
public static void creaHidatoManualment(int tamany) { taulerCreacio = new Tauler(tamany); VistaCrearHidatoManual ct = new VistaCrearHidatoManual(taulerCreacio,callbackImplementor); ct.mostra(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void creaHidatoAutomaticament()\n {\n ControladorVista.mostraCreacioHidatoAutomatica();\n }", "public abstract Anuncio creaAnuncioTematico();", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public abstract Anuncio creaAnuncioGeneral();", "public abstract Anuncio creaAnuncioIndividualizado();", "Documento createDocumento();", "Compuesta createCompuesta();", "public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }", "public static int fesCreacioAutomatica(int tamanyHidato, int numForats, int numPrecolocats, String dificultat)\n {\n\n Tauler t;\n TaulerComplert tc = new TaulerComplert();\n\n t = Algoritmes.creacioTaulerPredeterminat(tamanyHidato, numForats, numPrecolocats, dificultat, tc);\n\n if (tc.getTauler() == null) return -1;\n\n Hidato nouHidato = new Hidato();\n nouHidato.setTauler(t);\n nouHidato.setTaulerComplert(tc);\n nouHidato.setDificultat(dificultat);\n\n return GestorHidato.creaHidato(nouHidato); //todo prendre nota del creador i de la id\n\n }", "OperacionColeccion createOperacionColeccion();", "Operacion createOperacion();", "public void creaAziendaAgricola(){\n\t\tCantina nipozzano = creaCantina(\"Nipozzano\");\t\n\t\tBotte[] bottiNipozzano = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiNipozzano.length; i++){\n\t\t\tbottiNipozzano[i] = creaBotte(nipozzano, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\t\t\n\t\tVigna mormoreto = creaVigna(\"Mormoreto\", 330, 25, EsposizioneVigna.sud, \"Terreni ricchi di sabbia, ben drenati. Discreta presenza di calcio. pH neutro o leggermente alcalino\");\n\t\tFilare[] filariMormoreto = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMormoreto.length;i++){\n\t\t\tfilariMormoreto[i] = creaFilare(mormoreto, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\t\n\t\tVigna montesodi = creaVigna(\"Montesodi\", 400, 20, EsposizioneVigna.sud_ovest, \"Arido e sassoso, di alberese, argilloso e calcareo, ben drenato, poco ricco di sostanza organica\");\n\t\tFilare[] filariMontesodi = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMontesodi.length;i++){\n\t\t\tfilariMontesodi[i] = creaFilare(montesodi, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t/*\n\t\t * CANTINA: POMINO - VIGNETO BENEFIZIO\n\t\t */\n\t\t\n\t\tCantina pomino = creaCantina(\"Pomino\");\n\t\tBotte[] bottiPomino = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiPomino.length; i++){\n\t\t\tbottiPomino[i] = creaBotte(pomino, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\n\t\tVigna benefizio = creaVigna(\"Benefizio\", 700, 9, EsposizioneVigna.sud_ovest, \"Terreni ricchi di sabbia, forte presenza di scheletro. Molto drenanti. Ricchi in elementi minerali. PH acido o leggermente acido.\");\n\t\tFilare[] filariBenefizio = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariBenefizio.length;i++){\n\t\t\tfilariBenefizio[i] = creaFilare(benefizio, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(nipozzano);\n\t\taziendaAgricolaDAO.saveLuogo(mormoreto);\n\t\taziendaAgricolaDAO.saveLuogo(montesodi);\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(pomino);\n\t\taziendaAgricolaDAO.saveLuogo(benefizio);\n\t\t\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Giulio d'Afflitto\"));\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Francesco Ermini\"));\n\n\t\t\n\t}", "H1 createH1();", "Secuencia createSecuencia();", "public ExistenciaMaq generar(final String clave,final Date fecha, final Long almacenId);", "void crear(Tonelaje tonelaje);", "Vaisseau_ordonneeLaPlusHaute createVaisseau_ordonneeLaPlusHaute();", "private void creaHisotiralPDF(){\r\n Task<Void> task = new Task<Void>() {\r\n @Override\r\n protected Void call() throws Exception {\r\n HistorialPDF histo = new HistorialPDF();\r\n histo.pasoPrincipal();\r\n return null;\r\n }\r\n };\r\n //Maouse en modo esperar\r\n anchorPane.getScene().getRoot().cursorProperty()\r\n .bind(Bindings.when(task.runningProperty())\r\n .then(Cursor.WAIT).otherwise(Cursor.DEFAULT));\r\n \r\n dbExeccutor.submit(task);\r\n }", "private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(CostBio.TAGLIO_COGNOMI_PAGINA);\n String tag = \"Persone di cognome \";\n ArrayList titoli = new ArrayList();\n titoli.add(LibWiki.setBold(\"Cognome\"));\n titoli.add(LibWiki.setBold(\"Voci\"));\n\n for (Map.Entry<String, Integer> mappa: mappaCognomi.entrySet()) {\n\n cognomeText = mappa.getKey();\n num = mappa.getValue();\n if (num >= taglioPagine) {\n cognomeText = tag + cognomeText + CostBio.PIPE + cognomeText;\n cognomeText = LibWiki.setQuadre(cognomeText);\n cognomeText = LibWiki.setBold(cognomeText);\n }// end of if cycle\n\n listaRiga = new ArrayList();\n listaRiga.add(cognomeText);\n listaRiga.add(num);\n listaPagine.add(listaRiga);\n\n }// end of for cycle\n mappaTavola.put(Cost.KEY_MAPPA_SORTABLE_BOOLEAN, true);\n mappaTavola.put(Cost.KEY_MAPPA_TITOLI, titoli);\n mappaTavola.put(Cost.KEY_MAPPA_RIGHE_LISTA, listaPagine);\n testoTabella = LibWiki.creaTable(mappaTavola);\n\n return testoTabella;\n }", "public void creoVehiculo() {\n\t\t\n\t\tAuto a= new Auto(false, 0);\n\t\ta.encender();\n\t\ta.setPatente(\"saraza\");\n\t\ta.setCantPuertas(123);\n\t\ta.setBaul(true);\n\t\t\n\t\tSystem.out.println(a);\n\t\t\n\t\tMoto m= new Moto();\n\t\tm.encender();\n\t\tm.frenar();\n\t\tm.setManubrio(true);\n\t\tm.setVelMax(543);\n\t\tm.setPatente(\"zas 241\");\n\t\tVehiculo a1= new Auto(true, 0);\n\t\ta1.setPatente(\"asd 423\");\n\t\t((Auto)a1).setBaul(true);\n\t\t((Auto)a1).setCantPuertas(15);\n\t\tif (a1 instanceof Auto) {\n\t\t\tAuto autito= (Auto) a1;\n\t\t\tautito.setBaul(true);\n\t\t\tautito.setCantPuertas(531);\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Moto) {\n\t\t\tMoto motito=(Moto) a1;\n\t\t\tmotito.setManubrio(false);\n\t\t\tmotito.setVelMax(15313);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Camion) {\n\t\t\tCamion camioncito=(Camion) a1;\n\t\t\tcamioncito.setAcoplado(false);\n\t\t\tcamioncito.setPatente(\"ge\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\tVehiculo a2= new Moto();\n\t\tSystem.out.println(a2);\n\t\ta1.frenar();\n\t\t\n\t\tArrayList<Vehiculo>listaVehiculo= new ArrayList<Vehiculo>();\n\t\tlistaVehiculo.add(new Auto(true, 53));\n\t\tlistaVehiculo.add(new Moto());\n\t\tlistaVehiculo.add(new Camion());\n\t\tfor (Vehiculo vehiculo : listaVehiculo) {\n\t\t\tSystem.out.println(\"clase:\" +vehiculo.getClass().getSimpleName());\n\t\t\tvehiculo.encender();\n\t\t\tvehiculo.frenar();\n\t\t\tSystem.out.println(\"=======================================\");\n\t\t\t\n\t\t}\n\t}", "Compleja createCompleja();", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "Klassenstufe createKlassenstufe();", "public String createH() {\n\t\t// Create H per the algorithm\n\t\t// Create vertices of X --- The number of vertices in X is taken from the paper\n\t\t// k = (2 + epsilon)log n\n\t\tthis.createXVertices();\n\t\t// Create edges within X (both successive and random)\n\t\tthis.createXEdges();\n\n\t\treturn \"H Created (X Vertices)\";\n\n\t}", "Help createHelp();", "public void crearDisco( ){\r\n boolean parameter = true;\r\n String artista = panelDatos.darArtista( );\r\n String titulo = panelDatos.darTitulo( );\r\n String genero = panelDatos.darGenero( );\r\n String imagen = panelDatos.darImagen( );\r\n\r\n if( ( artista.equals( \"\" ) || titulo.equals( \"\" ) ) || ( genero.equals( \"\" ) || imagen.equals( \"\" ) ) ) {\r\n parameter = false;\r\n JOptionPane.showMessageDialog( this, \"Todos los campos deben ser llenados para crear el disco\" );\r\n }\r\n if( parameter){\r\n boolean ok = principal.crearDisco( titulo, artista, genero, imagen );\r\n if( ok )\r\n dispose( );\r\n }\r\n }", "Oracion createOracion();", "@Override\n public void crearReloj() {\n Manecilla seg;\n seg = new Manecilla(40,60,0,1,null);\n cronometro = new Reloj(seg);\n }", "public synchronized String criaSolucao(Chamado chamado ) throws HelpDeskException {\n\t\tSolucao solucao = new Solucao(chamado);\n\t\t\t\t\n\t\t\n\t\tSolucaoDAO solucaoDAO = SolucaoDAO.getInstance();\n\t\tInteger id = (Integer) solucaoDAO.insert(solucao);\n\t\treturn id.toString();\n\t}", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "Long crear(Prestamo prestamo);", "Obligacion createObligacion();", "public JogadorTradutor() {\n this.nome= \"Sem Registro\";\n this.pontuacao = pontuacao;\n id = id;\n \n geradorDesafioItaliano = new GerarPalavra(); // primeira palavra ja é gerada para o cliente\n }", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "public void createhomeonts(List<Homology> homos){\r\n\t\tSimpleExample se = new SimpleExample();\r\n\t\tString nameuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#Name\";\r\n\t\tString homoclsuri = se.PROMOTER_PREFIX + \"#Homology\";\r\n\t\tOntModel onmo = null;\r\n\t\ttry {\r\n\t\t\tonmo = se.loadDB2nd();\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}\r\n\t\tfor(Homology homo : homos){\r\n\t\t\tString homoidvuri = se.PROMOTER_PREFIX + \"#Homology_\" + homo.getId();\t\t\t\r\n\t\t\tIndividual itemp = onmo.createIndividual(homoidvuri, onmo.getOntClass(homoclsuri));\r\n\t\t\tse.addDataProperty(onmo, homoidvuri, nameuri, homo.getName());\t\t\t\r\n\t\t}\r\n\t\tse.testListIndividual(onmo, homoclsuri);\r\n\t}", "public void generarContrato() {\r\n\t\ttry {\r\n\t\t\tString nombre = Contrato.generarContrato(estudiante, periodo, reserva.getArrSitioPeriodo().getSitNombre());\r\n\t\t\tnombre = \"Contrato_\" + estudiante.getId().getPerDni() + \".zip\";\r\n\t\t\tthis.zip(estudiante.getId().getPerDni(), periodo.getPrdId());\r\n\t\t\tFunciones.descargarZip(url_contrato+ nombre);\r\n\t\t\t// MODIFICAR NOMBRE CONTRATO\r\n\t\t\tmngRes.agregarContratoReserva(estudiante, periodo.getPrdId());\r\n\t\t} catch (Exception e) {\r\n\t\t\tFunciones.descargarPdf(url_contrato + \"error.pdf\");\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\r\n\t}", "CreationData creationData();", "public void generar() throws Exception {\n\t\tAnalizador_Sintactico.salida.generar(\".DATA\", \"genero los datos estaticos para la clase \"+this.nombre);\r\n\t\tAnalizador_Sintactico.salida.generar(\"VT_\"+nombre+\":\",\" \");\r\n\t\t\r\n\t\tboolean esDinamico=false;\r\n\t\t\r\n\t\t//para cada metodo, genero la etiqueta dw al codigo\r\n\t\tfor (EntradaMetodo m: entradaMetodo.values()) {\r\n\t\t\tif (m.getModificador().equals(\"dynamic\")) {\r\n\t\t\t\tAnalizador_Sintactico.salida.gen_DW(\"DW \"+m.getEtiqueta(),\"offset: \"+m.getOffsetMetodo(),m.getOffsetMetodo());\r\n\t\t\t\tesDinamico=true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tAnalizador_Sintactico.salida.agregar_DW();\r\n\t\t\r\n\t\t//si NO hay ningun metodo dinamico -> VT con NOP\r\n\t\tif (! esDinamico)\r\n\t\t\tAnalizador_Sintactico.salida.generar(\"NOP\",\"no hago nada\");\r\n\t\t\r\n\t\t//genero codigo para todos los metodos\r\n\t\tAnalizador_Sintactico.salida.generar(\".CODE\",\"seccion codigo de la clase \"+this.nombre);\r\n\t\t\r\n\t\tList<EntradaPar> listaParams;\r\n\t\tfor(EntradaMetodo m: entradaMetodo.values()) {\r\n\t\t\t//metodo actual es m\r\n\t\t\tAnalizador_Sintactico.TS.setMetodoActual(m);\r\n\t\t\t\r\n\t\t\t//SETEO el offset de sus parametros\r\n\t\t\tlistaParams= m.getEntradaParametros();\r\n\t\t\t\r\n\t\t\tfor(EntradaPar p: listaParams) {\r\n\t\t\t\t//seteo offset de p\r\n\t\t\t\t\r\n\t\t\t\t//si es dinamico m -> offset desde 3\r\n\t\t\t\tif (m.getModificador().equals(\"dynamic\")) {\r\n\t\t\t\t\tp.setOffset((listaParams.size() +4) - p.getUbicacion());\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t//si es estatico m -> offset desde 2\r\n\t\t\t\t\tp.setOffset((listaParams.size() +3) - p.getUbicacion());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//genero el codigo del cuerpo de ese metodo\r\n\t\t\tm.generar();\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//genero codigo para todos los constructores\r\n\t\tfor(EntradaCtor c: entradaCtor.values()) {\r\n\t\t\t//metodo actual es m\r\n\t\t\tAnalizador_Sintactico.TS.setMetodoActual(c);\r\n\t\t\t\r\n\t\t\t//SETEO el offset de sus parametros\r\n\t\t\tlistaParams= c.getEntradaParametros();\r\n\t\t\t\r\n\t\t\tfor(EntradaPar p: listaParams) {\r\n\t\t\t\t//seteo offset de p\r\n\t\t\t\tp.setOffset(listaParams.size() +4 - p.getUbicacion());\t// +4 porque el ctor tiene this\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t//genero el codigo de ese metodo\r\n\t\t\tc.generar();\r\n\t\t}\t\r\n\t}", "public void create() {\n\t\t\n\t}", "public void createAd(/*Should be a form*/){\n Ad ad = new Ad();\n User owner = this.user;\n Vehicle vehicle = this.vehicle;\n String \n// //ADICIONAR\n ad.setOwner();\n ad.setVehicle();\n ad.setDescription();\n ad.setPics();\n ad.setMain_pic();\n }", "public CrearQuedadaVista() {\n }", "public ExistenciaMaq generar(final String clave,final Long almacenId,int year,int mes);", "Dimension_hauteur createDimension_hauteur();", "Vaisseau_ordonneeLaPlusBasse createVaisseau_ordonneeLaPlusBasse();", "Vaisseau_longueur createVaisseau_longueur();", "void crearNuevaPersona(Persona persona);", "public void crear_un_evento_recurrente_para_el_dia_de_hoy() {\n\t\t\n\t}", "public void generTirarDados() {\n\r\n\t}", "@Override\r\n\tpublic void creerEnchere(String desc, String dl) {\n\t\t\r\n\t}", "@Override\n\tprotected void createCompHeader() {\n\t\tString headerTxt = \"Add a New Pharmacy\";\n\t\tiDartImage icoImage = iDartImage.PHARMACYUSER;\n\t\tbuildCompHeader(headerTxt, icoImage);\n\t}", "protected void creaPagine() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* crea la pagina e aggiunge campi e pannelli */\n pag = this.addPagina(\"generale\");\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.data);\n pan.add(Cam.importo.get());\n pan.add(Cam.note.get());\n pag.add(pan);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public RespuestaBD crearRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioInsercion) {\n/* 342 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* 344 */ int elSiguiente = siguienteRegistro(codigoFlujo);\n/* 345 */ if (elSiguiente == 0) {\n/* 346 */ rta.setMensaje(\"Generando secuencia\");\n/* 347 */ return rta;\n/* */ } \n/* */ \n/* */ try {\n/* 351 */ String s = \"insert into wkf_detalle(codigo_flujo,secuencia,servicio_inicio,accion,codigo_estado,servicio_destino,nombre_procedimiento,correo_destino,enviar_solicitud,ind_mismo_proveedor,ind_mismo_cliente,estado,caracteristica,valor_caracteristica,caracteristica_correo,metodo_seleccion_proveedor,ind_correo_clientes,enviar_hermana,enviar_si_hermana_cerrada,ind_cliente_inicial,usuario_insercion,fecha_insercion) values (\" + codigoFlujo + \",\" + \"\" + elSiguiente + \",\" + \"\" + servicioInicio + \",\" + \"\" + accion + \",\" + \"\" + codigoEstado + \",\" + \"\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \"'\" + nombreProcedimiento + \"',\" + \"'\" + correoDestino + \"',\" + \"'\" + enviar + \"',\" + \"'\" + mismoProveedor + \"',\" + \"'\" + mismoCliente + \"',\" + \"'\" + estado + \"',\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \"'\" + usuarioInsercion + \"',\" + \"\" + Utilidades.getFechaBD() + \"\" + \")\";\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/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 398 */ rta = this.dat.executeUpdate2(s);\n/* 399 */ rta.setSecuencia(elSiguiente);\n/* */ }\n/* 401 */ catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"%FlujoDetalleDAO:crearRegistro \", e);\n/* 404 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 406 */ return rta;\n/* */ }", "Long crear(Espacio espacio);", "public ExistenciaMaq generar(final Producto producto,final Date fecha, final Long almacenId);", "public String altaGenero(){\n int id = coleccionGenero.size() + 1;\n Genero gen = new Genero(id, generoSeleccionado);\n //graba en bd\n GeneroService serv = new GeneroService();\n //refrescar otra vez la lista\n return \"lista-genero\";\n }", "Motivo create(Motivo motivo);", "private static void crearPedidoGenerandoOPP() throws RemoteException {\n\n\t\tlong[] idVariedades = { 25 };\n\t\tint[] cantidades = { 7 };\n\t\tPedidoClienteDTO pedido = crearPedido(\"20362134596\", \"test 2\", idVariedades, cantidades);\n\n\t\tpedido = PedidoController.getInstance().crearPedido(pedido).toDTO();\n\n\t\tPedidoController.getInstance().cambiarEstadoPedidoCliente(pedido.getNroPedido(), EstadoPedidoCliente.ACEPTADO);\n\t}", "public static void instanciarCreencias() {\n\t\tfor(int i =0; i < GestorPartida.getContJugadores(); i++) {\n\t\t\t\n\t\t\tGestorPartida.jugadores[i].setCreencias(new Creencias(GestorPartida.jugadores, GestorPartida.objetoJugador, GestorPartida.objetoSala, i)); \n\t\t}\n\t}", "public org.oep.cmon.dao.tlct.model.DanhMucGiayTo create(long id);", "protected void inicializar(){\n kr = new CreadorHojas(wp);\n jPanel1.add(wp,0); // inserta el workspace en el panel principal\n wp.insertarHoja(\"Hoja 1\");\n //wp.insertarHoja(\"Hoja 2\");\n //wp.insertarHoja(\"Hoja 3\");\n }", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "public void crearVehiculo( clsVehiculo vehiculo ){\n if( vehiculo.obtenerTipoMedioTransporte().equals(\"Carro\") ){\n //Debo llamar el modelo de CARRO\n modeloCarro.crearCarro( (clsCarro) vehiculo );\n } else if (vehiculo.obtenerTipoMedioTransporte().equals(\"Camion\")){\n //Debo llamar el modelo de CAMIÓN\n }\n }", "private TipoAtaque generateTipoAtaque() {\n\t\treturn null;\r\n\t}", "private void criaInterface() {\n\t\tColor azul = new Color(212, 212, 240);\n\n\t\tpainelMetadado.setLayout(null);\n\t\tpainelMetadado.setBackground(azul);\n\n\t\tmetadadoLabel = FactoryInterface.createJLabel(10, 3, 157, 30);\n\t\tpainelMetadado.add(metadadoLabel);\n\n\t\tbotaoAdicionar = FactoryInterface.createJButton(520, 3, 30, 30);\n\t\tbotaoAdicionar.setIcon(FactoryInterface.criarImageIcon(Imagem.ADICIONAR));\n\t\tbotaoAdicionar.setToolTipText(Sap.ADICIONAR.get(Sap.TERMO.get()));\n\t\tpainelMetadado.add(botaoAdicionar);\n\n\t\tbotaoEscolha = FactoryInterface.createJButton(560, 3, 30, 30);\n\t\tbotaoEscolha.setIcon(FactoryInterface.criarImageIcon(Imagem.VOLTAR_PRETO));\n\t\tbotaoEscolha.setToolTipText(Sap.ESCOLHER.get(Sap.TERMO.get()));\n\t\tbotaoEscolha.setEnabled(false);\n\t\tpainelMetadado.add(botaoEscolha);\n\n\t\talterarModo(false);\n\t\tatribuirAcoes();\n\t}", "public static void crearPartida() throws FileNotFoundException, IOException, ExcepcionesFich {\n\t\tLecturaFicheros.AllLecture(\"C:\\\\Users\\\\Erick\\\\pruebaPOO.txt\");\n\t\tinterfaz = new GUI(0);\t\t\n\t}", "Foco createFoco();", "public void crear(Tarea t) {\n t.saveIt();\n }", "public AgenteViaHistoricoEntity createRegistro(AgenteViaHistoricoEntity entity)\n {\n LOGGER.log(Level.INFO,\"Inicia proceso de crear un registro\");\n return persistence.create(entity);\n }", "private void creaModuloMem() {\n /* variabili e costanti locali di lavoro */\n ArrayList<Campo> campi = new ArrayList<Campo>();\n ModuloRisultati modulo;\n Campo campo;\n\n try { // prova ad eseguire il codice\n\n campo = CampoFactory.intero(Campi.Ris.codicePiatto.getNome());\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.nomePiatto.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"piatto\");\n campo.setToolTipLista(\"nome del piatto\");\n campo.decora()\n .etichetta(\"nome del piatto\"); // le etichette servono per il dialogo ricerca\n campo.setLarghezza(250);\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.categoria.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"categoria\");\n campo.setToolTipLista(\"categoria del piatto\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteVolte.getNome());\n campo.setVisibileVistaDefault();\n campo.setLarghezza(80);\n campo.setTitoloColonna(\"quante volte\");\n campo.setToolTipLista(\n \"quante volte questo piatto è stato offerto nel periodo analizzato\");\n campo.decora().etichetta(\"quante volte\");\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quantiCoperti.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"coperti\");\n campo.setToolTipLista(\"numero di coperti che avrebbero potuto ordinare\");\n campo.decora().etichetta(\"n. coperti\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteComande.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"comande\");\n campo.setToolTipLista(\"numero di comande effettive\");\n campo.decora().etichetta(\"n. comande\");\n campo.setLarghezza(80);\n campo.setTotalizzabile(true);\n campi.add(campo);\n\n campo = CampoFactory.percentuale(Campi.Ris.gradimento.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"gradimento\");\n campo.setToolTipLista(\n \"percentuale di gradimento (è il 100% se tutti i coperti potenziali lo hanno ordinato)\");\n campo.decora().etichetta(\"% gradimento\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n modulo = new ModuloRisultati(campi);\n setModuloRisultati(modulo);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }", "public void create(){}", "private static void crearPedidoGenerandoOPC() throws RemoteException {\n\n\t\tlong[] idVariedades = { 25, 29, 33 };\n\t\tint[] cantidades = { 6, 8, 11 };\n\t\tPedidoClienteDTO pedido = crearPedido(\"20362134596\", \"test 3\", idVariedades, cantidades);\n\n\t\tpedido = PedidoController.getInstance().crearPedido(pedido).toDTO();\n\t\t\n\t\tPedidoController.getInstance().cambiarEstadoPedidoCliente(pedido.getNroPedido(), EstadoPedidoCliente.ACEPTADO);\n\n\t}", "@Override\n public ComprobanteContable createComprobante(\n Aerolinea a, Boleto boleto, Cliente cliente, String tipo) throws CRUDException {\n Optional op;\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n buff.append(a.getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas\n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n comprobante.setIdCliente(cliente);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(tipo);\n\n //ComprobanteContablePK numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n comprobante.setIdNumeroGestion(numero);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\n return comprobante;\n }", "Hero createHero();", "public co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.soltec\n\t\t.datos_publicacion\n\t\t.ejb\n\t\t.sb\n\t\t.DatosPublicacionSTLocal create()\n\t\tthrows javax.ejb.CreateException;", "public int create(Esysmeudef menu);", "Determinante createDeterminante();", "@Override\n\tpublic void generarFactura() {\n\t\t\n\t}", "public int Create(Objet obj) {\n\t\tPreparedStatement smt=null; \n\t\t\n\t\tString chaineSQL=\"\";\n int rep=0;\n \t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tchaineSQL=\"insert into objet_vente (Designation,Prix,Categories,Lieu,Date,Email) values(?,?,?,?,?,?)\";\t\t\t\n\t\t\tsmt=this.getCnn().prepareStatement(chaineSQL, Statement.RETURN_GENERATED_KEYS); //retourne le Id auto incrementé lors de l'envoie de la chaine sql\n\t\t\t\n\t\t\tsmt.setString(1, obj.getDesignation());\n\t\t\tsmt.setInt(2, Integer.parseInt(obj.getPrix()));\n\t\t\tsmt.setString(3, obj.getCategorie());\n\t\t\tsmt.setString(4, obj.getLieu());\n\t\t\tsmt.setDate(5, obj.getDate());\n\t\t\tsmt.setString(6, obj.getEmail());\n\t\t\t\n\t\t\t\t\t\n\t\t\trep=smt.executeUpdate();\n\t\t\t// rep contient le nbre d'enreigistrement effectué/ligne\n\t\t\tResultSet generatedKey = smt.getGeneratedKeys(); //getGeneratedKeys retourne le *id auto incrementé\n\t\t\tgeneratedKey.next();\n\t\t\t//on sait que y a q'une ligne ou on insere donc 1 seule .next()\n\t\t\tobj.setId(generatedKey.getInt(1));\n\t\t\t// lit dans la 1ere colonne avec la ligne correspondante a celle crée et retourne ici l'ID objet\n\t\t\t\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn rep;\n\t}", "Negacion createNegacion();", "private IOferta buildOfertaEjemplo7() {\n\t\tPredicate<Compra> condicion = Predicates.alwaysTrue();\n\t\tFunction<Compra, Float> descuento = new DescuentoEnSegundoProducto(\"11-111-1111\", \"11-111-1112\", 50);\n\t\treturn new OfertaDinero(\"50% en Sprite, comprando 1 Coca\", condicion,\tdescuento);\n\t}", "@Override\n public ComprobanteContable createAsientoDiarioBoleto(Boleto boleto) throws CRUDException {\n\n Optional op;\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n /*Aerolinea a = em.find(Aerolinea.class, boleto.getIdAerolinea().getIdAerolinea());\n if (a != null) {\n buff.append(a.getNumero());\n }*/\n buff.append(boleto.getIdAerolinea().getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas \n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n Cliente c = em.find(Cliente.class, boleto.getIdCliente().getIdCliente());\n op = Optional.ofNullable(c);\n\n if (!op.isPresent()) {\n throw new CRUDException(\"No se encontro un Cliente para el boleto\");\n }\n\n comprobante.setIdCliente(c);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(ComprobanteContable.Tipo.ASIENTO_DIARIO);\n\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), ComprobanteContable.Tipo.ASIENTO_DIARIO);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setIdNumeroGestion(numero);\n\n return comprobante;\n }", "public DCrearDisco( InterfazDiscotienda id ){\r\n super( id, true );\r\n principal = id;\r\n\r\n panelDatos = new PanelCrearDisco( );\r\n panelBotones = new PanelBotonesDisco( this );\r\n\r\n getContentPane( ).add( panelDatos, BorderLayout.CENTER );\r\n getContentPane( ).add( panelBotones, BorderLayout.SOUTH );\r\n\r\n setTitle( \"Crear Disco\" );\r\n pack();\r\n }", "Para createPara();", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "public void creation(){\n\t for(int i=0; i<N;i++) {\r\n\t\t for(int j=0; j<N;j++) {\r\n\t\t\t tab[i][j]=0;\r\n\t\t }\r\n\t }\r\n\t resDiagonale(); \r\n \r\n\t //On remplit le reste \r\n\t conclusionRes(0, nCarre); \r\n \t\t\r\n\t \r\n\t isDone=true;\r\n }", "@Override\n\tpublic void create() {\n\t\t\n\t}", "private void crearNave(String accion) {\n\t\tthis.naveCreada=true;\n\t\tpausa = false;\n\t\t\n\t\tString [] info = accion.split(\"#\");\n\t\tString [] xA = info[3].split(\"=\");\n\t\tString [] yA = info[4].split(\"=\");\n\t\tString [] vxA = info[5].split(\"=\");\n\t\tString [] vyA = info[6].split(\"=\");\n\t\tString [] anA = info[7].split(\"=\");\n\t\t\n\t\tdouble x = Double.valueOf(xA[1]);\n\t\tdouble y = Double.valueOf(yA[1]);\n\t\tdouble velocidadx = Double.valueOf(vxA[1]);\n\t\tdouble velocidady = Double.valueOf(vyA[1]);\n\t\tdouble an = Double.valueOf(anA[1]);\n\t\t\n\t\tthis.nave = new Nave (x, y, an, 0.2, 0.98, 0.05, 20, this);\n\t\tnave.setVelocidadX(velocidadx);\n\t\tnave.setVelocidadY(velocidady);\n\t}", "@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}", "public void generarId() {\n try{\n int numAleatorio = (int)(Math.random()*99999);\n boolean resultado = dgt.generarIdAutomatico(numAleatorio);\n tfid.setText(String.valueOf(numAleatorio));\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "private static void generModeloDePrueba() {\n\t\tCSharpArchIdPackageImpl.init();\n // Retrieve the default factory singleton\n\t\tCSharpArchIdFactory factory = CSharpArchIdFactory.eINSTANCE;\n // create an instance of myWeb\n\t\tModel modelo = factory.createModel();\n\t\tmodelo.setName(\"Prueba\"); \n // create a page\n\t\tCompileUnit cu = factory.createCompileUnit();\n\t\tcu.setName(\"archivo.cs\");\n\t\tClassDeclaration clase = factory.createClassDeclaration();\n\t\t//clase.setName(\"Sumar\");\n\t\t//cu.getTypeDeclaration().add(clase);\n modelo.getCompileUnits().add(cu);\n \n Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;\n Map<String, Object> m = reg.getExtensionToFactoryMap();\n m.put(\"model\", new XMIResourceFactoryImpl());\n\n // Obtain a new resource set\n ResourceSet resSet = new ResourceSetImpl();\n\n // create a resource\n Resource resource = resSet.createResource(URI\n .createURI(\"CSharpArchId.model\"));\n // Get the first model element and cast it to the right type, in my\n // example everything is hierarchical included in this first node\n resource.getContents().add(modelo);\n\n // now save the content.\n try {\n resource.save(Collections.EMPTY_MAP);\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\t\t\n // and so on, and so on\n // as you can see the EMF model can be (more or less) used as standard Java\n\t}", "public JudokaCreator() {\n\t\tsuper();\n\t\ttechniques = new Technique[]{\n\t\t\t\tTechnique.UCHI_MATA,\n\t\t\t\tTechnique.UCHI_MATA,\n\t\t\t\tTechnique.UCHI_MATA,\n\t\t\t\tTechnique.UCHI_MATA,\n\t\t\t\tTechnique.UCHI_MATA,\n\t\t\t\tTechnique.UCHI_MATA,\n\t\t\t\tTechnique.UCHI_MATA,\n\t\t\t\tTechnique.UCHI_MATA\n\t\t};\n\t}", "HdbdtiModel createHdbdtiModel();", "private Hero createHeroObject(){\n return new Hero(\"ImageName\",\"SpiderMan\",\"Andrew Garfield\",\"6 feet 30 inches\",\"70 kg\",\n \"Webs & Strings\",\"Fast thinker\",\"Webs & Flexible\",\n \"200 km/hour\",\"Very fast\",\"Spiderman - Super Hero saves the world\",\n \"SuperHero saves the city from all the villians\");\n }", "@Override\n\tpublic void create() {\n\n\t}", "For createFor();", "private void añadirEnemigo() {\n\t\t\n\t\tif(enemigo.isVivo()==false){\n\t\t\tint k;\n\t\t\tk = (int)(Math.random()*1000)+1;\n\t\t\tif(k<=200){\n\t\t\t\tif(this.puntuacion<10000){\n\t\t\t\t\tenemigo.setTipo(0);\n\t\t\t\t\tenemigo.setVivo(true);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tenemigo.setTipo(1);\n\t\t\t\t\tenemigo.setVivo(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void crearGen(int id){\n Random random = new Random();\n int longitud = random.nextInt(6) + 5;\n\n random = null;\n\n Gen gen = new Gen(id, longitud);\n agregarGen(gen);\n }", "private IOferta buildOfertaEjemplo4() {\n\t\tPredicate<Compra> condicion = Predicates.alwaysTrue();\n\t\tFunction<Compra, Float> descuento = new DescuentoLlevaXPagaY(\"11-111-1111\", 3, 2);\n\t\treturn new OfertaDinero(\"Lleva 3 paga 2 en Coca-Cola\", condicion,\n\t\t\t\tdescuento);\n\t}", "@FXML\r\n private void crearSolicitud() {\r\n try {\r\n //Carga la vista de crear solicitud rma\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(Principal.class.getResource(\"/vista/CrearSolicitud.fxml\"));\r\n BorderPane vistaCrear = (BorderPane) loader.load();\r\n\r\n //Crea un dialogo para mostrar la vista\r\n Stage dialogo = new Stage();\r\n dialogo.setTitle(\"Solicitud RMA\");\r\n dialogo.initModality(Modality.WINDOW_MODAL);\r\n dialogo.initOwner(primerStage);\r\n Scene escena = new Scene(vistaCrear);\r\n dialogo.setScene(escena);\r\n\r\n //Annadir controlador y datos\r\n ControladorCrearSolicitud controlador = loader.getController();\r\n controlador.setDialog(dialogo, primerStage);\r\n\r\n //Carga el numero de Referencia\r\n int numReferencia = DAORma.crearReferencia();\r\n\r\n //Modifica el dialogo para que no se pueda cambiar el tamaño y lo muestra\r\n dialogo.setResizable(false);\r\n dialogo.showAndWait();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private static void createFileUmidade() throws IOException {\r\n\t\tInteger defaultUmidade = 30;\r\n\t\tarqUmidade = new File(pathUmidade);\r\n\t\tif(!arqUmidade.exists()) {\r\n\t\t\tarqUmidade.createNewFile();\r\n\t\t\tFileWriter fw = new FileWriter(getArqUmidade());\r\n\t\t\tBufferedWriter buffWrite = new BufferedWriter(fw);\r\n\t\t\tbuffWrite.append(defaultUmidade.toString() + String.valueOf('\\n'));/*Inicializa o arquivo com uma umidade Inicial*/\r\n\t\t\tbuffWrite.close();\r\n\t\t}else {\r\n\t\t\tFileReader fr = new FileReader(getArqUmidade());\r\n\t\t\tBufferedReader buffRead = new BufferedReader(fr);\r\n\t\t\tif(!buffRead.ready()) {/*Se o arquivo se encontar criado mas estiver vazio*/\r\n\t\t\t\tFileWriter fw = new FileWriter(arqUmidade);\r\n\t\t\t\tBufferedWriter buffWrite = new BufferedWriter(fw);\r\n\t\t\t\tbuffWrite.append(defaultUmidade.toString() + String.valueOf('\\n'));/*Inicializa o arquivo com uma umidade Inicial*/\r\n\t\t\t\tbuffWrite.close();\r\n\t\t\t}\r\n\t\t\tbuffRead.close();\r\n\t\t}\r\n\t}" ]
[ "0.7814888", "0.68813574", "0.6748658", "0.6364551", "0.63040394", "0.6244352", "0.6208792", "0.6147632", "0.61333185", "0.6050402", "0.60385627", "0.6021289", "0.6011786", "0.59699154", "0.59662724", "0.5920023", "0.59165925", "0.59014606", "0.58902526", "0.5876889", "0.58668554", "0.5848674", "0.5818824", "0.581163", "0.5808586", "0.57763875", "0.57701504", "0.5745878", "0.573536", "0.5724172", "0.5706647", "0.5699125", "0.56905603", "0.5671429", "0.5659965", "0.5659892", "0.5659798", "0.5654478", "0.5652521", "0.5639658", "0.5590223", "0.5580139", "0.5578841", "0.55751926", "0.55669075", "0.5560716", "0.5560652", "0.55514395", "0.55487907", "0.5548512", "0.5546543", "0.55425733", "0.55378246", "0.55369353", "0.5516414", "0.55088806", "0.54846025", "0.5475428", "0.5471859", "0.54700387", "0.5469995", "0.54636884", "0.54603815", "0.54414946", "0.54398674", "0.5438722", "0.54298854", "0.5429778", "0.54296994", "0.5427293", "0.54206", "0.54131514", "0.540467", "0.5402483", "0.5398079", "0.53963757", "0.53926", "0.53888774", "0.53864145", "0.538583", "0.5376668", "0.53758615", "0.53743416", "0.5374082", "0.53723943", "0.5372004", "0.5368553", "0.53577805", "0.53459793", "0.53370935", "0.53247225", "0.53245324", "0.53187984", "0.53183675", "0.5317812", "0.5305581", "0.5300438", "0.52967674", "0.5290221", "0.52901185" ]
0.7600176
1
Crida la funcio de crearHidatoAutomaticament
public static void creaHidatoAutomaticament() { ControladorVista.mostraCreacioHidatoAutomatica(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void creaHidatoManualment(int tamany)\n {\n\n taulerCreacio = new Tauler(tamany);\n VistaCrearHidatoManual ct = new VistaCrearHidatoManual(taulerCreacio,callbackImplementor);\n ct.mostra(true);\n }", "public abstract Anuncio creaAnuncioTematico();", "public static int fesCreacioAutomatica(int tamanyHidato, int numForats, int numPrecolocats, String dificultat)\n {\n\n Tauler t;\n TaulerComplert tc = new TaulerComplert();\n\n t = Algoritmes.creacioTaulerPredeterminat(tamanyHidato, numForats, numPrecolocats, dificultat, tc);\n\n if (tc.getTauler() == null) return -1;\n\n Hidato nouHidato = new Hidato();\n nouHidato.setTauler(t);\n nouHidato.setTaulerComplert(tc);\n nouHidato.setDificultat(dificultat);\n\n return GestorHidato.creaHidato(nouHidato); //todo prendre nota del creador i de la id\n\n }", "public abstract Anuncio creaAnuncioIndividualizado();", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public void creaAziendaAgricola(){\n\t\tCantina nipozzano = creaCantina(\"Nipozzano\");\t\n\t\tBotte[] bottiNipozzano = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiNipozzano.length; i++){\n\t\t\tbottiNipozzano[i] = creaBotte(nipozzano, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\t\t\n\t\tVigna mormoreto = creaVigna(\"Mormoreto\", 330, 25, EsposizioneVigna.sud, \"Terreni ricchi di sabbia, ben drenati. Discreta presenza di calcio. pH neutro o leggermente alcalino\");\n\t\tFilare[] filariMormoreto = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMormoreto.length;i++){\n\t\t\tfilariMormoreto[i] = creaFilare(mormoreto, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\t\n\t\tVigna montesodi = creaVigna(\"Montesodi\", 400, 20, EsposizioneVigna.sud_ovest, \"Arido e sassoso, di alberese, argilloso e calcareo, ben drenato, poco ricco di sostanza organica\");\n\t\tFilare[] filariMontesodi = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMontesodi.length;i++){\n\t\t\tfilariMontesodi[i] = creaFilare(montesodi, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t/*\n\t\t * CANTINA: POMINO - VIGNETO BENEFIZIO\n\t\t */\n\t\t\n\t\tCantina pomino = creaCantina(\"Pomino\");\n\t\tBotte[] bottiPomino = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiPomino.length; i++){\n\t\t\tbottiPomino[i] = creaBotte(pomino, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\n\t\tVigna benefizio = creaVigna(\"Benefizio\", 700, 9, EsposizioneVigna.sud_ovest, \"Terreni ricchi di sabbia, forte presenza di scheletro. Molto drenanti. Ricchi in elementi minerali. PH acido o leggermente acido.\");\n\t\tFilare[] filariBenefizio = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariBenefizio.length;i++){\n\t\t\tfilariBenefizio[i] = creaFilare(benefizio, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(nipozzano);\n\t\taziendaAgricolaDAO.saveLuogo(mormoreto);\n\t\taziendaAgricolaDAO.saveLuogo(montesodi);\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(pomino);\n\t\taziendaAgricolaDAO.saveLuogo(benefizio);\n\t\t\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Giulio d'Afflitto\"));\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Francesco Ermini\"));\n\n\t\t\n\t}", "public abstract Anuncio creaAnuncioGeneral();", "OperacionColeccion createOperacionColeccion();", "public void creoVehiculo() {\n\t\t\n\t\tAuto a= new Auto(false, 0);\n\t\ta.encender();\n\t\ta.setPatente(\"saraza\");\n\t\ta.setCantPuertas(123);\n\t\ta.setBaul(true);\n\t\t\n\t\tSystem.out.println(a);\n\t\t\n\t\tMoto m= new Moto();\n\t\tm.encender();\n\t\tm.frenar();\n\t\tm.setManubrio(true);\n\t\tm.setVelMax(543);\n\t\tm.setPatente(\"zas 241\");\n\t\tVehiculo a1= new Auto(true, 0);\n\t\ta1.setPatente(\"asd 423\");\n\t\t((Auto)a1).setBaul(true);\n\t\t((Auto)a1).setCantPuertas(15);\n\t\tif (a1 instanceof Auto) {\n\t\t\tAuto autito= (Auto) a1;\n\t\t\tautito.setBaul(true);\n\t\t\tautito.setCantPuertas(531);\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Moto) {\n\t\t\tMoto motito=(Moto) a1;\n\t\t\tmotito.setManubrio(false);\n\t\t\tmotito.setVelMax(15313);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Camion) {\n\t\t\tCamion camioncito=(Camion) a1;\n\t\t\tcamioncito.setAcoplado(false);\n\t\t\tcamioncito.setPatente(\"ge\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\tVehiculo a2= new Moto();\n\t\tSystem.out.println(a2);\n\t\ta1.frenar();\n\t\t\n\t\tArrayList<Vehiculo>listaVehiculo= new ArrayList<Vehiculo>();\n\t\tlistaVehiculo.add(new Auto(true, 53));\n\t\tlistaVehiculo.add(new Moto());\n\t\tlistaVehiculo.add(new Camion());\n\t\tfor (Vehiculo vehiculo : listaVehiculo) {\n\t\t\tSystem.out.println(\"clase:\" +vehiculo.getClass().getSimpleName());\n\t\t\tvehiculo.encender();\n\t\t\tvehiculo.frenar();\n\t\t\tSystem.out.println(\"=======================================\");\n\t\t\t\n\t\t}\n\t}", "public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }", "Secuencia createSecuencia();", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "Operacion createOperacion();", "public ExistenciaMaq generar(final String clave,final Date fecha, final Long almacenId);", "Compuesta createCompuesta();", "private TipoAtaque generateTipoAtaque() {\n\t\treturn null;\r\n\t}", "public void createAgendamento() {\n\n if (tbagendamento.getTmdataagendamento().after(TimeControl.getDateIni())) {\n if (agendamentoLogic.createTbagendamento(tbagendamento)) {\n AbstractFacesContextUtils.redirectPage(PagesUrl.URL_AGENDAMENTO_LIST);\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento cadastrado com sucesso.\");\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falhar ao realizado cadastro do agendamento.\");\n }\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"verifique se a data de agendamento esta correta.\");\n }\n }", "public AgenteViaHistoricoEntity createRegistro(AgenteViaHistoricoEntity entity)\n {\n LOGGER.log(Level.INFO,\"Inicia proceso de crear un registro\");\n return persistence.create(entity);\n }", "private void añadirEnemigo() {\n\t\t\n\t\tif(enemigo.isVivo()==false){\n\t\t\tint k;\n\t\t\tk = (int)(Math.random()*1000)+1;\n\t\t\tif(k<=200){\n\t\t\t\tif(this.puntuacion<10000){\n\t\t\t\t\tenemigo.setTipo(0);\n\t\t\t\t\tenemigo.setVivo(true);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tenemigo.setTipo(1);\n\t\t\t\t\tenemigo.setVivo(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void crear(Tonelaje tonelaje);", "Motivo create(Motivo motivo);", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public static void instanciarCreencias() {\n\t\tfor(int i =0; i < GestorPartida.getContJugadores(); i++) {\n\t\t\t\n\t\t\tGestorPartida.jugadores[i].setCreencias(new Creencias(GestorPartida.jugadores, GestorPartida.objetoJugador, GestorPartida.objetoSala, i)); \n\t\t}\n\t}", "@Override\n public ComprobanteContable createAsientoDiarioBoleto(Boleto boleto) throws CRUDException {\n\n Optional op;\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n /*Aerolinea a = em.find(Aerolinea.class, boleto.getIdAerolinea().getIdAerolinea());\n if (a != null) {\n buff.append(a.getNumero());\n }*/\n buff.append(boleto.getIdAerolinea().getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas \n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n Cliente c = em.find(Cliente.class, boleto.getIdCliente().getIdCliente());\n op = Optional.ofNullable(c);\n\n if (!op.isPresent()) {\n throw new CRUDException(\"No se encontro un Cliente para el boleto\");\n }\n\n comprobante.setIdCliente(c);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(ComprobanteContable.Tipo.ASIENTO_DIARIO);\n\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), ComprobanteContable.Tipo.ASIENTO_DIARIO);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setIdNumeroGestion(numero);\n\n return comprobante;\n }", "@Override\n public ComprobanteContable createComprobante(\n Aerolinea a, Boleto boleto, Cliente cliente, String tipo) throws CRUDException {\n Optional op;\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n buff.append(a.getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas\n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n comprobante.setIdCliente(cliente);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(tipo);\n\n //ComprobanteContablePK numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n comprobante.setIdNumeroGestion(numero);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\n return comprobante;\n }", "@Override\n public void crearReloj() {\n Manecilla seg;\n seg = new Manecilla(40,60,0,1,null);\n cronometro = new Reloj(seg);\n }", "public void generTirarDados() {\n\r\n\t}", "private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(CostBio.TAGLIO_COGNOMI_PAGINA);\n String tag = \"Persone di cognome \";\n ArrayList titoli = new ArrayList();\n titoli.add(LibWiki.setBold(\"Cognome\"));\n titoli.add(LibWiki.setBold(\"Voci\"));\n\n for (Map.Entry<String, Integer> mappa: mappaCognomi.entrySet()) {\n\n cognomeText = mappa.getKey();\n num = mappa.getValue();\n if (num >= taglioPagine) {\n cognomeText = tag + cognomeText + CostBio.PIPE + cognomeText;\n cognomeText = LibWiki.setQuadre(cognomeText);\n cognomeText = LibWiki.setBold(cognomeText);\n }// end of if cycle\n\n listaRiga = new ArrayList();\n listaRiga.add(cognomeText);\n listaRiga.add(num);\n listaPagine.add(listaRiga);\n\n }// end of for cycle\n mappaTavola.put(Cost.KEY_MAPPA_SORTABLE_BOOLEAN, true);\n mappaTavola.put(Cost.KEY_MAPPA_TITOLI, titoli);\n mappaTavola.put(Cost.KEY_MAPPA_RIGHE_LISTA, listaPagine);\n testoTabella = LibWiki.creaTable(mappaTavola);\n\n return testoTabella;\n }", "Long crear(Espacio espacio);", "Compleja createCompleja();", "public void generarContrato() {\r\n\t\ttry {\r\n\t\t\tString nombre = Contrato.generarContrato(estudiante, periodo, reserva.getArrSitioPeriodo().getSitNombre());\r\n\t\t\tnombre = \"Contrato_\" + estudiante.getId().getPerDni() + \".zip\";\r\n\t\t\tthis.zip(estudiante.getId().getPerDni(), periodo.getPrdId());\r\n\t\t\tFunciones.descargarZip(url_contrato+ nombre);\r\n\t\t\t// MODIFICAR NOMBRE CONTRATO\r\n\t\t\tmngRes.agregarContratoReserva(estudiante, periodo.getPrdId());\r\n\t\t} catch (Exception e) {\r\n\t\t\tFunciones.descargarPdf(url_contrato + \"error.pdf\");\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\r\n\t}", "private void populaHorarioAula()\n {\n Calendar hora = Calendar.getInstance();\n hora.set(Calendar.HOUR_OF_DAY, 18);\n hora.set(Calendar.MINUTE, 0);\n HorarioAula h = new HorarioAula(hora, \"Segunda e Quinta\", 1, 3, 1);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 5);\n h = new HorarioAula(hora, \"Terca e Sexta\", 1, 3, 1);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 15);\n h = new HorarioAula(hora, \"Terca e Sexta\", 2, 5, 3);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 5);\n h = new HorarioAula(hora, \"Terca e Sexta\", 2, 5, 3);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 10);\n h = new HorarioAula(hora, \"Terca e Sexta\", 2, 5, 3);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 5);\n h = new HorarioAula(hora, \"Quarta e Sexta\", 3, 5, 3);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 5);\n h = new HorarioAula(hora, \"Sexta\", 1, 1, 2);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 19);\n h = new HorarioAula(hora, \"Sexta\", 2, 1, 1);\n horarioAulaDAO.insert(h);\n\n hora.set(Calendar.HOUR_OF_DAY, 5);\n h = new HorarioAula(hora, \"Segunda\", 3, 6, 4);\n horarioAulaDAO.insert(h);\n\n }", "public synchronized String criaSolucao(Chamado chamado ) throws HelpDeskException {\n\t\tSolucao solucao = new Solucao(chamado);\n\t\t\t\t\n\t\t\n\t\tSolucaoDAO solucaoDAO = SolucaoDAO.getInstance();\n\t\tInteger id = (Integer) solucaoDAO.insert(solucao);\n\t\treturn id.toString();\n\t}", "public void createAppareil(Home h) {\n\t\tint numOfChauffages = manager.createQuery(\"Select p From Heater p\", Heater.class).getResultList().size();\n\n if (numOfChauffages == 0) {\n \tHeater e1 =new Heater(100);\n \th.getChauffages().add(e1);\n \te1.setHome(h);\n manager.persist(e1);\n \n Heater e2 =new Heater(120);\n \th.getChauffages().add(e2);\n \te2.setHome(h);\n manager.persist(e2);\n \n \tElectronicDevice e3 =new ElectronicDevice(80);\n \th.getEquipements().add(e3);\n \te3.setHome(h);\n manager.persist(e3);\n \n ElectronicDevice e4 =new ElectronicDevice(70);\n \th.getEquipements().add(e4);\n \te4.setHome(h);\n manager.persist(e4);\n }\n\t}", "public JogadorTradutor() {\n this.nome= \"Sem Registro\";\n this.pontuacao = pontuacao;\n id = id;\n \n geradorDesafioItaliano = new GerarPalavra(); // primeira palavra ja é gerada para o cliente\n }", "Oracion createOracion();", "public void crearAtracciones(){\n \n //Añado atracciones tipo A\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new A();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo B\n for (int i = 0; i < 6 ; i++){\n Atraccion atraccion = new B();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo C\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new C();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo D\n for (int i = 0; i < 3 ; i++){\n Atraccion atraccion = new D();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo E\n for (int i = 0; i < 7 ; i++){\n Atraccion atraccion = new E();\n atracciones.add(atraccion);\n }\n \n }", "Klassenstufe createKlassenstufe();", "public ExistenciaMaq generar(final Producto producto,final Date fecha, final Long almacenId);", "@Override\n\tpublic void crearTipoAsiento(TipoAsiento tipoAsiento) throws Exception {\n\t\ttipoAsientoMapper.crearTipoAsiento(tipoAsiento);\n\t\t\n\t}", "@Override\n public ComprobanteContable createComprobante(Aerolinea a, Boleto boleto, Cliente cliente, String tipo, NotaDebito nota) throws CRUDException {\n\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n buff.append(a.getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas\n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n comprobante.setIdCliente(cliente);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(tipo);\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n\n //ComprobanteContablePK numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n comprobante.setIdNumeroGestion(numero);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n return comprobante;\n }", "Documento createDocumento();", "public RespuestaBD crearRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioInsercion) {\n/* 342 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* 344 */ int elSiguiente = siguienteRegistro(codigoFlujo);\n/* 345 */ if (elSiguiente == 0) {\n/* 346 */ rta.setMensaje(\"Generando secuencia\");\n/* 347 */ return rta;\n/* */ } \n/* */ \n/* */ try {\n/* 351 */ String s = \"insert into wkf_detalle(codigo_flujo,secuencia,servicio_inicio,accion,codigo_estado,servicio_destino,nombre_procedimiento,correo_destino,enviar_solicitud,ind_mismo_proveedor,ind_mismo_cliente,estado,caracteristica,valor_caracteristica,caracteristica_correo,metodo_seleccion_proveedor,ind_correo_clientes,enviar_hermana,enviar_si_hermana_cerrada,ind_cliente_inicial,usuario_insercion,fecha_insercion) values (\" + codigoFlujo + \",\" + \"\" + elSiguiente + \",\" + \"\" + servicioInicio + \",\" + \"\" + accion + \",\" + \"\" + codigoEstado + \",\" + \"\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \"'\" + nombreProcedimiento + \"',\" + \"'\" + correoDestino + \"',\" + \"'\" + enviar + \"',\" + \"'\" + mismoProveedor + \"',\" + \"'\" + mismoCliente + \"',\" + \"'\" + estado + \"',\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \"'\" + usuarioInsercion + \"',\" + \"\" + Utilidades.getFechaBD() + \"\" + \")\";\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/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 398 */ rta = this.dat.executeUpdate2(s);\n/* 399 */ rta.setSecuencia(elSiguiente);\n/* */ }\n/* 401 */ catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"%FlujoDetalleDAO:crearRegistro \", e);\n/* 404 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 406 */ return rta;\n/* */ }", "public void create() {\r\n for(int i=0; i< 50; i++){\r\n long id = (new Date()).getTime();\r\n Benefit newBeneficio = new Benefit();\r\n newBeneficio.setId(\"\"+id); \r\n newBeneficio.setCategory(\"almacenes \"+id);\r\n newBeneficio.setDescription(\"description \"+id);\r\n newBeneficio.setDiscount(i);\r\n newBeneficio.setStart_date(\"start_date \"+id);\r\n newBeneficio.setEnd_date(\"end_date \"+id);\r\n newBeneficio.setReview(\"review \"+id);\r\n newBeneficio.setTitle(\"title \"+id);\r\n newBeneficio.setLogo(\"logo \"+id);\r\n newBeneficio.setTwitter(\"twitter \"+id);\r\n newBeneficio.setFacebook(\"facebook \"+id);\r\n newBeneficio.setUrl(\"url \"+ id);\r\n \r\n Address address = new Address();\r\n address.setCity(\"Santiago \"+ id);\r\n address.setCountry(\"Santiago \"+ id);\r\n address.setLine_1(\"Linea 1 \"+ id);\r\n address.setLine_2(\"Linea 2 \"+ id);\r\n address.setLine_3(\"Linea 3 \"+ id);\r\n address.setPostcode(\"\" + id);\r\n address.setState(\"Region Metropolitana \"+ id);\r\n \r\n Location location = new Location();\r\n double[] cordenadas = {-77.99283,-33.9980};\r\n location.setCoordinates(cordenadas);\r\n location.setDistance(5.445);\r\n location.setType(\"Point\");\r\n \r\n Lobby lobby = new Lobby();\r\n lobby.setHours(\"HORA \"+ + id);\r\n \r\n newBeneficio = service.persist(newBeneficio);\r\n LOGGER.info(newBeneficio.toString());\r\n }\r\n }", "Vaisseau_ordonneeLaPlusHaute createVaisseau_ordonneeLaPlusHaute();", "public void generar() throws Exception {\n\t\tAnalizador_Sintactico.salida.generar(\".DATA\", \"genero los datos estaticos para la clase \"+this.nombre);\r\n\t\tAnalizador_Sintactico.salida.generar(\"VT_\"+nombre+\":\",\" \");\r\n\t\t\r\n\t\tboolean esDinamico=false;\r\n\t\t\r\n\t\t//para cada metodo, genero la etiqueta dw al codigo\r\n\t\tfor (EntradaMetodo m: entradaMetodo.values()) {\r\n\t\t\tif (m.getModificador().equals(\"dynamic\")) {\r\n\t\t\t\tAnalizador_Sintactico.salida.gen_DW(\"DW \"+m.getEtiqueta(),\"offset: \"+m.getOffsetMetodo(),m.getOffsetMetodo());\r\n\t\t\t\tesDinamico=true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tAnalizador_Sintactico.salida.agregar_DW();\r\n\t\t\r\n\t\t//si NO hay ningun metodo dinamico -> VT con NOP\r\n\t\tif (! esDinamico)\r\n\t\t\tAnalizador_Sintactico.salida.generar(\"NOP\",\"no hago nada\");\r\n\t\t\r\n\t\t//genero codigo para todos los metodos\r\n\t\tAnalizador_Sintactico.salida.generar(\".CODE\",\"seccion codigo de la clase \"+this.nombre);\r\n\t\t\r\n\t\tList<EntradaPar> listaParams;\r\n\t\tfor(EntradaMetodo m: entradaMetodo.values()) {\r\n\t\t\t//metodo actual es m\r\n\t\t\tAnalizador_Sintactico.TS.setMetodoActual(m);\r\n\t\t\t\r\n\t\t\t//SETEO el offset de sus parametros\r\n\t\t\tlistaParams= m.getEntradaParametros();\r\n\t\t\t\r\n\t\t\tfor(EntradaPar p: listaParams) {\r\n\t\t\t\t//seteo offset de p\r\n\t\t\t\t\r\n\t\t\t\t//si es dinamico m -> offset desde 3\r\n\t\t\t\tif (m.getModificador().equals(\"dynamic\")) {\r\n\t\t\t\t\tp.setOffset((listaParams.size() +4) - p.getUbicacion());\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t//si es estatico m -> offset desde 2\r\n\t\t\t\t\tp.setOffset((listaParams.size() +3) - p.getUbicacion());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//genero el codigo del cuerpo de ese metodo\r\n\t\t\tm.generar();\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//genero codigo para todos los constructores\r\n\t\tfor(EntradaCtor c: entradaCtor.values()) {\r\n\t\t\t//metodo actual es m\r\n\t\t\tAnalizador_Sintactico.TS.setMetodoActual(c);\r\n\t\t\t\r\n\t\t\t//SETEO el offset de sus parametros\r\n\t\t\tlistaParams= c.getEntradaParametros();\r\n\t\t\t\r\n\t\t\tfor(EntradaPar p: listaParams) {\r\n\t\t\t\t//seteo offset de p\r\n\t\t\t\tp.setOffset(listaParams.size() +4 - p.getUbicacion());\t// +4 porque el ctor tiene this\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t//genero el codigo de ese metodo\r\n\t\t\tc.generar();\r\n\t\t}\t\r\n\t}", "public void crearEntidad() throws EntidadNotFoundException {\r\n\t\tif (validarCampos(getNewEntidad())) {\r\n\t\t\tif (validarNomNitRepetidoEntidad(getNewEntidad())) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN, \"Advertencia: \", \"Nombre, Nit o Prejifo ya existe en GIA\"));\r\n\t\t\t} else {\r\n\t\t\t\tif (entidadController.crearEntidad(getNewEntidad())) {\r\n\t\t\t\t\tmensajeGrow(\"Entidad Creada Satisfactoriamente\", getNewEntidad());\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('entCrearDialog').hide()\");\r\n\t\t\t\t\tsetNewEntidad(new EntidadDTO());\r\n\t\t\t\t\tresetCodigoBUA();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmensajeGrow(\"Entidad No Fue Creada\", getNewEntidad());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlistarEntidades();\r\n\t\t\t// newEntidad = new EntidadDTO();\r\n\t\t\t// fechaActual();\r\n\t\t}\r\n\r\n\t}", "private void populaAluno()\n {\n Calendar nasc = Calendar.getInstance();\n nasc.set(Calendar.DAY_OF_MONTH, 24);\n nasc.set(Calendar.MONTH, 03);\n nasc.set(Calendar.YEAR, 1989);\n Aluno c = new Aluno();\n c.setNome(\"Christian \");\n c.setEmail(\"c@gmail.com\");\n c.setCpf(\"33342523501\");\n c.setAltura(1.76);\n c.setPeso(70);\n c.setSenha(CriptografiaLogic.encriptar(\"r\"));\n c.setRg(\"22233344401\");\n c.setDataNascimento(nasc);\n c.setNumSolicitacao(0);\n alunoDAO.insert(c);\n\n for (int i = 1; i < 500; i++)\n {\n nasc.set(Calendar.DAY_OF_MONTH, NumberLogic.randomInteger(1, 28));\n nasc.set(Calendar.MONTH, NumberLogic.randomInteger(1, 12));\n nasc.set(Calendar.YEAR, NumberLogic.randomInteger(1940, 1995));\n Aluno a = new Aluno();\n a.setNome(\"Aluno \" + i);\n a.setEmail(\"aluno\" + i + \"@gmail.com\");\n a.setCpf(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n a.setAltura(NumberLogic.randomDouble(1.60d, 1.99d));\n a.setPeso(NumberLogic.randomInteger(60, 100));\n a.setSenha(CriptografiaLogic.encriptar(\"123\"));\n a.setRg(String.valueOf(NumberLogic.randomInteger(100000000, 999999999)));\n a.setDataNascimento(nasc);\n a.setNumSolicitacao(0);\n alunoDAO.insert(a);\n }\n }", "Obligacion createObligacion();", "Hazard createHazard();", "public static void horoscopo() {\n\n ArrayList<String> frases = new ArrayList<>();\n\n frases.add(\"Todo lo que seas capaz de creer, eres capaz de conseguir.\");\n frases.add(\"Serás más poderoso cuando tengas control total sobre ti mismo.\");\n frases.add(\"La sabiduría y la casualidad no van unidas de la mano.\");\n frases.add(\"Lo que hay en el ayer o en el mañana no es nada comparado con lo que hay en nuestro interior.\");\n frases.add(\"Cáete siete veces y levántate ocho.\");\n frases.add(\"Nunca es tarde para comenzar un nuevo proyecto, para ser quien siempre has deseado ser.\");\n frases.add(\"Con pensamientos positivos y perseverancia, solo es cuestión de tiempo que superes las adversidades y te propongas nuevos retos.\");\n frases.add(\"La vida es un 10% lo que nos ocurre, y un 90% cómo reaccionamos a ello.\");\n frases.add(\"No es más rico quien más tiene, sino quien menos necesita.\");\n frases.add(\"Intenta y falla, pero nunca falles en intentarlo.\");\n frases.add(\"Solo los hombres más sabios son capaces de saborear los momentos más simples.\");\n frases.add(\"cada segundo que goces, será segundo aprovechado.\");\n\n double numero = Math.round(Math.random() * 11);\n int numeroAleatorio = (int) numero;\n\n //Random r = new Random(); \n // int randomNumber = r.nextInt(frases.size());\n System.out.println(\"Frase horóscopo: \" + frases.get(numeroAleatorio));\n\n }", "public String altaGenero(){\n int id = coleccionGenero.size() + 1;\n Genero gen = new Genero(id, generoSeleccionado);\n //graba en bd\n GeneroService serv = new GeneroService();\n //refrescar otra vez la lista\n return \"lista-genero\";\n }", "public org.oep.cmon.dao.tlct.model.DanhMucGiayTo create(long id);", "public ExistenciaMaq generar(final String clave,final Long almacenId,int year,int mes);", "public co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.soltec\n\t\t.datos_publicacion\n\t\t.ejb\n\t\t.sb\n\t\t.DatosPublicacionSTLocal create()\n\t\tthrows javax.ejb.CreateException;", "public org.oep.cmon.dao.dvc.model.ThuTuc2GiayTo create(long id);", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "Vaisseau_estOrdonneeCouverte createVaisseau_estOrdonneeCouverte();", "public void create() {\n\t\t\n\t}", "public void createhomeonts(List<Homology> homos){\r\n\t\tSimpleExample se = new SimpleExample();\r\n\t\tString nameuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#Name\";\r\n\t\tString homoclsuri = se.PROMOTER_PREFIX + \"#Homology\";\r\n\t\tOntModel onmo = null;\r\n\t\ttry {\r\n\t\t\tonmo = se.loadDB2nd();\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}\r\n\t\tfor(Homology homo : homos){\r\n\t\t\tString homoidvuri = se.PROMOTER_PREFIX + \"#Homology_\" + homo.getId();\t\t\t\r\n\t\t\tIndividual itemp = onmo.createIndividual(homoidvuri, onmo.getOntClass(homoclsuri));\r\n\t\t\tse.addDataProperty(onmo, homoidvuri, nameuri, homo.getName());\t\t\t\r\n\t\t}\r\n\t\tse.testListIndividual(onmo, homoclsuri);\r\n\t}", "public void generarId() {\n try{\n int numAleatorio = (int)(Math.random()*99999);\n boolean resultado = dgt.generarIdAutomatico(numAleatorio);\n tfid.setText(String.valueOf(numAleatorio));\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "Long crear(Prestamo prestamo);", "public void crearActividad (Actividad a) {\r\n String query = \"INSERT INTO actividad (identificacion_navegate, numero_matricula, fecha, hora, destino, eliminar) VALUES (\\\"\" \r\n + a.getIdentificacionNavegante()+ \"\\\", \" \r\n + a.getNumeroMatricula() + \", \\\"\" \r\n + a.getFecha() + \"\\\", \\\"\" \r\n + a.getHora() + \"\\\", \\\"\" \r\n + a.getDestino()+ \"\\\" ,false)\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad creada\", \"Operación exitosa\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "Negacion createNegacion();", "public int Create(Objet obj) {\n\t\tPreparedStatement smt=null; \n\t\t\n\t\tString chaineSQL=\"\";\n int rep=0;\n \t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tchaineSQL=\"insert into objet_vente (Designation,Prix,Categories,Lieu,Date,Email) values(?,?,?,?,?,?)\";\t\t\t\n\t\t\tsmt=this.getCnn().prepareStatement(chaineSQL, Statement.RETURN_GENERATED_KEYS); //retourne le Id auto incrementé lors de l'envoie de la chaine sql\n\t\t\t\n\t\t\tsmt.setString(1, obj.getDesignation());\n\t\t\tsmt.setInt(2, Integer.parseInt(obj.getPrix()));\n\t\t\tsmt.setString(3, obj.getCategorie());\n\t\t\tsmt.setString(4, obj.getLieu());\n\t\t\tsmt.setDate(5, obj.getDate());\n\t\t\tsmt.setString(6, obj.getEmail());\n\t\t\t\n\t\t\t\t\t\n\t\t\trep=smt.executeUpdate();\n\t\t\t// rep contient le nbre d'enreigistrement effectué/ligne\n\t\t\tResultSet generatedKey = smt.getGeneratedKeys(); //getGeneratedKeys retourne le *id auto incrementé\n\t\t\tgeneratedKey.next();\n\t\t\t//on sait que y a q'une ligne ou on insere donc 1 seule .next()\n\t\t\tobj.setId(generatedKey.getInt(1));\n\t\t\t// lit dans la 1ere colonne avec la ligne correspondante a celle crée et retourne ici l'ID objet\n\t\t\t\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn rep;\n\t}", "Foco createFoco();", "public void crear(Tarea t) {\n t.saveIt();\n }", "public void insertarAlimento (int id_alimento, String nombre, String estado, float caloria, float proteinas,float grasas, float hidratos_de_carbono, float H20, float NE, float vitamina_a, float vitamina_B1, float vitamina_B2, float vitamina_C, float Niac, float sodio, float potasio, float calcio, float magnesio, float cobre, float hierro, float fosforo, float azufre, float cloro, float Fen, float Ileu, float Leu, float Lis, float Met, float Tre, float Tri, float Val, float Acid, float AlCAL);", "public void CrearArco(String Identificador, E Dato, Double peso, Vertice Verticei, Vertice Verticef){\r\n this.Vi = Verticei;\r\n this.Vf = Verticef;\r\n this.id = Identificador;\r\n this.Dato = Dato;\r\n this.p = peso;\r\n }", "Determinante createDeterminante();", "@Override\n\tpublic void crearNuevaPoblacion() {\n\t\t/* Nos quedamos con los mejores individuos. Del resto, cruzamos la mitad, los mejores,\n\t\t * y el resto los borramos.*/\n\t\tList<IIndividuo> poblacion2 = new ArrayList<>();\n\t\tint numFijos = (int) (poblacion.size()/2);\n\t\t/* Incluimos el 50%, los mejores */\n\t\tpoblacion2.addAll(this.poblacion.subList(0, numFijos));\n\t\t\n\t\t/* De los mejores, mezclamos la primera mitad \n\t\t * con todos, juntandolos de forma aleatoria */\n\t\tList<IIndividuo> temp = poblacion.subList(0, numFijos+1);\n\t\tfor(int i = 0; i < temp.size()/2; i++) {\n\t\t\tint j;\n\t\t\tdo {\n\t\t\t\tj = Individuo.aleatNum(0, temp.size()-1);\n\t\t\t}while(j != i);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tpoblacion2.addAll(cruce(temp.get(i), temp.get(j)));\n\t\t\t} catch (CruceNuloException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//this.poblacion.clear();\n\t\tthis.poblacion = poblacion2;\n\t}", "public void createAngajat(int id, String nume, String prenume, float salariu, int idPetShop) {\n\t\tif (petShopOperations.checkPetShop(idPetShop) == false)\n\t\t\tSystem.out.println(\"PetShop not found.\");\n\t\tif (angajatOperations.checkAngajat(id) == true)\n\t\t\tSystem.out.println(\"Angajat existent.\");\n\t\tAngajat angajatToAdd = new Angajat(id, nume, prenume, salariu, idPetShop);\n\t\tList<Angajat> angajati = angajatOperations.getAllAngajati();\n\t\tSystem.out.println(\"After adding...\");\n\t\tangajatOperations.addAngajat(angajatToAdd);\n\t\tangajatOperations.printListOfAngajati(angajati);\n\n\t}", "@Override\n\tpublic void crearPoblacion() {\n\t\tif(this.terminales == null || this.funciones == null) {\n\t\t\tSystem.out.println(\"Error. Los terminales y las funciones tienen que estar inicializados\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tpoblacion = new ArrayList<>();\n\t\tfor(int i = 0; i < this.numIndividuos; i++) {\n\t\t\tIndividuo ind = new Individuo();\n\t\t\tind.crearIndividuoAleatorio(this.profundidad, this.terminales, this.funciones);\n\t\t\tthis.poblacion.add(ind);\n\t\t}\n\t}", "@Override\r\n /* OSINE791 - RSIS1 - Inicio */\r\n //public ExpedienteDTO generarExpedienteOrdenServicio(ExpedienteDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO) throws ExpedienteException{\r\n public ExpedienteGSMDTO generarExpedienteOrdenServicio(ExpedienteGSMDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO,String sigla) throws ExpedienteException{\r\n LOG.error(\"generarExpedienteOrdenServicio\");\r\n ExpedienteGSMDTO retorno= new ExpedienteGSMDTO();\r\n try{\r\n expedienteDTO.setEstado(Constantes.ESTADO_ACTIVO);\r\n PghExpediente pghExpediente = ExpedienteGSMBuilder.toExpedienteDomain(expedienteDTO);\r\n pghExpediente.setFechaEstadoProceso(new Date());\r\n pghExpediente.setDatosAuditoria(usuarioDTO);\r\n crud.create(pghExpediente);\r\n retorno=ExpedienteGSMBuilder.toExpedienteDto(pghExpediente);\r\n \r\n //reg historicoEstado\r\n MaestroColumnaDTO tipoHistorico=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_EXPEDIENTE).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstado=historicoEstadoDAO.registrar(pghExpediente.getIdExpediente(), null, pghExpediente.getIdEstadoProceso().getIdEstadoProceso(), pghExpediente.getIdPersonal().getIdPersonal(), pghExpediente.getIdPersonal().getIdPersonal(), tipoHistorico.getIdMaestroColumna(),null,null, null, usuarioDTO);\r\n LOG.info(\"historicoEstado-->\"+historicoEstado);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n //inserta ordenServicio\r\n Long idLocador=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)?expedienteDTO.getOrdenServicio().getLocador().getIdLocador():null;\r\n Long idSupervisoraEmpresa=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)?expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa():null;\r\n OrdenServicioDTO OrdenServicioDTO=ordenServicioDAO.registrar(retorno.getIdExpediente(), \r\n expedienteDTO.getOrdenServicio().getIdTipoAsignacion(), expedienteDTO.getOrdenServicio().getEstadoProceso().getIdEstadoProceso(), \r\n /* OSINE791 - RSIS1 - Inicio */\r\n //codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO);\r\n codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO,sigla);\r\n /* OSINE791 - RSIS1 - Fin */\r\n LOG.info(\"OrdenServicioDTO:\"+OrdenServicioDTO.getNumeroOrdenServicio());\r\n //busca idPersonalDest\r\n PersonalDTO personalDest=null;\r\n List<PersonalDTO> listPersonalDest=null;\r\n if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)){\r\n //personalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null)).get(0);\r\n listPersonalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null));\r\n }else if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)){\r\n //personalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa())).get(0);\r\n listPersonalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa()));\r\n }\r\n if(listPersonalDest==null || listPersonalDest.isEmpty()){\r\n throw new ExpedienteException(\"La Empresa Supervisora no tiene un Personal asignado\",null);\r\n }else{\r\n personalDest=listPersonalDest.get(0);\r\n }\r\n //inserta historico Orden Servicio\r\n EstadoProcesoDTO estadoProcesoDto=estadoProcesoDAO.find(new EstadoProcesoFilter(Constantes.IDENTIFICADOR_ESTADO_PROCESO_OS_REGISTRO)).get(0);\r\n MaestroColumnaDTO tipoHistoricoOS=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_ORDEN_SERVICIO).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstadoOS=historicoEstadoDAO.registrar(null, OrdenServicioDTO.getIdOrdenServicio(), estadoProcesoDto.getIdEstadoProceso(), expedienteDTO.getPersonal().getIdPersonal(), personalDest.getIdPersonal(), tipoHistoricoOS.getIdMaestroColumna(),null,null, null, usuarioDTO); \r\n LOG.info(\"historicoEstadoOS:\"+historicoEstadoOS);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n retorno.setOrdenServicio(new OrdenServicioDTO(OrdenServicioDTO.getIdOrdenServicio(),OrdenServicioDTO.getNumeroOrdenServicio()));\r\n }catch(Exception e){\r\n LOG.error(\"error en generarExpedienteOrdenServicio\",e);\r\n throw new ExpedienteException(e.getMessage(), e);\r\n }\r\n return retorno;\r\n }", "H1 createH1();", "private static void crearPedidoGenerandoOPCyOrdenInsumo() throws RemoteException {\n\t\tlong[] idVariedades = { 63 };\n\t\tint[] cantidades = { 4 };\n\t\tPedidoClienteDTO pedido = crearPedido(\"20362134596\", \"test 5\", idVariedades, cantidades);\n\n\t\tpedido = PedidoController.getInstance().crearPedido(pedido).toDTO();\n\n\t\tPedidoController.getInstance().cambiarEstadoPedidoCliente(pedido.getNroPedido(), EstadoPedidoCliente.ACEPTADO);\n\t}", "@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}", "public void creation(){\n\t for(int i=0; i<N;i++) {\r\n\t\t for(int j=0; j<N;j++) {\r\n\t\t\t tab[i][j]=0;\r\n\t\t }\r\n\t }\r\n\t resDiagonale(); \r\n \r\n\t //On remplit le reste \r\n\t conclusionRes(0, nCarre); \r\n \t\t\r\n\t \r\n\t isDone=true;\r\n }", "public void crearVehiculo( clsVehiculo vehiculo ){\n if( vehiculo.obtenerTipoMedioTransporte().equals(\"Carro\") ){\n //Debo llamar el modelo de CARRO\n modeloCarro.crearCarro( (clsCarro) vehiculo );\n } else if (vehiculo.obtenerTipoMedioTransporte().equals(\"Camion\")){\n //Debo llamar el modelo de CAMIÓN\n }\n }", "Dimension_hauteur createDimension_hauteur();", "private void crearVista() {\n\t\tVista vista = Vista.getInstancia();\n\t\tvista.addObservador(this);\n\n\t}", "ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);", "public void crearAreaInt(AreaInteres a) throws Exception {\r\n\t\tboAreaInt.crearAreaInteres(a);\r\n\t}", "public void create(){}", "void crearNuevaPersona(Persona persona);", "public CrearQuedadaVista() {\n }", "public void crearNodos()\n\t{\n\t\tfor(List<String> renglon: listaDeDatos)\n\t\t{\n\t\t\tPersona persona = new Persona(Integer.parseInt(renglon.get(1)), Integer.parseInt(renglon.get(2))); //crea la persona\n\t\t\t\n\t\t\tNodo nodo = new Nodo(Integer.parseInt(renglon.get(0)), 0, 0, false); //crea el nodo con id en posicion 1\n\t\t\t\n\t\t\tnodo.agregarPersona(persona);\n\t\t\tlistaNodos.add(nodo);\n\t\t}\n\t\t\n\t}", "public void crear_un_evento_recurrente_para_el_dia_de_hoy() {\n\t\t\n\t}", "private void crearDimensionContable()\r\n/* 201: */ {\r\n/* 202:249 */ this.dimensionContable = new DimensionContable();\r\n/* 203:250 */ this.dimensionContable.setIdOrganizacion(AppUtil.getOrganizacion().getId());\r\n/* 204:251 */ this.dimensionContable.setIdSucursal(AppUtil.getSucursal().getId());\r\n/* 205:252 */ this.dimensionContable.setNumero(getDimension());\r\n/* 206:253 */ verificaDimension();\r\n/* 207: */ }", "private static void createFileUmidade() throws IOException {\r\n\t\tInteger defaultUmidade = 30;\r\n\t\tarqUmidade = new File(pathUmidade);\r\n\t\tif(!arqUmidade.exists()) {\r\n\t\t\tarqUmidade.createNewFile();\r\n\t\t\tFileWriter fw = new FileWriter(getArqUmidade());\r\n\t\t\tBufferedWriter buffWrite = new BufferedWriter(fw);\r\n\t\t\tbuffWrite.append(defaultUmidade.toString() + String.valueOf('\\n'));/*Inicializa o arquivo com uma umidade Inicial*/\r\n\t\t\tbuffWrite.close();\r\n\t\t}else {\r\n\t\t\tFileReader fr = new FileReader(getArqUmidade());\r\n\t\t\tBufferedReader buffRead = new BufferedReader(fr);\r\n\t\t\tif(!buffRead.ready()) {/*Se o arquivo se encontar criado mas estiver vazio*/\r\n\t\t\t\tFileWriter fw = new FileWriter(arqUmidade);\r\n\t\t\t\tBufferedWriter buffWrite = new BufferedWriter(fw);\r\n\t\t\t\tbuffWrite.append(defaultUmidade.toString() + String.valueOf('\\n'));/*Inicializa o arquivo com uma umidade Inicial*/\r\n\t\t\t\tbuffWrite.close();\r\n\t\t\t}\r\n\t\t\tbuffRead.close();\r\n\t\t}\r\n\t}", "public ObjetoBean clonar() {\n\t\t// TODO Auto-generated method stub\n\t\tHorario_Has_Aula horaul=new Horario_Has_Aula();\n\t\thoraul.ISHORARIO_IDISHORARIO=this.ISHORARIO_IDISHORARIO;\n\t\thoraul.ISAULA_IDISAULA=this.ISAULA_IDISAULA;\n\t\thoraul.ISCURSO_IDISCURSO=this.ISCURSO_IDISCURSO;\n\t\t//horaul.inicializar();\n\t\treturn horaul;\n\t}", "public void insertarHematologia(Examen.Hematologia hematologia)\n {\n ContentValues valores = new ContentValues();\n valores.put(\"fecha\",formatter.format(hematologia.getFechaExamen()));\n valores.put(\"fibrinogeno\",hematologia.getFibrinogeno());\n valores.put(\"leucocitos\",hematologia.getFibrinogeno());\n valores.put(\"hemoglobina\",hematologia.getHemoglobina());\n valores.put(\"hematocrito\",hematologia.getHematocrito());\n valores.put(\"plaqueta\",hematologia.getPlaquetas());\n valores.put(\"vsg\",hematologia.getVsg());\n valores.put(\"hcm\",hematologia.getVsg());\n\n db.insert(\"hematologia\",null,valores);\n\n }", "public co.com.telefonica.atiempo.vpistbba.actividades.df.instalacion.ejb.sb.AInstalarTOALocal create()\n\t\tthrows javax.ejb.CreateException;", "private void criaInterface() {\n\t\tColor azul = new Color(212, 212, 240);\n\n\t\tpainelMetadado.setLayout(null);\n\t\tpainelMetadado.setBackground(azul);\n\n\t\tmetadadoLabel = FactoryInterface.createJLabel(10, 3, 157, 30);\n\t\tpainelMetadado.add(metadadoLabel);\n\n\t\tbotaoAdicionar = FactoryInterface.createJButton(520, 3, 30, 30);\n\t\tbotaoAdicionar.setIcon(FactoryInterface.criarImageIcon(Imagem.ADICIONAR));\n\t\tbotaoAdicionar.setToolTipText(Sap.ADICIONAR.get(Sap.TERMO.get()));\n\t\tpainelMetadado.add(botaoAdicionar);\n\n\t\tbotaoEscolha = FactoryInterface.createJButton(560, 3, 30, 30);\n\t\tbotaoEscolha.setIcon(FactoryInterface.criarImageIcon(Imagem.VOLTAR_PRETO));\n\t\tbotaoEscolha.setToolTipText(Sap.ESCOLHER.get(Sap.TERMO.get()));\n\t\tbotaoEscolha.setEnabled(false);\n\t\tpainelMetadado.add(botaoEscolha);\n\n\t\talterarModo(false);\n\t\tatribuirAcoes();\n\t}", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "private static void crearPedidoGenerandoOPC() throws RemoteException {\n\n\t\tlong[] idVariedades = { 25, 29, 33 };\n\t\tint[] cantidades = { 6, 8, 11 };\n\t\tPedidoClienteDTO pedido = crearPedido(\"20362134596\", \"test 3\", idVariedades, cantidades);\n\n\t\tpedido = PedidoController.getInstance().crearPedido(pedido).toDTO();\n\t\t\n\t\tPedidoController.getInstance().cambiarEstadoPedidoCliente(pedido.getNroPedido(), EstadoPedidoCliente.ACEPTADO);\n\n\t}", "public static RelatorioImcMedioFaixaIdade createEntity(EntityManager em) {\n RelatorioImcMedioFaixaIdade relatorioImcMedioFaixaIdade = new RelatorioImcMedioFaixaIdade()\n .faixaEtaria(DEFAULT_FAIXA_ETARIA)\n .imcMedio(DEFAULT_IMC_MEDIO);\n return relatorioImcMedioFaixaIdade;\n }", "Vaisseau_longueur createVaisseau_longueur();", "@Override\n void create(Cliente cliente);", "public Angkot createAngkot(Angkot angkot) {\n \n // membuat sebuah ContentValues, yang berfungsi\n // untuk memasangkan data dengan nama-nama\n // kolom pada database\n ContentValues values = new ContentValues();\n values.put(HelperAngkot.COLUMN_NAME, angkot.getName());\n values.put(HelperAngkot.COLUMN_DESCRIPTION, angkot.getDescription());\n values.put(HelperAngkot.COLUMN_TIME, angkot.getTime());\n \n // mengeksekusi perintah SQL insert data\n // yang akan mengembalikan sebuah insert ID \n long insertId = database.insert(HelperAngkot.TABLE_NAME, null,\n values);\n \n // setelah data dimasukkan, memanggil perintah SQL Select \n // menggunakan Cursor untuk melihat apakah data tadi benar2 sudah masuk\n // dengan menyesuaikan ID = insertID \n Cursor cursor = database.query(HelperAngkot.TABLE_NAME,\n allColumns, HelperAngkot.COLUMN_ID + \" = \" + insertId, null,\n null, null, null);\n \n // pindah ke data paling pertama \n cursor.moveToFirst();\n \n // mengubah objek pada kursor pertama tadi\n // ke dalam objek barang\n Angkot newAngkot = cursorToAngkot(cursor);\n \n // close cursor\n cursor.close();\n \n // mengembalikan barang baru\n return newAngkot;\n }" ]
[ "0.7361667", "0.7259172", "0.68874526", "0.6672159", "0.66550565", "0.6473374", "0.6425457", "0.6326677", "0.6314602", "0.627452", "0.6240495", "0.6211848", "0.6203669", "0.6191841", "0.61337173", "0.61098385", "0.6104223", "0.60165954", "0.60016257", "0.5987355", "0.59769136", "0.5976613", "0.5933767", "0.5906921", "0.59052026", "0.58985484", "0.58940834", "0.5876039", "0.5868753", "0.5846423", "0.5816109", "0.5806884", "0.580303", "0.579433", "0.579019", "0.57868105", "0.5773495", "0.5768855", "0.57633656", "0.5762162", "0.573433", "0.57218593", "0.5710385", "0.5703181", "0.5696623", "0.5696299", "0.5695407", "0.5692292", "0.5684599", "0.5674327", "0.56655204", "0.56642514", "0.5660513", "0.56494784", "0.56393284", "0.56330436", "0.5631214", "0.5616126", "0.56064874", "0.56023884", "0.55886984", "0.55830514", "0.5581732", "0.5571723", "0.556547", "0.55555594", "0.55514014", "0.5550844", "0.5548455", "0.55165356", "0.55003995", "0.5494463", "0.5493602", "0.5492119", "0.54920727", "0.5490978", "0.54902613", "0.5490179", "0.54884964", "0.5476358", "0.54758555", "0.5474708", "0.5471392", "0.5461174", "0.5459965", "0.545953", "0.5453263", "0.5444125", "0.5443175", "0.5439378", "0.54340684", "0.5433327", "0.5427672", "0.54197735", "0.54146695", "0.54135305", "0.5410079", "0.54098624", "0.54051083", "0.540016" ]
0.88756543
0
Crida la funcio de crear un Hidato automaticament
public static int fesCreacioAutomatica(int tamanyHidato, int numForats, int numPrecolocats, String dificultat) { Tauler t; TaulerComplert tc = new TaulerComplert(); t = Algoritmes.creacioTaulerPredeterminat(tamanyHidato, numForats, numPrecolocats, dificultat, tc); if (tc.getTauler() == null) return -1; Hidato nouHidato = new Hidato(); nouHidato.setTauler(t); nouHidato.setTaulerComplert(tc); nouHidato.setDificultat(dificultat); return GestorHidato.creaHidato(nouHidato); //todo prendre nota del creador i de la id }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void creaHidatoAutomaticament()\n {\n ControladorVista.mostraCreacioHidatoAutomatica();\n }", "public abstract Anuncio creaAnuncioTematico();", "public static void creaHidatoManualment(int tamany)\n {\n\n taulerCreacio = new Tauler(tamany);\n VistaCrearHidatoManual ct = new VistaCrearHidatoManual(taulerCreacio,callbackImplementor);\n ct.mostra(true);\n }", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public abstract Anuncio creaAnuncioIndividualizado();", "public abstract Anuncio creaAnuncioGeneral();", "Compuesta createCompuesta();", "Secuencia createSecuencia();", "public void creaAziendaAgricola(){\n\t\tCantina nipozzano = creaCantina(\"Nipozzano\");\t\n\t\tBotte[] bottiNipozzano = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiNipozzano.length; i++){\n\t\t\tbottiNipozzano[i] = creaBotte(nipozzano, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\t\t\n\t\tVigna mormoreto = creaVigna(\"Mormoreto\", 330, 25, EsposizioneVigna.sud, \"Terreni ricchi di sabbia, ben drenati. Discreta presenza di calcio. pH neutro o leggermente alcalino\");\n\t\tFilare[] filariMormoreto = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMormoreto.length;i++){\n\t\t\tfilariMormoreto[i] = creaFilare(mormoreto, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\t\n\t\tVigna montesodi = creaVigna(\"Montesodi\", 400, 20, EsposizioneVigna.sud_ovest, \"Arido e sassoso, di alberese, argilloso e calcareo, ben drenato, poco ricco di sostanza organica\");\n\t\tFilare[] filariMontesodi = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMontesodi.length;i++){\n\t\t\tfilariMontesodi[i] = creaFilare(montesodi, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t/*\n\t\t * CANTINA: POMINO - VIGNETO BENEFIZIO\n\t\t */\n\t\t\n\t\tCantina pomino = creaCantina(\"Pomino\");\n\t\tBotte[] bottiPomino = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiPomino.length; i++){\n\t\t\tbottiPomino[i] = creaBotte(pomino, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\n\t\tVigna benefizio = creaVigna(\"Benefizio\", 700, 9, EsposizioneVigna.sud_ovest, \"Terreni ricchi di sabbia, forte presenza di scheletro. Molto drenanti. Ricchi in elementi minerali. PH acido o leggermente acido.\");\n\t\tFilare[] filariBenefizio = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariBenefizio.length;i++){\n\t\t\tfilariBenefizio[i] = creaFilare(benefizio, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(nipozzano);\n\t\taziendaAgricolaDAO.saveLuogo(mormoreto);\n\t\taziendaAgricolaDAO.saveLuogo(montesodi);\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(pomino);\n\t\taziendaAgricolaDAO.saveLuogo(benefizio);\n\t\t\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Giulio d'Afflitto\"));\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Francesco Ermini\"));\n\n\t\t\n\t}", "Motivo create(Motivo motivo);", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "public org.oep.cmon.dao.tlct.model.DanhMucGiayTo create(long id);", "public void create() {\n\t\t\n\t}", "H1 createH1();", "void crear(Tonelaje tonelaje);", "Operacion createOperacion();", "OperacionColeccion createOperacionColeccion();", "public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }", "Compleja createCompleja();", "public void create(){}", "public void createAppareil(Home h) {\n\t\tint numOfChauffages = manager.createQuery(\"Select p From Heater p\", Heater.class).getResultList().size();\n\n if (numOfChauffages == 0) {\n \tHeater e1 =new Heater(100);\n \th.getChauffages().add(e1);\n \te1.setHome(h);\n manager.persist(e1);\n \n Heater e2 =new Heater(120);\n \th.getChauffages().add(e2);\n \te2.setHome(h);\n manager.persist(e2);\n \n \tElectronicDevice e3 =new ElectronicDevice(80);\n \th.getEquipements().add(e3);\n \te3.setHome(h);\n manager.persist(e3);\n \n ElectronicDevice e4 =new ElectronicDevice(70);\n \th.getEquipements().add(e4);\n \te4.setHome(h);\n manager.persist(e4);\n }\n\t}", "Foco createFoco();", "public org.oep.cmon.dao.dvc.model.ThuTuc2GiayTo create(long id);", "public AgenteViaHistoricoEntity createRegistro(AgenteViaHistoricoEntity entity)\n {\n LOGGER.log(Level.INFO,\"Inicia proceso de crear un registro\");\n return persistence.create(entity);\n }", "Long crear(Espacio espacio);", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "public void crearEntidad() throws EntidadNotFoundException {\r\n\t\tif (validarCampos(getNewEntidad())) {\r\n\t\t\tif (validarNomNitRepetidoEntidad(getNewEntidad())) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN, \"Advertencia: \", \"Nombre, Nit o Prejifo ya existe en GIA\"));\r\n\t\t\t} else {\r\n\t\t\t\tif (entidadController.crearEntidad(getNewEntidad())) {\r\n\t\t\t\t\tmensajeGrow(\"Entidad Creada Satisfactoriamente\", getNewEntidad());\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('entCrearDialog').hide()\");\r\n\t\t\t\t\tsetNewEntidad(new EntidadDTO());\r\n\t\t\t\t\tresetCodigoBUA();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmensajeGrow(\"Entidad No Fue Creada\", getNewEntidad());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlistarEntidades();\r\n\t\t\t// newEntidad = new EntidadDTO();\r\n\t\t\t// fechaActual();\r\n\t\t}\r\n\r\n\t}", "public void creoVehiculo() {\n\t\t\n\t\tAuto a= new Auto(false, 0);\n\t\ta.encender();\n\t\ta.setPatente(\"saraza\");\n\t\ta.setCantPuertas(123);\n\t\ta.setBaul(true);\n\t\t\n\t\tSystem.out.println(a);\n\t\t\n\t\tMoto m= new Moto();\n\t\tm.encender();\n\t\tm.frenar();\n\t\tm.setManubrio(true);\n\t\tm.setVelMax(543);\n\t\tm.setPatente(\"zas 241\");\n\t\tVehiculo a1= new Auto(true, 0);\n\t\ta1.setPatente(\"asd 423\");\n\t\t((Auto)a1).setBaul(true);\n\t\t((Auto)a1).setCantPuertas(15);\n\t\tif (a1 instanceof Auto) {\n\t\t\tAuto autito= (Auto) a1;\n\t\t\tautito.setBaul(true);\n\t\t\tautito.setCantPuertas(531);\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Moto) {\n\t\t\tMoto motito=(Moto) a1;\n\t\t\tmotito.setManubrio(false);\n\t\t\tmotito.setVelMax(15313);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Camion) {\n\t\t\tCamion camioncito=(Camion) a1;\n\t\t\tcamioncito.setAcoplado(false);\n\t\t\tcamioncito.setPatente(\"ge\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\tVehiculo a2= new Moto();\n\t\tSystem.out.println(a2);\n\t\ta1.frenar();\n\t\t\n\t\tArrayList<Vehiculo>listaVehiculo= new ArrayList<Vehiculo>();\n\t\tlistaVehiculo.add(new Auto(true, 53));\n\t\tlistaVehiculo.add(new Moto());\n\t\tlistaVehiculo.add(new Camion());\n\t\tfor (Vehiculo vehiculo : listaVehiculo) {\n\t\t\tSystem.out.println(\"clase:\" +vehiculo.getClass().getSimpleName());\n\t\t\tvehiculo.encender();\n\t\t\tvehiculo.frenar();\n\t\t\tSystem.out.println(\"=======================================\");\n\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "@Override\n\tpublic void create() {\n\n\t}", "Documento createDocumento();", "Oracion createOracion();", "public ExistenciaMaq generar(final String clave,final Date fecha, final Long almacenId);", "Klassenstufe createKlassenstufe();", "public synchronized String criaSolucao(Chamado chamado ) throws HelpDeskException {\n\t\tSolucao solucao = new Solucao(chamado);\n\t\t\t\t\n\t\t\n\t\tSolucaoDAO solucaoDAO = SolucaoDAO.getInstance();\n\t\tInteger id = (Integer) solucaoDAO.insert(solucao);\n\t\treturn id.toString();\n\t}", "public void crear(Tarea t) {\n t.saveIt();\n }", "public static void instanciarCreencias() {\n\t\tfor(int i =0; i < GestorPartida.getContJugadores(); i++) {\n\t\t\t\n\t\t\tGestorPartida.jugadores[i].setCreencias(new Creencias(GestorPartida.jugadores, GestorPartida.objetoJugador, GestorPartida.objetoSala, i)); \n\t\t}\n\t}", "private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(CostBio.TAGLIO_COGNOMI_PAGINA);\n String tag = \"Persone di cognome \";\n ArrayList titoli = new ArrayList();\n titoli.add(LibWiki.setBold(\"Cognome\"));\n titoli.add(LibWiki.setBold(\"Voci\"));\n\n for (Map.Entry<String, Integer> mappa: mappaCognomi.entrySet()) {\n\n cognomeText = mappa.getKey();\n num = mappa.getValue();\n if (num >= taglioPagine) {\n cognomeText = tag + cognomeText + CostBio.PIPE + cognomeText;\n cognomeText = LibWiki.setQuadre(cognomeText);\n cognomeText = LibWiki.setBold(cognomeText);\n }// end of if cycle\n\n listaRiga = new ArrayList();\n listaRiga.add(cognomeText);\n listaRiga.add(num);\n listaPagine.add(listaRiga);\n\n }// end of for cycle\n mappaTavola.put(Cost.KEY_MAPPA_SORTABLE_BOOLEAN, true);\n mappaTavola.put(Cost.KEY_MAPPA_TITOLI, titoli);\n mappaTavola.put(Cost.KEY_MAPPA_RIGHE_LISTA, listaPagine);\n testoTabella = LibWiki.creaTable(mappaTavola);\n\n return testoTabella;\n }", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public void createhomeonts(List<Homology> homos){\r\n\t\tSimpleExample se = new SimpleExample();\r\n\t\tString nameuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#Name\";\r\n\t\tString homoclsuri = se.PROMOTER_PREFIX + \"#Homology\";\r\n\t\tOntModel onmo = null;\r\n\t\ttry {\r\n\t\t\tonmo = se.loadDB2nd();\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}\r\n\t\tfor(Homology homo : homos){\r\n\t\t\tString homoidvuri = se.PROMOTER_PREFIX + \"#Homology_\" + homo.getId();\t\t\t\r\n\t\t\tIndividual itemp = onmo.createIndividual(homoidvuri, onmo.getOntClass(homoclsuri));\r\n\t\t\tse.addDataProperty(onmo, homoidvuri, nameuri, homo.getName());\t\t\t\r\n\t\t}\r\n\t\tse.testListIndividual(onmo, homoclsuri);\r\n\t}", "@Override\r\n\tpublic void create() {\n\r\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "public co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.soltec\n\t\t.datos_publicacion\n\t\t.ejb\n\t\t.sb\n\t\t.DatosPublicacionSTLocal create()\n\t\tthrows javax.ejb.CreateException;", "public CrearQuedadaVista() {\n }", "public void create() {\r\n for(int i=0; i< 50; i++){\r\n long id = (new Date()).getTime();\r\n Benefit newBeneficio = new Benefit();\r\n newBeneficio.setId(\"\"+id); \r\n newBeneficio.setCategory(\"almacenes \"+id);\r\n newBeneficio.setDescription(\"description \"+id);\r\n newBeneficio.setDiscount(i);\r\n newBeneficio.setStart_date(\"start_date \"+id);\r\n newBeneficio.setEnd_date(\"end_date \"+id);\r\n newBeneficio.setReview(\"review \"+id);\r\n newBeneficio.setTitle(\"title \"+id);\r\n newBeneficio.setLogo(\"logo \"+id);\r\n newBeneficio.setTwitter(\"twitter \"+id);\r\n newBeneficio.setFacebook(\"facebook \"+id);\r\n newBeneficio.setUrl(\"url \"+ id);\r\n \r\n Address address = new Address();\r\n address.setCity(\"Santiago \"+ id);\r\n address.setCountry(\"Santiago \"+ id);\r\n address.setLine_1(\"Linea 1 \"+ id);\r\n address.setLine_2(\"Linea 2 \"+ id);\r\n address.setLine_3(\"Linea 3 \"+ id);\r\n address.setPostcode(\"\" + id);\r\n address.setState(\"Region Metropolitana \"+ id);\r\n \r\n Location location = new Location();\r\n double[] cordenadas = {-77.99283,-33.9980};\r\n location.setCoordinates(cordenadas);\r\n location.setDistance(5.445);\r\n location.setType(\"Point\");\r\n \r\n Lobby lobby = new Lobby();\r\n lobby.setHours(\"HORA \"+ + id);\r\n \r\n newBeneficio = service.persist(newBeneficio);\r\n LOGGER.info(newBeneficio.toString());\r\n }\r\n }", "@Override\n\tpublic int createHitos(Hitos h) {\n\t\treturn hitosDao.createHitos(h);\n\t}", "CreationData creationData();", "public Angkot createAngkot(Angkot angkot) {\n \n // membuat sebuah ContentValues, yang berfungsi\n // untuk memasangkan data dengan nama-nama\n // kolom pada database\n ContentValues values = new ContentValues();\n values.put(HelperAngkot.COLUMN_NAME, angkot.getName());\n values.put(HelperAngkot.COLUMN_DESCRIPTION, angkot.getDescription());\n values.put(HelperAngkot.COLUMN_TIME, angkot.getTime());\n \n // mengeksekusi perintah SQL insert data\n // yang akan mengembalikan sebuah insert ID \n long insertId = database.insert(HelperAngkot.TABLE_NAME, null,\n values);\n \n // setelah data dimasukkan, memanggil perintah SQL Select \n // menggunakan Cursor untuk melihat apakah data tadi benar2 sudah masuk\n // dengan menyesuaikan ID = insertID \n Cursor cursor = database.query(HelperAngkot.TABLE_NAME,\n allColumns, HelperAngkot.COLUMN_ID + \" = \" + insertId, null,\n null, null, null);\n \n // pindah ke data paling pertama \n cursor.moveToFirst();\n \n // mengubah objek pada kursor pertama tadi\n // ke dalam objek barang\n Angkot newAngkot = cursorToAngkot(cursor);\n \n // close cursor\n cursor.close();\n \n // mengembalikan barang baru\n return newAngkot;\n }", "@Override\n public ComprobanteContable createAsientoDiarioBoleto(Boleto boleto) throws CRUDException {\n\n Optional op;\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n /*Aerolinea a = em.find(Aerolinea.class, boleto.getIdAerolinea().getIdAerolinea());\n if (a != null) {\n buff.append(a.getNumero());\n }*/\n buff.append(boleto.getIdAerolinea().getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas \n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n Cliente c = em.find(Cliente.class, boleto.getIdCliente().getIdCliente());\n op = Optional.ofNullable(c);\n\n if (!op.isPresent()) {\n throw new CRUDException(\"No se encontro un Cliente para el boleto\");\n }\n\n comprobante.setIdCliente(c);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(ComprobanteContable.Tipo.ASIENTO_DIARIO);\n\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), ComprobanteContable.Tipo.ASIENTO_DIARIO);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setIdNumeroGestion(numero);\n\n return comprobante;\n }", "public String altaGenero(){\n int id = coleccionGenero.size() + 1;\n Genero gen = new Genero(id, generoSeleccionado);\n //graba en bd\n GeneroService serv = new GeneroService();\n //refrescar otra vez la lista\n return \"lista-genero\";\n }", "@Override\n public ComprobanteContable createComprobante(\n Aerolinea a, Boleto boleto, Cliente cliente, String tipo) throws CRUDException {\n Optional op;\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n buff.append(a.getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas\n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n comprobante.setIdCliente(cliente);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(tipo);\n\n //ComprobanteContablePK numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n comprobante.setIdNumeroGestion(numero);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\n return comprobante;\n }", "public JogadorTradutor() {\n this.nome= \"Sem Registro\";\n this.pontuacao = pontuacao;\n id = id;\n \n geradorDesafioItaliano = new GerarPalavra(); // primeira palavra ja é gerada para o cliente\n }", "private void addHocSinh() {\n\t\thocsinh user = new hocsinh();\n\n\t\tuser.setMa(txtMa.getText());\n\t\tuser.setTen(txtTen.getText());\n\t\tuser.setTuoi(txtTuoi.getText());\n\t\tuser.setSdt(txtSdt.getText());\n\t\tuser.setDiaChi(txtDiaChi.getText());\n\t\tuser.setEmail(txtEmail.getText());\n\t\t\n\t\thocsinhdao.addUser(user);\n\t}", "public String createKontakt(String hodnota, String typ, String cislo_rp) {\n Session session = sessionFactory.openSession();\n Transaction tx = null;\n\n try {\n tx = session.beginTransaction();\n Kontakt kontakt = new Kontakt(hodnota, typ, cislo_rp);\n hodnota = (String) session.save(kontakt);\n tx.commit();\n } catch (HibernateException e) {\n e.printStackTrace();\n } finally {\n session.close();\n }\n\n return hodnota;\n }", "public void crearVehiculo( clsVehiculo vehiculo ){\n if( vehiculo.obtenerTipoMedioTransporte().equals(\"Carro\") ){\n //Debo llamar el modelo de CARRO\n modeloCarro.crearCarro( (clsCarro) vehiculo );\n } else if (vehiculo.obtenerTipoMedioTransporte().equals(\"Camion\")){\n //Debo llamar el modelo de CAMIÓN\n }\n }", "HdbdtiModel createHdbdtiModel();", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "public com.alain.puntocoma.model.Catalogo create(long catalogoId);", "public DCrearDisco( InterfazDiscotienda id ){\r\n super( id, true );\r\n principal = id;\r\n\r\n panelDatos = new PanelCrearDisco( );\r\n panelBotones = new PanelBotonesDisco( this );\r\n\r\n getContentPane( ).add( panelDatos, BorderLayout.CENTER );\r\n getContentPane( ).add( panelBotones, BorderLayout.SOUTH );\r\n\r\n setTitle( \"Crear Disco\" );\r\n pack();\r\n }", "private TipoAtaque generateTipoAtaque() {\n\t\treturn null;\r\n\t}", "protected void creaPagine() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* crea la pagina e aggiunge campi e pannelli */\n pag = this.addPagina(\"generale\");\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.data);\n pan.add(Cam.importo.get());\n pan.add(Cam.note.get());\n pag.add(pan);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public void criar() throws IOException {\nif (!directorio.exists()) {\n directorio.mkdir();\n System.out.println(\"Directorio criado\");\n } else {\n System.out.println(\"Directorio existe\");\n }\n if (!fileAdmin.exists()) {\n fileAdmin.createNewFile();\n System.out.println(\"file de Administrador criado com sucesso\");\n escrever(lista);\n } else {\n System.out.println(\"ficheiro existe\");\n }\n\n }", "public ExistenciaMaq generar(final String clave,final Long almacenId,int year,int mes);", "public void createAngajat(int id, String nume, String prenume, float salariu, int idPetShop) {\n\t\tif (petShopOperations.checkPetShop(idPetShop) == false)\n\t\t\tSystem.out.println(\"PetShop not found.\");\n\t\tif (angajatOperations.checkAngajat(id) == true)\n\t\t\tSystem.out.println(\"Angajat existent.\");\n\t\tAngajat angajatToAdd = new Angajat(id, nume, prenume, salariu, idPetShop);\n\t\tList<Angajat> angajati = angajatOperations.getAllAngajati();\n\t\tSystem.out.println(\"After adding...\");\n\t\tangajatOperations.addAngajat(angajatToAdd);\n\t\tangajatOperations.printListOfAngajati(angajati);\n\n\t}", "private void criaInterface() {\n\t\tColor azul = new Color(212, 212, 240);\n\n\t\tpainelMetadado.setLayout(null);\n\t\tpainelMetadado.setBackground(azul);\n\n\t\tmetadadoLabel = FactoryInterface.createJLabel(10, 3, 157, 30);\n\t\tpainelMetadado.add(metadadoLabel);\n\n\t\tbotaoAdicionar = FactoryInterface.createJButton(520, 3, 30, 30);\n\t\tbotaoAdicionar.setIcon(FactoryInterface.criarImageIcon(Imagem.ADICIONAR));\n\t\tbotaoAdicionar.setToolTipText(Sap.ADICIONAR.get(Sap.TERMO.get()));\n\t\tpainelMetadado.add(botaoAdicionar);\n\n\t\tbotaoEscolha = FactoryInterface.createJButton(560, 3, 30, 30);\n\t\tbotaoEscolha.setIcon(FactoryInterface.criarImageIcon(Imagem.VOLTAR_PRETO));\n\t\tbotaoEscolha.setToolTipText(Sap.ESCOLHER.get(Sap.TERMO.get()));\n\t\tbotaoEscolha.setEnabled(false);\n\t\tpainelMetadado.add(botaoEscolha);\n\n\t\talterarModo(false);\n\t\tatribuirAcoes();\n\t}", "private void añadirEnemigo() {\n\t\t\n\t\tif(enemigo.isVivo()==false){\n\t\t\tint k;\n\t\t\tk = (int)(Math.random()*1000)+1;\n\t\t\tif(k<=200){\n\t\t\t\tif(this.puntuacion<10000){\n\t\t\t\t\tenemigo.setTipo(0);\n\t\t\t\t\tenemigo.setVivo(true);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tenemigo.setTipo(1);\n\t\t\t\t\tenemigo.setVivo(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "Long crear(Prestamo prestamo);", "Dimension_hauteur createDimension_hauteur();", "Negacion createNegacion();", "public void createDienst()\n\t{\n\t\twriteDb(\"INSERT INTO dienstleistung (Bezeichnung, Preis)\" + \"VALUES('\" + typ + \"', '\" + preis +\"')\", getWriteCon());\n\t\tcommitDbConnection(getWriteCon());\n\t}", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "@Override\n public ComprobanteContable createComprobante(Aerolinea a, Boleto boleto, Cliente cliente, String tipo, NotaDebito nota) throws CRUDException {\n\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n buff.append(a.getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas\n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n comprobante.setIdCliente(cliente);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(tipo);\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n\n //ComprobanteContablePK numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), tipo);\n comprobante.setIdNumeroGestion(numero);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n return comprobante;\n }", "For createFor();", "@Override\r\npublic int create(Detalle_pedido d) {\n\treturn detalle_pedidoDao.create(d);\r\n}", "private void creaModuloMem() {\n /* variabili e costanti locali di lavoro */\n ArrayList<Campo> campi = new ArrayList<Campo>();\n ModuloRisultati modulo;\n Campo campo;\n\n try { // prova ad eseguire il codice\n\n campo = CampoFactory.intero(Campi.Ris.codicePiatto.getNome());\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.nomePiatto.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"piatto\");\n campo.setToolTipLista(\"nome del piatto\");\n campo.decora()\n .etichetta(\"nome del piatto\"); // le etichette servono per il dialogo ricerca\n campo.setLarghezza(250);\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.categoria.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"categoria\");\n campo.setToolTipLista(\"categoria del piatto\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteVolte.getNome());\n campo.setVisibileVistaDefault();\n campo.setLarghezza(80);\n campo.setTitoloColonna(\"quante volte\");\n campo.setToolTipLista(\n \"quante volte questo piatto è stato offerto nel periodo analizzato\");\n campo.decora().etichetta(\"quante volte\");\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quantiCoperti.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"coperti\");\n campo.setToolTipLista(\"numero di coperti che avrebbero potuto ordinare\");\n campo.decora().etichetta(\"n. coperti\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteComande.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"comande\");\n campo.setToolTipLista(\"numero di comande effettive\");\n campo.decora().etichetta(\"n. comande\");\n campo.setLarghezza(80);\n campo.setTotalizzabile(true);\n campi.add(campo);\n\n campo = CampoFactory.percentuale(Campi.Ris.gradimento.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"gradimento\");\n campo.setToolTipLista(\n \"percentuale di gradimento (è il 100% se tutti i coperti potenziali lo hanno ordinato)\");\n campo.decora().etichetta(\"% gradimento\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n modulo = new ModuloRisultati(campi);\n setModuloRisultati(modulo);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }", "@Override\n\tpublic void crearTipoAsiento(TipoAsiento tipoAsiento) throws Exception {\n\t\ttipoAsientoMapper.crearTipoAsiento(tipoAsiento);\n\t\t\n\t}", "public String createH() {\n\t\t// Create H per the algorithm\n\t\t// Create vertices of X --- The number of vertices in X is taken from the paper\n\t\t// k = (2 + epsilon)log n\n\t\tthis.createXVertices();\n\t\t// Create edges within X (both successive and random)\n\t\tthis.createXEdges();\n\n\t\treturn \"H Created (X Vertices)\";\n\n\t}", "private void criaCabecalho() {\r\n\t\tJLabel cabecalho = new JLabel(\"Cadastro de Homem\");\r\n\t\tcabecalho.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tcabecalho.setFont(new Font(\"Arial\", Font.PLAIN, 16));\r\n\t\tcabecalho.setForeground(Color.BLACK);\r\n\t\tcabecalho.setBounds(111, 41, 241, 33);\r\n\t\tpainelPrincipal.add(cabecalho);\r\n\t}", "Obligacion createObligacion();", "@Override\n void create(Cliente cliente);", "private void creaPannelli() {\n /* variabili e costanti locali di lavoro */\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* pannello date */\n pan = this.creaPanDate();\n this.addPannello(pan);\n\n /* pannello coperti */\n PanCoperti panCoperti = new PanCoperti();\n this.setPanCoperti(panCoperti);\n this.addPannello(panCoperti);\n\n\n /* pannello placeholder per il Navigatore risultati */\n /* il navigatore vi viene inserito in fase di inizializzazione */\n pan = new PannelloFlusso(Layout.ORIENTAMENTO_ORIZZONTALE);\n this.setPanNavigatore(pan);\n this.addPannello(pan);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }", "@Override\n public void crearReloj() {\n Manecilla seg;\n seg = new Manecilla(40,60,0,1,null);\n cronometro = new Reloj(seg);\n }", "public void crear_un_evento_recurrente_para_el_dia_de_hoy() {\n\t\t\n\t}", "public void CrearArco(String Identificador, E Dato, Double peso, Vertice Verticei, Vertice Verticef){\r\n this.Vi = Verticei;\r\n this.Vf = Verticef;\r\n this.id = Identificador;\r\n this.Dato = Dato;\r\n this.p = peso;\r\n }", "Vaisseau_longueur createVaisseau_longueur();", "public void generarContrato() {\r\n\t\ttry {\r\n\t\t\tString nombre = Contrato.generarContrato(estudiante, periodo, reserva.getArrSitioPeriodo().getSitNombre());\r\n\t\t\tnombre = \"Contrato_\" + estudiante.getId().getPerDni() + \".zip\";\r\n\t\t\tthis.zip(estudiante.getId().getPerDni(), periodo.getPrdId());\r\n\t\t\tFunciones.descargarZip(url_contrato+ nombre);\r\n\t\t\t// MODIFICAR NOMBRE CONTRATO\r\n\t\t\tmngRes.agregarContratoReserva(estudiante, periodo.getPrdId());\r\n\t\t} catch (Exception e) {\r\n\t\t\tFunciones.descargarPdf(url_contrato + \"error.pdf\");\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\r\n\t}", "public void crearTemaGenerico (String nombre) {\n\n controladorDeDominio.crearTema(nombre);\n System.out.println(\"Se ha creado el tema: \"+nombre);\n }", "public void generTirarDados() {\n\r\n\t}", "public synchronized void criarTabela(){\n \n String sql = \"CREATE TABLE IF NOT EXISTS CPF(\\n\"\n + \"id integer PRIMARY KEY AUTOINCREMENT,\\n\"//Autoincrement\n// + \"codDocumento integer,\\n\"\n + \"numCPF integer\\n\"\n + \");\";\n \n try (Connection c = ConexaoJDBC.getInstance();\n Statement stmt = c.createStatement()) {\n // create a new table\n stmt.execute(sql);\n stmt.close();\n c.close();\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage()); \n// System.out.println(e.getMessage());\n }\n System.out.println(\"Table created successfully\");\n }", "public void insertarHematologia(Examen.Hematologia hematologia)\n {\n ContentValues valores = new ContentValues();\n valores.put(\"fecha\",formatter.format(hematologia.getFechaExamen()));\n valores.put(\"fibrinogeno\",hematologia.getFibrinogeno());\n valores.put(\"leucocitos\",hematologia.getFibrinogeno());\n valores.put(\"hemoglobina\",hematologia.getHemoglobina());\n valores.put(\"hematocrito\",hematologia.getHematocrito());\n valores.put(\"plaqueta\",hematologia.getPlaquetas());\n valores.put(\"vsg\",hematologia.getVsg());\n valores.put(\"hcm\",hematologia.getVsg());\n\n db.insert(\"hematologia\",null,valores);\n\n }", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "public void insertarAlimento (int id_alimento, String nombre, String estado, float caloria, float proteinas,float grasas, float hidratos_de_carbono, float H20, float NE, float vitamina_a, float vitamina_B1, float vitamina_B2, float vitamina_C, float Niac, float sodio, float potasio, float calcio, float magnesio, float cobre, float hierro, float fosforo, float azufre, float cloro, float Fen, float Ileu, float Leu, float Lis, float Met, float Tre, float Tri, float Val, float Acid, float AlCAL);", "@Override\n\tpublic void create(Owner owner) {\n\n\t}", "public ExistenciaMaq generar(final Producto producto,final Date fecha, final Long almacenId);", "Hero createHero();", "@Override\n\tpublic void create(Empleado e) {\n\t\tSystem.out.println(\"Graba el empleado \" + e + \" en la BBDD.\");\n\t}", "private void crearGen(int id){\n Random random = new Random();\n int longitud = random.nextInt(6) + 5;\n\n random = null;\n\n Gen gen = new Gen(id, longitud);\n agregarGen(gen);\n }", "@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}", "protected void inicializar(){\n kr = new CreadorHojas(wp);\n jPanel1.add(wp,0); // inserta el workspace en el panel principal\n wp.insertarHoja(\"Hoja 1\");\n //wp.insertarHoja(\"Hoja 2\");\n //wp.insertarHoja(\"Hoja 3\");\n }", "private void crearVista() {\n\t\tVista vista = Vista.getInstancia();\n\t\tvista.addObservador(this);\n\n\t}" ]
[ "0.80885243", "0.71524245", "0.70287484", "0.70179754", "0.67037", "0.65962565", "0.6591758", "0.6518809", "0.64497596", "0.6427881", "0.6398209", "0.6372396", "0.63533497", "0.6342691", "0.6318086", "0.63175416", "0.6303132", "0.6278101", "0.6265563", "0.62644094", "0.6211168", "0.62057436", "0.61792517", "0.6107564", "0.61056685", "0.6104309", "0.6100975", "0.6094969", "0.60855687", "0.6082545", "0.6081239", "0.60755044", "0.607204", "0.60549474", "0.6031975", "0.60141915", "0.60134125", "0.6002833", "0.5996686", "0.5992123", "0.59738874", "0.5939577", "0.59183156", "0.5915401", "0.59044254", "0.5902083", "0.59019876", "0.58976567", "0.5897643", "0.5893156", "0.58920866", "0.5891539", "0.5883574", "0.5882566", "0.58360285", "0.58339715", "0.58119494", "0.58072937", "0.57964385", "0.5794922", "0.5791248", "0.5788995", "0.57879955", "0.57753885", "0.57740545", "0.57731044", "0.5772667", "0.5761529", "0.57593054", "0.5750878", "0.5739254", "0.57353455", "0.57321537", "0.57270783", "0.57253677", "0.57204586", "0.5715531", "0.57148", "0.571187", "0.5704002", "0.5698863", "0.56958073", "0.56868345", "0.56858087", "0.56837803", "0.56813824", "0.5667824", "0.5660101", "0.5658386", "0.5640415", "0.56395334", "0.5634001", "0.56275773", "0.56272227", "0.56233263", "0.5618104", "0.56178623", "0.5614321", "0.5611764", "0.56116503" ]
0.63173807
16
hasta que no tenga el brotherhood area no pueden organizarse parades
public Parade save(final Parade parade) { Assert.notNull(parade.getBrotherhood().getArea()); Assert.notNull(parade); Parade result = parade; Brotherhood brotherhood = null; Chapter chapter = null; final Authority authorityBrotherhood = new Authority(); authorityBrotherhood.setAuthority(Authority.BROTHERHOOD); final Authority authorityChapter = new Authority(); authorityChapter.setAuthority(Authority.CHAPTER); if (LoginService.getPrincipal().getAuthorities().contains(authorityBrotherhood)) brotherhood = this.brotherhoodService.findByPrincipal(); else if (LoginService.getPrincipal().getAuthorities().contains(authorityChapter)) { chapter = this.chapterService.findByPrincipal(); final Chapter chapterCoordinatedParades = this.chapterService.findChapterByAreaId(parade.getBrotherhood().getArea().getId()); Assert.isTrue(chapter.getId() == chapterCoordinatedParades.getId()); } Assert.isTrue(brotherhood != null || chapter != null); /* * Aqu� pasamos el status a SUBMITTED si se le pusiera en el create o el edit * el FINAL MODE a TRUE */ if (parade.getId() != 0) { final Parade paradeBBDD = this.findOne(parade.getId()); //si estaba a true ya no se puede modificar if (!LoginService.getPrincipal().getAuthorities().contains(authorityChapter)) Assert.isTrue(paradeBBDD.getFinalMode() == false); //si estaba a false el de BBDD y ahora se ha puesto a true if (parade.getStatus() == null && parade.getFinalMode() == true) parade.setStatus("SUBMITTED"); if (parade.getStatus() == "REJECTED") Assert.isTrue(parade.getRejectedComment() != null && parade.getRejectedComment() != ""); } else if (parade.getId() == 0 && parade.getFinalMode() == true) parade.setStatus("SUBMITTED"); final Date currentMoment = new Date(System.currentTimeMillis() - 1000); Assert.isTrue(parade.getOrganisationMoment().after(currentMoment)); result = this.paradeRepository.save(parade); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih napomena!!\");\r\n\t\t}\r\n\r\n\t}", "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "private void nourrireLePeuple() {\n\t\t\tint totalDepense = (int)((population * 1) + (populationColoniale * 0.8) + ((armee + armeeDeployee()) * nourritureParArmee));\r\n\t\t\tnourriture -= totalDepense;\r\n\t\t\tenFamine = (nourriture > 0) ? false : true;\r\n\t\t}", "Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);", "private boolean colisionEstorbos(){\r\n\t\tif(game.estorbo1.getBounds().intersects(getBounds())){\r\n\t\t\tasignarVelocidad(game.estorbo1, rebotes1);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif(game.estorbo2.getBounds().intersects(getBounds())){\r\n\t\t\tasignarVelocidad(game.estorbo2, rebotes2);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif(game.estorbo3.getBounds().intersects(getBounds())){\r\n\t\t\tasignarVelocidad(game.estorbo3, rebotes3);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean tienePapel()\n {\n //COMPLETE\n return this.hojas > 0;\n }", "public void acheter(){\n\t\t\n\t\t// Achete un billet si il reste des place\n\t\ttry {\n\t\t\tthis.maBilleterie.vendre();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tthis.status.put('B', System.currentTimeMillis());\n\t\tSystem.out.println(\"STATE B - Le festivalier \" + this.numFestivalier + \" a acheté sa place\");\n\t}", "public boolean NoEnPantalla() {\n\t\treturn x + xmapa + anchura < 0 ||\n\t\t\t\tx + xmapa - anchura > PanelJuego.ANCHURA ||\n\t\t\t\ty + ymapa + altura < 0 ||\n\t\t\t\ty + ymapa - altura > PanelJuego.ALTURA;\n\t}", "public void hallarPerimetroIsosceles() {\r\n this.perimetro = 2*(this.ladoA+this.ladoB);\r\n }", "public void partieEnCour(int niveau){\n\t\t\t\n\t\t\tif(niveau<=0){\n\t\t\t\tSystem.out.println(\"Quel niveau ?\");\n\t\t\t\tniveau=lire.nextInt();\n\t\t\t}\n\t\t\tthis.niveau=niveau;\n\t\t\tthis.terrainDeLaPartie=this.EnsembleNiveau.listeMap.get(niveau-1);\n\t\t\tSystem.out.println(terrainDeLaPartie.getCave().toString());\n\t\t\tthis.terrainDeLaPartie.afficherMap();\n\t\t\tboolean heroEnVie=true;\n\t\t\twhile(sortieNonAtteint()&& tempsNonEcoule() && heroEnVie==true){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(ObjetVivant eleViv:terrainDeLaPartie.getPersonnageSurLeTerrain()){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tif(eleViv.estEnVie()){\n\t\t\t\t\t\t\teleViv.seDeplacer(terrainDeLaPartie);\n\t\t\t\t\t\t}\n\t\t\t\t\t}catch(DeplacementInvalideException e){\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tfor(ObjetNonVivant eleNonViv:terrainDeLaPartie.getObjetSurLeTerrain()){\n\t\t\t\t\teleNonViv.tomber(terrainDeLaPartie);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tquiEstMort();\n\t\t\t\tquiEstDetruit();\n\t\t\t\tthis.terrainDeLaPartie.getObjetSurLeTerrain().addAll(this.terrainDeLaPartie.reinitialisationObjet());\n\t\t\t\tthis.terrainDeLaPartie.afficherMap();\n\t\t\t\tCave a=this.terrainDeLaPartie.getCave();\n\t\t\t\ta.setCaveTime(a.getCaveTime()-1);\t\t\t\n\t\t\t\tSystem.out.println(this.terrainDeLaPartie.getPersonnageSurLeTerrain().size()-1+\" enemie\");\n\t\t\t\tSystem.out.println(this.terrainDeLaPartie.getObjetSurLeTerrain().size()-1+\" objet\");\n\t\t\t\t\n\t\t\t\theroEnVie=heroEncoreDansListe(this.terrainDeLaPartie.getPersonnageSurLeTerrain());\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(heroEnVie && !sortieNonAtteint()){\n\t\t\t\tthis.terrainDeLaPartie=this.EnsembleNiveau.listeMap.get(niveau);\n\t\t\t\tpartieEnCour(niveau+1);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"Vous avez perdu ! Voulez vous rejouer ?\");\n\t\t\t\tSystem.out.println(\"1:rejouer\");\n\t\t\t\tSystem.out.println(\"2:quitter \");\n\t\t\t\tint rep=lire.nextInt();\n\t\t\t\tif(rep==1){\n\t\t\t\t\tFile f=new File(\"BD01plus.bdcff\");\n\t\t\t\t\tEnsembleNiveau=new Univers();\n\t\t\t\t\tLireFichier.lire(f, EnsembleNiveau);\n\t\t\t\t\tthis.partieEnCour(niveau);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}", "public void MemberOfParliament(){\n this.spendings_sum=0d;\n this.spending_repair_office=0d;\n this.how_many_trips=0;\n this.longest_trip=0;\n this.was_in_italy = false;\n }", "private boolean isBilancioInFaseEsercizioProvvisorio() {\n\t\tbilancioDad.setEnteEntity(req.getEnte());\n\t\treturn bilancioDad.isFaseEsercizioProvvisiorio(req.getBilancio().getAnno());\n\t}", "public boolean hayParadasCercanas(Coordenada coordenadaDeBusqueda) {\n\t\t// TODO Auto-generated method stub\n\t\treturn false;\n\t}", "public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}", "protected void jouerOrdinateur() {\n Random rdmPropoOrdi = new Random();\n\n for (int i = 0; i < nbrPosition; i++) {\n int min = 0;\n int max = propositionHaute[i];\n if (propositionBasse[i] != 0) {\n min = propositionBasse[i] + 1;\n }\n\n if (propositionOrdinateur[i] != combinaisonJoueur[i]) {\n int propoOrdi = min + rdmPropoOrdi.nextInt(max - min);\n propositionOrdinateur[i] = (byte) (propoOrdi);\n\n if (propositionOrdinateur[i] < combinaisonJoueur[i]) {\n propositionBasse[i] = propositionOrdinateur[i];\n } else {\n propositionHaute[i] = propositionOrdinateur[i];\n }\n }\n }\n }", "public Boolean gorbiernoConPrestamos() {\n if (super.getMundo().getGobierno().getPrestamos().size() > 0)\n return true;\n return false;\n }", "public boolean tienePrepaga() {\r\n\t\treturn obraSocial != null;\r\n\t}", "private boolean estPlein() {\n return (nbAssoc == associations.length);\n }", "private void compruebaColisiones()\n {\n // Comprobamos las colisiones con los Ufo\n for (Ufo ufo : ufos) {\n // Las naves Ufo chocan con la nave Guardian\n if (ufo.colisionaCon(guardian) && ufo.getVisible()) {\n mensajeDialogo(0);\n juego = false;\n }\n // Las naves Ufo llegan abajo de la pantalla\n if ((ufo.getPosicionY() - ufo.getAlto() > altoVentana)) {\n mensajeDialogo(0);\n juego = false;\n }\n // El disparo de la nave Guardian mata a una nave Ufo\n if (ufo.colisionaCon(disparoGuardian) && ufo.getVisible()) {\n ufo.setVisible(false);\n disparoGuardian.setVisible(false);\n disparoGuardian.setPosicion(0, 0);\n ufosMuertos++;\n }\n }\n\n // El disparo de las naves Ufo mata a la nave Guardian\n if (guardian.colisionaCon(disparoUfo)) {\n disparoUfo.setVisible(false);\n mensajeDialogo(0);\n juego = false;\n }\n\n // Si el disparo Guardian colisiona con el disparo de los Ufo, se\n // eliminan ambos\n if (disparoGuardian.colisionaCon(disparoUfo)) {\n disparoGuardian.setVisible(false);\n disparoGuardian.setPosicion(0, 0);\n disparoUfo.setVisible(false);\n }\n }", "@Override\n\tpublic void checkeoDeBateria() {\n\n\t}", "public void caminar(){\n if(this.robot.getOrden() == true){\n System.out.println(\"Ya tengo la orden, caminare a la cocina para empezar a prepararla.\");\n this.robot.asignarEstadoActual(this.robot.getEstadoCaminar());\n }\n }", "@SuppressWarnings(\"SuspiciousMethodCalls\")\n private int houve_estouro()\n {\n int retorno = 0;\n boolean checar = false;\n for (Map.Entry i: janela.entrySet())\n {\n if (janela.get(i.getKey()).isEstouro())\n {\n janela.get(i.getKey()).setEstouro(false);\n retorno =(int) i.getKey();\n checar = true;\n break;\n }\n }\n for(Map.Entry i2: janela.entrySet()) janela.get(i2.getKey()).setEstouro(false);\n if(checar) return retorno;\n else return -69;\n }", "private void verificaVencedor(){\n\n // Metodo para verificar o vencedor da partida\n\n if(numJogadas > 4) {\n\n String vencedor = tabuleiro.verificaVencedor();\n\n vencedor = (numJogadas == tabuleiro.TAM_TABULEIRO && vencedor == null) ? \"Deu Velha!\" : vencedor;\n\n if (vencedor != null) {\n\n mostraVencedor(vencedor);\n temVencedor = true;\n\n }\n\n }\n\n }", "private void aggiornamento()\n {\n\t gestoreTasti.aggiornamento();\n\t \n\t /*Se lo stato di gioco esiste eseguiamo il suo aggiornamento.*/\n if(Stato.getStato() != null)\n {\n \t Stato.getStato().aggiornamento();\n }\n }", "public boolean souvislost(){\n\t\t\n\t\tif(pole.size() != pocetVrcholu){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "public boolean Victoria(){\n boolean respuesta=false;\n if(!(this.palabra.contains(\"-\"))&& this.oportunidades>0 && !(this.palabra.isEmpty())){\n this.heGanado=true;\n respuesta=true;\n }\n return respuesta;\n }", "public void imprimir() {\n\t\r\n\tSystem.out.println(\"El circulo tiene un perimetro de \"+ this.perimetro + \" y un area de \"+ this.area);\r\n\t\r\n\t}", "public void verificar_que_se_halla_creado() {\n\t\t\n\t}", "public boolean estaVacia() {\n return (top == -1); // regresa verdadero si la cima es igual a -1 \r\n }", "private boolean estSurPlateau(Coordonnees emplacement) {\n return emplacement.getLigne() >= 0 && emplacement.getColonne() >= 0 && emplacement.getLigne() < Plateau.NOMBRE_COLONNE && emplacement.getColonne() < Plateau.NOMBRE_LIGNE;\n }", "public void verEstadoAmarres() {\n System.out.println(\"****************************************************\");\n for(int posicion = 0; posicion<NUMERO_AMARRES; posicion++) {\n int i = 0;\n boolean posicionEncontrada = false;\n while(!posicionEncontrada && i<alquileres.size()) {\n if(alquileres.get(i)!=null) {\n if(alquileres.get(i).getPosicion()==posicion) {\n System.out.println(\"Amarre [\"+posicion+\"] está ocupado\");\n System.out.println(\"Precio: \" + alquileres.get(i).getCosteAlquiler());\n posicionEncontrada = true;\n }\n }\n i++;\n }\n if(!posicionEncontrada) {\n System.out.println(\"Amarre [\"+posicion+\"] No está ocupado\");\n }\n }\n System.out.println(\"****************************************************\");\n }", "public void checaColision() {\n //Si el proyectil colisiona con la barra entonces..\n if (objBarra.colisiona(objProyectil)) {\n //Guardo el centro x del proyectil para no facilitar su comparacion\n int iCentroProyectil = objProyectil.getX()\n + objProyectil.getAncho() / 2;\n //Si el nivel de Y del lado inferior del proyectil es el mismo que\n //el nivel de Y del lado superior de la barra...\n if (objProyectil.getY() + objProyectil.getAlto()\n >= objBarra.getY()) {\n //Dividimos el ancho de la barra en 2 secciones que otorgan \n //diferente velocidad dependiendo que seccion toque el proyectil\n //Si el centro del proyectil toca la primera parte de la \n //barra o el lado izquierdo del proyectil esta mas a la \n //izquierda que el lado izquierdo de la barra...\n if ((iCentroProyectil > objBarra.getX() && iCentroProyectil\n < objBarra.getX() + objBarra.getAncho() / 2)\n || (objProyectil.getX() < objBarra.getX())) {\n bDireccionX = false; // arriba\n bDireccionY = false; // izquierda\n } //Si el centro del proyectil toca la ultima parte de la barra o\n //el lado derecho del proyectil esta mas a la derecha que el \n //lado derecho de la barra\n else if ((iCentroProyectil > objBarra.getX()\n + (objBarra.getAncho() / 2) && iCentroProyectil\n < objBarra.getX() + (objBarra.getAncho()\n - objBarra.getAncho() / 18)) || (objProyectil.getX()\n + objProyectil.getAncho() > objBarra.getX()\n + objBarra.getAncho())) {\n bDireccionX = true; // arriba\n bDireccionY = false; // derecha\n }\n }\n\n }\n for (Object objeBloque : lnkBloques) {\n Objeto objBloque = (Objeto) objeBloque;\n //Checa si la barra choca con los bloques (Choca con el poder)\n if(objBarra.colisiona(objBloque)) {\n bPoderes[objBloque.getPoder()] = true;\n }\n // Checa si el proyectil choca contra los bloques\n if (objBloque.colisiona(objProyectil)) {\n iScore++; // Se aumenta en 1 el score\n iNumBloques--; //Se resta el numero de bloques\n //Se activa el bloque con el poder para que se mueva para abajo\n if (objBloque.getPoder() != 0) {\n URL urlImagenPoder\n = this.getClass().getResource(\"metanfeta.png\");\n objBloque.setImagen(Toolkit.getDefaultToolkit()\n .getImage(urlImagenPoder));\n objBloque.setVelocidad(2);\n bAvanzaBloque = true;\n }\n if(objProyectil.colisiona(objBloque.getX(), \n objBloque.getY()) ||\n objProyectil.colisiona(objBloque.getX(), \n objBloque.getY()+objBloque.getAlto())) {\n objBloque.setX(getWidth() + 50);\n bDireccionX = false; //va hacia arriba\n }\n if(objProyectil.colisiona(objBloque.getX()+objBloque.getAncho(), \n objBloque.getY()) ||\n objProyectil.colisiona(objBloque.getX()+objBloque.getAncho(), \n objBloque.getY()+objBloque.getAlto())) {\n objBloque.setX(getWidth() + 50);\n bDireccionX = true; //va hacia arriba\n }\n //Si la parte superior de proyectil es mayor o igual a la parte\n //inferior del bloque(esta golpeando por abajo del bloque...\n if((objProyectil.getY() <= objBloque.getY() \n + objBloque.getAlto()) && (objProyectil.getY() \n + objProyectil.getAlto() > objBloque.getY() \n + objBloque.getAlto())) {\n objBloque.setX(getWidth() + 50);\n bDireccionY = true; //va hacia abajo\n \n \n }\n //parte inferior del proyectil es menor o igual a la de la parte\n //superior del bloque(esta golpeando por arriba)...\n else if(( objProyectil.getY() + objProyectil.getAlto()\n >= objBloque.getY())&&( objProyectil.getY() \n < objBloque.getY())) {\n objBloque.setX(getWidth() + 50);\n bDireccionY = false; //va hacia arriba\n }\n //Si esta golpeando por algun otro lugar (los lados)...\n else {\n objBloque.setX(getWidth()+50);\n bDireccionX = !bDireccionX;\n }\n }\n }\n //Si la barra choca con el lado izquierdo...\n if (objBarra.getX() < 0) {\n objBarra.setX(0); //Se posiciona al principio antes de salir\n } //Si toca el lado derecho del Jframe...\n else if (objBarra.getX() + objBarra.getAncho() - objBarra.getAncho() / 18\n > getWidth()) {\n objBarra.setX(getWidth() - objBarra.getAncho() + objBarra.getAncho()\n / 18);// Se posiciciona al final antes de salir\n }\n //Si el Proyectil choca con cualquier limite de los lados...\n if (objProyectil.getX() < 0 || objProyectil.getX()\n + objProyectil.getAncho() > getWidth()) {\n //Cambias su direccion al contrario\n bDireccionX = !bDireccionX;\n } //Si el Proyectil choca con la parte superior del Jframe...\n else if (objProyectil.getY() < 0) {\n //Cambias su direccion al contrario\n bDireccionY = !bDireccionY;\n } //Si el proyectil toca el fondo del Jframe...\n else if (objProyectil.getY() + objProyectil.getAlto() > getHeight()) {\n iVidas--; //Se resta una vida.\n // se posiciona el proyectil en el centro arriba de barra\n objProyectil.reposiciona((objBarra.getX() + objBarra.getAncho() / 2\n - (objProyectil.getAncho() / 2)), (objBarra.getY()\n - objProyectil.getAlto()));\n }\n }", "private void esconderBotao() {\n\t\tfor (int i = 0; i < dificuldade.getValor(); i++) {// OLHAM TODOS OS BOTOES\r\n\t\t\tfor (int j = 0; j < dificuldade.getValor(); j++) {\r\n\t\t\t\tif (celulaEscolhida(botoes[i][j]).isVisivel() && botoes[i][j].isVisible()) {// SE A CELULA FOR VISIVEL E\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// O BOTAO FOR VISIVEL,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ESCONDE O BOTAO\r\n\t\t\t\t\tbotoes[i][j].setVisible(false);//DEIXA BOTAO INVISIVEL\r\n\t\t\t\t\tlblNumeros[i][j].setVisible(true);//DEIXA O LABEL ATRAS DO BOTAO VISIVEL\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void carregarRegistroDoPrimeiroAno() {\n\t\tlimpar();\n\t\t\n\t\tlistaAlunos = repository.encontrarComQueryNomeada(AlunosMilitaresOMDS.class, \"alunosMilitaresOMDS.listarPorOMEPeriodo\",\n\t\t\t\tnew Object[]{\"periodo\", periodo},\n\t\t\t\tnew Object[]{\"organizacao\", subordinado},\n\t\t\t\tnew Object[]{\"ano\", Ano.PRIMEIRO});\n\t\t\n\t\tif (listaAlunos.size() > 0) {\n\t\t\tlistaAlunos.forEach(efetivo ->{\n\t\t\t\tif (efetivo.getTipoAlunosMilitaresOMDS().equals(TipoAlunosMilitaresOMDS.OFICIAL))\n\t\t\t\t\tsetAlunosMilitarOficial(listaAlunos.get(0));\n\t\t\t\tif(efetivo.getTipoAlunosMilitaresOMDS().equals(TipoAlunosMilitaresOMDS.PRACA))\n\t\t\t\t\tsetAlunosMilitarPraca(listaAlunos.get(0));;\n\t\t\t});\n\t\t\thabilitaBotao=false;\n\t\t}\n\t\torganizarValores();\n\t}", "private boolean estPrise(Deplacement unDeplacement, Couleur couleurJoueur) {\n\t\tPosition[] positions = unDeplacement.toArray(new Position[0]); \n\t\tif(positions.length > 2) {\n\t\t\treturn true;\n\t\t}\n\t\tCollection<Position> c = Position.diagonale(positions[0], positions[1]); \n\t\tif (c.size() >= 1) {\n\t\t\tPion aDeplacer = obtenirPion(positions[0]);\n\t\t\tif(!(aDeplacer instanceof Dame)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tfor (Position pos: c) {\n\t\t\t\t\tif(obtenirPion(pos) != null) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "private int hallarCuposArea(String k_idparqueadero, String k_idarea) throws CaException{\n int cupos = 0;\n \n try {\n String strSQL = \"SELECT q_cuposdisponibles from area WHERE k_idparqueadero=? AND k_idarea=?\";\n Connection conexion = ServiceLocator.getInstance().tomarConexion();\n PreparedStatement prepStmt = conexion.prepareStatement(strSQL);\n prepStmt.setInt(1, Integer.valueOf(k_idparqueadero));\n prepStmt.setString(2, k_idarea);\n ResultSet rs = prepStmt.executeQuery();\n while (rs.next()) {\n cupos = rs.getInt(1);\n break;\n }\n } catch (SQLException e) {\n throw new CaException(\"ServicioDAO\", \"No pudo recuperar el servicio\" + e.getMessage());\n }finally {\n ServiceLocator.getInstance().liberarConexion();\n }\n \n return cupos;\n }", "private boolean estValide(Deplacement unDeplacement, Couleur couleurJoueur) {\n\t\tboolean estOK = true; \n\n\t\t//toutes les positions\n\t\tPosition[] positions = unDeplacement.toArray(new Position[0]);\n\n\t\t//on teste s'il y a au moins deux positions\n\t\testOK = estOK && (positions.length >= 2); \n\n\t\tif (estOK) {\n\t\n\t\t\t//on teste si toutes les positions sont valides\n\t\t\tfor (int i = 0; ( (i < positions.length)&&(estOK) ); i++) {\n\t\t\t\testOK = estOK && (positions[i].estValide()); \n\t\t\t}\n\t\t\tif(!estOK) return false;\n\n\t\t\t//position de depart\n\t\t\tPosition depart = positions[0];\n\n\t\t\t//on teste s'il y a un pion de la couleur du joueur\n\t\t\tPion aDeplacer = obtenirPion(depart); \n\t\t\testOK = estOK && (aDeplacer != null); \n\t\t\testOK = estOK && (aDeplacer.aMemeCouleur(couleurJoueur)); \n\t\t\t\n\t\t\t//on teste que les cases sont libres\t\t\n\t\t\tfor (int i = 1; ( (i < positions.length)&&(estOK) ); i++) {\n\t\t\t\testOK = estOK && (obtenirPion(positions[i]) == null); \n\t\t\t}\n\t\t\tif(!estOK) return false;\n\t\t\t\n\t\t\tArrayList<Position> pionsSuppr = new ArrayList<Position>();\n\t\t\tArrayList<Pion> piecesSuppr = new ArrayList<Pion>();\n\t\t\tfor (int i = 1; ( (i < positions.length)&&(estOK) ); i++) {\n\t\t\t\testOK = estOK && Position.estDiagonale(positions[i-1], positions[i]);\n\t\t\t\tif(!estOK) break;\n\t\t\t\t\n\t\t\t\tCollection<Position> c = Position.diagonale(positions[i-1], positions[i]); \n\t\t\t\tif (c.size() == 1) {\n\t\t\t\t\tif(!(aDeplacer instanceof Dame)) {\n\t\t\t\t\t\tfor (Position pos: c) {\n\t\t\t\t\t\t\tPion aSupprimer = obtenirPion(pos); \n\t\t\t\t\t\t\testOK = estOK && ( (aSupprimer != null) && (!aSupprimer.aMemeCouleur(couleurJoueur)) );\n\t\t\t\t\t\t\tif (estOK) {\n\t\t\t\t\t\t\t\tpionsSuppr.add(pos);\n\t\t\t\t\t\t\t\tpiecesSuppr.add(aSupprimer);\n\t\t\t\t\t\t\t\tsupprimerPion(pos);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tint nbPionsSupprimes = 0;\n\t\t\t\t\t\tfor (Position pos: c) {\n\t\t\t\t\t\t\tPion aSupprimer = obtenirPion(pos); \n\t\t\t\t\t\t\tif(aSupprimer != null) {\n\t\t\t\t\t\t\t\testOK = estOK && (!aSupprimer.aMemeCouleur(couleurJoueur));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (estOK && (aSupprimer != null)) {\n\t\t\t\t\t\t\t\tnbPionsSupprimes++;\n\t\t\t\t\t\t\t\tpionsSuppr.add(pos);\n\t\t\t\t\t\t\t\tpiecesSuppr.add(aSupprimer);\n\t\t\t\t\t\t\t\tsupprimerPion(pos);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(nbPionsSupprimes == 0) {\n\t\t\t\t\t\t\testOK = estOK && (positions.length == 2);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\testOK = estOK && (nbPionsSupprimes == 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (c.size() > 1) {\n\t\t\t\t\t//c'est valide que pour une dame\n\t\t\t\t\tif(!(aDeplacer instanceof Dame)) {\n\t\t\t\t\t\testOK = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//est une dame\n\t\t\t\t\t\tint nbPionsSupprimes = 0;\n\t\t\t\t\t\tfor (Position pos: c) {\n\t\t\t\t\t\t\tPion aSupprimer = obtenirPion(pos); \n\t\t\t\t\t\t\tif(aSupprimer != null) {\n\t\t\t\t\t\t\t\testOK = estOK && (!aSupprimer.aMemeCouleur(couleurJoueur));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (estOK && (aSupprimer != null)) {\n\t\t\t\t\t\t\t\tnbPionsSupprimes++;\n\t\t\t\t\t\t\t\tpionsSuppr.add(pos);\n\t\t\t\t\t\t\t\tpiecesSuppr.add(aSupprimer);\n\t\t\t\t\t\t\t\tsupprimerPion(pos);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(nbPionsSupprimes == 0) {\n\t\t\t\t\t\t\testOK = estOK && (positions.length == 2);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\testOK = estOK && (nbPionsSupprimes == 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (c.size() == 0) {\n\t\t\t\t\testOK = estOK && (positions.length == 2);\n\t\t\t\t\tif(!(aDeplacer instanceof Dame)) {\n\t\t\t\t\t\tif (couleurJoueur.equals(Couleur.noir())) {\n\t\t\t\t\t\t\testOK = estOK && (positions[i].j() - positions[i-1].j() > 0);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\testOK = estOK && (positions[i].j() - positions[i-1].j() < 0);\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\tfor (int i=0; i<pionsSuppr.size(); i++) {\n\t\t\t\tajouterPion(piecesSuppr.get(i), pionsSuppr.get(i));\n\t\t\t}\n\t\t}\n\n\t\treturn estOK; \n }", "public boolean estaLlena() {\n return (capacidad == top+1); // regresa verdadero si la capacidad es igual al tope (la cima +1)\r\n }", "@Override\r\n\tpublic boolean isChocado(Bola bola) {\r\n\t isChocado = bola.getBounds().intersects(this.getBounds());\r\n\t if(isChocado) {\r\n\t \tif(ark.existeBloque(this)) {\r\n\t \t\tsetY(getY()-getHeight()-3);\r\n\t \t\treturn false;\r\n\t \t}\r\n\t \tark.setUltimoBloque(new BloqueNaranja(getX(),getY(),getWidth(),getHeight(),ark));\r\n\t \tsetVivo(false);\r\n\t }\r\n\t return isChocado;\r\n }", "public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }", "@Test\n public void testCheckPlaceHorizontaleTeteDehors() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(10, 10, j, p);\n\n try {\n j.checkPlace(\"Z6\", g, 5, true);\n fail(\"Une exception devrai etre lancée\");\n }\n catch (Exception e) {\n assertTrue(\"L'exception n'est pas bonne\", e instanceof BateauxStartPointInvalide);\n }\n }", "public void naplnVrcholy() {\r\n System.out.println(\"Zadajte pocet vrcholov: \");\r\n pocetVrcholov = skener.nextInt();\r\n for (int i=0; i < pocetVrcholov; i++) {\r\n nekonecno = (int)(Double.POSITIVE_INFINITY);\r\n if(i==0) { //pre prvy vrchol potrebujeme nastavit vzdialenost 0 \r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu, 0, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n } else { //ostatne budu mat nekonecno alebo v tomto pripade 9999 (lebo tuto hodnotu v mensich grafoch nepresiahnem)\r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu,nekonecno, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n }\r\n }\r\n }", "@Before\n\tpublic void incoporacionDeCandidatosYProvinciasHabilitadasALaJuntaElectoral(){\n\t\tmendoza.agregarPartido(pro);\n\t\tbuenosaires.agregarPartido(pro);\n\t\trionegro.agregarPartido(pro);\n\t\tentrerios.agregarPartido(pro);\n\t\tmendoza.agregarPartido(renovador);\n\t\tbuenosaires.agregarPartido(renovador);\n\t\trionegro.agregarPartido(renovador);\n\t\tentrerios.agregarPartido(renovador);\n\t\tmendoza.agregarPartido(fpv);\n\t\tbuenosaires.agregarPartido(fpv);\n\t\trionegro.agregarPartido(fpv);\n\t\tentrerios.agregarPartido(fpv);\n\n\t\t//Incorporacion de los candidatos habilitados al centro de computos\n\t\tjuntaElectoral.agregarCandidato(macri);\t\t\n\t\tjuntaElectoral.agregarCandidato(massa);\t\t\n\t\tjuntaElectoral.agregarCandidato(scioli);\n\n\t\t//Incorporacion de las provincias habilitadas al centro de computos\n\t\tjuntaElectoral.agregarProvincia(mendoza);\n\t\tjuntaElectoral.agregarProvincia(buenosaires);\n\t\tjuntaElectoral.agregarProvincia(rionegro);\n\t\tjuntaElectoral.agregarProvincia(entrerios);\n\t}", "public void orina() {\n System.out.println(\"Que bien me quedé! Deposito vaciado.\");\n }", "@Test\n public void testCheckPlaceVerticaleTeteDehors() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(10, 10, j, p);\n\n try {\n j.checkPlace(\"A50\", g, 5, false);\n fail(\"Une exception devrai etre lancée\");\n }\n catch (Exception e) {\n assertTrue(\"L'exception n'est pas bonne\", e instanceof BateauxStartPointInvalide);\n }\n }", "public void trykkPaa() throws TrykketPaaBombe {\n // Ingenting skal skje dersom en av disse er true;\n if (brettTapt || trykketPaa || flagget) {\n return;\n }\n\n // Om ruten er en bombe taper man brettet\n if (bombe) {\n trykketPaa = true;\n setText(\"x\");\n setBackground(new Background(new BackgroundFill(Color.RED, CornerRadii.EMPTY, Insets.EMPTY)));\n throw new TrykketPaaBombe();\n }\n // Om ruten har null naboer skal et stoerre omraade aapnes\n else if (bombeNaboer == 0) {\n Lenkeliste<Rute> besokt = new Lenkeliste<Rute>();\n Lenkeliste<Rute> aapneDisse = new Lenkeliste<Rute>();\n aapneDisse.leggTil(this);\n // Rekursiv metode som fyller aapneDisse med riktige ruter\n finnAapentOmraade(besokt, aapneDisse);\n for (Rute r : aapneDisse) {\n r.aapne();\n }\n } else {\n aapne();\n }\n }", "public void controlla_bersaglio() {\n\n if ((x[0] == bersaglio_x) && (y[0] == bersaglio_y)) {\n punti++;\n posiziona_bersaglio();\n }\n }", "public void pagarSaidaDaPrisao() throws Exception {\n if (listaJogadoresNaPrisao.contains(listaJogadores.get(jogadorAtual()).getNome())) {\n listaJogadoresNaPrisao.remove(listaJogadores.get(jogadorAtual()).getNome());\n listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n listaJogadores.get(jogadorAtual()).retirarDinheiro(50);\n\n } else {\n print(\"\\tTentou tirar \" + listaJogadores.get(jogadorAtual()).getNome());\n throw new Exception(\"player is not on jail\");\n }\n\n this.pagouPrisaoRecentemente = false;\n }", "public void inOrden(){\n\t\tPlanta planta= Singleton.GetPlanta();\n\t Arbol <T> aux=null;\n\t if (!vacio()) {\n\t if ((aux=getHijoIzq())!=null) {\n\t aux.inOrden();\n\t } \n\t \n\t planta.out().print(\" \"+this.datoRaiz);\n\t \n\t if ((aux=getHijoDer())!=null){\n\t aux.inOrden();\n\t } \n\t }\n\t}", "public BoroughContestObjects createBoroughContestInOslo() {\n\t\tBoroughContestObjects objects = new BoroughContestObjects();\n\n\t\tobjects.nbNoLocale = getNbNoLocale();\n\t\tobjects.adminUserData = createUserDataForAdministrator(objects.nbNoLocale);\n\t\tobjects.electionEvent = createElectionEvent(objects.adminUserData, objects.nbNoLocale);\n\n\t\tcreateAreas(objects.electionEvent, objects.nbNoLocale);\n\t\tcopyRolesFromAdminEvent(objects.electionEvent);\n\t\tsetMvAreaOnUserData(objects.adminUserData, backend.getMvAreaRepository().findSingleByPath(AreaPath.from(ELECTION_EVENT_ID)));\n\n\t\tobjects.electionGroup = createElectionGroup(objects.adminUserData, objects.electionEvent);\n\t\tobjects.election = createElection(objects.adminUserData, objects.electionGroup);\n\t\tList<NewlyCreatedContest> newlyCreatedContests = createContests(objects.adminUserData, objects.election);\n\t\tobjects.registerNewlyCreatedContests(newlyCreatedContests);\n\n\t\tMvArea osloMunicipality = backend.getMvAreaRepository().findSingleByPath(OSLO_MUNICIPALITY_AREA_PATH);\n\t\tMvArea kampenPollingDistrict = backend.getMvAreaRepository().findSingleByPath(KAMPEN_SKOLE_AREA_PATH);\n\t\tcreateReportingUnit(objects.adminUserData, OSLO_ELECTION_PATH, osloMunicipality, ReportingUnitTypeId.VALGSTYRET, \"Oslo\");\n\t\tcreateReportingUnit(objects.adminUserData, OSLO_ELECTION_PATH, kampenPollingDistrict, ReportingUnitTypeId.STEMMESTYRET, \"Kampen skole\");\n\n\t\tobjects.opptellingsansvarligUserData = createOpptellingsansvarligUserData(objects.nbNoLocale, objects.electionEvent);\n\n\t\tParty arbeiderpartiet = createArbeiderpartiet(objects.adminUserData, objects.electionEvent);\n\n\t\tcreateBallotsAndAffiliations(objects.contestIdToContestMap, arbeiderpartiet, objects.nbNoLocale, objects.adminUserData, 2);\n\n\t\tcreateElectionDay(ELECTION_DAY_1, objects.electionEvent, objects.adminUserData);\n\t\tcreateElectionDay(ELECTION_DAY_2, objects.electionEvent, objects.adminUserData);\n\n\t\tcreateAntallStemmesedlerLagtTilSide(objects, newlyCreatedContests, osloMunicipality);\n\n\t\treturn objects;\n\t}", "public void posizionaPecora(Agnello pecora) {\n\t\tpecore.add(pecora);\n\t\tif (pecora instanceof PecoraAdulta) {\n\t\t\tif (((PecoraAdulta) pecora).isMaschio())\n\t\t\t\tnumMontoni++;\n\t\t\telse\n\t\t\t\tnumPecoreFemmine++;\n\t\t\treturn;\n\t\t} else if (!(pecora instanceof PecoraNera))\n\t\t\tnumeroAgelli++;\n\t}", "public void verEstado(){\n for(int i = 0;i <NUMERO_AMARRES;i++) {\n System.out.println(\"Amarre nº\" + i);\n if(alquileres.get(i) == null) {\n System.out.println(\"Libre\");\n }\n else{\n System.out.println(\"ocupado\");\n System.out.println(alquileres.get(i));\n } \n }\n }", "public void moverArriba() {\n estado = EstadosPersonaje.QUIETO;\n mover(new Vector2(0, 1));\n }", "@Override\n\tpublic int getHasarPuaniGoster() {\n\t\treturn 0;\n\t}", "public boolean inGoalRegion() {\n return position >= GOAL_POSITION;\n }", "public boolean placementDone() {return placedShips == 4;}", "public void atrapar() {\n if( una == false) {\n\t\tif ((app.mouseX > 377 && app.mouseX < 591) && (app.mouseY > 336 && app.mouseY < 382)) {\n\t\t\tint aleotoridad = (int) app.random(0, 4);\n\n\t\t\tif (aleotoridad == 3) {\n\n\t\t\t\tSystem.out.print(\"Lo atrapaste\");\n\t\t\t\tcambioEnemigo = 3;\n\t\t\t\tsuerte = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\t\t\tif (aleotoridad == 1 || aleotoridad == 2 || aleotoridad == 0) {\n\n\t\t\t\tSystem.out.print(\"Mala Suerte\");\n\t\t\t\tcambioEnemigo = 4;\n\t\t\t\tmal = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\n\t\t}\n }\n\t}", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "private Boolean esMejor() {\n if(debug) {\n System.out.println(\"**********************esMejor\");\n }\n \n if(this.solOptima == null || (this.sol.pesoEmparejamiento < this.solOptima.pesoEmparejamiento)) return true;\n else return false;\n }", "@Override\n\tpublic boolean estPleine() {\n\t\treturn getNbClients()==capacite;\n\t}", "public void AwansSpoleczny() {\n\t\tSystem.out.println(\"AwansSpoleczny\");\n\t\tif(Plansza.getNiewolnikNaPLanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getNiewolnikNaPLanszy() instanceof Niewolnicy) {\n\t\t\tPlansza.setNiewolnikNaPlanszy(new Mieszczanie(Plansza.getNiewolnikNaPLanszy()));\n\t\t}\n\t\t\t\n\t\tif(Plansza.getRzemieslnikNaPlanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getRzemieslnikNaPlanszy() instanceof Rzemieslnicy) {\n\t\t\tPlansza.setRzemieslnikNaPlanszy(new Handlarze(Plansza.getRzemieslnikNaPlanszy()));\n\t\t}\n\t\t\t\n\t\tif(Plansza.getArystokrataNaPlanszy().getPopulacja() >= ZapisOdczyt.getPOPULACJAMAX()*0.67 && Plansza.getArystokrataNaPlanszy() instanceof Arystokracja) {\n\t\t\tPlansza.setArystokrataNaPlanszy(new Szlachta(Plansza.getArystokrataNaPlanszy()));\n\t\t}\n\t}", "public void statoIniziale()\n {\n int r, c;\n for (r=0; r<DIM_LATO; r++)\n for (c=0; c<DIM_LATO; c++)\n {\n if (eNera(r,c))\n {\n if (r<3) // le tre righe in alto\n contenutoCaselle[r][c] = PEDINA_NERA;\n else if (r>4) // le tre righe in basso\n contenutoCaselle[r][c] = PEDINA_BIANCA;\n else contenutoCaselle[r][c] = VUOTA; // le 2 righe centrali\n }\n else contenutoCaselle[r][c] = VUOTA; // caselle bianche\n }\n }", "private boolean isLoptaNaPodlozi(){\n\t\tif (loptaY >= LOPTA_MIN_Y && loptaY <= LOPTA_MAX_Y){\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean affordTown() {\n \t\treturn (FREE_BUILD || towns < MAX_TOWNS\n \t\t\t\t&& getResources(Type.BRICK) >= 1\n \t\t\t\t&& getResources(Type.LUMBER) >= 1\n \t\t\t\t&& getResources(Type.GRAIN) >= 1\n \t\t\t\t&& getResources(Type.WOOL) >= 1);\n \t}", "private boolean completouVolta(int jogador, int valorDados) {\n\n if ((this.posicoes[jogador] + valorDados) >= 40 && this.posicoes[jogador] != 40) {\n this.listaJogadores.get(jogador).addDinheiro(200);\n this.print(\"\\tGanha $200 por passar pela casa 40.\");\n return true;\n }\n return false;\n\n }", "public static void proveraServisa() {\n\t\tSystem.out.println(\"Unesite redni broj vozila za koje racunate vreme sledeceg servisa:\");\n\t\tUtillMethod.izlistavanjeVozila();\n\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\tif (redniBroj < Main.getVozilaAll().size()) {\n\t\t\tif (!Main.getVozilaAll().get(redniBroj).isVozObrisano()) {\n\t\t\t\tUtillMethod.proveraServisaVozila(Main.getVozilaAll().get(redniBroj));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Ovo vozilo je obrisano i ne moze da se koristi!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t}\n\t}", "private boolean correcto() {\r\n return (casillas.size()>numCasillaCarcel); //&&tieneJuez\r\n }", "private void BajarPiezaRapido() {\n if (!Mover(piezaActual, posicionX, posicionY - 1)) {\r\n BajarPieza1posicion();\r\n }\r\n }", "private void recolteNourriture() {\r\n\t\t\t//1pop recolte toute la case\r\n\t\t\tint tempNourr = 0;\r\n\t\t\tint totalPop = population + populationColoniale;\r\n\t\t\tint limite = (totalPop < caseOwned.size()) ? totalPop : caseOwned.size();\r\n\t\t\tfor(int id = 0; id < limite; id++) {\r\n\t\t\t\ttempNourr += caseOwned.get(id).getFood();\r\n\t\t\t}\r\n\t\t\t//animaux\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Bétail) * 10; //Ca mange de l'herbe, ça se tente.\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Cervidés) * 7.5; //CARIBOUUUUUUUUU !!\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Crabe) * 2; //ca pique les pied, a mort!!\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Elephants) * 30; //polution sonore\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Moutons) * 5; //kébab landais\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Poissons) * 5; //croustibat\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Chevaux) * 7; //lasagnes\r\n\t\t\ttempNourr += howManyAnimal(Animaux.Baleines) * 50; //*bruit de baleine virile*\r\n\t\t\t//aplication des bonus\r\n\t\t\ttempNourr *= (1 + (0.15 * scienceLvl) + (0.05 * (bonheur - baseBonheur))); // +15% par scienceLvl +5% par bonheur excedentaire, -5% par bonheur négatif\r\n\t\t\t\r\n\t\t\tnourriture += tempNourr;\r\n\t\t\t//bonus de conservation grâce au sel\r\n\t\t\tif(howManyRessource(StrategicRessource.Sel) > 0 && nourriture > 0) nourriture *= 1.10;\r\n\t\t\t//limitation de stockage\r\n\t\t\tint stockageMax = caseOwned.size() * 100 * scienceLvl;\r\n\t\t\tif(nourriture > stockageMax) nourriture = stockageMax;\r\n\t\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 }", "private void landOrTakeoff(String land_or_takeoff) {\n\t\ttry {\n\t\tthis.baggage = Integer.valueOf(land_or_takeoff);\n\t\tthis.isLanding = true;\n\t\t}catch(NumberFormatException e) {\n\t\t\tthis.isLanding = false;\n\t\t\tthis.destination = land_or_takeoff;\n\t\t}//catch\n\t}", "public void ganarDineroPorAutomoviles() {\n for (Persona p : super.getMundo().getListaDoctores()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaCocineros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaAlbaniles()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaHerreros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaCocineros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n }", "public void calculEtatSuccesseur() { \r\n\t\tboolean haut = false,\r\n\t\t\t\tbas = false,\r\n\t\t\t\tgauche = false,\r\n\t\t\t\tdroite = false,\r\n\t\t\t\thautGauche = false,\r\n\t\t\t\tbasGauche = false,\r\n\t\t\t\thautDroit = false,\r\n\t\t\t\tbasDroit = false;\r\n\t\t\r\n\t\tString blanc = \" B \";\r\n\t\tString noir = \" N \";\r\n\t\tfor(Point p : this.jetonAdverse()) {\r\n\t\t\tString [][]plateau;\r\n\t\t\tplateau= copieEtat();\r\n\t\t\tint x = (int) p.getX();\r\n\t\t\tint y = (int) p.getY();\r\n\t\t\tif(this.joueurActuel.getCouleur() == \"noir\") { //dans le cas ou le joueur pose un pion noir\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) { //on regarde uniquement le centre du plateaau \r\n\t\t\t\t\t//on reinitialise x,y et plateau a chaque étape\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tdroite = getDroite(x,y,blanc);\r\n\t\t\t\t\thaut = getHaut(x, y, blanc);\r\n\t\t\t\t\tbas = getBas(x, y, blanc);\r\n\t\t\t\t\tgauche = getGauche(x, y, blanc);\r\n\t\t\t\t\thautDroit = getDiagHautdroite(x, y, blanc);\r\n\t\t\t\t\thautGauche = getDiagHautGauche(x, y, blanc);\r\n\t\t\t\t\tbasDroit = getDiagBasDroite(x, y, blanc);\r\n\t\t\t\t\tbasGauche = getDiagBasGauche(x, y, blanc);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y-1]==noir) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(droite) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//1\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==noir) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(bas) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==noir) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(gauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(haut) {\r\n\t\t\t\t\t\t\t//System.out.println(\"regarde en dessous\");\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==noir) {\r\n\t\t\t\t\t\tif(hautGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(basGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit : OK!\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(hautDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==noir) {\r\n\t\t\t\t\t\tif(basDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t//System.out.println(\"ajouté!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {//si le joueur actuel a les pions blanc\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x][y-1]==blanc) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(getDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t}//1.1\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==blanc) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getBas(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2.2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==blanc) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getGauche(x, y, noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3.3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == blanc) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getHaut(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4.4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5.5\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//6.6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautdroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//7.7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8.8\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private boolean esHoja() {\r\n boolean hoja = false;\r\n\r\n if( subABizq.esVacio() && subABder.esVacio() ) {\r\n hoja = true;\r\n }\r\n\r\n return hoja;\r\n }", "public void setNombreArea(String p) { this.nombreArea = p; }", "boolean hasHasAlcoholBloodContent();", "private void acabarJogo() {\n\t\tif (mapa.isFimDeJogo() || mapa.isGanhouJogo()) {\r\n\r\n\t\t\tthis.timer.paraRelogio();\r\n\r\n\t\t\tif (mapa.isFimDeJogo()) {//SE PERDEU\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"VOCÊ PERDEU\", \"FIM DE JOGO\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t} else {//SE GANHOU\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\r\n\t\t\t\t\t\t\"PARABÉNS \" + this.nomeJogador + \"! \" + \"TODAS AS BOMBAS FORAM ENCONTRADAS\", \"VOCÊ GANHOU\",\r\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\tiniciarRanking();//SE VENCEU MANDA O JOGADOR PRO RANKING\r\n\t\t\t}\r\n\t\t\tthis.voltarMenu();//VOLTA PRO MENU\r\n\r\n\t\t}\r\n\t}", "public boolean is_full(){\n return this.habitant.size() >= Constantes.HOUSE_FULL;\n }", "private static boolean juega() {\r\n\t\tv.setMensaje( \"Empieza el nivel \" + nivel + \". Puntuación = \" + puntuacion + \r\n\t\t\t\". Dejar menos de \" + (tamanyoTablero-2) + \" pelotas de cada color. \" + (tamanyoTablero-1) + \" o más seguidas se quitan.\" );\r\n\t\t// v.setDibujadoInmediato( false ); // Notar la mejoría de \"vibración\" si se hace esto y (2)\r\n\t\twhile (!v.estaCerrada() && !juegoAcabado()) {\r\n\t\t\tPoint puls = v.getRatonPulsado();\r\n\t\t\tif (puls!=null) {\r\n\t\t\t\t// Pelota pelotaPulsada = hayPelotaPulsadaEn( puls, tablero ); // Sustituido por el objeto:\r\n\t\t\t\tPelota pelotaPulsada = tablero.hayPelotaPulsadaEn( puls );\r\n\t\t\t\tif (pelotaPulsada!=null) {\r\n\t\t\t\t\tdouble coordInicialX = pelotaPulsada.getX();\r\n\t\t\t\t\tdouble coordInicialY = pelotaPulsada.getY();\r\n\t\t\t\t\tv.espera(20); // Espera un poquito (si no pasa todo demasiado rápido)\r\n\t\t\t\t\t// Hacer movimiento hasta que se suelte el ratón\r\n\t\t\t\t\tPoint drag = v.getRatonPulsado();\r\n\t\t\t\t\twhile (drag!=null && drag.x>0 && drag.y>0 && drag.x<v.getAnchura() && drag.y<v.getAltura()) { // EN CORTOCIRCUITO - no se sale de los bordes\r\n\t\t\t\t\t\tpelotaPulsada.borra( v );\r\n\t\t\t\t\t\tpelotaPulsada.incXY( drag.x - puls.x, drag.y - puls.y );\r\n\t\t\t\t\t\tpelotaPulsada.dibuja( v );\r\n\t\t\t\t\t\trepintarTodas(); // Notar la diferencia si no se hace esto (se van borrando las pelotas al pintar otras que pasan por encima)\r\n\t\t\t\t\t\t// v.repaint(); // (2)\r\n\t\t\t\t\t\tpuls = drag;\r\n\t\t\t\t\t\tdrag = v.getRatonPulsado();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Recolocar pelota en un sitio válido\r\n\t\t\t\t\trecolocar( pelotaPulsada, coordInicialX, coordInicialY );\r\n\t\t\t\t\tquitaPelotasSiLineas( true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tpuntuacion -= (numMovimientos*PUNTOS_POR_MOVIMIENTO); // Se penaliza por el número de movimientos\r\n\t\tif (v.estaCerrada()) return false; // Se acaba el juego cerrando la ventana\r\n\t\tif (nivelPasado()) return true; // Se ha pasado el nivel\r\n\t\treturn false; // No se ha pasado el nivel\r\n\t}", "boolean EsHemisferioSur()\r\n {\r\n if (getLat() < 29.46)\r\n return true;\r\n else\r\n return false;\r\n }", "private void carregaAvisosGerais() {\r\n\t\tif (codWcagEmag == WCAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"12.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"9.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.7\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\t// comentado por n�o ter achado equi\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t} else if (codWcagEmag == EMAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.21\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.24\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.17\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.6\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.14\", AVISO, codWcagEmag, \"\"));\r\n\t\t}\r\n\r\n\t}", "public boolean ePedina(int pezzo)\n { return ( (pezzo==PEDINA_BIANCA) || (pezzo==PEDINA_NERA) ); }", "public void presenta_Estudiante(){\r\n System.out.println(\"Universidad Técnica Particular de Loja\\nInforme Semestral\\nEstudiante: \"+nombre+\r\n \"\\nAsignatura: \"+nAsignatura+\"\\nNota 1 Bimestre: \"+nota1B+\"\\nNota 2 Bimestre: \"+nota2B+\r\n \"\\nPromedio: \"+promedio()+\"\\nEstado de la Materia: \"+estado());\r\n }", "public void venceuRodada () {\n this.pontuacaoPartida++;\n }", "private String elaboraIncipit() {\n String testo = VUOTA;\n\n if (usaHeadIncipit) {\n testo += elaboraIncipitSpecifico();\n testo += A_CAPO;\n }// fine del blocco if\n\n return testo;\n }", "private void reserveChambre() {\n\t\tfor(Chambre chambre : this.getChambres()) {\n\t\t\tif(chambre.equals(this.chambresVides().get(0))) {\n\t\t\t\tchambre.setReserve(true);\n\t\t\t\tSystem.out.println(\"\\n---------------------------------------\\nVous avez bien réservé cette chambre: |\");\n\t\t\t\tSystem.out.println(chambre.toString());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void unUsuarioEstaDentroDelAreaDeCobertura(){\n\t\tPOI cgp = new CGP(\"cgp\", posicionUno, direccion, vertices);\n\t\tAssert.assertTrue(cgp.estaCercaDe(posicionSeis));\n\t}", "private boolean canDamoneBlackSaveOtherLeftBehind(Damone damone) {\n boolean trovataPedinaNeraDaProteggere = false;\n boolean trovataPedinaBiancaAttaccante = false;\n\n //verifico che la casella x+1 e y+1 sia libera\n if(!controllaSeCasellaLibera(damone.getX() - 1, damone.getY() - 1))\n return false;\n\n //verifico che nella casella x+2 e y+2 ci sia una pedina nera da proteggere\n //e che non vengo mangiato\n for (Pedina pedinaBianca : arrayPedineBianche) {\n if ((damone.getX() - 2) == pedinaBianca.getX()\n && (damone.getY() - 2) == pedinaBianca.getY()) \n return false;\n else if(damone.getX() == pedinaBianca.getX()\n && damone.getY() - 2 == pedinaBianca.getY()\n && damone.getX() - 2 >= 0\n && controllaSeCasellaLibera(damone.getX() - 2, damone.getY()))\n return false;\n else if(pedinaBianca instanceof Damone\n && damone.getX() - 2 == pedinaBianca.getX()\n && damone.getY() == pedinaBianca.getY()\n && damone.getY() - 2 >= 0\n && controllaSeCasellaLibera(damone.getX(), damone.getY() - 2))\n return false;\n }\n\n for (Pedina pedinaNera : arrayPedineNere) {\n if ((damone.getX() - 2) == pedinaNera.getX()\n && (damone.getY() - 2) == pedinaNera.getY()) {\n trovataPedinaNeraDaProteggere = true;\n }\n }\n\n //verifico che nella casella x+3 e y+3 ci sia una pedina bianca che possa mangiare la pedina nera compagna\n for (Pedina pedinaNera : arrayPedineNere) {\n if ((damone.getX() - 3) == pedinaNera.getX()\n && (damone.getY() - 3) == pedinaNera.getY()) {\n return false;\n }\n }\n \n for (Pedina pedinaBianca : arrayPedineBianche) {\n if ((damone.getX() - 3) == pedinaBianca.getX()\n && (damone.getY() - 3) == pedinaBianca.getY()) {\n trovataPedinaBiancaAttaccante = true;\n }\n }\n\n if (trovataPedinaNeraDaProteggere && trovataPedinaBiancaAttaccante) {\n if(damone.getX() - 1 < 0 || damone.getY() - 1 < 0)\n return false;\n else {\n damone.setXTemp(damone.getX() - 1);\n damone.setYTemp(damone.getY() - 1);\n return true;\n }\n } else \n return false;\n }", "public void aggiungiPecoraCasualmente() {\n\t\tif (((int) (Math.random() * 3)) >= 1) {\n\t\t\tPecoraAdulta nuovaPecoraAdulta = new PecoraAdulta();\n\t\t\tpecore.add(nuovaPecoraAdulta);\n\t\t\tif (nuovaPecoraAdulta.isMaschio())\n\t\t\t\tnumMontoni++;\n\t\t\telse\n\t\t\t\tnumPecoreFemmine++;\n\t\t} else {\n\t\t\tpecore.add(new Agnello());\n\t\t\tnumeroAgelli++;\n\t\t}\n\t}", "private boolean poseeSaldoAnterior() {\n boolean retorno = false;\n if(saldoAnterior !=null){\n retorno = true;\n }\n return retorno;\n }", "public boolean esPared(CoordCasilla cc)\n {\n //Gdx.app.log(\"ES PARED\", \"ANalizando (\"+cc.x+\",\"+cc.y+\")\");\n \n TiledMapTileLayer.Cell casilla=( (TiledMapTileLayer)mapaActual.getLayers().get(\"PAREDES\")).getCell(cc.x,cc.y);\n if(casilla==null)\n return false;\n int idTile=casilla.getTile().getId();\n return idTile!=Mundo.ID_TILE_MURO_TRANSITABLE_1 && idTile!=Mundo.ID_TILE_MURO_TRANSITABLE_2 && idTile!=Mundo.ID_TILE_MURO_TRANSITABLE_3;\n }", "private boolean ptoStaDentroCuadra(float posx, float posy, int x, int y, int ancho,\n\t\t\tint alto) {\n\t\treturn (x < posx && posx < x + ancho && y < posy && posy < y + alto);\n\t}", "public void moverJugador(char letra) {\n switch (letra) {\n case 'w':\n for(int b=0;b<rectangles.length;b++){\n if(rectangles[b].overlaps(rectangle.set(x,y+3,AnchoJugador,largoJugador))){//Comprobamos si en el array de rectangles hacer overlaps con nuestro jugador\n olision=true;//Si lo hace olision se vuelve true y no se movera\n break;\n }else{\n olision=false;//Si no lo hace olision de volvera false y se movera\n }\n }\n if(olision==false){\n for(int b=0;b<colisiones.getSalida().length;b++){\n if(colisiones.getSalida()[b].overlaps(rectangle.set(x,y,AnchoJugador,largoJugador))){//Comprobamos si nuestro personaje hace overlaps con alguna salida\n switch (colisiones.getObj2()[b].getName()){//Si colisiona este switch se encargara de ver con que salida estamos chocando mediante el nombre de los rectangulos(Esto se pone en el tiled)\n case \"salidaBajo\":\n main.dispose();\n main.setPantallaActual(new MapaPlantaBaja(main,358,10));\n break;\n case \"salida1\":\n main.dispose();\n main.setPantallaActual(new MapaInicial(main,347,298,main.getScreen().getBd()));\n break;\n case \"salida2\":\n main.dispose();\n main.setPantallaActual(new MapaPueblo(main,80,140));\n break;\n case \"miCasa\":\n main.dispose();\n main.setPantallaActual(new MapaPlantaBaja(main,194,10));\n break;\n case \"bichos\":\n main.dispose();\n main.setPantallaActual(new MapaBichos(main,100,100));\n break;\n case \"salidaPuebloBichos\":\n main.dispose();\n main.setPantallaActual(new MapaPueblo(main,196,22));\n break;\n }\n }\n }\n y=y+3;\n }else{\n\n }\n\n break;\n case 's':\n for(int b=0;b<rectangles.length;b++){\n if(rectangles[b].overlaps(rectangle.set(x,y-3,AnchoJugador,largoJugador))){\n olision=true;\n break;\n }else{\n olision=false;\n }\n }\n if(olision==false){\n for(int b=0;b<colisiones.getSalida().length;b++){\n if(colisiones.getSalida()[b].overlaps(rectangle.set(x,y,AnchoJugador,largoJugador))){\n System.out.println(\"colisionando\");\n switch (colisiones.getObj2()[b].getName()){\n case \"salidaBajo\":\n main.dispose();\n main.setPantallaActual(new MapaPlantaBaja(main,358,140));\n break;\n case \"salida1\":\n main.dispose();\n main.setPantallaActual(new MapaInicial(main,347,298,main.getScreen().getBd()));\n break;\n case \"salida2\":\n main.dispose();\n main.setPantallaActual(new MapaPueblo(main,80,140));\n break;\n case \"miCasa\":\n main.dispose();\n main.setPantallaActual(new MapaPlantaBaja(main,194,10));\n break;\n case \"bichos\":\n main.dispose();\n main.setPantallaActual(new MapaBichos(main,100,100));\n break;\n case \"salidaPuebloBichos\":\n main.dispose();\n main.setPantallaActual(new MapaPueblo(main,196,22));\n break;\n }\n }\n }\n\n y=y-3;\n }\n break;\n case 'd':\n for(int b=0;b<rectangles.length;b++){\n if(rectangles[b].overlaps(rectangle.set(x+3,y,AnchoJugador,largoJugador))){\n olision=true;\n break;\n }else{\n olision=false;\n }\n }\n if(olision==false){\n for(int b=0;b<colisiones.getSalida().length;b++){\n if(colisiones.getSalida()[b].overlaps(rectangle.set(x,y,AnchoJugador,largoJugador))){\n System.out.println(\"colisionando\");\n switch (colisiones.getObj2()[b].getName()){\n case \"salidaBajo\":\n main.dispose();\n main.setPantallaActual(new MapaPlantaBaja(main,358,140));\n break;\n case \"salida1\":\n main.dispose();\n main.setPantallaActual(new MapaInicial(main,347,298,main.getScreen().getBd()));\n break;\n case \"salida2\":\n main.dispose();\n main.getScreen().dispose();\n main.setPantallaActual(new MapaPueblo(main,80,140));\n break;\n case \"miCasa\":\n main.dispose();\n main.setPantallaActual(new MapaPlantaBaja(main,194,10));\n break;\n case \"bichos\":\n main.dispose();\n main.setPantallaActual(new MapaBichos(main,100,100));\n case \"salidaPuebloBichos\":\n main.dispose();\n main.setPantallaActual(new MapaPueblo(main,196,22));\n break;\n }\n }\n }\n x=x+3;\n }\n break;\n case 'a':\n for(int b=0;b<rectangles.length;b++){\n if(rectangles[b].overlaps(rectangle.set(x-3,y,AnchoJugador,largoJugador))){\n olision=true;\n break;\n }else{\n olision=false;\n }\n }\n if(olision==false){\n for(int b=0;b<colisiones.getSalida().length;b++){\n if(colisiones.getSalida()[b].overlaps(rectangle.set(x,y,AnchoJugador,largoJugador))){\n System.out.println(\"colisionando\"+colisiones.getObj2()[b].getName());\n switch (colisiones.getObj2()[b].getName()){\n case \"salidaBajo\":\n main.dispose();\n main.setPantallaActual(new MapaPlantaBaja(main,358,140));\n break;\n case \"salida1\":\n main.dispose();\n main.setPantallaActual(new MapaInicial(main,347,298,main.getScreen().getBd()));\n break;\n case \"salida2\":\n main.dispose();\n main.setPantallaActual(new MapaPueblo(main,80,140));\n break;\n case \"miCasa\":\n main.dispose();\n main.setPantallaActual(new MapaPlantaBaja(main,194,10));\n break;\n case \"bichos\":\n main.dispose();\n main.setPantallaActual(new MapaBichos(main,100,100));\n case \"salidaPuebloBichos\":\n main.dispose();\n main.setPantallaActual(new MapaPueblo(main,196,22));\n break;\n }\n }\n }\n x=x-3;\n }\n break;\n }\n }", "private boolean sortieNonAtteint(){\n\t\t\t//return this.terrainDeLaPartie.getTerrain()[this.terrainDeLaPartie.getAbSortie()][this.terrainDeLaPartie.getOrdSortie()]!='R' ;\t\t\t\n\t\t\tif(this.terrainDeLaPartie.getTerrain()[terrainDeLaPartie.getAbSortie()][terrainDeLaPartie.getOrdSortie()]=='R'){\n\t\t\t\tSystem.out.println(\"###################################### SORTIE #################################\");\n\t\t\t}\n\t\t\treturn this.terrainDeLaPartie.getTerrain()[terrainDeLaPartie.getAbSortie()][terrainDeLaPartie.getOrdSortie()]!='R';\n\t\t}", "public void setBrojParcele(int value) {\n this.brojParcele = value;\n }", "public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}", "private boolean neuerBahnhof(int x, int y) {\n if (geld - getPreisBhf() >= getMaxMinus() && bahnhoefe[y][x] == null && x > 0 && y > 0 && x < teile[0].length && y < teile.length && bhfNamen.size() > 0) {\n String name = bhfNamen.remove((int) Math.round(Math.random() * (bhfNamen.size() - 1)));\n intNeuerBahnhof(x, y, name);\n geld = geld - getPreisBhf();\n ticker.neueNachricht(\"Bahnhof \" + name + \" wurde feierlich eröffnet!\");\n return true;\n } else {\n return false;\n }\n\n }", "public boolean blockedGame() {\r\n int pointsperplayer = 0;\r\n if (playedDominoes.size() > 9) {\r\n if (end[0] == end[1]) {\r\n List<Domino> aux = new ArrayList();\r\n for (Domino d : playedDominoes) {\r\n if (d.getBothNumbers().contains(end[0])) {\r\n System.out.println(\"Adding domino\" + d.toString());\r\n aux.add(d);\r\n }\r\n }\r\n return aux.size() == 7;\r\n }\r\n }\r\n return false;\r\n }", "private boolean isEmptyWest()\r\n\t{\r\n\t\treturn (westElem == 0);\r\n\t}", "private boolean revisar(GrafoAristaPonderada G) {\n\n // check peso\n double pesoTotal = 0.0;\n for (Arista a : aristas()) {\n pesoTotal += a.peso();\n }\n if (Math.abs(pesoTotal - peso()) > EPSILON_PUNTO_FLOTANTE) {\n System.err.printf(\n \"Peso de la aristas no es igual a peso(): %f vs. %f\\n\",\n pesoTotal, peso());\n return false;\n }\n\n // check that it is acyclic\n UF uf = new UF(G.V());\n for (Arista e : aristas()) {\n int v = e.unVertice(), w = e.otroVertice(v);\n if (uf.estanConectados(v, w)) {\n System.err.println(\"No es un bosque\");\n return false;\n }\n uf.union(v, w);\n }\n\n // check that it is a spanning forest\n for (Arista a : G.aristas()) {\n int v = a.unVertice(), w = a.otroVertice(v);\n if (!uf.estanConectados(v, w)) {\n System.err.println(\"No es un bosque de expansion\");\n return false;\n }\n }\n\n // check that it is a minimal spanning forest (cut optimality conditions)\n for (Arista a : aristas()) {\n\n // all aristas in MST except a\n uf = new UF(G.V());\n for (Arista o : aristas()) {\n int x = o.unVertice(), y = o.otroVertice(x);\n if (o != a) uf.union(x, y);\n }\n\n // check that e is min peso edge in crossing cut\n for (Arista o : G.aristas()) {\n int x = o.unVertice(), y = o.otroVertice(x);\n if (!uf.estanConectados(x, y)) {\n if (o.peso() < a.peso()) {\n System.err.println(\"Arista \" + o + \n \" viola las condiciones de optimalidad\"\n + \"del corte\");\n return false;\n }\n }\n }\n\n }\n\n return true;\n }" ]
[ "0.61459315", "0.61165833", "0.60863525", "0.5886414", "0.5830936", "0.5727473", "0.5708263", "0.570271", "0.56941277", "0.5659017", "0.56373584", "0.56357634", "0.5619374", "0.5607943", "0.5605666", "0.5590688", "0.55890816", "0.55830854", "0.5560454", "0.5551256", "0.5549595", "0.55450886", "0.55413187", "0.5525148", "0.55200917", "0.55165505", "0.5516434", "0.5481763", "0.54751265", "0.5460515", "0.54567736", "0.544529", "0.5441378", "0.54399323", "0.5439724", "0.5421964", "0.5418434", "0.54177296", "0.54085445", "0.54044086", "0.5384829", "0.5382182", "0.5381815", "0.53787136", "0.5378695", "0.53678155", "0.53528416", "0.53496164", "0.53486145", "0.5339348", "0.5338342", "0.53351915", "0.533294", "0.532417", "0.5321001", "0.5319017", "0.5312962", "0.5312254", "0.53090566", "0.5304457", "0.5292166", "0.52905893", "0.52885616", "0.5282577", "0.5280975", "0.5280758", "0.52759075", "0.5270439", "0.5266377", "0.5265671", "0.52594334", "0.525659", "0.52560234", "0.52555656", "0.52516586", "0.5249454", "0.52474195", "0.5244969", "0.5240802", "0.52402943", "0.52389467", "0.52387", "0.52376825", "0.52373755", "0.5235899", "0.52339405", "0.52327293", "0.5230782", "0.52278507", "0.5218073", "0.5216359", "0.52129936", "0.521236", "0.52122116", "0.5211519", "0.52084416", "0.5206494", "0.52057856", "0.52057785", "0.5200702", "0.520031" ]
0.0
-1
Created by Barak Bar Orion 12/15/14.
public interface Constant<T> extends Remote { T getValue() throws RemoteException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\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\r\n\tpublic void rozmnozovat() {\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "private void m50366E() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "protected void mo6255a() {\n }", "@Override\n protected void getExras() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n public int describeContents() { return 0; }", "private void init() {\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\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n protected void init() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo6081a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public void mo12930a() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void skystonePos4() {\n }", "@Override\n void init() {\n }", "private void strin() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void mo12628c() {\n }", "@Override\n public void init() {}", "public void mo21877s() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}" ]
[ "0.6098237", "0.6044252", "0.59052384", "0.58860207", "0.58633864", "0.58625007", "0.58459055", "0.58459055", "0.5766396", "0.57501996", "0.56981826", "0.5693475", "0.56927985", "0.56903166", "0.56853735", "0.5672243", "0.5668902", "0.5655806", "0.56506264", "0.5646051", "0.56250155", "0.55977374", "0.55964726", "0.5583395", "0.5544167", "0.5544065", "0.5544065", "0.5544065", "0.5544065", "0.5544065", "0.5544065", "0.5544065", "0.5534004", "0.5527039", "0.5526871", "0.5526871", "0.55177355", "0.5510442", "0.5510442", "0.5510442", "0.5510442", "0.5510442", "0.5492343", "0.54890853", "0.54875517", "0.5484311", "0.5483018", "0.5476146", "0.5460262", "0.5460262", "0.5460262", "0.5460262", "0.5460262", "0.5460262", "0.54547685", "0.5442817", "0.5440769", "0.54361635", "0.5433677", "0.5429131", "0.5429131", "0.5424194", "0.5422808", "0.54186064", "0.5411397", "0.54094803", "0.5405036", "0.54045314", "0.53993577", "0.53941524", "0.5387064", "0.53821933", "0.53821355", "0.5363999", "0.5363999", "0.5363999", "0.53626394", "0.5361778", "0.5355319", "0.5355319", "0.5355319", "0.53494126", "0.5346641", "0.5345684", "0.534156", "0.53377265", "0.53373945", "0.53356767", "0.5334795", "0.5334795", "0.5334795", "0.5333082", "0.532928", "0.53291976", "0.5319179", "0.53151536", "0.53136307", "0.5313342", "0.5313342", "0.53086233", "0.5296828" ]
0.0
-1
System.out.println(new Date()); System.out.println( LocalDateTime.now()); DayOfWeek dow = DayOfWeek.MONDAY; Locale locale = Locale.getDefault(); System.out.println(dow.getDisplayName(TextStyle.FULL, locale)); YearMonth date1 = YearMonth.now(); System.out.printf("%s: %d%n", date1, date1.lengthOfMonth());
public static void main(String[] args) { LocalDate date = LocalDate.now(); System.out.println("print date- "+date); // print day DayOfWeek dow = date.getDayOfWeek(); System.out.println("print day name - "+ dow); int dateNo = date.getDayOfMonth(); System.out.println("print day (number) - "+ dateNo); // print month Month monthName = date.getMonth(); System.out.println("print month name - "+ monthName); int monthNo = date.getMonthValue(); System.out.println("print month (Number) - "+ monthNo); // print month int year = date.getYear(); System.out.println("print year - "+ year); // print particuller date like birth day LocalDate birthDay = LocalDate.of(1990, Month.NOVEMBER, 20); System.out.println("print particuller date - "+birthDay); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void Month() {\n System.out.printf(\"%d%n\", Month.FEBRUARY.maxLength());\n\n Month month = Month.AUGUST;\n Locale locale = Locale.getDefault();\n System.out.println(month.getDisplayName(TextStyle.FULL, locale));\n System.out.println(month.getDisplayName(TextStyle.NARROW, locale));\n System.out.println(month.getDisplayName(TextStyle.SHORT, locale));\n }", "@Test\n public void DayOfWeek() {\n System.out.printf(\"%s%n\\n\", DayOfWeek.MONDAY.plus(3));\n\n DayOfWeek dow = DayOfWeek.MONDAY;\n Locale locale = Locale.getDefault();\n System.out.println(dow.getDisplayName(TextStyle.FULL, locale));\n System.out.println(dow.getDisplayName(TextStyle.NARROW, locale));\n System.out.println(dow.getDisplayName(TextStyle.SHORT, locale));\n }", "public static void main(String[] args) {\n\t\t\n\t\tLocalDate date = LocalDate.now(); \n\t\tSystem.out.println(date);\n\t\t//date.atStartOfDay();\n\t\t int d=date.getDayOfMonth();\n\t\t System.out.println(d);\n\t\t int y=date.getYear();\n\t\t System.out.println(y);\n\t\t int m=date.getMonthValue();\n\t\t System.out.println(m);\n\t\t\n\t\t \n\t\t \n\t\t \n\t\t\n\t\t \n\t\t \n\t}", "public static void main(String[] args) {\n LocalDateTime localDateTime = LocalDateTime.of(1995, Month.MAY, 28, 12, 45);\n System.out.println(localDateTime);\n System.out.println(\"After 6 months : \"+localDateTime.plusMonths(6));\n System.out.println(\"Before 6 months : \"+localDateTime.minusMonths(6));\n\n //Similarly, plus days , minus days, plus weeks, minus weeks etc, a lot of methods are present\n }", "public static int getTodaysMonth() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.month + 1;\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n System.out.println(DateUtils.addMonths(new Date(), 1).getMonth());\n System.out.println(Calendar.getInstance().getDisplayName((Calendar.MONTH)+1, Calendar.LONG, Locale.getDefault()));\n System.out.println(LocalDate.now().plusMonths(1).getMonth());\n\t}", "@Test\n\tpublic void testPrintingDayNameShortForm() throws Exception {\n\t DateTime oneSunnyWednesday = new DateTime(2014, 10, 15, 0, 0);\n DateTimeFormatter format = DateTimeFormat.forPattern(\"E, d MMM y\");\n String dayNameAndDate = format.print(oneSunnyWednesday);\n \n assertEquals(\"Wed, 15 Oct 2014\", dayNameAndDate);\n\t}", "public static void main(String[] args) {\n LocalDate d = LocalDate.of(1989, Month.APRIL, 1);\r\n System.err.println(d);\r\n LocalTime lt = LocalTime.now();\r\n System.err.println(lt);\r\n }", "public String toString() {\n StringBuilder output = new StringBuilder();\n LocalDateTime currentTime = getCurrentTime();\n output.append(currentTime.getYear()).append(\":\").append(currentTime.getMonthValue()).append(\":\")\n .append(currentTime.getDayOfMonth());\n return output.toString();\n }", "public static void main(String[] args) {\n System.out.println(\"Instant.now(): \" + Instant.now());\n System.out.println(\"LocalDate.now(): \" + LocalDate.now());\n System.out.println(\"LocalTime.now(): \" + LocalTime.now());\n System.out.println(\"LocalDateTime.now(): \" + LocalDateTime.now());\n System.out.println(\"ZonedDateTime.now(): \" + ZonedDateTime.now());\n\n //All output values are using the ISO 8601 standard formatting. For dates, the basic for‐\n //mat is yyyy-MM-dd. For times, the format is hh:mm:ss.sss.\n\n //The of method for the date/time classes\n System.out.println(\"First landing on the Moon:\");\n LocalDate moonLandingDate = LocalDate.of(1969, Month.JULY, 20);\n LocalTime moonLandingTime = LocalTime.of(20, 18);\n System.out.println(\"Date: \" + moonLandingDate);\n System.out.println(\"Time: \" + moonLandingTime);\n System.out.println(\"Neil Armstrong steps onto the surface: \");\n LocalTime walkTime = LocalTime.of(20, 2, 56, 150_000_000);\n LocalDateTime walk = LocalDateTime.of(moonLandingDate, walkTime);\n System.out.println(walk);\n\n Set<String> regionNames = ZoneId.getAvailableZoneIds();\n System.out.println(\"There are \" + regionNames.size() + \" region names\");\n\n //Applying a time zone to a LocalDateTime\n LocalDateTime dateTime = LocalDateTime.of(2017, Month.JULY, 4, 13, 20, 10);\n ZonedDateTime nyc = dateTime.atZone(ZoneId.of(\"America/New_York\"));\n System.out.println(nyc);\n ZonedDateTime london = nyc.withZoneSameInstant(ZoneId.of(\"Europe/London\"));\n System.out.println(london);\n\n //Some methods in the Month enum\n System.out.println(\"Days in Feb in a leap year: \" +\n Month.FEBRUARY.length(true));\n System.out.println(\"Day of year for first day of Aug (leap year): \" +\n Month.AUGUST.firstDayOfYear(true));\n System.out.println(\"Month.of(1): \" + Month.of(1));\n System.out.println(\"Adding two months: \" + Month.JANUARY.plus(2));\n System.out.println(\"Subtracting a month: \" + Month.MARCH.minus(1));\n\n //Creating Dates and Times from Existing Instances\n //Once you’ve created a LocalDate, LocalTime, LocalDateTime, or ZonedDateTime,\n //it can no longer be changed. each returns a new instance, which is a copy of the original with the added\n //amount.\n\n //Using plus methods on LocalDate and LocalTime\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\");\n LocalDate start = LocalDate.of(2017, Month.FEBRUARY, 2);\n LocalDate end = start.plusDays(3);\n assertEquals(\"2017-02-05\", end.format(formatter));\n end = start.plusWeeks(5);\n assertEquals(\"2017-03-09\", end.format(formatter));\n end = start.plusMonths(7);\n assertEquals(\"2017-09-02\", end.format(formatter));\n end = start.plusYears(2);\n assertEquals(\"2019-02-02\", end.format(formatter));\n\n formatter = DateTimeFormatter.ISO_LOCAL_TIME;\n LocalTime startLocaltime = LocalTime.of(11, 30, 0, 0);\n LocalTime endLocaltime = startLocaltime.plusNanos(1_000_000);\n assertEquals(\"11:30:00.001\", end.format(formatter));\n startLocaltime = startLocaltime.plusSeconds(20);\n assertEquals(\"11:30:20\", end.format(formatter));\n startLocaltime = startLocaltime.plusMinutes(45);\n assertEquals(\"12:15:00\", end.format(formatter));\n startLocaltime = startLocaltime.plusHours(5);\n assertEquals(\"16:30:00\", end.format(formatter));\n\n Period period = Period.of(2, 3, 4); // 2 years, 3 months, 4 days\n LocalDateTime startLocalDateTime = LocalDateTime.of(2017, Month.FEBRUARY, 2, 11, 30);\n LocalDateTime endLocalDateTime = startLocalDateTime.plus(period);\n assertEquals(\"2019-05-06T11:30:00\",\n startLocalDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n startLocalDateTime = startLocalDateTime.plus(3, ChronoUnit.HALF_DAYS);\n assertEquals(\"2017-02-03T23:30:00\",\n startLocalDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n startLocalDateTime = startLocalDateTime.minus(period);\n assertEquals(\"2014-10-29T11:30:00\",\n startLocalDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n startLocalDateTime = startLocalDateTime.minus(2, ChronoUnit.CENTURIES);\n assertEquals(\"1817-02-02T11:30:00\",\n startLocalDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n startLocalDateTime = startLocalDateTime.plus(3, ChronoUnit.MILLENNIA);\n assertEquals(\"5017-02-02T11:30:00\",\n startLocalDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n\n LocalDateTime start2 = LocalDateTime.of(2017, Month.FEBRUARY, 2, 11, 30);\n LocalDateTime end2 = start2.withMinute(45);\n assertEquals(\"2017-02-02T11:45:00\",\n start2.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n end2 = start2.withHour(16);\n assertEquals(\"2017-02-02T16:30:00\",\n end2.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n end2 = start2.withDayOfMonth(28);\n assertEquals(\"2017-02-28T11:30:00\",\n end2.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n end2 = start2.withDayOfYear(300);\n assertEquals(\"2017-10-27T11:30:00\",\n end2.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n end2 = start2.withYear(2020);\n assertEquals(\"2020-02-02T11:30:00\",\n end2.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n\n LocalDateTime start3 = LocalDateTime.of(2017, Month.FEBRUARY, 2, 11, 30);\n start3.withDayOfMonth(29);\n\n //Adjusting the month to an invalid value\n LocalDateTime start4 = LocalDateTime.of(2017, Month.JANUARY, 31, 11, 30);\n LocalDateTime end4 = start4.with(ChronoField.MONTH_OF_YEAR, 2);\n assertEquals(\"2017-02-28T11:30:00\",\n end.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));\n\n\n }", "public static void main(String[] args) {\n System.out.println(\"************\");\n System.out.println(\"Example01\");\n System.out.println(\"************\");\n System.out.println();\n System.out.print(\"100 days ago: \");\n System.out.println(LocalDate.now().plusDays(-100));\n System.out.print(\"Today: \");\n System.out.println(LocalDate.now());\n System.out.print(\"100 days later: \");\n System.out.println(LocalDate.now().plusDays(100));\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"************\");\n System.out.println(\"Example02\");\n System.out.println(\"************\");\n System.out.println();\n \n Period period = Period.between(LocalDate.now(), LocalDate.of(LocalDate.now().getYear(), 12, 25));\n System.out.print(period.getMonths());\n System.out.print(\" Months \");\n System.out.print(period.getDays());\n System.out.print(\" Days to Cristmas!\");\n }", "public void printMonth() {\r\n switch (cur.getMonth()){\r\n case 1:\r\n System.out.println(\"JANUARY\");\r\n break;\r\n case 2:\r\n System.out.println(\"FEBRUARY\");\r\n break;\r\n case 3:\r\n System.out.println(\"MARCH\");\r\n break;\r\n case 4:\r\n System.out.println(\"APRIL\");\r\n break;\r\n case 5:\r\n System.out.println(\"MAY\");\r\n break;\r\n case 6:\r\n System.out.println(\"JUNE\");\r\n break;\r\n case 7:\r\n System.out.println(\"JULY\");\r\n break;\r\n case 8:\r\n System.out.println(\"AUGUST\");\r\n break;\r\n case 9:\r\n System.out.println(\"SEPTEMBER\");\r\n break;\r\n case 10:\r\n System.out.println(\"OCTOBER\");\r\n break;\r\n case 11:\r\n System.out.println(\"NOVEMBER\");\r\n break;\r\n case 12:\r\n System.out.println(\"DECEMBER\");\r\n break;\r\n }\r\n }", "public void printDate() {\r\n printDayOfWeek();\r\n System.out.println(cur.getDay());\r\n printMonth();\r\n System.out.println(cur.getYear());\r\n }", "public void getCurrentDate(){\n Date now = new Date(); //get todays date \n \n SimpleDateFormat formatter = new SimpleDateFormat( \"MM/dd/yyyy\" ); \n System.out.println ( \"The current date is: \" + formatter.format( now ) ); \n \n month = (String) formatter.format( now ).subSequence(0, 2);\n day = (String) formatter.format( now ).subSequence(3, 5);\n year = (String) formatter.format( now ).subSequence(6, 10);\n \n System.out.println(\"month: \" + month);\n System.out.println(\"day: \" + day);\n System.out.println(\"year: \" + year);\n \n }", "public String getCurrentDayOfMonthAsString() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public static void printMonthTitle(int year, int month) {\n\n }", "private void printColumn() {\n System.out.println(new SimpleDateFormat(\"MMMM YYYY\").format(calendar.getTime()));\n System.out.println(\" Sun Mon Tue Wed Thu Fri Sat\");\n }", "public static void main(String[] args) {\n\t\tLocalDate localDate = LocalDate.now();\r\n\t\tSystem.out.println(\"Local Date : \" + localDate); // toString()\r\n\t\t\r\n\t\tLocalTime localTime = LocalTime.now();\r\n\t\tSystem.out.println(\"Local Time : \" + localTime);\r\n\t\t\r\n\t\t\r\n\t\tLocalDateTime localDateTime = LocalDateTime.now();\r\n\t\tSystem.out.println(\"Local Date Time : \" + localDateTime);\r\n\t}", "public String getTodayDate() \n\t{\n\t\treturn getMonthInteger() + \"/\" + getDayOfMonth() + \"/\" + getYear();\n\n\t}", "public static void main(String[] args) {\n\n LocalDateTime currentTime = LocalDateTime.now();\n\n// new LocalTime();\n// new LocalDateTime();\n// new LocalDate();\n\n LocalDate.now();\n LocalTime lt = LocalTime.now();\n LocalDateTime.now();\n\n // parse the string to a LocalDate\n LocalDate localDateFromString = LocalDate.parse(\"19-07-1999\", DateTimeFormatter.ofPattern(\"dd-MM-yyyy\") );\n\n // Create the new formatter we want\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"dd MMMM yyyy\");\n\n // Use the formatter on the Date to get what we want\n System.out.println(formatter.format(localDateFromString));\n\n JapaneseDate jDate = JapaneseDate.from(localDateFromString);\n\n System.out.println(jDate.getEra().toString());\n// System.out.println(jDate.getEra().toString());\n\n System.out.println(\"***************\");\n\n DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern(\"dd MMMM yyyy hh-mm-ss\");\n\n System.out.println(\"Current date: \");\n System.out.println(currentTime);\n\n System.out.println(String.format(\"%s hour %s minutes\", currentTime.getHour(), currentTime.getMinute()));\n\n\n System.out.println(\"Formatted date: \");\n System.out.println(timeFormatter.format(currentTime.plusDays(90)));\n\n System.out.println(\"##############\");\n\n LocalDate today = LocalDate.now();\n System.out.println(today.plusDays(17).getDayOfWeek());\n\n// java.time.LocalDate currentDate = java.time.LocalDate.now();\n// System.out.println(currentDate);\n\n }", "public static void main(String[] args) {\n\t\tCalendar today = new GregorianCalendar();\n\t\tSystem.out.println(today);\n\t\t\n\t\tGregorianCalendar christmas = new GregorianCalendar(1970,11,5);\n\t\t\n\t\tSystem.out.println(christmas.get(Calendar.DAY_OF_WEEK));\n\t\t\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd (E)\");\n\t\tSystem.out.println(sdf.format(christmas.getGregorianChange())); // 날짜오류\n\t\t\n\t\tSystem.out.println(sdf.format(today.getTime()));\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tCalendar now = Calendar.getInstance();\r\n\t\tint hour = now.get(Calendar.HOUR_OF_DAY);\r\n\t\tint minute = now.get(Calendar.MINUTE);\r\n\t\tint month = now.get(Calendar.MONTH + 1);\r\n\t\tint day = now.get(Calendar.DAY_OF_MONTH);\r\n\t\tint year = now.get(Calendar.YEAR);\r\n\r\n\t\tSystem.out.println(now.getTime());\r\n\r\n\t\t// Crear una fecha fija\r\n\t\tCalendar sameDate = new GregorianCalendar(2010, Calendar.FEBRUARY, 22, 23, 11, 44);\r\n\r\n\t\t// mostrar los agradecimientos\r\n\t\tif (hour < 12)\r\n\t\t\tSystem.out.println(\"Buenos días. \\n\");\r\n\t\telse if (hour < 17)\r\n\t\t\tSystem.out.println(\"Buenas tardes. \\n\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Buenas noches charAt(\\n)\");\r\n\r\n\t\t// Mostrar minutos\r\n\t\tSystem.out.println(\"It is\");\r\n\t\tif (minute != 0) {\r\n\t\t\tSystem.out.print(\" \" + minute + \" \");\r\n\t\t\tSystem.out.print((minute != 1) ? \"minutes\" : \"minute\");\r\n\t\t\tSystem.out.print(\" past\");\r\n\t\t}\r\n\t\t// Mostrar la hora\r\n\t\tSystem.out.print(\" \");\r\n\t\tSystem.out.print((hour > 12) ? (hour - 12) : hour);\r\n\t\tSystem.out.print(\" o'clock on \\n\");\r\n\r\n\t\t// Mostrar el mes\r\n\r\n\t\tSystem.out.print(\"Estamos en el mes de: \");\r\n\t\tswitch (month) {\r\n\t\tcase 1:\r\n\t\t\tSystem.out.println(\"Enero\");\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"Febrero\");\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"Marzo\");\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"Abril\");\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tSystem.out.println(\"Mayo\");\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tSystem.out.println(\"Junio\");\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tSystem.out.println(\"Julio\");\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tSystem.out.println(\"Agosto\");\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\t\tSystem.out.println(\"Septiembre\");\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tSystem.out.println(\"Octubre\");\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tSystem.out.println(\"Noviembre\");\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tSystem.out.println(\"Diciembre\");\r\n\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\n LocalDate today = LocalDate.now();\n System.out.println(\"today = \" + today);\n\n LocalDate tomorrow = today.plus(1, ChronoUnit.DAYS);\n System.out.println(\"tomorrow = \" + tomorrow );\n\n LocalDate yesterday = tomorrow.minusDays(2);\n System.out.println(\"yesterday = \" + yesterday);\n\n LocalDate independenceDay = LocalDate.of(2019, Month.DECEMBER, 11);\n DayOfWeek dayOfWeek = independenceDay.getDayOfWeek();\n System.out.println(\"dayOfWeek = \" + dayOfWeek);\n\n\n\n\n }", "@Test\n\tpublic void testPrintingDayName() throws Exception {\n\t DateTime oneSunnyWednesday = new DateTime(2014, 10, 15, 0, 0);\n\t DateTimeFormatter format = DateTimeFormat.forPattern(\"EEEE d/M/y\");\n\t String dayNameAndDate = format.print(oneSunnyWednesday);\n\t \n\t assertEquals(\"Wednesday 15/10/2014\", dayNameAndDate);\n\t}", "public static int getTodaysDay() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.monthDay;\t\r\n\t\t\r\n\t}", "public void Print_date()\n {\n \n System.out.println(\"Date: \" + date);\n }", "public static void main(String[] args) {\n\t\tLocalDateTime dt = LocalDateTime.now();\r\n\t\tSystem.out.println(dt);\r\n\t\tSystem.out.printf(\r\n\t\t\t\t \"Today is %1$td.%1$tm.%1$tY\\n\", LocalDate.now());\r\n\t}", "public static void printMonthBody(int year, int month, int dayofweek, int lengthOfMonth) {\n\t\tint startIndex = dayofweek * 4 - 2;\r\n\t\tint currentIndex = 0;\r\n\t\tint date = 1;\r\n\t\tSystem.out.println(\" \" + (month) + \" \" + year);\r\n\t\tSystem.out.println(\"-----------------------------\");\r\n\t\tSystem.out.println(\" Sun Mon Tue Wed Thu Fri Sat\");\r\n\t\tfor (int i = 0; i < startIndex; i++) {\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t\tcurrentIndex = i;\r\n\t\t}\r\n\t\tfor (int i = currentIndex; i < 28; i += 4) {\r\n\t\t\tSystem.out.print(date + \" \");\r\n\t\t\tdate++;\r\n\t\t}\r\n\t\tSystem.out.println(\"\");\r\n\t\twhile(date <= lengthOfMonth) {\r\n\t\t\tfor (int i = 0; i < 28; i += 4) {\r\n\t\t\t\tif (i == 0) {\r\n\t\t\t\t\tif(date<10) {\r\n\t\t\t\t\t\tSystem.out.print(\" \"+date+\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSystem.out.print(\" \"+date+\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif(date<10) {\r\n\t\t\t\t\t\tSystem.out.print(date+\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSystem.out.print(date+\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdate++;\r\n\t\t\t\tif(date > lengthOfMonth) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t}\r\n\t}", "public static void main(String...args) {\n DateTime nowDateTime = new DateTime();\n DateTime futureDateTime = new DateTime(2018, 3, 20, 0, 0, 0);\n System.out.println(nowDateTime.getMonthOfYear()); // Mar->3\n System.out.println(nowDateTime.withTimeAtStartOfDay()); // 获取今天的开始时间\n System.out.println(nowDateTime.millisOfDay().withMaximumValue()); // 获取今天的结束时间\n System.out.println(Days.daysBetween(nowDateTime, futureDateTime).getDays()); // 计算两个日期的相隔天数\n System.out.println(nowDateTime.plusDays(3).toString(\"E MM/dd/yyyy HH:mm:ss.SSS\")); // 以 Joda 的方式向某一个瞬间加上 3 天并输出结果\n }", "public String getPrintFormattedDate() {\n return this.date.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n }", "public static void main(String[] args) {\n\t\tDayOfWeek day = DayOfWeek.MONDAY;\n\t\t\n\t\tswitch(day){\n\t\tcase TUESDAY:\n\t\t\tSystem.out.println(\"Tu\");\n\t\t}\n\t\t\n\t\tfor(DayOfWeek d: DayOfWeek.values()){\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\tSystem.out.println(DayOfWeek.valueOf(\"MM\"));\n\t}", "private static String getYearMonth() {\n LocalDate oneMonthAgo = LocalDate.now().minusMonths(1);\n return oneMonthAgo.getYear() + String.format(\"%02d\", oneMonthAgo.getMonth().getValue());\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"현재 기준 월요일 날짜 : \" + getCurMonday());\r\n\t\t\r\n\t\tSystem.out.println(\"현재 기준 일요일 날짜 : \" + getCurSunday());\r\n\t\t\r\n\t\tSystem.out.println(\"현재 날짜 기준 주차 : \" + getWeek());\r\n\t\t\r\n\t\tSystem.out.println(\"설정한 날의 해당월의 마지막날짜 : \" + lastDayOfMonth(\"20190924\"));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString dateTime = \"\";\r\n\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tDate d = new Date();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMM\");\r\n\r\n\t\ttry {\r\n\t\t\tString today = \"\"; // 오늘\r\n\t\t\tDate targetDay = null; // Biz 로그 대상일(하루 전일자)\r\n\t\t\ttoday = sdf.format(d);\r\n\t\t\ttargetDay = sdf.parse(today);\r\n\t\t\tcal.setTime(targetDay);\r\n\t\t\tcal.add(Calendar.DAY_OF_MONTH, -2);\r\n\t\t\tdateTime = sdf.format(cal.getTime());\r\n\t\t} catch (ParseException pe) {\r\n\t\t\tSystem.out.println(pe);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\tSystem.out.println(dateTime);\r\n\t\t\r\n\t}", "public int getToday() {\n \treturn 0;\n }", "public String toString() {\r\n String date = month + \"/\" + day;\r\n return date;\r\n }", "public String toString(){\n\t\t\n\t\treturn month+\"/\"+day+\"/\"+year;\n\t}", "private static void printCalendar(int numberOfMonthDays, int firstWeekdayOfMonth, int currDate) {\n\n\t\t// reset index of weekday\n\t\tint weekdayIndex = 0;\n\n\t\t// print calendar weekday header\n\t\tSystem.out.println(\"Su Mo Tu We Th Fr Sa\");\n\n\t\t// leave/skip weekdays before the first day of month\n\t\tfor (int day = 1; day < firstWeekdayOfMonth; day++) {\n\t\t\tSystem.out.print(\" \");\n\t\t\tweekdayIndex++;\n\t\t}\n\t\t// print the days of month in tabular format.\n\t\tfor (int day = 1; day <= numberOfMonthDays; day++) {\n\t\t\tif (day != currDate)\n\t\t\t\t// print day\n\t\t\t\tSystem.out.printf(\"%2d\", day);\n\t\t\telse\n\t\t\t\tSystem.out.printf(\"[%d]\", day);\n\t\t\t// next weekday\n\t\t\tweekdayIndex++;\n\t\t\t// if it is the last weekday\n\t\t\tif (weekdayIndex == 7) {\n\t\t\t\t// reset it\n\t\t\t\tweekdayIndex = 0;\n\t\t\t\t// and go to next line\n\t\t\t\tSystem.out.println();\n\t\t\t} else { // otherwise\n\t\t\t\t// print space\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\n\t\t// print a final new-line.\n\t\tSystem.out.println();\n\t}", "private static void printMonth(int start, int days) {\n for (int day = -(start - 2); day <= days; day++) {\n if (day < 1) {\n // Empty space before start of month.\n System.out.printf(\" \");\n } else if (day <= (7 - (start - 1))) {\n // Possibly short first week.\n System.out.printf(\"%4d%c\", day, day == (7 - (start - 1)) ? '\\n' : ' ');\n } else {\n // Full and last weeks.\n System.out.printf(\"%4d%c\", day, (day - (7 - (start - 1))) % 7 == 0 ? '\\n' : ' ');\n }\n }\n }", "public void m1() {\n\t\tLocalDate dateInIndia = LocalDate.now();\r\n\t\tSystem.out.println(\"Date in India \" +dateInIndia);\r\n\r\n\t\t// Current Date and Time\r\n\t\t\t\tLocalTime timeInIndia = LocalTime.now();\r\n\t\t\t\tSystem.out.println(\"Time in India \" +timeInIndia);\r\n\t\t\r\n\t\t\r\n\t\tZoneId PSTZone = ZoneId.of(\"America/Los_Angeles\");\r\n\t\tLocalDate dateInUS = LocalDate.now(PSTZone);\r\n\t\tSystem.out.println(\"Date in US \" +dateInUS);\r\n\t\t\r\n\t\tLocalTime timeInUS = LocalTime.now(PSTZone);\r\n\t\tSystem.out.println(\"Time in US \" +timeInUS);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static String getDateAndTime() {\n Calendar JCalendar = Calendar.getInstance();\n String JMonth = JCalendar.getDisplayName(Calendar.MONTH, Calendar.SHORT, Locale.UK);\n String JDate = JCalendar.getDisplayName(Calendar.DATE, Calendar.LONG, Locale.UK);\n String JHour = JCalendar.getDisplayName(Calendar.HOUR, Calendar.LONG, Locale.UK);\n String JSec = JCalendar.getDisplayName(Calendar.SECOND, Calendar.LONG, Locale.UK);\n\n return JDate + \"th \" + JMonth + \"/\" + JHour + \".\" + JSec + \"/24hours\";\n }", "@Override\n public String toString() {\n return month + \"/\" + day + \"/\" + year;\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter year: \");\r\n\t\tint year = input.nextInt();\r\n\t\tSystem.out.println(\"Enter month: \");\r\n\t\tint month = input.nextInt();\r\n\t\tCalendar calendar = new GregorianCalendar(year, month - 1, 1);\r\n\t\tint lengthOfMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\r\n\t\tint dayofweek = calendar.get(Calendar.DAY_OF_WEEK);\r\n\t\tprintMonth(year, month, dayofweek, lengthOfMonth);\r\n\r\n\t}", "public int getDayOfMonth();", "public String dayOfWeek()\n {\n\n int m;\n int y;\n\n if (month == 1)\n {\n m = 13;\n y = year - 1;\n }\n else if (month == 2)\n {\n m = 14;\n y = year - 1;\n }\n else\n {\n m = month;\n y = year;\n }\n int k = y % 100;\n int j = y / 100;\n int a = 13 * (m + 1);\n\n if ((day + a / 5 + k + k / 4 + j / 4 + 5 * j) % 7 == 0)\n return \"Saturday\";\n else if ((day + a / 5 + k + k / 4 + j / 4 + 5 * j) % 7 == 1)\n return \"Sunday\";\n else if ((day + a / 5 + k + k / 4 + j / 4 + 5 * j) % 7 == 2)\n return \"Monday\";\n else if ((day + a / 5 + k + k / 4 + j / 4 + 5 * j) % 7 == 3)\n return \"Tuesday\";\n else if ((day + a / 5 + k + k / 4 + j / 4 + 5 * j) % 7 == 4)\n return \"Wednesday\";\n else if ((day + a / 5 + k + k / 4 + j / 4 + 5 * j) % 7 == 5)\n return \"Thursday\";\n else if ((day + a / 5 + k + k / 4 + j / 4 + 5 * j) % 7 == 6)\n return \"Friday\";\n else\n return \"ERROR\";\n }", "public static void printMonth(int year, int month, int dayofweek, int lengthOfMonth) {\n\t\tprintMonthBody(year, month, dayofweek, lengthOfMonth);\r\n\t}", "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 dayName() {\n int arrayDay = (day + month + year + (year/4) + (year/100) % 4) % 7;\n return dayName[arrayDay];\n }", "public String getMonth()\n {\n return Month.get();\n }", "public static void main(String[] args) {\n\n\t\tjava.util.Calendar cal = java.util.Calendar.getInstance(); // new로\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 객체생성불가.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// getinstance로\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 객체받아옴\n\t\t// System.out.println(cal);\n\n\t\tSystem.out.print(cal.get(Calendar.YEAR) + \"년\");\n\t\tSystem.out.print(cal.get(Calendar.MONTH) + 1 + \"월\"); // 전산에서\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// calendar.MONTH\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// : 0월~11월 ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// +1해줘야한다.\n\t\tSystem.out.print(cal.get(Calendar.DATE) + \"일\");\n\t\tSystem.out.println();\n\t\tSystem.out.print(cal.get(Calendar.HOUR_OF_DAY) + \"시\"); // 24시 기준\n\t\t// System.out.print(cal.get(Calendar.HOUR)+\"시\"); 0시~11\n\t\tSystem.out.print(cal.get(Calendar.MINUTE) + \"분\");\n\t\tSystem.out.println(cal.get(Calendar.SECOND) + \"초\");\n\t\tSystem.out.println(\"ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ\");\n\n\t\tif (cal.get(Calendar.AM) == 0) {\n\t\t\tSystem.out.print(\"am\");\n\t\t} else if (cal.get(Calendar.AM) == 1) {\n\t\t\tSystem.out.print(\"pm\");\n\t\t}\n\t\tSystem.out.print(cal.get(Calendar.HOUR) + \"시\"); // 0~11시\n\t\tSystem.out.print(cal.get(Calendar.MINUTE) + \"분\");\n\t\tSystem.out.println(cal.get(Calendar.SECOND) + \"초\");\n\n\t\t// System.out.println(cal.get(Calendar.DAY_OF_WEEK));요일은 숫자로 표현. 1~7 일~토\n\t\tchar ch = '?';\n\t\tswitch (cal.get(Calendar.DAY_OF_WEEK)) {\n\t\t\tcase 1:\n\t\t\t\tch = '일';\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tch = '월';\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tch = '화';\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\n\t\t\tcase 4:\n\t\t\t\tch = '수';\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tch = '목';\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tch = '금';\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tch = '토';\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\tSystem.out.print(\"[\" + ch + \"]\");\n\t\tSystem.out.println(\"요일\");\n\n\t\tSystem.out.println(\"2020년의 \" + cal.get(Calendar.WEEK_OF_YEAR) + \"번째 주\");\n\t\tSystem.out.println(\"2020년의 \" + cal.get(Calendar.DAY_OF_YEAR) + \"번째 날\");\n\t\tSystem.out.println(\"2020년 5월의 \" + cal.get(Calendar.DAY_OF_MONTH)\n\t\t\t\t+ \"번째 날\");\n\t\tSystem.out.println(\"2020년 5월의 \" + cal.get(Calendar.WEEK_OF_MONTH)\n\t\t\t\t+ \"번째 주\");\n\t\tSystem.out.println(\"ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ\");\n\t\tSystem.out.println(cal.get(0)); // 1\n\t\tSystem.out.println(cal.get(1)); // year\n\t\tSystem.out.println(cal.get(2)); //\n\t\tSystem.out.println(cal.get(3)); //\n\t\tSystem.out.println(cal.get(4)); // month\n\t\tSystem.out.println(cal.get(5)); // day\n\t\tSystem.out.println(cal.get(6)); //\n\t\tSystem.out.println(cal.get(7)); //\n\t\tSystem.out.println(cal.get(8)); //\n\t\tSystem.out.println(cal.get(9)); // ?\n\n\t}", "public void displayDate() {\n\t\tSystem.out.print(year + \"/\" + month + \"/\" + day);\r\n\t}", "public void printDayOfWeek() {\r\n switch (cur.getDayOfWeek()){\r\n case 1:\r\n System.out.println(\"MON\");\r\n break;\r\n case 2:\r\n System.out.println(\"TUE\");\r\n break;\r\n case 3:\r\n System.out.println(\"WED\");\r\n break;\r\n case 4:\r\n System.out.println(\"THU\");\r\n break;\r\n case 5:\r\n System.out.println(\"FRI\");\r\n break;\r\n case 6:\r\n System.out.println(\"SAT\");\r\n break;\r\n case 7:\r\n System.out.println(\"SUN\");\r\n break;\r\n }\r\n }", "private static void printMonthHeader(int month, int year) {\n System.out.printf(\" %s %d\\n\", monthNames[month - 1], year);\n for (String d : dayNames) {\n System.out.printf(\" %s \", d);\n }\n System.out.println();\n }", "@Override\n public String getCurrentMonthAndYear() {\n\n setLogString(\"Get Month and year\", true, CustomLogLevel.HIGH);\n final String currentMonth = getElement(getDriver(), By.className(SAVINGS_MONTH),\n TINY_TIMEOUT).getText();\n setLogString(\"Current Month and Year: \" + currentMonth, true, CustomLogLevel.HIGH);\n return currentMonth.substring(currentMonth.indexOf(\"-\") + 1, currentMonth.length()).trim();\n }", "public static void main(String[] args)\r\n/* 96: */ {\r\n/* 97:104 */ SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n/* 98:105 */ String qiandaotime = df.format(new Date());\r\n/* 99:106 */ System.out.println(qiandaotime);\r\n/* 100: */ }", "public int getDate() {\n\t\treturn date.getDayOfMonth();\n\t}", "public static void main(String[] args) {\n\t\tLocalDate date = LocalDate.now();\n\t\tSystem.out.println(\"Original date: \"+date);\n\t\t\n\t\t//DateTimeFormatter formatter = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL);\n\t\tDateTimeFormatter formatter = DateTimeFormatter.ofLocalizedDate(FormatStyle.LONG);\n\t\tString formattedDate = date.format(formatter);\n\t\tSystem.out.println(\"Full: \"+formattedDate);\n\t}", "public static void main (String[] args) {\n String day = \"Wednesday\";\n int date = 17;\n String month = \"February\";\n int year = 1999;\n\n System.out.println (\"American format:\");\n System.out.println (day + \", \" + month + \" \" + date + \", \" + year);\n\n System.out.println (\"European format:\");\n System.out.println (day + \" \" + date + \" \" + month + \", \" + year);\n }", "public static void main(String[] args) {\n\n\t\tDate date = new Date();\n\t\tSystem.out.println(date.toString());\n\t\t\n\t\t//If date is required in specific format\n\t\t\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"M/d/yyyy hh::mm::ss\");\n\t\tsdf.format(date);\n\t\tSystem.out.println(\"In required date format \"+sdf.format(date));\n\t\t\n\t\t//Using calendar objects\n\t\t\n\t\tCalendar cal = Calendar.getInstance();\n\t\tSimpleDateFormat sdf1 = new SimpleDateFormat(\"M/d/yyyy hh::mm::ss\");\n\t\tSystem.out.println(\"Using the Calendar objects \"+sdf1.format(cal.getTime()));\n\t\tSystem.out.println(\"Methods in Calendar \"+Calendar.DAY_OF_WEEK_IN_MONTH);\n\t\t\n\t\t\n\t}", "@Test\n\tpublic void systemDate_Get()\n\t{\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM-dd-yyyy\");\n\t\t\n\t\t// Created object of Date, to get system current date\n\t\tDate date = new Date();\n\t\t\n\t\tString currDate = dateFormat.format(date);\n\t\t\n\t\tSystem.out.println(\"Today's date is : \"+currDate);\n\n\t}", "public static void main(String[] args) {\n\r\n\t\tGregorianCalendar g = new GregorianCalendar();\r\n\t\tg.add(Calendar.DAY_OF_MONTH, 100);\r\n\t\tSystem.out.println(g.get(Calendar.MONTH) + 1 \r\n\t\t\t\t+ \", \" + g.get(Calendar.DAY_OF_MONTH) + \", \" + g.get(Calendar.YEAR));\r\n\t\t\r\n\t\t\r\n\t\tg = new GregorianCalendar(1999, 4, 30);\r\n\t\tSystem.out.println(\"The \" + g.get(Calendar.DAY_OF_WEEK) + \" Day of the week\");\r\n\t\t\r\n\t\t\r\n\t\tg.add(Calendar.DAY_OF_MONTH, 10000);\r\n\t\tSystem.out.println(g.get(Calendar.MONTH) + 1 + \", \" \r\n\t\t+ g.get(Calendar.DAY_OF_MONTH) + \", \" + g.get(Calendar.YEAR));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@Test public void Month_name_1__day__year()\t\t\t\t\t{tst_date_(\"2 Mar 2001\"\t\t\t\t, \"2001-03-02\");}", "public static void printMonthBody(int year, int month) {\n int startDay = getStartDay(year, month);\n //call the method getStartDay to get the start day for each month of the year \n print(startDay,year,month);\n //call the method print to print the calender for the month and pass the first day of the month as the parameter \n \n }", "private String getMonth(Date date) {\n\t\tLocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\n\t\tMonth month = localDate.getMonth();\n\n\t\treturn month.name();\n\t}", "public String getFormatedDate() {\n DateFormat displayFormat = new SimpleDateFormat(\"EEEE', ' dd. MMMM yyyy\", Locale.GERMAN);\n return displayFormat.format(mEvent.getTime());\n }", "public java.lang.String getDay() {\r\n return localDay;\r\n }", "public java.lang.String getDay() {\r\n return localDay;\r\n }", "public static void printTitle(int year, int month) {\n System.out.println(\" Sun Mon Tue Wed Thu Fri Sat\");//output the title for each month of the year\n }", "public String getCurrentDayOfWeekAsShortName() {\n\t\t\t\tDateFormat format = new SimpleDateFormat(\"EEE\");\n\t\t\t\tDate date = new Date(System.currentTimeMillis());\n\t\t\t\tString dayOfWeek = format.format(date);\n\t\t\t\treturn dayOfWeek;\n\t\t\t}", "public int MagicDate(){\n return month = day = year = 1;\n \n }", "public DateTimeFormatterBuilder appendMonthOfYearText() { \r\n return appendText(DateTimeFieldType.monthOfYear());\r\n }", "public static void testDate() {\n\t\tDate oldDate = new Date();\r\n\t\tSystem.out.println(oldDate);\r\n\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tc.set(2000, 0, 17);\r\n\t\tDate oldDate2 = c.getTime();\r\n\t\tSystem.out.println(oldDate2);\r\n\r\n\t\t// Dates created with Java 8\r\n\t\tLocalDateTime newDateTime = LocalDateTime.now();\r\n\t\tLocalDate newDate = LocalDate.now();\r\n\t\tLocalTime newTime = LocalTime.now();\r\n\t\tSystem.out.println(newTime);\r\n\r\n\t\tnewDateTime = LocalDateTime.of(newDate, newTime);\r\n\t\tSystem.out.println(newDateTime);\r\n\r\n\t\tLocalDateTime newDateTime1 = LocalDateTime.of(2015, 12, 1, 10, 2, 3, 4);\r\n\t\tSystem.out.println(newDateTime1);\r\n\r\n\t\tnewDateTime1 = newDateTime1.plusYears(1);\r\n\t\tSystem.out.println(newDateTime1);\r\n\r\n\t\tDateTimeFormatter dtf = DateTimeFormatter\r\n\t\t\t\t.ofLocalizedDateTime(FormatStyle.SHORT);\r\n\t\tSystem.out.println(dtf.format(newDateTime1));\r\n\t\tdtf = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM);\r\n\t\tSystem.out.println(dtf.format(newDateTime1));\r\n\r\n\t\tdtf = DateTimeFormatter.ofPattern(\"MMMM dd yyyy, hh:mm:ss\");\r\n\t\tSystem.out.println(dtf.format(newDateTime1));\r\n\t}", "public static void print(int startDay, int year, int month) {\n //call the method getNumberOfdaysInMonth to find out the number of the days in the month \n //use a for loop to print spaces up to the start day for each month\n //use another for loop to print the rest of the days in the calender\n //if the month is November calculate the thanksgiving day and output }\n int amount = getNumberOfDaysInMonth(year,month);\n for(int e = 0; e < startDay; e++){//this print outs the spaces for the months and aligns the dates together\n System.out.print(\" \");//use a for loop to print spaces up to the start day for each month\n }\n for(int e = 1; e <= amount; e++){//use another for loop to print the rest of the days in the calender\n if(e < 10){\n System.out.print(\" \" + e + \" \");//for the spaces\n }\n else{\n System.out.print(\" \" + e + \" \");\n }\n if((startDay + e) % 7 == 0){ \n System.out.println();\n }\n }\n thanks(startDay, month);//call the method thanks so it can work correctly\n }", "public String getDate()\n {\n return day + \"/\" + month + \"/\" + year;\n }", "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: */ }", "public int getDayOfWeek();", "public static void main(String[] args) {\n\t String str = String.format(\"%tc\", new Date());\r\n\t System.out.printf(str);\r\n\t \r\n//\t // display time and date\r\n//\t System.out.printf(\" Today is : %1$s %2$tB %2$td, %2$tY\", \"Due date : \", new Date());\r\n//\r\n\r\n\t System.out.println( new SimpleDateFormat(\"E yyyy.MM.dd 'at' hh:mm:ss a zzz\").format(new Date()));\r\n\t System.out.println( new SimpleDateFormat(\"EEEE, MMMM d, yyyy\").format(new Date()));\r\n\t}", "@Test public void Month_name_1__year__day()\t\t\t\t\t{tst_date_(\"2001 Mar 02\"\t\t\t, \"2001-03-02\");}", "public String getCurrentDayOfWeekAsFullName() {\n\t\t\t\treturn new DateFormatSymbols().getWeekdays()[Calendar.getInstance()\n\t\t\t\t\t\t.get(Calendar.DAY_OF_WEEK)];\n\t\t\t}", "private void printDays() {\n for (int dayOfMonth = 1; dayOfMonth <= daysInMonth; ) {\n for (int j = ((dayOfMonth == 1) ? dayOfWeek - 1 : 0); j < 7 && (dayOfMonth <= daysInMonth); j++) {\n if (this.isDateChosen == true && date.getDate() == dayOfMonth) {\n String space = date.getDate() >= 10 ? \" \" : \" \";\n System.out.print(space + ANSI_GREEN + dayOfMonth + ANSI_RESET + \" \");\n } else {\n System.out.printf(\"%4d \", dayOfMonth);\n }\n dayOfMonth++;\n }\n System.out.println();\n }\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 }", "public String toString() {\n return this.day + \" \" + this.month + \" \" + this.time;\n }", "public final String getMonthName() {\n return yearMonthProperty().get().getMonth().getDisplayName(TextStyle.FULL, Locale.getDefault());\n }", "public void enumerators()\n {\n Month birthMonth; //create a variable type called birthMonth\n birthMonth = Month.MAY; //assign a value to birthMonth from the enum defined above\n int ordinalNum = birthMonth.ordinal();\n String getMonth = birthMonth.toString();\n \n if(birthMonth.equals(Month.NOV))\n {\n System.out.println(\"Turkey Month! \");\n }\n else\n {\n System.out.println(\"That's a good month! \");\n }\n System.out.println(birthMonth.valueOf(\"DEC\"));\n \n System.out.println(\"ordinal: \" + ordinalNum);\n \n System.out.println(\"getMonth is: \" + getMonth); //starts at 0\n \n }", "public static String obtenerFechaActual() {\n\t\tCalendar date = Calendar.getInstance();\n\t\treturn date.get(Calendar.DATE) + \"_\" + (date.get(Calendar.MONTH) < 10 ? \"0\" + (date.get(Calendar.MONTH) + 1) : (date.get(Calendar.MONTH) + 1) + \"\") + \"_\" + date.get(Calendar.YEAR);\n\t}", "public double getMon60612() {\r\n\t\treturn mon60612;\r\n\t}", "public String getMonth() {\n return month.getText();\n }", "private static String getTodaysDate() {\n\n LocalDateStringConverter dateToStringConverter = new LocalDateStringConverter();\n return dateToStringConverter.toString(LocalDate.now());\n }", "public String toString() {\n\t\t\treturn month + \"/\" + day + \"/\" + year;\n\t\t}", "public String firstDayOfWeek(){\n cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);\n return (\"Mon\" + \" \" + cal.get(Calendar.DATE) + \" \" + cal.get(Calendar.MONTH) + \" \" + cal.get(Calendar.YEAR));\n }", "public static String dateDisplay(Calendar cal) {\n\t\tLONGDAYS[] arrayOfDays = LONGDAYS.values();\n\t\tString toReturn = cal.get(Calendar.MONTH)+1 + \"/\" + cal.get(Calendar.DAY_OF_MONTH);\n\t\ttoReturn = arrayOfDays[cal.get(Calendar.DAY_OF_WEEK)-1] + \" \" + toReturn;\n\t\treturn toReturn;\n\t}", "public static void printMonthBody(int year, int month) {\n\n }", "public String localDateToDayOfWeek(LocalDate localDate) {\n Calendar calendar = Calendar.getInstance();\n calendar.clear();\n calendar.set(localDate.getYear(), localDate.getMonthValue()-1, localDate.getDayOfMonth());\n dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);\n if(dayOfWeek == 2){\n day = \"monday\";\n } else if(dayOfWeek == 3){\n day = \"Tuesday\";\n } else if(dayOfWeek == 4){\n day = \"wednesday\";\n } else if(dayOfWeek == 5){\n day = \"thursday\";\n } else if(dayOfWeek == 6){\n day = \"friday\";\n }\n return day;\n }", "public static void main(String[] args) {\n\t\tLocalDate ld = LocalDate.now();\n\t\tSystem.out.println(ld);\n\t\tSystem.out.println(ld.minusDays(1));\n\t}", "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 static String printTime(LocalDate time) {\n return time.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n }", "public static void main(String[] args) {\n MutableDateTime dateTime = new MutableDateTime();\n System.out.println(\"Current date = \" + dateTime);\n\n // Find the first day of the next month can be done by:\n // 1. Add 1 month to the date\n // 2. Set the day of the month to 1\n // 3. Set the millis of day to 0.\n dateTime.addMonths(1);\n dateTime.setDayOfMonth(1);\n dateTime.setMillisOfDay(0);\n System.out.println(\"First day of next month = \" + dateTime);\n }", "@Test public void Month_name_1__day__year__guess()\t\t\t\t{tst_date_(\"02 Mar 01\"\t\t\t\t, \"2001-03-02\");}", "public static void main(String[] arg){\n\tDate today;\n\ttoday=new Date();\n\tSystem.out.println(today);\n}", "public static void main(String[] args) {\n \n String day;\n String date;\n String month;\n int year;\n \n day = \"Friday\";\n date = \"4th\";\n month = \"March\";\n year = 2016;\n System.out.println(\"The current date is:\");\n System.out.println(day);\n System.out.println(date);\n System.out.println(month);\n System.out.println(year);\n \n }", "public static void main(String[] args) {\n\t\tLocalDate localDate = LocalDate.now();\n\n\t\tSystem.out.println(\"LocalDate: \" + localDate);\n\n\t\tSystem.out.println(LocalDate.of(2019, 04, 16));\n\n\t\tSystem.out.println(LocalDate.parse(\"2019-04-16\"));\n\n\t\t////////////////////////////////////////////////////////\n\n\t\tLocalDate tomorrow = LocalDate.now().plusDays(1);\n\n\t\tSystem.out.println(\"LocalDate +1 day : \" + tomorrow);\n\n\t\t////////////////////////////////////////////////////////\n\n\t\tLocalDate previousMonthSameDay = LocalDate.now().minus(1, ChronoUnit.MONTHS);\n\n\t\tSystem.out.println(\"Previous month, same day: \" + previousMonthSameDay);\n\n\t\t////////////////////////////////////////////////////////\n\n\t\tDayOfWeek sunday = LocalDate.parse(\"2019-04-18\").getDayOfWeek();\n\n\t\tSystem.out.println(\"Which day was at 2019-04-18 ? \" + sunday);\n\n\t\tint twelve = LocalDate.parse(\"2019-04-18\").getDayOfMonth();\n\n\t\tSystem.out.println(\"Which day was at 2016-06-12 ? \" + twelve);\n\n\t\t/////////////////////////////////////////////////////////\n\n\t\tboolean leapYear = LocalDate.now().isLeapYear();\n\n\t\tSystem.out.println(\"Is leap year? \" + leapYear);\n\n\t\t/////////////////////////////////////////////////////////\n\n\t\tboolean notBefore = LocalDate.parse(\"2016-06-12\").isBefore(LocalDate.parse(\"2016-06-11\"));\n\n\t\tSystem.out.println(\"Not before: \" + notBefore);\n\n\t\tboolean isAfter = LocalDate.parse(\"2016-06-12\").isAfter(LocalDate.parse(\"2016-06-11\"));\n\n\t\tSystem.out.println(\"Is after: \" + isAfter);\n\n\t\t////////////////////////////////////////////////////////\n\n\t\tLocalDate firstDayOfTheMonth = LocalDate.parse(\"2016-06-12\").with(TemporalAdjusters.firstDayOfMonth());\n\t\tSystem.out.println(\"First day of 2016.06: \" + firstDayOfTheMonth);\n\t\tLocalDate nextMonday = LocalDate.parse(\"2016-06-12\").with(TemporalAdjusters.next(DayOfWeek.MONDAY));\n\t\tSystem.out.println(\"Next monday: \" + nextMonday);\n\t}" ]
[ "0.7123279", "0.681804", "0.6573241", "0.6416837", "0.6389668", "0.6375172", "0.6234342", "0.62287784", "0.6187472", "0.6133701", "0.61242294", "0.6110911", "0.6100487", "0.60954416", "0.60746956", "0.6065069", "0.60320866", "0.60315865", "0.6006141", "0.5999401", "0.59973013", "0.5991131", "0.5984313", "0.5951181", "0.59476465", "0.5936563", "0.5929456", "0.5920018", "0.59045863", "0.5890864", "0.58619016", "0.5855887", "0.5853547", "0.58501464", "0.5827128", "0.58236706", "0.58156264", "0.579779", "0.5788021", "0.57786155", "0.5775362", "0.5762332", "0.5760346", "0.5751811", "0.5748768", "0.5745697", "0.5745547", "0.5735427", "0.5734759", "0.573407", "0.5733792", "0.5732922", "0.57242656", "0.57191503", "0.57182866", "0.5701626", "0.5698096", "0.56950927", "0.5688394", "0.5680568", "0.5680097", "0.5676609", "0.5675476", "0.56749177", "0.5649703", "0.5649703", "0.5646254", "0.5643335", "0.5640639", "0.5638892", "0.5628411", "0.5624996", "0.5617001", "0.56069815", "0.56045824", "0.5602374", "0.5601305", "0.5596514", "0.5596392", "0.55962473", "0.55951476", "0.5591348", "0.5590157", "0.558834", "0.55851763", "0.55801195", "0.5575351", "0.55748224", "0.55705", "0.55703247", "0.55613184", "0.5558291", "0.5554721", "0.5554315", "0.55510616", "0.55486953", "0.5537728", "0.55354106", "0.5535079", "0.553494" ]
0.6476105
3
Add the number to an internal data structure.
public void add(int number) { if(!m.containsKey(number)) { m.put(number, 0); } int pre = m.get(number); m.put(number, pre + 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void add(int number) {\n sum.add(number);\n }", "public void addNumber(int number) {\r\n\t\tadd(Integer.toString(number).getBytes(charset));\r\n\t}", "public void add(int number) {\n if(map.containsKey(number)) map.put(number, map.get(number) + 1);\n else {\n map.put(number, 1);\n list.add(number);\n }\n }", "public void add(int number) {\n if (mapping.containsKey(number)) {\r\n mapping.put(number, 2);\r\n } else {\r\n mapping.put(number, 1);\r\n }\r\n insert(elements, number);\r\n return;\r\n }", "public void add(int number) {\n numbers.put(number, numbers.getOrDefault(number, 0)+1);\n }", "public void add(int number) {\n map.put(number, map.getOrDefault(number, 0) + 1);\n }", "public void add(int number) {\n\t map.put(number,map.containsKey(number)?map.get(number)+1:1);\n\t}", "public void addNumber(int number) {\n totalNumber += number;\n availableNumber += number;\n }", "public void add(int number) {\n //map.put(number, map.getOrDefault(number, 0) + 1);\n if (map.containsKey(number)) {\n map.put(number, map.get(number) + 1);\n } else {\n map.put(number, 1);\n }\n }", "public void add(int number) {\n arrayList.add(number);\n isSorted = false;\n }", "public void addNumber(String number){\n\t\tnumberList.add(number);\n\t}", "public void add(int number) {\n hash.put(number, hash.getOrDefault(number, 0) + 1);\n }", "public void add(int num){\r\n\t\t\tNode newNode = new Node(num);\r\n\t\t\tthis.addNode(newNode);\r\n\t\t}", "public void add(int number) {\n // Write your code here\n if(map.containsKey(number)) {\n map.put(number, map.get(number) + 1);\n }else {\n map.put(number, 1);\n }\n }", "public void add(int number) {\n\t if (hash.containsKey(number)) hash.put(number, 2); // two is enough\n\t else {\n\t \thash.put(number, 1);\n\t \tlist.add(number);\n\t }\n\t}", "public void add(int number) {\n if (hash.containsKey(number)) {\n hash.put(number, 2);\n } else {\n hash.put(number, 1);\n }\n }", "public void add(NestedInteger ni);", "public void add(int number) {\n for(int num : list) set.add(num + number);\n list.add(number);\n }", "public void add(int number) {\n // Write your code here\n if(map.containsKey(number)){\n map.put(number, map.get(number) + 1);\n }else{\n list.add(number);\n map.put(number, 1);\n }\n }", "public abstract void add(NestedInteger ni);", "public void add(int add) {\r\n value += add;\r\n }", "public void add(NestedInteger ni){}", "public void addItem(int num) {\r\n\t\t\r\n\t\t//left sub tree\r\n\t\tif(num < this.data) {\r\n\t\t\tif(this.left !=null) {\r\n\t\t\t\tthis.left.addItem(num);\r\n\t\t\t} else {\r\n\t\t\t\tthis.left = new BTNode(num);\r\n\t\t\t}\r\n\t\t} else { \r\n\t\t\t//right sub tree\r\n\t\t\tif(this.right !=null) {\r\n\t\t\t\tthis.right.addItem(num);\r\n\t\t\t} else {\r\n\t\t\t\tthis.right = new BTNode(num);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void add(int value) {\n m_value += value;\n }", "public void add(int number) {\n if(numbers.size() > 0){\n \tSet<Integer> twoSum = numbers.stream().map(Integer::intValue).map(i -> i+number).collect(Collectors.toSet());\n twoSums.addAll(twoSum);\n }\n numbers.add(number);\n }", "public void add(int value) {\n\t \tensureCapacity(size+ 1);\n\t \telementData[size] = value;\n\t \tsize++;\n\t }", "public void addInMemory(double num) {\n memoryValue += SciCalculator.currentValue = num;\n }", "@Override\n\tpublic void add(Integer value) {\n\t\troot=add(root,value);\n\t\tcount++;\n\t}", "public void add(int num) {\n // if the array is not large enough, an array of twice\n // the capacity is created\n if (count + 1 > list.length) {\n int[] temp = new int[list.length * 2];\n for (int i = 0; i < list.length; i++) {\n temp[i] = list[i];\n }\n list = temp;\n temp = null;\n }\n \n // add the element to the array and increment the count\n list[count++] = num;\n }", "public static <K> void addNumber (Map<? super K, Integer> toAdd, K key, int val) {\n if (toAdd.get(key) == null) {\n toAdd.put(key, val);\n } else {\n toAdd.put(key, toAdd.get(key) + val);\n }\n }", "private void addNumber(int num, int row, int column) {\n numbersAdded++;\n square[row * dimensions + column] = num;\n }", "public void add (int value) {\r\n\t\ttotal = total + value;\r\n\t\thistory = history + \" + \" + value;\r\n\t}", "@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}", "private static void addItem( String name, Integer number ) {\n\t\tItem item = container.addItem( itemId );\n\t\tsetValues( name, number, item );\n\t}", "void add(int value);", "public void addValue(List<Integer> list, int number) {\n list.add(number);\n System.out.println(list);\n }", "public void add(int element);", "public void add(Number v)\n\t{ total = total + v.doubleValue(); }", "public void add(int value) {\n overallRoot = add(overallRoot, value);\n }", "public void add(NestedInteger ni) {\n this.list.add(ni);\n }", "public double addNumber(double num) {\r\n\t\tdouble sum = 0;\r\n\t\tSystem.out.print(\"Add num to previousNumber\");\r\n\t\tsum = num + previousNumber;\r\n\t\treturn sum;\r\n\t}", "public void addElement(Integer e){\n list.add(e);\n }", "public void add (int value) {\n\t\ttotal = total + value;\n\n\t\thistory = history + \" + \" + value;\n\t\t\n\t}", "public void add(BinaryNumber aBinaryNumber) {\n\t\tint c = 0;\n\t\tif(length < aBinaryNumber.length) {\n\t\t\tprepend(Math.abs(this.length - aBinaryNumber.length), this);\n\t\t}\n\t\tif(length > aBinaryNumber.length) {\n\t\t\tprepend(Math.abs(this.length - aBinaryNumber.length), aBinaryNumber);\n\t\t}\n\t\tint added[] = new int[this.length];\n\t\tfor(int i = data.length-1;i >= 0; i--) {\n\t\t\tif(aBinaryNumber.data[i] + data[i] + c == 0) {\n\t\t\t\tadded[i] = 0;\n\t\t\t\tc = 0;\n\t\t\t}\n\t\t\telse if(aBinaryNumber.data[i] + data[i] + c == 2) {\n\t\t\t\tadded[i] = 0;\n\t\t\t\tc = 1;\n\t\t\t}\n\t\t\telse if (aBinaryNumber.data[i] + data[i] + c == 3){\n\t\t\t\tadded[i] = 1;\n\t\t\t\tc = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tadded[i] = 1;\n\t\t\t\tc=0;\n\t\t\t}\n\t\t}\n\t\tthis.data = added.clone();\n\t\tif( c == 1)\n\t\t{\n\t\t\tprepend(c, this);\n\t\t\tdata[0] = 1;\n\t\t}\t\n\t}", "public boolean add(int number)\n\t{\n\t\tif (arraySize >= array.length)\n\t\t{\n\t\t\tthis.ensureCapacity(array.length * 2 + 1);\n\t\t} \n\t\tarray[arraySize] = number;\t\n\t\tarraySize++;\n\t\treturn true;\n\t}", "public void add(int kn) {\n\t\tif(this.size > this.N-1) {\n\t\t\tsetNDouble(N);\n\t\t}\n//\t\tSystem.out.println(this.n + \" \" + this.size);\n\t\tarray[this.size] = kn;\n\t\tthis.size++;\n\t}", "public void add()\n {\n set(++ current);\n }", "public void add(int num) {\n ListNode newNode = new ListNode(num);\n if (head == null) {\n head = newNode;\n } else {\n head.previous = newNode;\n newNode.next = head;\n head = newNode;\n }\n }", "public void add(NestedInteger ni) {\n this.nestedIntegers.add(ni);\n }", "public void add(int v) {\n if (empty) {\n x = v;\n empty = false;\n }\n else {\n if (next == null) {\n next = new Lista(v);\n }\n else {\n Lista iter = new Lista(this);\n while (iter.next != null) {\n iter = iter.next;\n }\n iter.next = new Lista(v);\n } \n }\n }", "private synchronized void agregarElemento(int numero){\n int hashtag = funcionHash(numero);\n int cantDigitos = cantidadDigitos(numero);\n \n if(!listaPorDigitos.containsKey(cantDigitos)){\n listaPorDigitos.put(cantDigitos, new TreeMap());\n }\n if(listaPorDigitos.get(cantDigitos).get(hashtag) == null){\n listaPorDigitos.get(cantDigitos).put(hashtag, new ArrayList<Integer>());\n }\n listaPorDigitos.get(cantDigitos).get(hashtag).add(numero);\n this.add(numero);\n }", "public void add(int data)\n\t{\n\t\tNodeRandom n;\n\t\tn= new NodeRandom(data);\n\t\tif (start==null)\n\t\t{\n\t\t\tSystem.out.println(\"The list is empty\");\n\t\t\t//n.next=null;\n\t\t start= n;\n\t\t curr=n;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//System.out.println(\"The list is not empty\");\n\t\t\t//System.out.println(\"nodelink.curr value is \"+Nodelink.curr.data);\n\t\t curr.next= n;\n\t\t\tcurr=curr.next;\n\t\t\tn.next=null;\n\t\t\t\n\t\t}\n\t}", "public void add(int value) {\n\t\taddRecursive(root, value);\n\t\t// System.out.print(\"root\" + String.valueOf(root.value));\n\t}", "public void add(NestedInteger ni) {\n\t\tif (this.list == null) {\n\t\t\tthis.list = new ArrayList<>();\n\t\t}\n\t\tthis.list.add(ni);\n\t}", "public void addTrackNumber( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), TRACKNUMBER, value);\r\n\t}", "public void addValue(int i) {\n value = value + i;\n }", "public void addVertices(int num){ \n this.nrVertices += num;\n }", "public int addOrderedList(int number) {\n\t\tint index;\n\n\t\tif (olist.traverse(number) == 1) {\n\t\t\tindex = olist.returnPos(number);\n\t\t\tSystem.out.println(\"number will be added at\" + index);\n\n\t\t\tolist.insertAt(number, index);\n\n\t\t\tcount++;\n\n\t\t} else if (olist.traverse(number) == 0) {\n\t\t\tolist.deleteElement(number);\n\t\t\tcount--;\n\n\t\t}\n\n\t\treturn count;\n\n\t}", "void add(String name, int value);", "public void addValue() {\n addValue(1);\n }", "public void add( Object value )\n\t{\n\t\tint n = size();\n\t\tif (addIndex >= n)\n\t\t{\n\t\t\tif (n == 0)\n\t\t\t\tn = 8;\n\t\t\telse\n\t\t\t\tn *= 2;\n\t\t\tObject narray = Array.newInstance( array.getClass().getComponentType(), n );\n\t\t\tSystem.arraycopy( array, 0, narray, 0, addIndex );\n\t\t\tarray = narray;\n\t\t}\n\t\tArray.set( array, addIndex++, value );\n\t}", "public void addLength(int num) {\r\n this.length += num;\r\n }", "public Builder addData(int value) {\n ensureDataIsMutable();\n data_.add(value);\n onChanged();\n return this;\n }", "public void add(int data)\n {\n Node node = new Node(data);\n node.next = head;\n head = node;\n }", "public void add (String name, String number) {\n this.persons.add(new Person(name, number));\n }", "void add(int val);", "public void add(int i) {\n\t\t\tthis.val =i;\n\t\t\t\n\t\t}", "public void add(double n){\n list [index] = n;\n index ++;\n if (index==length){\n if(!hasFilled){\n hasFilled = true;\n }\n index=0;\n }\n }", "public void add(BinaryNumber aBinaryNumber) {\n\t\tif(data.length != aBinaryNumber.getLength()) {\n\t\t\tSystem.out.println(\"the lengths of the binary numbers do not coincide\");\n\t\t\t\n\t\t}else {\n\t\t\tint carried = 0;\n\t\t\tint sum = 0;\n\t\t\tfor(int i = data.length - 1;i >= 0;i--) {\n\t\t\t\tsum = data[i] + aBinaryNumber.getDigit(i) + carried;\n\t\t\t\tcarried = sum / 2;\n\t\t\t\tdata[i] = sum % 2;\n\t\t\t}\n\t\t\tSystem.out.println(toString());\n\t\t\tif(carried == 1) {\n\t\t\t\toverflow = true;\n\t\t\t\tSystem.out.println(\"overflow\");\n\t\t\t}else {\n\t\t\t\toverflow = false;\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void AddItem(int n) {\n\t\tSystem.out.println(\"ADDED:\" + n);\r\n\r\n\t}", "@attribute(value = \"\", required = true)\t\r\n\tpublic void addNumberField(NumberField f) {\r\n\t\tfields.put(\"\" + fieldCount++, f);\r\n\t}", "@Override\r\n\tpublic int add() {\n\t\treturn 0;\r\n\t}", "public void add(int toBeAdded) {\n\t\tif (this.myCount==this.myValues.length){\n\t\t\tSystem.err.println(\"No more space in array\");\n\t\t\tSystem.exit(1);\n\t\t}\n \tthis.myValues[this.myCount] = toBeAdded;\n this.myCount++;\n }", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int add() {\n\t\treturn 0;\n\t}", "public void addPartNumber(String partNumber){partNumbers.add(partNumber);}", "public void add(int data) { // Big O -> O(1)\n\n\t\tNode temp = new Node(data);\n\t\tif(tail != null) { // if there is a tail, it adds after the tail.\n\t\t\ttail.next = temp;\n\t\t\ttemp.prev = tail;\n\t\t\t}\n\t\ttail = temp; // the added node is the new tail, regardless of \n\t\t\t\t\t//whether the list was empty or not\n\t\tif(head == null) { // if there is no head, the new node is the new head as well\n\t\t\thead = temp;\n\t\t\t}\n\t\tsize++; \n\t}", "public void addToPrimitive(int add) {\n primitiveCounter += add;\n }", "public void add(DJNode n) {\n\t\tif (next == heap.length) {\n\t\t\tresize();\n\t\t}\n\n\t\theap[next] = n;\n\t\tfloatNode();\n\t\tnext++;\n\t}", "public void addNum(int num) {\n \tmaxHeap.add((long) num);\n \tminHeap.add(-maxHeap.poll());\n \tif (maxHeap.size() < minHeap.size()) {\n \t\tmaxHeap.add(-minHeap.poll());\n \t}\n }", "public void add(Double addedAmount) {\n }", "void add(BigInt number);", "@Override\n public void add(Integer element) {\n if (this.contains(element) != -1) {\n return;\n }\n // when already in use\n int index = this.getIndex(element);\n if(this.data[index] != null && this.data[index] != this.thumbstone){\n int i = index + 1;\n boolean foundFreePlace = false;\n while(!foundFreePlace && i != index){\n if(this.data[i] == null && this.data[i] == this.thumbstone){\n foundFreePlace = true;\n }else{\n if(i == this.data.length - 1){\n // start at beginning.\n i = 0;\n }else{\n i++;\n }\n }\n }\n if(foundFreePlace){\n this.data[i] = element;\n }else{\n throw new IllegalStateException(\"Data Structre Full\");\n }\n }\n }", "public void addItem(int value) {\n if (root == null) {\n root = new Node(value);\n } else {\n addToNode(root, value);\n }\n }", "private void addTwoNumbers() {\n\t\t\n\t}", "public void addNodeAfterThis( int newdata ) {\r\n\t\tlink = new IntNode( newdata, link );\r\n\t}", "public void addElement(Integer elem){\n\t\tlist.add(elem);\n\t}", "public void add (int item)\n\t{\n\t\tadd(this.root,item);\n\t}", "void addNode(int node);", "void addHadithReferenceNo(Object newHadithReferenceNo);", "public void push(T data) {\n numberList.addAtStart(data);\n }", "public void add1() {\r\n value++;\r\n }", "public void addToBill(int newBill){\n Bill = Bill + newBill;\n }", "public void increase(int number) {\r\n this.count += number;\r\n }", "public void increase(int number) {\r\n this.count += number;\r\n }", "public void add(int data) {\n\t\t// Its a first element\n\t\tif (head == null && tail == null) {\n\t\t\tNode newNode = getNewNode(data);\n\t\t\thead = tail = newNode;\n\t\t\treturn;\n\t\t}\n\t\t// This will add to the end of list with time complexity -O(1)\n\t\tNode newNode = getNewNode(data);\n\t\ttail.next = newNode;\n\t\tnewNode.prev = tail;\n\t\ttail = newNode;\n\t}", "@Override\n public void addNumbers() {\n calculator.add(2, 2);\n }", "public void add(int value){\n \n // Case 1: The tree is empty - allocate the root\n if(root==null){\n root = new BSTNode(value);\n }\n \n // Case 2: The tree is not empty \n // find the right location to insert value\n else{\n addTo(root, value);\n } \n count++; // update the number of nodes\n }", "private void addNumberToArrayByIndex(Number[] array, Number number, int index) {\n if (index >= array.length) {\n array = arrayExtension(array);\n }\n array[index] = number;\n }" ]
[ "0.7298927", "0.7258595", "0.7185211", "0.7179542", "0.71686804", "0.71325636", "0.7110969", "0.7081806", "0.7026955", "0.70166874", "0.6992092", "0.69855356", "0.6917963", "0.6915635", "0.6803027", "0.6701519", "0.6692067", "0.6672693", "0.658667", "0.6564145", "0.656076", "0.6527999", "0.6525292", "0.6505411", "0.6459512", "0.64580905", "0.6415824", "0.6398923", "0.6346936", "0.63327247", "0.6270312", "0.62268376", "0.6211229", "0.6208956", "0.6206665", "0.6185443", "0.61797744", "0.61705714", "0.6169334", "0.61659205", "0.615938", "0.6154824", "0.61472386", "0.6133151", "0.6124543", "0.61186135", "0.6118613", "0.6112437", "0.6108759", "0.609417", "0.60910916", "0.6085887", "0.6083412", "0.6081758", "0.607074", "0.6059427", "0.60593617", "0.6057834", "0.6034395", "0.60334706", "0.6026609", "0.60252637", "0.6020196", "0.600847", "0.60081905", "0.59859854", "0.59822756", "0.5973777", "0.5969455", "0.5949628", "0.59413147", "0.59267145", "0.5925834", "0.5890972", "0.5890972", "0.5890972", "0.5890672", "0.5877894", "0.5874129", "0.58710784", "0.58562654", "0.5841307", "0.5839276", "0.583798", "0.5823735", "0.580287", "0.5802492", "0.57966536", "0.57868105", "0.57860065", "0.578399", "0.57670766", "0.5760931", "0.5758912", "0.5754763", "0.5754763", "0.57539195", "0.57526916", "0.5739848", "0.57215106" ]
0.70860004
7
Find if there exists any pair of numbers which sum is equal to the value.
public boolean find(int value) { boolean res = false; if(m.size() >0) { for(int i : m.keySet()) { if(value - i == i) { if(m.get(i) > 1) { res = true; break; } } else { if(m.containsKey(value - i)) { res = true; break; } } } } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void hasPairWithSum(int[] input, int sum) {\n\t\tMap<Integer, Integer> map = new Hashtable<>();\n\t\tint occurence = 0;\n\t\tfor (int num : input) {\n\t\t\toccurence = 1;\n\t\t\tif (map.containsKey(num)) {\n\t\t\t\toccurence = map.get(num);\n\t\t\t\toccurence++;\n\t\t\t}\n\t\t\tmap.put(num, occurence);\n\t\t}\n\n\t\tfor (int first : input) {\n\t\t\tint second = sum - first;\n\t\t\tif (map.containsKey(second)) {\n\t\t\t\toccurence = map.get(second);\n\t\t\t\tif (occurence > 0) {\n\t\t\t\t\tif (second == first) {\n\t\t\t\t\t\tif (occurence > 1) {\n\t\t\t\t\t\t\tSystem.out.println(\"[\" + first + \",\" + second + \"]\");\n\t\t\t\t\t\t\toccurence -= 2;\n\t\t\t\t\t\t\tmap.put(first, occurence);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tint firstOccurence = map.get(first);\n\t\t\t\t\t\tfirstOccurence--;\n\t\t\t\t\t\tint secondOccurence = map.get(second);\n\t\t\t\t\t\tsecondOccurence--;\n\t\t\t\t\t\tmap.put(first, firstOccurence);\n\t\t\t\t\t\tmap.put(second, secondOccurence);\n\t\t\t\t\t\tSystem.out.println(\"[\" + first + \",\" + second + \"]\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public boolean find(int value) {\n return twoSums.contains(value);\n }", "public boolean find(int value) {\n for (int key : numbers.keySet()) {\n int pair = value - key;\n if (numbers.containsKey(pair) && (key != pair || numbers.get(key) > 1)) {\n return true;\n }\n }\n return false;\n }", "public boolean find(int value) {\n for (Map.Entry<Integer, Integer> entry : hash.entrySet()) {\n int num1 = entry.getKey();\n int num2 = value - num1;\n if ((num1 == num2 && entry.getValue() > 1) || (num1 != num2 && hash.containsKey(num2))) {\n return true;\n }\n }\n return false;\n }", "public boolean find(int value) {\n for(int num1 : list){\n int num2 = value - num1;\n if((num1 == num2) && map.get(num1) > 1 || (num1 != num2) && map.containsKey(num2)) return true;\n }\n return false;\n }", "public static boolean findNumbers(double Array[], int arraySize, double sum) {\n //outter loop keeps first number unless it has to change\n for (int i = 0; i < arraySize - 2; i++) {\n //middle loop keeps second number unless it has to change \n for (int j = i + 1; j < arraySize - 1; j++) {\n //changes the every time and will break function if sum is found\n for (int k = j + 1; k < arraySize; k++) {\n //conditional staement if found print and return true \n if (Array[i] + Array[j] + Array[k] == sum) {\n System.out.print(\"Triplet is \" + Array[i] + \" ,\" + Array[j] + \" ,\" + Array[k]);\n return true;\n }\n }\n }\n }\n\n // If we reach here then nothing was found \n return false;\n }", "static boolean find3Numbers(int A[], int arr_size, int sum) {\n\t\t// Fix the first element as A[i] \n\t\tfor (int i = 0; i < arr_size - 2; i++) {\n\t\t\t// Find pair in subarray A[i+1..n-1] \n\t\t\t// with sum equal to sum - A[i] \n\t\t\tHashSet<Integer> s = new HashSet<Integer>();\n\t\t\tint curr_sum = sum - A[i];\n\t\t\tfor (int j = i + 1; j < arr_size; j++) {\n\t\t\t\tif (s.contains(curr_sum - A[j])) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\ts.add(A[j]);\n\t\t\t}\n\t\t}\n\n\t\t// If we reach here, then no triplet was found \n\t\treturn false;\n\t}", "private boolean checkTwoSum(List<Integer> a, int twoSum, int start) {\n\t\t\n\t\tfor (int i = start, j = a.size() - 1; i <=j;) {\n\t\t\tif (a.get(i) + a.get(i) == twoSum || \n\t\t\t\ta.get(j) + a.get(j) == twoSum ||\n\t\t\t\ta.get(i) + a.get(j) == twoSum) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif (a.get(i) + a.get(j) > twoSum) {\n\t\t\t\t\tj--;\n\t\t\t\t} else if (a.get(i) + a.get(j) < twoSum) {\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public Collection<MatchingPair> matchingPairs(Collection<Integer> values, Integer targetSum)\n {\n HashMap<Integer, Integer> tableCompteur = new HashMap<>();\n LinkedHashMap<Integer, Integer> tablePaire = new LinkedHashMap<Integer, Integer>();\n Collection<MatchingPair> paireSansDuplication = new LinkedList();\n Collection<MatchingPair> solution = new LinkedList();\n\n // On itere sur les valeurs donnee pour savoir le compte de chaque valeur\n for (Integer valeur : values)\n {\n if (tableCompteur.containsKey(valeur))\n {\n // Partie Compteur\n Integer compteur = tableCompteur.get(valeur);\n compteur++;\n tableCompteur.put(valeur, compteur);\n }\n else {\n tableCompteur.put(valeur, 0);\n }\n\n }\n\n // On itere sur les valeurs donnee pour savoir les paires\n for (Integer element : values)\n {\n int temp = targetSum - element;\n if (tablePaire.containsKey(element))\n {\n if (tablePaire.get(element) != null)\n {\n paireSansDuplication.add(new MatchingPair(element, temp));\n }\n // si la table contient l'element on met nul pour ne pas avoir de repetition\n tablePaire.put(temp, null);\n }\n else if (!tablePaire.containsKey(element))\n {\n tablePaire.put(temp, element);\n }\n }\n\n // On trouve le minimum count entre les paire et leur compte pour tenir en compte de toutes les possibilites. Ici le meilleur cas reste O(n) ( pas de paire)\n for (MatchingPair paire : paireSansDuplication)\n {\n if (paire != null) { // verification au debug pr erreur nullpointer\n int a = tableCompteur.get(paire.first);\n int b = tableCompteur.get(paire.second);\n int minCount = Math.min(a+1, b+1);\n for (int i = 0; i < pow(minCount, 2); i++)\n {\n solution.add(new MatchingPair(paire.first, paire.second));\n }\n }\n }\n return solution;\n }", "boolean bruteForce(int A[], int sum) {\n\n\t\t// Fix the first element as A[i]\n\t\tfor (int i = 0; i < A.length - 2; i++) {\n\n\t\t\t// Fix the second element as A[j]\n\t\t\tfor (int j = i + 1; j < A.length - 1; j++) {\n\n\t\t\t\t// Now look for the third number\n\t\t\t\tfor (int k = j + 1; k < A.length; k++) {\n\t\t\t\t\tif (A[i] + A[j] + A[k] == sum) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// If we reach here, then no triplet was found\n\t\treturn false;\n\t}", "public boolean find(int value) {\n // Write your code here\n for(Integer i : list){\n int num = value - i;\n if((num == i && map.get(i) > 1) || (num != i && map.containsKey(num))){\n return true;\n }\n }\n return false;\n }", "public boolean find(int value) {\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tint num1 = list.get(i);\n\t\t\tint num2 = value - num1;\n\t\t\tif (num2 != num1 && hash.containsKey(num2) || num2 == num1 && hash.get(num2) > 1) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t return false;\n\t}", "private static boolean tripletWithSumExists(int[] arr, int expectedSum){\n Set<Integer> observedElems = new HashSet<>();\n int size = arr.length;\n\n observedElems.add(arr[0]);\n\n for(int i=1; i<size-1; ++i){\n for(int j=i+1; j<size; ++j){\n int complement = expectedSum - (arr[i] + arr[j]);\n if(observedElems.contains(complement))\n return true;\n }\n observedElems.add(arr[i]);\n }\n return false;\n }", "public static boolean tripletSum(int[] arr, int sum) {\n //first we will sort the array O(n*log(n)).\n\n Arrays.sort(arr);\n\n int currentSum;\n int left = 0;\n int right = arr.length - 1;\n\n HashSet<Integer> hashSet = new HashSet<>();\n\n //use the outer loop to fix an index of the array, i, as one of the pairs\n\n for (int i = 0; i < arr.length; i++) {\n\n currentSum = sum -arr[i];\n\n //this is the pair sum algorithm with an updated sum\n\n for (int j = 0; j < arr.length; j++) {\n if (left == i) {\n left++;\n }\n if (right == i) {\n right--;\n }\n if (hashSet.contains(arr[left] + arr[right])) {\n return true;\n } else {\n hashSet.add(currentSum - (arr[left] + arr[right]));\n if (arr[left] + arr[right] > currentSum) {\n right--;\n } else if (arr[left] + arr[right] < currentSum) {\n left++;\n } else {\n return true;\n }\n }\n if (left >= right) {\n break;\n }\n }\n\n left = 0;\n right = arr.length - 1;\n hashSet.clear();\n\n }\n return false;\n\n }", "public boolean kPairSum(Integer k) {\r\n\t\tint i = 0;\r\n\t\tint j = sortedIntegerArray.length - 1;\r\n\t\treturn kPairSumInterval(k, i, j);\r\n\r\n\t}", "public boolean find(int value) {\n // Write your code here\n for(Integer num : map.keySet()) {\n int num2 = value - num;\n if(num != num2 && map.containsKey(num2) || num == num2 && map.get(num) > 1) {\n return true;\n }\n }\n return false;\n }", "static boolean hasArrayTwoCandidates(int A[], \n\t\t\t\t\t\tint arr_size, int sum) \n\t{ \n\t\tint l, r; \n\t\n\t\t/* Sort the elements */\n\t\tArrays.sort(A); \n\t\n\t\t/* Now look for the two candidates \n\t\tin the sorted array*/\n\t\tl = 0; \n\t\tr = arr_size-1; \n\t\twhile (l < r) \n\t\t{ \n\t\t\tif(A[l] + A[r] == sum) \n\t\t\t\treturn true; \n\t\t\telse if(A[l] + A[r] < sum) \n\t\t\t\tl++; \n\t\t\telse // A[i] + A[j] > sum \n\t\t\t\tr--; \n\t\t} \n\t\treturn false; \n\t}", "public boolean find(int value) {\n \t\n \tfor(int num : map.keySet()) {\n \t\tint target = value - num;\n \t\tif(map.containsKey(target)) {\n \t\t\tif(num != target || map.get(target) == 2)\n \t\t\t\treturn true;\n \t\t}\n \t}\n return false;\n }", "public boolean find(int value) {\n for (int key : map.keySet()) {\n int other = value - key;\n if (map.containsKey(other)) {\n //other != key || other == key && map.get(key) > 1, the \"other == key is redundant\"\n if (other != key || map.get(key) > 1) {\n return true;\n }\n }\n }\n return false;\n }", "public static void main(String[] args) {\n int[] a={11, 15, 6, 8, 9, 10,4};\n int sum =2;\n //SORTING AND FIND PAIRS\n /*Arrays.sort(a);\n \n int i=0,j=a.length-1;\n while(i<j)\n {\n\t if(a[i]+a[j]==sum)\n\t {\n\t\t System.out.println(\"pair is+\"+a[i]+\" \"+a[j]);\n\t\t i++;j++;\n\t\t }\n\t else if(a[i]+a[j]<sum)\n\t {\n\t\t i++;\n\t }\n\t else if(a[i]+a[j]>sum)\n\t {\n\t\t j--;\n\t }\n }*/\n //Arrays.sort(a);\n LinkedHashSet<Integer> m = new LinkedHashSet<Integer>();\n int temp;\n for(int i=0;i<a.length;i++)\n {\n\t temp=sum+a[i];\n\t if(m.contains(temp))\n\t {\n\t\t System.out.println(\"par is:\"+a[i]+\" \"+temp);\n\t }\n\t else\n\t\t m.add(a[i]);\n }\n\n\t}", "public boolean find(int value) {\r\n // Write your code here\r\n for (int i = 0; i < elements.size() && elements.get(i) < value / 2 + 1; i++) {\r\n if (elements.get(i) * 2 == value && mapping.get(elements.get(i)) == 2) {\r\n return true;\r\n }\r\n if (elements.get(i) * 2 != value && mapping.containsKey(value - elements.get(i))) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public static Map<Integer, Integer> findPairWithGivenSum(List<Integer> list, int sum) {\n\t\tSet<Integer> hashSet = new HashSet<>();\n\t\tMap<Integer, Integer> map = new HashMap<>();\n\n\t\tlist.forEach(a -> {\n\t\t\tif (hashSet.contains(sum - a)) {\n\t\t\t\tmap.put(a, sum - a);\n\t\t\t} else {\n\t\t\t\thashSet.add(a);\n\t\t\t}\n\t\t});\n\n\t\tSet<Map.Entry<Integer, Integer>> entrySet = map.entrySet();\n\t\tentrySet.forEach(a -> {\n\t\t\tSystem.out.println(\"key: \" + a.getKey() + \" value: \" + a.getValue());\n\t\t});\n\n\t\treturn map;\n\t}", "public static void getPairs(int[] input, int sum)\r\n\t{\r\n\t\tjava.util.Arrays.sort(input);\r\n\t\tint start = 0;\r\n\t\tint end = input.length-1;\r\n\r\n\t\twhile(start<end)\r\n\t\t{\r\n\t\t\tint s = input[start]+input[end];\r\n\t\t\tif(s == sum){\r\n\t\t\t\tSystem.out.println(input[start] +\",\"+input[end]);\r\n\t\t\t\tstart++;\r\n\t\t\t\tend--;\r\n\t\t\t}else{ \r\n\t\t\t\tif(s < sum){\r\n\t\t\t start++;\r\n\t\t\t\t}else{\r\n\t\t \t end--;\r\n\t\t }\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "private static void printPairs(int[] a, int sum) {\n\t\tfor(int i=0;i<a.length;i++) {\n\t\t//for (int j = 0; j < n; j++) {/Is the reverse of pair is acceptable\n\t\t\tfor(int j=i+1;j<a.length;j++) {\n\t\t\t\tif(a[i]+a[j]==sum) {\n\t\t\t\t\tSystem.out.println(\"(\"+a[i]+\"+\"+a[j]+\") = \"+sum);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\n boolean isTrue = false;\n int[] numbers = { 10, 15, 3, 1, 6, 16, 8 };\n int k = 17;\n\n for (int i = 0; i < (numbers.length-1); i++) {\n for (int j = (i+1); j < numbers.length; j++) {\n if (numbers[i] + numbers[j] == k) {\n isTrue = true;\n break;\n }\n }\n }\n System.out.println(isTrue);\n }", "public boolean containsSum13(List<Integer> selectedCards) \n {\n //2 loops to check every combination of 2 in selectedCards \n for(int i = 0;i < selectedCards.size()-1;i++)\n {\n for(int n = i+1;n < selectedCards.size();n++)\n {\n \t//checks if 2 cards added together equals 13\n \tif(cardAt(selectedCards.get(i)).pointValue()+cardAt(selectedCards.get(n)).pointValue() == 13)\n \t{\n \t\treturn true;\n \t}\n }\n }\n return false;\n }", "private static void findPairSum(int[] pairSumArray, int k) {\n\t\tint count = 0;\r\n\t\tint pair = 0;\r\n\t\tfor (int i = 0; i < pairSumArray.length; i++) {\r\n\t\t\tfor (int j = pairSumArray.length - 1; j > i; j--) {\r\n\t\t\t\tpair = pairSumArray[j] + pairSumArray[i];\r\n\t\t\t\tif (pair == k) {\r\n\t\t\t\t\tSystem.out.println(\" ( \" + pairSumArray[j] + \"+\"\r\n\t\t\t\t\t\t\t+ pairSumArray[i] + \" ) \" + pair);\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"count of pairs : \" + count);\r\n\t}", "public boolean existSum(int[] array, int target) {\n Set<Integer> set = new HashSet<>();\n for (int num : array) {\n \tif (set.contains(target - num)) {\n \treturn true;\n }\n set.add(num);\n }\n return false;\n }", "@Override\n\t\tpublic boolean equals(Object p) {\n\t\t\tif (p instanceof Pair) {\n\t\t\t\tPair obj = (Pair)p;\n\t\t\t\treturn (this.sum == obj.sum && this.index == obj.index);\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public void search() {\n while (!done) {\n num2 = mNums.get(cntr);\n num1 = mSum - num2;\n\n if (mKeys.contains(num1)) {\n System.out.printf(\"We found our pair!...%d and %d\\n\\n\",num1,num2);\n done = true;\n } //end if\n\n mKeys.add(num2);\n cntr++;\n\n if (cntr > mNums.size()) {\n System.out.println(\"Unable to find a matching pair of Integers. Sorry :(\\n\");\n done = true;\n }\n } //end while\n }", "private static boolean tripletWithSumExistsNoExtraSpace(int[] arr, int expectedSum){\n Arrays.sort(arr);\n int size = arr.length;\n for(int i=0; i<size-2; ++i){\n int complement = expectedSum - arr[i];\n int lidx = i+1, ridx = size-1;\n while (lidx < ridx){\n if(arr[lidx]+arr[ridx] == complement)\n return true;\n else if(arr[lidx]+arr[ridx] < complement)\n ++lidx;\n else\n --ridx;\n }\n }\n return false;\n }", "protected static void printPairsEqualToSum(int[] arr1, int[] arr2, int sum) {\n\t\t\r\n\t\tint count = 0; \r\n\t \r\n\t\t// creating an arraylist from first array to use the contains() method\r\n\t ArrayList<Integer> as = new ArrayList<Integer>(); \r\n\t \r\n\t // insert all the elements \r\n\t // of 1st array in the arraylist \r\n\t // table(unordered_set 'as') \r\n\t for (int i = 0; i < arr1.length; i++) {\r\n\t as.add(arr1[i]); \r\n\t }\r\n\t // for each element of arr2[] \r\n\t for (int j = 0; j < arr2.length; j++) {\r\n\t \r\n\t // find all cases where(x - arr2[j]) in 'as' \r\n\t if (as.contains(sum - arr2[j])) { // if pair element is found in array 1\r\n\t for (int k: as) { // repeat print for duplicate entries in the arraylist as\r\n\t \tif (k == sum - arr2[j]) { \r\n\t \tcount++; \r\n\t \tSystem.out.println(\"[\"+ (sum-arr2[j]) + \",\" + arr2[j] + \"]\"); //display in paired form\r\n\t \t}\r\n\t }\r\n\t }\r\n\t }\r\n\t \r\n\t if (count == 0) { // if no combos are found\r\n\t \tSystem.out.println(\"No pairs found.\");\r\n\t }\r\n\t\t\r\n\t}", "public boolean find(int value) {\n if (!isSorted) {\n Collections.sort(arrayList);\n }\n int tail = 0;\n int head = arrayList.size() - 1;\n while (tail < head) {\n if (arrayList.get(tail) + arrayList.get(head) == value) {\n return true;\n }\n if (arrayList.get(tail) + arrayList.get(head) < value) {\n tail++;\n } else {\n head--;\n }\n }\n return false;\n }", "public boolean find(int value) {\n\t for(Map.Entry<Integer,Integer> entry:map.entrySet){\n\t\t int key = entry.getKey();\n\t\t int num = entry.getValue();\n\t\t int offset = value-key;\n\t\t if((offset==key&&num>1)||(offset!=key&&!map.containsKey(offset))){\n\t\t\t return true;\n\t\t }\n\t }\n\t return false;\n\t}", "public int findPairs(int[] nums, int k) {\n if (k < 0) {\n return 0;\n }\n Set<Integer> unique = new HashSet<>();\n Set<Integer> duplicate = new HashSet<>();\n for (int n : nums) {\n if (!unique.add(n)) {\n duplicate.add(n);\n }\n }\n if (k == 0) {\n return duplicate.size();\n }\n int count = 0;\n for (int v : unique) {\n if (unique.contains(v + k)) {\n count += 1;\n }\n }\n return count;\n }", "boolean lessThanSearch(int A[], int sum) {\n\t\tint l, r;\n\n\t\tint arr_size = A.length;\n\n\t\t/* Sort the elements */\n\t\tquickSort(A, 0, arr_size - 1);\n\n\t\t/*\n\t\t * Now fix the first element one by one and find the other two elements\n\t\t */\n\t\tfor (int i = 0; i < arr_size - 2; i++) {\n\n\t\t\t// To find the other two elements, start two index variables\n\t\t\t// from two corners of the array and move them toward each\n\t\t\t// other\n\t\t\tl = i + 1; // index of the first element in the remaining elements\n\t\t\tr = arr_size - 1; // index of the last element\n\t\t\twhile (l < r) {\n\t\t\t\tif (A[i] + A[l] + A[r] == sum) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (A[i] + A[l] + A[r] < sum)\n\t\t\t\t\tl++;\n\n\t\t\t\telse // A[i] + A[l] + A[r] > sum\n\t\t\t\t\tr--;\n\t\t\t}\n\t\t}\n\n\t\t// If we reach here, then no triplet was found\n\t\treturn false;\n\t}", "public Map<Integer, Integer> findPairs( int[] input, Integer sum ) {\n HashSet<Integer> hash = new HashSet<>();\n HashMap<Integer, Integer> map = new HashMap<>();\n\n for (int i:input)\n if (!hash.contains(i)) {\n Integer y = sum - i;\n if (hash.contains(y)) {\n map.put(y, i);\n map.put(i, y);\n }\n hash.add(i);\n }\n\n return map;\n }", "private static int findPairs(int[] nums, int k) {\n if(nums == null || nums.length == 0 || k < 0)\n return 0;\n\n int count = 0;\n Map<Integer, Integer> map = new HashMap<>();\n for(int i : nums)\n map.put(i, map.getOrDefault(i, 0) + 1);\n\n for(Map.Entry<Integer, Integer> entry : map.entrySet()) {\n if(k == 0) {\n if(entry.getValue() >= 2)\n count++;\n } else {\n if(map.containsKey(entry.getKey() + k))\n count++;\n }\n }\n return count;\n }", "public static int findPairs(int[] nums, int k) {\n \tif(k<0){\n \t\treturn 0;\n \t}\n \t\n int re=0;\n Map<Integer, Integer> map=new HashMap<Integer, Integer>();\n for(int num: nums){\n \tif(map.containsKey(num)){\n \t\tif(k==0&&map.get(num)==1){\n \t\t\tre++;\n \t\t\tmap.put(num, 0);\n \t\t}\n \t\tcontinue;\n \t}\n \tif(map.containsKey(num+k)){\n \t\tre++;\n \t}\n \tif(map.containsKey(num-k)){\n \t\tre++;\n \t}\n \tmap.put(num, 1);\n }\n return re;\n }", "public static void fourSum(int[] data){\n HashMap<Integer,Pair> set = new HashMap<>();//integer = sum, pair are the nums\n for(int i = 0; i < data.length; i++)\n for(int j = i+1; j < data.length; j++) {\n Pair check = set.get(i+j);\n if(check != null) {\n System.out.println(\"fauifa\");\n return;\n }\n set.put(check.a()+check.b(), check);\n }\n System.out.println(\"None found.\");\n }", "boolean SubArraySum( int arr[] , int n , int sum ){\n HashSet<Integer> s = new HashSet<Integer>();\n int pre_sum = 0 ;\n for( int i = 0 ; i < n ; i++ ){\n pre_sum += arr[i];\n if( pre_sum == sum ) // Corner case if pre-sum is equal to sum.\n return true;\n if( s.contains(pre_sum - sum))\n return true;\n s.add(pre_sum);\n }\n return false;\n }", "boolean hasComputeSum();", "public static boolean check(int[][] arr, int n, int value){\n if(value >= -arrsum && value <= arrsum){\r\n return arr[n][arrsum + value] == 1 || arr[n][arrsum + value] == 2 || arr[n][arrsum + value] == -1;\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "private int pairContains(HashMap<Integer,HashSet<Integer>> pairs, int k1, int k2){\n\t\t\n\t\t\n\t\t\tif(pairs.containsKey(k1))\n\t\t\t\tif(pairs.get(k1).contains(k2))\n\t\t\t\t\treturn 2;\n\t\t\t\telse\n\t\t\t\t\treturn 1;\n\t\t\n\t\treturn 0;\n\t}", "public static int TwoSum_bruteForce(int[] a,int lo, int hi, int x)\r\n\t{\r\n\t\tint count = 0;\r\n\t\tfor (int i = lo; i < hi; ++i)\r\n\t\t{\r\n\t\t\tfor (int j = i+1; j < a.length; ++j)\r\n\t\t\t{\r\n\t\t\t\tif (a[i]+a[j] == x)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Pair: (\" + a[i] + \",\" + a[j] + \")\");\r\n\t\t\t\t\t++count;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "public static boolean sumTo(int[] values, int n) {\n // TODO\n // /** construnc a hashset and when we iterate through the array, we find if curr is in the set and insert n-curr into the set\n return false;\n }", "public static boolean find3Numbers(int A[], int n, int X) { \n \n // Your code \n for(int i=0;i<n-2;i++)\n {\n HashSet<Integer> set = new HashSet<>();\n int toFind=X-A[i];\n for(int j=i+1;j<n;j++)\n {\n if(set.contains(toFind-A[j]))\n {\n return true;\n }\n set.add(A[j]);\n }\n }\n return false;\n }", "public boolean hasAdjacentEqualPair()\n { \n \tfor( int i = 0; i < purchases.size()-1; i++ )\n \t{\n \t\tGizmo curr = purchases.get( i );\n \t\tGizmo nxt = purchases.get( i + 1 );\n \t\tif( curr.equals( nxt ) )\n \t\t\treturn true;\n \t}\n \treturn false; \t\n }", "public static boolean hasPair(Card[] cards) {\n\t\tint counter = 0;\n\t\tfor(int i = 0; i < cards.length; i++){\n\t\t\tfor(int j = i+1; j< cards.length; j++){\n\t\t\t\tif(cards[i].getValue() == cards[j].getValue()){\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(counter>=1){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "static boolean isSubsetSum(int set[], \n\t\t\t\t\t\t\tint n, int sum)\n\t{\n\t\tboolean dp[][] = new boolean[n + 1][sum + 1];\n\t\tfor(int i = 1; i <= sum; i++)\n\t\t dp[0][i] = false;\n\t\tfor(int i = 0; i <= n; i++)\n\t\t dp[i][0] = true;\n\t\t \n\t\tfor(int i = 1; i <= n; i++) {\n\t\t for(int j = 1; j <= sum; j++) {\n\t\t //System.out.println(i + \" \" + j);\n\t\t try {\n\t\t if(j >= set[i - 1])\n\t\t dp[i][j] = dp[i - 1][j] || dp[i - 1][j - set[i - 1]];\n\t\t else\n\t\t dp[i][j] = dp[i - 1][j];\n\t\t }\n\t\t catch(ArrayIndexOutOfBoundsException exception) {\n\t\t System.out.println(\"here\");\n\t\t System.out.println(i + \" \" + j);\n\t\t }\n\t\t }\n\t\t}\n\t\treturn dp[n][sum];\n\t}", "static boolean sumOfTwo(int[] a, int[] b, int v) {\r\n for (int i = 0; i < a.length; i++) {\r\n for (int j = 0; j < b.length; j++) {\r\n if (a[i] + b[j] == v) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }", "public boolean containsNearbyDuplicate2(int[] nums, int k) {\n if (nums == null || nums.length == 0)\n return false;\n\n Map<Integer, Integer> numByIndex = new HashMap<>();\n for(int i = 0; i< nums.length; i++){\n if(numByIndex.containsKey(nums[i])){\n final Integer pos1 = numByIndex.get(nums[i]);\n if (Math.abs(pos1-i)<=k) {\n return true;\n }\n }\n numByIndex.put(nums[i], i);\n }\n return false;\n\n }", "static void findTwoSum(List<List<Integer>> list, int[] nums, int k) {\n \tint target = 0 - nums[k]; // 7 -> check a + b = 7 (target)\n int fi = 0;\n int la = k - 1;\n\n while (fi < la) {\n if (nums[fi] + nums[la] == target) {\n list.add(Arrays.asList(nums[fi], nums[la], nums[k]));\n while (fi < nums.length - 1 && nums[fi] == nums[fi + 1]) {\n \tfi++;\n }\n fi++;\n }\n else if (nums[fi] + nums[la] < target)\n fi++;\n else\n la--;\n }\n }", "public boolean elementOf(int value){\n for(int element = 0; element < set.length; element++){\n if(set[element] == value)\n return true; \n }\n return false;\n }", "public int find(List<Integer> numbers) {\n int count = 0;\n for (Integer n : numbers) {\n int x = 1;\n do {\n if (x * (x + 1) == n) {\n count++;\n }\n x++;\n } while (x < Math.sqrt(n));\n }\n return count;\n }", "public int[] twoSum(int[] num, int sum)\n {\n int[] onlyOneValidAnswer = new int[]{-1,-1};\n for(int i = 0; i < num.length; i++)\n {\n for(int j = 0; j < num.length; j++)\n {\n if(num[i] != num[j])\n {\n if((num[i] + num[j]) == sum)\n {\n onlyOneValidAnswer[0] = j;\n onlyOneValidAnswer[1] = i;\n }\n }\n }\n }\n\n return onlyOneValidAnswer;\n }", "public boolean containsNearbyDuplicate2(int[] nums, int k) {\n \tif(nums == null || nums.length <=1) return false;\r\n \tSet<Integer> set = new HashSet<Integer> ();\r\n \tfor(int i=0; i< nums.length; i++) {\r\n \t\tif(i>k) set.remove(nums[i-k-1]);\r\n \t\tif(!(set.add(nums[i]))) return true;\r\n \t}\r\n \treturn false;\r\n }", "boolean checkThreeSum(List<Integer> a, int threeSum) {\n\t\tCollections.sort(a); // n log n\n\t\t\n\t\tfor (int index = 0; index <= a.size() - 1; index++) {// o [n square]\n\t\t\tint current = a.get(index);\n\t\t\tif (checkTwoSum(a, threeSum - current, index)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean containsNearbyDuplicate2(int[] nums, int k) {\n\n int max = Integer.MIN_VALUE;\n for (int i = 0; i < nums.length; i++) {\n max=Math.max(max,nums[i]);\n }\n Integer[] map = new Integer[max+1];\n for (int i = 0; i < nums.length; i++) {\n Integer c = map[nums[i]];\n if(c!=null && i-c<=k){\n return true;\n }else {\n map[nums[i]]=i;\n }\n }\n return false;\n }", "private static int matchingFriends(int seq) {\n\t\tint firstFree = -1;\n\t\tfor (int i = 0; i < students; ++i) {\n\t\t\tif (!taken[i]) {\n\t\t\t\tfirstFree = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// all students find their own pairs and finish recursion\n\t\tif (firstFree == -1) {\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\tint result = 0;\n\t\tfor (int pairWith = firstFree + 1; pairWith < students; ++pairWith) {\n\t\t\tif (!taken[pairWith] && areFriends[firstFree][pairWith] && areFriends[pairWith][firstFree]) {\n\t\t\t\ttaken[firstFree] = true;\n\t\t\t\ttaken[pairWith] = true;\n\t\t\t\tresult += matchingFriends(firstFree + 1);\n\t\t\t\ttaken[firstFree] = false;\n\t\t\t\ttaken[pairWith] = false;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public boolean containsNearbyDuplicate(int[] nums, int k) {\n \tint len=nums.length;\n \tif(len<2){\n \t\treturn false;\n \t}\n \tHashMap<Integer,Integer> map=new HashMap<Integer,Integer>();\n \tfor(int i=0; i<len; i++){\n \t\tif(!map.containsKey(nums[i])){\n \t\t\tmap.put(nums[i], i);\n \t\t}else{\n \t\t\tif((i-map.get(nums[i])<=k)){\n \t\t\t\treturn true;\n \t\t\t}\n \t\t\tmap.put(nums[i], i);\n \t\t}\n \t}\t\n \treturn false; \n }", "static boolean isSubsetPossible(int[] nums, int sum) {\t\n\t\tboolean[][] dp = new boolean[nums.length][sum + 1];\n\t\tfor(int row = 0; row < dp.length; row++) {\n\t\t\tdp[row][0] = true;\n\t\t}\n \n\t\tfor(int row = 0; row < dp.length; row++) {\n\t\t\tint num = nums[row];\n\t\t\tfor(int col = 1; col < dp[0].length; col++) {\n\t\t\t\tif( col < num ) {\n\t\t\t\t\tdp[row][col] = (row == 0) ? false : dp[row - 1][col];\n\t\t\t\t}else if(num == col) {\n\t\t\t\t\tdp[row][col] = true;\n\t\t\t\t}else {\n\t\t\t\t\tdp[row][col] = dp[row - 1][col] || dp[row - 1][col - num];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(dp[row][sum]){\n\t\t\t\tSystem.out.println(\"breaked at row \" + row);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"all the way end\");\n\t\treturn dp[nums.length - 1][sum];\n\t}", "public static void pairSum(int[] input, int x){\n \tint n = input.length;\n\t\tint a, b;\n\t\tfor (int i = 0; i < n - 1; i++) { \n\t\t\tfor (int j = i + 1; j < n; j++) { \n\t\t\t\tif (input[i] + input[j] == x) {\n\t\t\t\t\tif(input[j] < input[i]) {\n\t\t\t\t\t\ta = input[j];\n\t\t\t\t\t\tb = input[i];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ta = input[i];\n\t\t\t\t\t\tb = input[j];\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(a + \" \" + b); \n\t\t\t\t}\n\t\t\t} \n\t\t}\n\t\t\n\t}", "private static void second(int[] arr, int sum){\n\n Map<Integer,Boolean> map = new Hashtable<>();\n\n for(int i:arr){\n\n if (map.containsKey(sum - i)){\n System.out.println(i + \" , \" + (sum-i));\n }\n else{\n map.put(i, true);\n }\n\n }\n\n }", "private boolean contains(int[] valueSet, int value) {\n\t\tfor (int i = 0; i < valueSet.length; i++) {\r\n\t\t\tif (valueSet[i] == value) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private int pairValue() {\n int pValue = 0;\n \n for (int i = 0; i < combos.length; i++) {\n if (combos[i].length == 2 && combos[i][0].charAt(0) == combos[i][1].charAt(0)) {\n pValue += 2;\n }\n }\n \n return pValue;\n }", "public boolean checkIfExist(int[] arr) {\n int len = arr.length;\n\n Set<Integer> set = new HashSet<>();\n for (int num : arr) {\n if (set.contains(num*2) || (num%2==0 && set.contains(num/2))) return true;\n set.add(num);\n }\n\n return false;\n }", "private boolean isCoin(double value) {\n\t\tdouble[] possibleCoin = {1, 2, 5, 10};\n\t\tfor (double coinValue : possibleCoin) {\n\t\t\tif (value == coinValue) return true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains(int total) {\n \t \n \tint sum=0;\n \tfor (int j=(stack.size()-3);j<stack.size();j++){\n \t\tsum=sum+stack.peek();\n \t}\n \tif(total==sum){\n \t\treturn true;\n \t}\n\t\treturn false;\n \n }", "public static Optional<Pair<Integer, Integer>> twoPointers(List<Integer> sorted, int targetSum) {\n return twoPointers(sorted, targetSum, 0, sorted.size() - 1);\n }", "public boolean hasPathSum(TreeNode root, int sum) {\n if (null == root) {\n return false;\n }\n if (root.left == null && null == root.right) {\n return root.val == sum;\n }\n\n return hasPathSum(root.left, sum - root.val) || hasPathSum(root.right, sum - root.val);\n\n }", "boolean hasXYPairs();", "public boolean isSubSetSumProblem(int [] set, int n , int sum){\n\t\tif (sum == 0)\n\t\t\treturn true;\n\t\t\n\t\tif(n == 0 && sum != 0)\n\t\t\treturn false;\n\t\tif(set[n-1] > sum)\n\t\t\treturn isSubSetSumProblem(set, n-1, sum);\n\t\t\n\t\treturn isSubSetSumProblem(set, n-1, sum) || isSubSetSumProblem(set, n-1, sum-set[n-1]);\n\t}", "public static boolean hasTwoPair(Card[] cards) {\n\t\tint counter = 0;\n\t\tint value = 0;\n\t\tfor(int i = 0; i< cards.length; i++){\n\t\t\tfor(int j = i+1; j< cards.length; j++){\n\t\t\t\tif(cards[i].getValue() == cards[j].getValue() \n\t\t\t\t\t\t&& value !=cards[j].getValue()){\n\t\t\t\t\tcounter++;\n\t\t\t\t\tvalue = cards[j].getValue();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(counter>=2){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static void targetSumPair(int[] arr, int target){\n //write your code here\n Arrays.sort(arr); // O(nlogn)\n int i=0, j=arr.length-1;\n while(i < j) {\n if(arr[i]+arr[j] < target) {\n i++;\n }\n else if(arr[i] + arr[j] > target)\n j--;\n else {\n System.out.println(arr[i] + \", \" + arr[j]);\n i++; j--;\n }\n }\n }", "public ArrayList<Integer> twoSum(final List<Integer> A, int B) {\n HashMap<Integer, List<Integer>> hm = new HashMap<>();\n ArrayList<Integer> solution = new ArrayList<Integer>();\n int smallestIndex2 = A.size() - 1;\n int smallestIndex1 = A.size() - 1;\n boolean containsPair = false;\n \n for (int i = 0; i < A.size(); i++) {\n if (hm.containsKey(A.get(i))) {\n List<Integer> entry = hm.get(A.get(i));\n entry.add(i);\n hm.put(A.get(i), entry);\n } else {\n List<Integer> entry = new ArrayList<>();\n entry.add(i);\n hm.put(A.get(i), entry);\n }\n }\n \n for (Map.Entry<Integer, List<Integer>> entry : hm.entrySet()) {\n int number = entry.getKey();\n List<Integer> list = entry.getValue();\n int desiredNum = B - number;\n \n if (hm.containsKey(desiredNum)) {\n List<Integer> desiredList = hm.get(desiredNum);\n Collections.sort(desiredList); // grab minimum indices\n Collections.sort(list);\n \n int desIndex = desiredList.get(0);\n int listIndex = list.get(0);\n \n if (list.size() == 1 && number*2 == B) {\n continue;\n } else {\n if (desIndex == listIndex) { // if both refer to the same index\n desIndex = desiredList.get(1);\n }\n }\n \n if (desIndex > listIndex) {\n if (desIndex < smallestIndex2) {\n smallestIndex2 = desIndex;\n smallestIndex1 = listIndex;\n } else if (desIndex == smallestIndex2) {\n if (listIndex < smallestIndex1) {\n smallestIndex1 = listIndex;\n smallestIndex2 = desIndex;\n }\n }\n } else {\n if (listIndex < smallestIndex2) {\n smallestIndex2 = listIndex;\n smallestIndex1 = desIndex;\n } else if (listIndex == smallestIndex2) {\n if (desIndex < smallestIndex1) {\n smallestIndex1 = desIndex;\n smallestIndex2 = listIndex;\n }\n }\n }\n \n containsPair = true;\n }\n }\n \n if (containsPair) {\n solution.add(smallestIndex1 + 1);\n solution.add(smallestIndex2 + 1);\n }\n \n return solution;\n }", "public static boolean canThreePartsEqualSum(int[] arr) {\n int sum=0;\n int cumulative[]=new int[arr.length];\n for(int i=0;i<arr.length;i++){\n sum+=arr[i];\n cumulative[i]=sum;\n }\n for(int i=0;i<cumulative.length;i++){\n for(int j=i+1;j<cumulative.length;j++){\n if(cumulative[i]==cumulative[j]-cumulative[i]){\n if(cumulative[i]==cumulative[cumulative.length-1]-cumulative[j] && (cumulative.length-1) !=j){\n return true;\n }\n }\n }\n }\n return false;\n}", "public boolean checkSubarraySum(int[] nums, int k) {\n int N = nums.length;\n if (N == 0)\n return false;\n Map<Integer, Integer> m = new HashMap();\n int sum = 0;\n m.put(0, -1);\n for (int i = 0; i < N; i++) {\n sum += nums[i];\n if (k != 0 )\n sum %= k;\n if (m.containsKey(sum)) {\n if (i - m.get(sum) >= 2)\n return true;\n } else {\n m.put(sum, i);\n }\n }\n return false;\n }", "public boolean containsNearbyDuplicate(int[] nums, int k) {\n Set<Integer> numSet = new HashSet<Integer>(nums.length);\n for (int i=0;i<nums.length;i++) {\n \tif (i>k) {\n \t\tnumSet.remove(nums[i-k-1]);\n \t}\n \tif (numSet.contains(nums[i])) return true;\n \t\n \tnumSet.add(nums[i]);\n }\n return false;\n }", "public static void main(String[] args) {\n List<Integer> nums1 = Arrays.asList(1,2,2);\n List<Integer> nums2 = Arrays.asList(2,2);\n\n List<int[]> pairs = nums1.stream().flatMap(\n i-> nums2.stream().map(j -> new int[] {i,j})\n ).collect(Collectors.toList());\n\n pairs.stream().map(Arrays::toString).forEach(System.out::println);\n System.out.println(\"*********************************************\");\n //return only pairs whose sum is divisible by 3\n List<int[]> pairs2 = nums1.stream().flatMap(\n i-> nums2.stream().filter(j -> (i+j)%3==0)\n .map(j -> new int[]{i,j})\n ).collect(Collectors.toList());\n pairs2.stream().map(Arrays::toString).forEach(System.out::println);\n System.out.println(\"*********************************************\");\n //return pairs whose sum is equal to 6\n List<int []> pairs3 = nums1.stream().flatMap(\n i -> nums2.stream().filter(j -> (i+j)==4).map(j -> new int[]{i,j})\n ).collect(Collectors.toList());\n pairs3.stream().map(Arrays::toString).forEach(System.out::println);\n }", "private static boolean findEqualSumBottomUp(int[] arr, int n, int sum) {\n boolean subset[][] = \n new boolean[sum+1][n+1]; \n \n // If sum is 0, then answer is true \n for (int i = 0; i <= n; i++) \n subset[0][i] = true; \n \n // If sum is not 0 and set is empty, \n // then answer is false \n for (int i = 1; i <= sum; i++) \n subset[i][0] = false; \n \n // Fill the subset table in botton \n // up manner \n for (int i = 1; i <= sum; i++) \n { \n for (int j = 1; j <= n; j++) \n { \n subset[i][j] = subset[i][j-1]; \n if (i >= arr[j-1]) \n subset[i][j] = subset[i][j] || \n subset[i - arr[j-1]][j-1]; \n } \n } \n \n // uncomment this code to print table \n /*for (int i = 0; i <= sum; i++) \n { \n for (int j = 0; j <= n; j++) \n System.out.print (subset[i][j]+\" \"); \n } */\n \n return subset[sum][n];\n\t}", "static void check(int arr[],int sum)\r\n {\r\n boolean binmap[] = new boolean[max]; /* by default this is array of false as {false,false,false,false,......,false} */\r\n for(int i=0;i<arr.length;i++)\r\n {\r\n int temp=sum-arr[i];\r\n if(temp>0 && binmap[temp]){ /* in condition , we can use binmap[temp] which means binmap[temp]==true */\r\n System.out.println(\"two numbers in given array whose sum is equal to given sum are :\"+temp+ \" and \" +arr[i]);\r\n }\r\n binmap[arr[i]]=true;\r\n }\r\n }", "public Map<Integer, Integer> getPairs(int[] input, int sum) {\n\t\tMap<Integer, Integer> pairs = new HashMap<Integer, Integer>();\n\t\ttry {\n\t\t\t// validate the input\n\t\t\tif (input == null && input.length == 0) {\n\t\t\t\tthrow new RuntimeException(\" Invalid input \");\n\t\t\t}\n\n\t\t\tint n = input.length;\n\t\t\tint a = 0;\n\n\t\t\t// construct an arraylist from input\n\t\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tresult.add(input[i]);\n\t\t\t}\n\n\t\t\t// check if pairs add to the sum\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\ta = Math.abs(sum - input[i]);\n\t\t\t\tif (result.contains(a)) {\n\t\t\t\t\tpairs.put(input[i], a);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn pairs;\n\t}", "public static boolean opposites(Pair[] data){\n HashSet<Pair> hs = new HashSet<>(20, 0.9f);\n for(Pair p : data) {\n if(hs.contains(new Pair(p.b(), p.a())))\n return true;\n hs.add(p);\n }\n return false;\n }", "static boolean equalSumPartition(int[] arr){\n int sum = 0;\n for (int i = 0;i<arr.length;i++){\n sum+=arr[i];\n }\n if (sum%2==0){\n return subSetSumProblem(arr,sum/2);\n }\n return false;\n }", "public boolean hasPair(ArrayList<Card>cards) {\r\n\t\tCollections.sort(cards);\r\n\t\tfor(int i = 0; i < cards.size() - 1; i++) {\r\n\t\t\tfor(int j = i+1; j < cards.size(); j++) {\r\n\t\t\t\tif(cards.get(i).getValue() == cards.get(j).getValue()) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t\r\n\t}", "private static int findPair(boolean[][] isFriends, boolean[] alreadyPaired, int numStudents) {\n int target = -1;\n for (int i = 0; i < numStudents; i++) {\n if (!alreadyPaired[i]) {\n target = i;\n break;\n }\n }\n \n if (target == -1)\n return 1;\n \n int count = 0;\n \n for (int i = target + 1; i < numStudents; i++) {\n if (!alreadyPaired[i] && isFriends[target][i]) {\n alreadyPaired[i] = true;\n alreadyPaired[target] = true;\n count += findPair(isFriends, alreadyPaired, numStudents);\n alreadyPaired[i] = false;\n alreadyPaired[target] = false;\n \n }\n }\n return count;\n }", "static boolean sumEquals(double u, double v, double w) {\n return (u + v == w) && (u == w - v) && (v == w - u);\n }", "public boolean isPair(){\n \r\n List<PokerCard> pair;\r\n remainingCardValues = new ArrayList<>();\r\n \r\n //First possibility: first two cards\r\n pair = cards.subList(0, 2);\r\n if(haveSameValue(pair)){\r\n handValue = pair.get(0).getValue();\r\n \r\n //Store remaining card values for potential later comparison\r\n remainingCardValues.add(cards.get(4).getValue());\r\n remainingCardValues.add(cards.get(3).getValue());\r\n remainingCardValues.add(cards.get(2).getValue()); \r\n \r\n return true;\r\n }\r\n \r\n //Second possibility: cards 2 and 3\r\n pair = cards.subList(1, 3);\r\n if(haveSameValue(pair)){\r\n handValue = pair.get(0).getValue();\r\n \r\n //Store remaining card values for potential later comparison\r\n remainingCardValues.add(cards.get(4).getValue());\r\n remainingCardValues.add(cards.get(3).getValue());\r\n remainingCardValues.add(cards.get(0).getValue());\r\n \r\n return true;\r\n }\r\n \r\n //Third possibility: cards 3 and 4\r\n pair = cards.subList(2, 4);\r\n if(haveSameValue(pair)){\r\n handValue = pair.get(0).getValue();\r\n \r\n //Store remaining card values for potential later comparison\r\n remainingCardValues.add(cards.get(4).getValue());\r\n remainingCardValues.add(cards.get(1).getValue());\r\n remainingCardValues.add(cards.get(0).getValue());\r\n \r\n return true;\r\n }\r\n \r\n //Fourth possibility: last two cards\r\n pair = cards.subList(3, 5);\r\n if(haveSameValue(pair)){\r\n handValue = pair.get(0).getValue();\r\n \r\n //Store remaining card values for potential later comparison\r\n remainingCardValues.add(cards.get(2).getValue());\r\n remainingCardValues.add(cards.get(1).getValue());\r\n remainingCardValues.add(cards.get(0).getValue());\r\n \r\n return true;\r\n }\r\n return false;\r\n }", "public boolean hasPathSum (TreeNode root, int sum) {\n if (root == null)\n return false;\n if (root.val == sum && root.left == null && root.right == null)\n return true;\n else {\n return hasPathSum (root.left, sum - root.val) || hasPathSum (root.right, sum - root.val);\n }\n }", "public boolean hasPathSum(TreeNode root, int sum) {\n if(root == null){\n return false;\n }\n \n //if value of root is equal to the sum, if it is and no child, return true\n if(root.val == sum){\n if(root.left == null && root.right == null){\n return true;\n }\n }\n \n //all is not equal, then start to recursive to judge the left or right tree equal to sum-val\n return hasPathSum(root.left, sum-root.val) || hasPathSum(root.right, sum-root.val);\n }", "public static boolean solution1(int[] nums, int numToAddTo){\n for (int i = 0; i < nums.length; i++){\n for (int j = i+1; j < nums.length; j++){\n if (nums[i] + nums[j] == numToAddTo){\n return true;\n }\n }\n }\n return false;\n }", "public void checkSum() {\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < sudoku.length; i++)\n\t\t\tsum +=sudoku[row][i];\n\t\tif(sum != 45) {\n\t\t\tvalue = false;\n\t\t\tSystem.out.println(\"The sum in row \" + row + \" is \" + sum);\n\t\t}\n\t}", "public boolean find(int value) {\n return set.contains(value);\n }", "public boolean existII(TreeNode root, int sum) {\n if (root == null) {\n return false;\n }\n Set<Integer> prefixSums = new HashSet<>();\n prefixSums.add(0);\n return helperII(root, prefixSums, 0, sum);\n }", "public int[] isEverywhere(int[] nums, int val) {\n\n\t\tfor (int i=0; i<nums.length-1; i++) {\n\t\t\tif (nums[i] != val && nums[i+1] != val) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\n\t}", "private int numOfPairs(int[] nums, int start, int end, int target){\n int res = 0;\n while(start < end){\n int sum = nums[start] + nums[end];\n if(sum < target){\n res += end - start;\n start++;\n }\n else{\n end--;\n }\n }\n return res;\n }", "public boolean checkSubarraySum(int[] nums, int k){\n\t\tif(nums == null || nums.length == 0)\n\t\t\treturn false;\n\t\tint sum = 0;\n\t\tHashMap<Integer, Integer> map = new HashMap<>();\n\t\tmap.put(0,-1);\n\t\tfor( int i = 0; i<nums.length; i++){\n\t\t\tsum+=nums[i];\n\t\t\tif(k!=0)\n\t\t\t\tsum = sum % k;\n\t\t\tif(map.containsKey(sum)){\n\t\t\t\tif(i - map.get(sum) > 1)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmap.put(sum,i);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static boolean hasPair(Card[] cards) {\n\t\tint startInt= 1;\n\t\tfor(int check1 = 0; check1 < cards.length-1; check1++)\n\t\t{\n\t\t\tfor(int check2 = startInt; check2 < cards.length; check2++)\n\t\t\t{\n\t\t\t\tif (cards[check1].getValue() == cards[check2].getValue())\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tstartInt++;\n\t\t}\n\t\treturn false;\n\t\t//throw new RuntimeException(\"Not yet implemented.\");\n\t}" ]
[ "0.7004017", "0.68952566", "0.67666686", "0.6591662", "0.65779155", "0.65529066", "0.65353143", "0.6517477", "0.6465265", "0.6460707", "0.64448756", "0.64388967", "0.64232916", "0.6412718", "0.63869613", "0.63844234", "0.63832927", "0.6344679", "0.6302931", "0.62976724", "0.6255108", "0.6240379", "0.6227364", "0.6186178", "0.61747664", "0.6145067", "0.6130556", "0.60989255", "0.6069945", "0.60418373", "0.6034283", "0.60297877", "0.5972576", "0.5971816", "0.5958251", "0.59459615", "0.5903215", "0.5880214", "0.58774436", "0.5865373", "0.58338886", "0.58219665", "0.5798189", "0.57816887", "0.57621545", "0.5739221", "0.5708958", "0.570841", "0.56774956", "0.5674359", "0.5622395", "0.56165457", "0.5615342", "0.5614763", "0.5599734", "0.55969465", "0.55601215", "0.55599195", "0.55577016", "0.5556817", "0.55414736", "0.55412304", "0.55388147", "0.55137604", "0.5501127", "0.5497656", "0.54893607", "0.54866594", "0.5486562", "0.54851514", "0.5478849", "0.5463982", "0.5462501", "0.5460472", "0.5456895", "0.5454244", "0.5451579", "0.5445839", "0.54456556", "0.54320085", "0.54293746", "0.5426535", "0.54263026", "0.54238415", "0.54208297", "0.54194975", "0.54168004", "0.541436", "0.5396219", "0.5390919", "0.539013", "0.5388267", "0.5383015", "0.53803575", "0.5379195", "0.5375751", "0.53714806", "0.5358822", "0.535517", "0.5340779" ]
0.59384215
36
TODO Autogenerated method stub
@Override public void onCreate() { super.onCreate(); try { // Log.d("Ringer", "inside service.."); c = this; mPrefs = new IUnderstandStore(this.getApplicationContext()); gdata = (GlobalDataApplication) GlobalDataApplication.getInstance(); am = (AudioManager) this.getApplicationContext().getSystemService(Context.AUDIO_SERVICE); //globaldata=(GlobalDataApplication)getApplication(); Initvolume = am.getRingerMode(); //Log.d("change","Init Ringer mode: "+Initvolume); sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); accelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); proxy = sensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY); BroadcastReceiver receiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { if (am.getRingerMode() == AudioManager.RINGER_MODE_NORMAL) { if ((mPrefs.getpickupmode()) || (mPrefs.getmagicmode()) || (mPrefs.getpocketpmode())) { SensorService.registerAllSensors(); Toast.makeText(getApplicationContext(), "Services enabled!", Toast.LENGTH_SHORT).show(); } } else { if ((mPrefs.getpickupmode()) || (mPrefs.getmagicmode()) || (mPrefs.getpocketpmode())) { SensorService.unregisterAllSensors(); Toast.makeText(getApplicationContext(), "Services disabled!", Toast.LENGTH_SHORT).show(); } } Toast.makeText(getApplicationContext(), "" + am.getRingerMode(), Toast.LENGTH_SHORT).show(); } }; IntentFilter filter = new IntentFilter( AudioManager.RINGER_MODE_CHANGED_ACTION); registerReceiver(receiver, filter); registerAllSensors(); } catch (Exception e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onDestroy() { super.onDestroy(); }
{ "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 int onStartCommand(Intent intent, int flags, int startId) { return super.onStartCommand(intent, flags, startId); }
{ "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 IBinder onBind(Intent intent) { 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 onAccuracyChanged(Sensor sensor, int accuracy) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
Creates or updates the current object.
public boolean save(Context context) { return save(context, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object createOrUpdate() {\n if (isNewRecord()) {\n create();\n } else {\n update();\n }\n return this;\n }", "private void saveCurrentObject() {\n\t}", "public boolean update(New object);", "Update createUpdate();", "public void updateByObject()\r\n\t{\n\t}", "public boolean save(New object);", "protected abstract DBObject getNewObject();", "@Override\n public Owner save(Owner object) {\n return super.save(object);\n }", "public void createNewObject(Representation entity) throws ResourceException {\r\n\t\tT entry = createObjectFromHeaders(null, entity);\r\n\t\texecuteUpdate(entity, entry, createUpdateObject(entry));\r\n\r\n\t}", "com.exacttarget.wsdl.partnerapi.ObjectDefinition addNewObjectDefinition();", "protected Object create(Object object) {\n EntityManager em = getEntityManager();\n em.getTransaction().begin();\n try {\n em.persist(object);\n em.getTransaction().commit();\n LOG.debug(\"Persisted \" + object);\n } catch (Exception e) {\n LOG.error(\"Could not persist Object\", e);\n em.getTransaction().rollback();\n } finally {\n em.close();\n }\n return object;\n }", "public boolean create(ModelObject obj);", "void update(T obj) throws PersistException;", "@Override\n\tpublic void saveORUpdate(T obj) throws Exception {\n\t\t\n\t}", "@Override\r\n\tpublic Ngo update(Ngo obj) {\n\t\treturn null;\r\n\t}", "public DBObject createNew() {\n DBObjectImpl obj = (DBObjectImpl) getNewObject();\n obj.DELETE_STMT_STR = DELETE_STMT_STR;\n obj.INSERT_STMT_STR = INSERT_STMT_STR;\n obj.UPDATE_STMT_STR = UPDATE_STMT_STR;\n obj.QUERY_STMT_STR = QUERY_STMT_STR;\n\n return obj;\n }", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "public void create(final Object obj) {\n txTemplate.execute(new TransactionCallbackWithoutResult() {\n @Override\n public void doInTransactionWithoutResult(TransactionStatus status) {\n getHibernateTemplate().save(obj);\n }\n });\n }", "public void doExecute() {\n\t\tparent.requestChange(new ModelChangeRequest(this.getClass(), parent,\n\t\t\t\t\"create\") {\n\t\t\t@Override\n\t\t\tprotected void _execute() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tCompositeEntity parentModel = (CompositeEntity) parent;\n\t\t\t\t\tString componentName = null;\n\t\t\t\t\tif (model == null) {\n\t\t\t\t\t\tcomponentName = ModelUtils.findUniqueName(parentModel,\n\t\t\t\t\t\t\t\t\t\t clazz,\n\t\t\t\t\t\t\t\t\t\t name.equalsIgnoreCase(\"INPUT\") ? DEFAULT_INPUT_PORT : DEFAULT_OUTPUT_PORT,\n\t\t\t\t\t\t\t\t\t\t name);\n\t\t\t\t\t\tcomponentName = ModelUtils.getLegalName(componentName);\n\t\t\t\t\t\tClass constructorClazz = CompositeEntity.class;\n\t\t\t\t\t\tif (clazz.getSimpleName().equals(\"TypedIOPort\")) {\n\t\t\t\t\t\t\tconstructorClazz = ComponentEntity.class;\n\t\t\t\t\t\t} else if (clazz.getSimpleName().equals(\n\t\t\t\t\t\t\t\t\"TextAttribute\")) {\n\t\t\t\t\t\t\tconstructorClazz = NamedObj.class;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (clazz.getSimpleName().equals(\"Vertex\")) {\n\t\t\t\t\t\t\tTypedIORelation rel = new TypedIORelation(\n\t\t\t\t\t\t\t\t\tparentModel, componentName);\n\t\t\t\t\t\t\tchild = new Vertex(rel, \"Vertex\");\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tConstructor constructor = clazz.getConstructor(\n\t\t\t\t\t\t\t\t\tconstructorClazz, String.class);\n\n\t\t\t\t\t\t\tchild = (NamedObj) constructor.newInstance(\n\t\t\t\t\t\t\t\t\tparentModel, componentName);\n\t\t\t\t\t\t\tif (child instanceof TypedIOPort) {\n\t\t\t\t\t\t\t\tboolean isInput = name\n\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"INPUT\");\n\t\t\t\t\t\t\t\t((TypedIOPort) child).setInput(isInput);\n\t\t\t\t\t\t\t\t((TypedIOPort) child).setOutput(!isInput);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (model instanceof TypedIOPort) {\n\t\t\t\t\t\t\tname = ((TypedIOPort) model).isInput() ? DEFAULT_INPUT_PORT\n\t\t\t\t\t\t\t\t\t: DEFAULT_OUTPUT_PORT;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcomponentName = ModelUtils.findUniqueName(parentModel, model.getClass(), name, name);\n\t\t\t\t\t\tcomponentName = ModelUtils.getLegalName(componentName);\n\t\t\t\t\t\tif (model instanceof Vertex) {\n\t\t\t\t\t\t\tTypedIORelation rel = new TypedIORelation(\n\t\t\t\t\t\t\t\t\tparentModel, componentName);\n\t\t\t\t\t\t\tchild = new Vertex(rel, \"Vertex\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchild = (NamedObj) model\n\t\t\t\t\t\t\t\t\t.clone(((CompositeEntity) parentModel)\n\t\t\t\t\t\t\t\t\t\t\t.workspace());\n\t\t\t\t\t\t\tchild.setName(componentName);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tComponentUtility.setContainer(child, parentModel);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcreateDefaultValues(child);\n\t\t\t\t\t\n\t\t\t\t\tif (location != null) {\n\t\t\t\t\t\tModelUtils.setLocation(child, location);\n\t\t\t\t\t}\n\t\t\t\t\tsetChild(child);\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tgetLogger().error(\"Unable to create component\", e);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t});\n\t}", "@Override\n public void execute(Realm realm) {\n Book newbook = realm.createObject(Book.class, UUID.randomUUID().toString());\n newbook.setBook_name(newBookName);\n newbook.setAuthor_name(newAuthorName);\n }", "@Override\n public boolean create(Revue objet) {\n return false;\n }", "@Override\r\n protected void createDbContentCreateEdit() {\n DbContentCreateEdit dbContentCreateEdit = new DbContentCreateEdit();\r\n dbContentCreateEdit.init(null);\r\n form.getModelObject().setDbContentCreateEdit(dbContentCreateEdit);\r\n dbContentCreateEdit.setParent(form.getModelObject());\r\n ruServiceHelper.updateDbEntity(form.getModelObject()); \r\n }", "@Override\r\n protected void updateObject(SimpleBody object, Entity e) {\n }", "@Override\r\n protected void updateObject(SimpleBody object, Entity e) {\n }", "public void save(){\r\n\t\tmanager.save(this);\r\n\t}", "@Override\n public boolean IsNewObject()\n {\n return _isNewObject;\n }", "T update(T object);", "private void saveObject(Object object) {\n Connection connection = ConnectionPoll.getConnection();\n CRUDService crudService = new CRUDService(connection, object.getClass());\n try {\n Field[] fields = object.getClass().getDeclaredFields();\n Field id = null;\n for (Field f : fields) {\n if (f.isAnnotationPresent(Id.class)) {\n id = f;\n }\n }\n id.setAccessible(true);\n\n if (Integer.parseInt(id.get(object).toString()) != 0 && !id.get(object).equals(null)) {\n crudService.update((SimpleORMInterface) object);\n } else {\n crudService.insert((SimpleORMInterface) object);\n }\n id.setAccessible(false);\n ConnectionPoll.releaseConnection(connection);\n\n } catch (IllegalAccessException | NoSuchFieldException e) {\n e.printStackTrace();\n }\n }", "public abstract String createNewObject(boolean fPromote_p, Object mode_p, OwResource resource_p, String strObjectClassName_p, OwPropertyCollection properties_p, OwPermissionCollection permissions_p, OwContentCollection content_p,\r\n OwObject parent_p, String strMimeType_p, String strMimeParameter_p, boolean fKeepCheckedOut_p) throws Exception;", "@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }", "public abstract String createNewObject(boolean fPromote_p, Object mode_p, OwResource resource_p, String strObjectClassName_p, OwPropertyCollection properties_p, OwPermissionCollection permissions_p, OwContentCollection content_p,\r\n OwObject parent_p, String strMimeType_p, String strMimeParameter_p) throws Exception;", "public void create(){}", "public void saveOrUpdate(Object aObject);", "private void updateObject(Object object) {\n Connection connection = ConnectionPoll.getConnection();\n CRUDService crudService = new CRUDService(connection, object.getClass());\n\n try {\n crudService.update((SimpleORMInterface) object);\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n\n ConnectionPoll.releaseConnection(connection);\n\n try {\n connection.close();\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n }", "public Object saveOrUpdateCopy(Object obj) throws HibException;", "@POST( CONTROLLER )\n VersionedObjectKey createObject( @Body CreateObjectRequest request );", "@Override\n\tpublic void update() {\n\t\tobj.update();\n\t}", "public void saveOrUpdate(Object obj) throws HibException;", "public void updateEntity();", "protected void save() {\n close();\n if(saveAction != null) {\n saveAction.accept(getObject());\n }\n }", "@Override\n protected void createEntity() {\n ProjectStatus status = createProjectStatus(5);\n setEntity(status);\n }", "public void update(Object obj) throws HibException;", "@Override\r\n\tpublic boolean update(Moteur obj) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void update(Unidade obj) {\n\n\t}", "<T> void update(T persistentObject);", "public abstract Object put(String oid, Object obj) throws OIDAlreadyExistsException, ObjectNotSupportedException;", "public boolean update(ModelObject obj);", "public void save() throws DfException {\n\t\tobject.save();\n\t}", "@Override\n public void add(T obj) {\n generateObjIdIfRequired(obj);\n \n //Try to copy when adding so we can prevent unwanted changes\n obj = getCopyOfT(obj);\n \n if (objects.contains(obj)) throw new DBEntityAlreadyExistsException(obj.toString());\n\n objects.add(obj);\n }", "@Override\r\n\tpublic void update(Object object) {\n\t\t\r\n\t}", "public void createNoteEditModel() {\n \t\tif (this.mNoteItemModel == null)\n \t\t\tthis.mNoteItemModel = new NoteItemModel(this.getContext());\n \t\tthis.status = STATUS_CREATE;\n \t}", "public boolean update(Object obj) throws Exception;", "@Transactional(isolation=Isolation.READ_COMMITTED, \n\t\t\tpropagation=Propagation.REQUIRED,\n\t\t\trollbackFor=Exception.class)\n\tpublic void create(Object object) {\n\t\tsessionFactory.getCurrentSession().save(object);\n\t}", "WithCreate withCreationData(CreationData creationData);", "public void update()\n {\n modifier = coral.getCurrentSubject();\n modified = new Date();\n try\n {\n persistence.save(this);\n }\n catch(SQLException e)\n {\n throw new BackendException(\"failed to update resource's persitent image\", e);\n }\n try\n {\n Resource impl = coral.getStore().getResource(getId());\n coralEventHub.getGlobal().fireResourceChangeEvent(impl, modifier);\n }\n catch(EntityDoesNotExistException e)\n {\n throw new BackendException(\"inconsistent data\", e);\n }\n }", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "@Override\n\tpublic Model create() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void update(Cidade obj) {\n\r\n\t}", "public void doCreateItem() {\r\n\t\tlogger.info(\"Se procede a crear el book \" + newItem.getDescription());\r\n\t\tBook entity = newItem.getEntity();\r\n\t\tentity.setUser(Global.activeUser());\r\n\t\tentity.setBookBalance(BigDecimal.ZERO);\r\n\t\tentity.setTotalBudget(BigDecimal.ZERO);\r\n\t\tentity.setTotalIncome(BigDecimal.ZERO);\r\n\t\tentity.setTotalExpenses(BigDecimal.ZERO);\r\n\t\tentity = bookService.create(entity);\r\n\r\n\t\t// Actualizar el mapa de books\r\n\t\tGlobalBook.instance().put(new BookData(entity));\r\n\r\n\t\tlogger.info(\"Se ha creado el book \" + newItem.getDescription());\r\n\t\tnewItem = new BookData(new Book());\r\n\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO, \"Libro creado\", \"Libro creado correctamente\"));\r\n\t}", "public void save(Object instance);", "@Override\n protected void commitCreates(ViewImpl view, ObjectInstance oi)\n {\n }", "void update(T objectToUpdate);", "public abstract String createNewObject(OwResource resource_p, String strObjectClassName_p, OwPropertyCollection properties_p, OwPermissionCollection permissions_p, OwContentCollection content_p, OwObject parent_p, String strMimeType_p,\r\n String strMimeParameter_p) throws Exception;", "protected void update(Object object) {\n EntityManager em = getEntityManager();\n em.getTransaction().begin();\n try {\n em.merge(object);\n em.getTransaction().commit();\n } catch (Exception e) {\n LOG.error(\"Could not update Object\", e);\n em.getTransaction().rollback();\n } finally {\n em.close();\n }\n }", "void add( ModelObject modelObject, Long id );", "@Override\r\n\tpublic Ressource update(Ressource obj) {\n\t\treturn null;\r\n\t}", "protected PersistableObject(boolean isNewObject)\n {\n this._isNewObject = isNewObject;\n }", "@Override\n\tpublic boolean create(Eleve o) {\n\t\tmap.put(o.getId(),o);\n\t\treturn true;\n\t}", "public void setNew();", "public void create() {\n\t\t\n\t}", "@Override\n public void write(Object obj) {\n if (obj != null) {\n if (!isUpsert()) {\n try {\n collection.insertOne((Document) obj);\n } catch (MongoException e) {\n System.err.println(e.getCode() + \" \" + e.getMessage());\n }\n } else {\n try {\n Document doc = (Document) obj;\n collection.updateOne(Filters.eq(\"_id\", doc.get(\"_id\")), new Document(\"$set\", doc), new UpdateOptions().upsert(true));\n } catch (MongoException e) {\n System.err.println(e.getCode() + \" \" + e.getMessage());\n }\n\n }\n }\n }", "public void add(Object obj) {\r\n\t\tSession session = null;\r\n\t\tTransaction tx = null;\r\n\r\n\t\ttry {\r\n\t\t\tsession = factory.openSession();\r\n\t\t\ttx = session.beginTransaction();\r\n\r\n\t\t\tsession.save(obj);\r\n\t\t\ttx.commit();\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tif (tx != null)\r\n\t\t\t\ttx.rollback();\r\n\t\t\tSystem.out.println(ex.getMessage());\r\n\t\t} finally {\r\n\t\t\tif (session != null)\r\n\t\t\t\tsession.close();\r\n\t\t}\r\n\t}", "@Override\n\tpublic boolean create(Langues obj) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void update(T obj) throws Exception {\n\t\t\n\t}", "@Override\n public void Create() {\n initView();\n initData();\n }", "@Override\r\n\tpublic boolean create(Moteur obj, Connection conn) throws SQLException {\n\t\treturn false;\r\n\t}", "public WriteResult updateObject(String id, String name) {\n\t\treturn null;\n\t}", "Pair<Long, String> updateOrCreateActor() {\n\n boolean isNew = false;\n\n Actor actor = ActorDao.getActorByRefId(getRefId());\n\n if (actor == null) {\n actor = new Actor();\n isNew = true;\n }\n actor.refId = getRefId();\n actor.firstName = getFirstName();\n actor.lastName = getLastName();\n actor.erpRefId = getErpRefId();\n actor.employeeId = getEmployeId();\n actor.fixPhone = getFixPhone();\n actor.mobilePhone = getMobilePhone();\n actor.title = getTitle();\n actor.mail = getMail();\n actor.orgUnit = getOrgUnit();\n actor.actorType = getActorType();\n actor.uid = getLogin();\n actor.isActive = getIsActiveAsBoolean();\n actor.save();\n\n if (isNew) {\n return Pair.of(actor.id, actor.refId);\n }\n\n return null;\n }", "private void saveObjects() {\n\t\tgo.setMeteors(meteors);\n\t\tgo.setExplosions(explosions);\n\t\tgo.setTargets(targets);\n\t\tgo.setRockets(rockets);\n\t\tgo.setCrosses(crosses);\n\t\tgo.setEarth(earth);\n\t}", "private Performer createOrModify(Performer p) throws EVDBRuntimeException, EVDBAPIException {\n\t\t\n\t\tMap<String, String> params = new HashMap();\n\t\tparams.put(\"name\", p.getName());\n\t\tparams.put(\"short_bio\", p.getShortBio());\n\t\tparams.put(\"long_bio\", p.getLongBio());\n\t\t\n\t\tparams.put(\"user\", APIConfiguration.getEvdbUser());\n\t\tparams.put(\"password\", APIConfiguration.getEvdbPassword());\n\t\t\n\t\t//modify needs this to be set\n\t\tparams.put(\"id\", p.getSpid());\n\t\t\n\t\tString tagString = \"\";\n\t\tif (p.getTags() != null) {\n\t\t\tfor (Tag t : p.getTags()) {\n\t\t\t\ttagString += t.getTitle() + \" \";\n\t\t\t}\n\t\t\tparams.put(\"tags\", tagString);\n\t\t}\n\t\t\t\n\t\tString method = p.getSpid() == null ? PERFORMERS_NEW : PERFORMERS_MODIFY;\n\t\tInputStream is = serverCommunication.invokeMethod(method, params);\n\t\t\n\t\tGenericResponse gr = (GenericResponse)unmarshallRequest(GenericResponse.class, is);\n\t\t\n\t\tp.setSpid(gr.getId());\n\t\t\n\t\treturn p;\n\t}", "public App create(App obj) {\n \n JsonNode node = getClient().post(Routes.APP_CREATE, toJsonNode(obj));\n App rapp = getMapper().convertValue(node, App.class);\n \n if (!node.has(\"id\")) {\n throw new ClientException(\"Missing ID on object creation\");\n }\n \n obj.merge(rapp);\n obj.setId(rapp.getId());\n\n return obj;\n }", "@Override\r\n\tpublic void create(T t) {\n\t\tsuper.getSessionFactory().getCurrentSession().save(t);\r\n\t\tsuper.getSessionFactory().getCurrentSession().flush();\r\n\t}", "public void updateRecord(Record object);", "Entity createEntity();", "public Object persist(Object object)\n{\n\t// save\n\tif ( firstPersistedObject == null )\n\t\tfirstPersistedObject = object;\n\t\t\n\t// store the object\n\tobjects.add(object);\n\n\treturn object;\n}", "@Override\n\tpublic int update(Object object) {\n\t\treturn 0;\n\t}", "public void doNew() {\n\n if (!canChangeDocuments()) {\n return;\n }\n \n setDocument(fApplication.createNewDocument());\n }", "public Promise<ResourceResponse, ResourceException> createInstance(final Context context, \n final CreateRequest request) {\n try {\n final CreateRequest createRequest = Requests.copyOfCreateRequest(request);\n createRequest.setResourcePath(REPO_RESOURCE_PATH);\n createRequest.setContent(convertToRepoObject(firstResourcePath(context, request), request.getContent()));\n \n // If the request is from ManagedObjectSet then create and return the promise after formatting.\n if (context.containsContext(ManagedObjectSetContext.class)) {\n return getConnection().createAsync(context, createRequest).then(FORMAT_RESPONSE);\n }\n \n // Get the before value of the managed object\n final ResourceResponse beforeValue = getManagedObject(context);\n \n // Create the relationship\n final ResourceResponse response = \n getConnection().createAsync(context, createRequest).then(FORMAT_RESPONSE).getOrThrow();\n \n // Get the before value of the managed object\n final ResourceResponse afterValue = getManagedObject(context);\n \n // Do activity logging. \n // Log an \"update\" for the managed object, even though this is a \"create\" request on relationship field.\n activityLogger.log(context, request, \"update\", getManagedObjectPath(context), beforeValue.getContent(), \n afterValue.getContent(), Status.SUCCESS);\n\n // Changes to the relationship will trigger sync on the managed object that this field belongs to.\n managedObjectSyncService.performSyncAction(context, request, getManagedObjectId(context), \n SyncServiceAction.notifyUpdate, beforeValue.getContent(), afterValue.getContent());\n \n return expandFields(context, request, response);\n } catch (ResourceException e) {\n return e.asPromise();\n } catch (Exception e) {\n return new InternalServerErrorException(e.getMessage(), e).asPromise();\n }\n }", "@Override\n\tpublic Client update(Client obj) {\n\t\treturn null;\n\t}", "public Base save(Base model) throws IOException {\n\t\tif (model.getID().equals(\"\")) {\n\t\t\treturn Core.create(model, getHttpMethodExecutor());\n\t\t} else {\n\t\t\treturn Core.update(model, getHttpMethodExecutor());\n\t\t}\n\n\t}", "@Override\n\tpublic boolean create(Item obj) {\n\t\ttry{\n\t\t\tString query=\"INSERT INTO items(title, start_date, end_date, type) VALUES(?,?,?,?)\";\n\t\t\tPreparedStatement state = conn.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);\n\t\t\tstate.setString(1, obj.getTitle());\n\t\t\tstate.setDate(2, obj.getStartDate());\n\t\t\tstate.setDate(3, obj.getEndDate());\n\t\t\tstate.setInt(4, obj.getItemType().getIndex());\n\t\t\t\n\t\t\t// Run the query\n\t\t\tstate.executeUpdate();\n\t\t\t\n\t\t\t// Update of the index (should be 0 up to this point)\n\t\t\tResultSet genKey = state.getGeneratedKeys();\n\t\t\tif (genKey.next()){\n\t\t\t\tobj.setIndex(genKey.getInt(1));\n\t\t\t};\n\t\t\tstate.close();\n\t\t\t\n\t\t\t// Notify the Dispatcher on a suitable channel.\n\t\t\tthis.publish(EntityEnum.ITEM.getValue());\n\t\t\t\n\t\t\treturn true;\n\t\t} catch (SQLException e){\n\t\t\tJOptionPane jop = new JOptionPane();\n\t\t\tjop.showMessageDialog(null, e.getMessage(),\"PostgreSQLItemDao.create -- ERROR!\",JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "T put(T obj) throws DataElementPutException, RepositoryAccessDeniedException;", "LicenseUpdate create(LicenseUpdate newLicenseUpdate);", "public void uploadObject() {\n\n\t}", "@Override\n public boolean update(Revue objet) {\n return false;\n }", "public void update(){}", "public void update(){}", "ControllerState getNewObjectState();", "@Override\n\tpublic boolean update(Etape obj) {\n\t\treturn false;\n\t}", "public void update() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.update(this);\n\t\tsession.getTransaction().commit();\n\t}", "void setObject(String id, Object data);" ]
[ "0.6440818", "0.6296445", "0.61568916", "0.61260337", "0.59889585", "0.59220785", "0.58530915", "0.5840952", "0.58252376", "0.5800972", "0.5799011", "0.57923526", "0.5754077", "0.57158494", "0.56451255", "0.5642307", "0.56259227", "0.5602478", "0.5599698", "0.55984825", "0.55972314", "0.5585729", "0.5580991", "0.5580991", "0.5568186", "0.55560637", "0.55511415", "0.55437464", "0.55189055", "0.5494037", "0.546923", "0.5462773", "0.54584986", "0.5445831", "0.5440471", "0.5438245", "0.5430675", "0.5407578", "0.53961", "0.5389914", "0.5388894", "0.5367584", "0.5364489", "0.53596675", "0.5359517", "0.53577", "0.53494096", "0.53492945", "0.5327823", "0.53200203", "0.5309993", "0.5303921", "0.5295386", "0.5294909", "0.5288611", "0.5287787", "0.5284217", "0.5277866", "0.5272781", "0.527244", "0.5263498", "0.52623063", "0.52567405", "0.5256255", "0.525461", "0.5254237", "0.5245127", "0.5231046", "0.52271813", "0.5220685", "0.52193314", "0.5211617", "0.5208811", "0.52065414", "0.5203016", "0.5199844", "0.51982796", "0.51894253", "0.51852256", "0.5181278", "0.5179262", "0.51726335", "0.517037", "0.51681143", "0.51671016", "0.5163505", "0.5163262", "0.51558673", "0.51517963", "0.51434064", "0.5137148", "0.51352316", "0.51293343", "0.5128546", "0.51256293", "0.51251733", "0.51251733", "0.51161987", "0.5114657", "0.51136404", "0.51135516" ]
0.0
-1
Sign in the user with specified parameters.
public static void signIn(String username, String password, final Context context, final OnLoginListener onLoginListener) { HttpClientHelper client = new HttpClientHelper(Endpoints.User.login, context); client.addParamForPost("api_type", "json"); client.addParamForPost("user", username); client.addParamForPost("passwd", password); client.addParamForPost("rem", String.valueOf(true)); Network.newRequest(client, Network.POST, Network.WITHOUT_COOKIE, new Delegate() { @Override public void requestResults(Network.Status status) { User user = null; boolean err = false; if(status.hasInternet) { if(status.response.getStatusLine().getStatusCode() == 200 || status.response.getStatusLine().getStatusCode() == 409) { try { JSONObject values = (JSONObject) ((JSONObject) status.result.get("json")).get("data"); String cookie = values.getString("cookie"); status.httpClientHelper.setCookie(cookie, context); getMe(context, onLoginListener); } catch (JSONException e) { err = true; onLoginListener.onLogin(user, status, err); } } else { err = true; onLoginListener.onLogin(user, status, err); } } else { onLoginListener.onLogin(user, status, err); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "User signIn(String login, String password);", "String signIn(String userName, String password) throws UserNotFoundException;", "public String signIn(String username, String password);", "public void signIn(String userName, String password) {\n\t}", "public void user_signin()\r\n\t{\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"email\")).clear();\r\n\t\tdriver.findElement(By.id(\"email\")).sendKeys(UID);\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"pass\")).clear();\r\n\t\tdriver.findElement(By.id(\"pass\")).sendKeys(PWD);\r\n\t}", "private void signIn() {\n }", "public void login () {\n\t\tGPPSignIn.sharedInstance().authenticate();\n\t}", "public void login(User user);", "private void signIn() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(getActivity(), gso);\n\n // Starting the intent prompts the user to select a Google account to sign in with\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "public User logInUser(final String login, final String password);", "public void signIn(View view) {\n\n //retrieve the elements containing email and pass input\n EditText emailEle = findViewById(R.id.email);\n EditText passwordEle = findViewById(R.id.pass);\n //retrieve the input\n String emailInput = emailEle.getText().toString();\n String passwordInput = passwordEle.getText().toString();\n\n //attempt to authenticate with the input. if we did, go to doctors list page\n email = emailInput;\n\n //verify that there is input.\n if(email.equals(\"\") || passwordInput.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Please input your username and password.\", Toast.LENGTH_SHORT)\n .show();\n return;\n }\n\n auth(emailInput, passwordInput);\n }", "private void signIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "public void signIn()\r\n {\r\n FoodCenterRequestFactory factory = AndroidRequestUtils.getFoodCenterRF(context);\r\n ClientServiceRequest service = factory.getClientService();\r\n\r\n service.login(regId).fire(this);\r\n }", "private void signIn() {\n mGoogleSignInClient = buildGoogleSignInClient();\n startActivityForResult(mGoogleSignInClient.getSignInIntent(), REQUEST_CODE_SIGN_IN);\n }", "private void signIn() {\n Utility.showLoader(this);\n mGoogleApiClient.clearDefaultAccountAndReconnect();\n\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "void login(String user, String password);", "public ConsumersLOEPage signIn (User user) {\r\n clickEmailField(driver);\r\n clearEmailField();\r\n inputEmail(user.getEmail());\r\n //\r\n clickPasswordField(driver);\r\n clearPasswordField();\r\n inputPassword(user.getPassword());\r\n //\r\n getsignInButtonField().submit();\r\n //\r\n return new ConsumersLOEPage(driver, user);\r\n }", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn(){\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 Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, Constants.RC_SIGN_IN);\n\n }", "private void signIn() {\n final String email = ((EditText)findViewById(R.id.etSignInEmail)).getText().toString();\n final String password = ((EditText)findViewById(R.id.etSignInPassword)).getText().toString();\n\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success\n updateUI();\n } else {\n // Sign in failure\n Toast.makeText(LoginActivity.this, \"Incorrect email and/or password.\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void signIn(JSONArray parameter) {\n if (parameter.size() == 1) {\n nick = parameter.get(0).toString();\n clientInstance = new Client(client, this, nick);\n if (MailboxServer.addClientToList(nick, clientInstance) == true) {\n clientResponse(\"User \" + nick + \" connected\");\n }\n } else {\n failedClientResponse(\"Wrong Parameters\");\n }\n }", "public void loginAsUser() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"user\");\n vinyardApp.fillPassord(\"123\");\n vinyardApp.clickSubmitButton();\n }", "private void signIn() {\n // [START_EXCLUDE silent]\n // [END_EXCLUDE]\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "public void login() {\n\t\tUser user = new User(\"admin\", \"12345678\", Role.ADMIN);\n\t\tuser.setEmail(\"admin@gibmit.ch\");\n\t\t\n\t\tif(user != null) {\n\t\t\tuserBean.setLoggedInUser(user);\n\t\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\t\tHttpServletRequest req = (HttpServletRequest)context.getExternalContext().getRequest();\n\t\t\treq.getSession().setAttribute(ATTR_USER, user);\n\t\t}else{\n\t\t\tkeepDialogOpen();\n\t\t\tdisplayErrorMessageToUser(\"Wrong Username/Password. Try again\");\n\t\t}\n\t\t\n\t}", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n finish();\n }", "public void signIn(View view) {\n requestSignIn();\n }", "public void LogIn() {\n\t\t\r\n\t}", "public void signInUser(){\n Intent intent = new Intent(this, AuthUiActivity.class);\n startActivity(intent);\n }", "User login(String username, String password);", "void onSignInButtonClicked(String userEmail, String userPassword);", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, SIGN_IN_CODE);\n }", "public void signin() {\n\t\tStage window = new Stage();\n\t\t//Scene scene = new Scene(primarygridpane,400,500);\n\t\tSigninForm signin = new SigninForm();\n\t\tsignin.start(window);\n\t\tsignin.isLogged(this);\n\t}", "User login(Uuid id, String username, String password, Time creationTime);", "public void login() {\n try {\n callApi(\"GET\", \"account/session\", null, null, true);\n } catch (RuntimeException re) {\n\n }\n\n Map<String, Object> payload = new HashMap<>();\n payload.put(\"name\", \"admin\");\n payload.put(\"password\", apiAdminPassword);\n payload.put(\"remember\", 1);\n\n callApi(\"POST\", \"account/signin\", null, payload, true);\n }", "String login(Integer userId);", "void loginAttempt(String email, String password);", "public Person login(String username, String password);", "private void login(String username,String password){\n\n }", "public abstract User login(User data);", "private void login(){\n\t\tprogress.toggleProgress(true, R.string.pagetext_signing_in);\n\t\tParseUser.logInInBackground(email.split(\"@\")[0], password, new LogInCallback() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void done(ParseUser user, ParseException e) {\n\t\t\t\tif (e == null) {\n\t\t\t\t\tprogress.toggleProgress(false);\n\t\t\t\t\tIntent intent = new Intent(context, MainActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// else, incorrect password\n\t\t\t\t\tToast.makeText(context, \n\t\t\t\t\t\t\t\t getString(R.string.parse_login_fail, email), \n\t\t\t\t\t\t\t\t Toast.LENGTH_LONG).show();\t\t\t\t\t\n\t\t\t\t\tLog.e(\"Error Logging into Parse\", \"Details: \" + e.getMessage());\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\t\t\n\t\t});\n\t}", "User login(String email, String password) throws AuthenticationException;", "public User doAuthentication(String account, String password);", "public void UserSignInMethod(){\n // Passing Google Api Client into Intent.\n Intent AuthIntent = Auth.GoogleSignInApi.getSignInIntent(googleApiClient);\n startActivityForResult(AuthIntent, REQUEST_SIGN_IN_CODE);\n }", "public void studentSignIn(View view){\n \tfinal EditText userName = (EditText) findViewById(R.id.StudentNameSignText);\n \tfinal EditText password = (EditText) findViewById(R.id.StudentPasswordSignText);\n \tfinal TextView error = (TextView) findViewById(R.id.ErrorStudentSignIn);\n \tParseUser.logInInBackground(userName.getText().toString(), password.getText().toString(),\n new LogInCallback() {\n public void done(ParseUser user, ParseException e) {\n if (user != null) {\n \tParseUser currentUser = ParseUser.getCurrentUser();\n \tboolean isOrg = (Boolean) currentUser.get(\"organization\");\n // Make sure it is not an organization signing in\n \t// If it is a student, then log them them in!!!!\n \tif(!isOrg){\n \t\tIntent i = new Intent(getApplicationContext(), StudentMainNav.class);\n \tstartActivity(i);\n \t}\n \t//Actually an organization. Log them out!!!\n \telse{\n \t\tParseUser.logOut();\n \t\terror.setText(\"Please log in as an organization!\");\n \t}\n } \n //Student user does not exist. retype name and password or create a new account\n else {\n if(e.getCode() == ParseException.CONNECTION_FAILED){\n \t error.setText(\"Internet connection lost\");\n }\n else if(e.getCode() == ParseException.ACCOUNT_ALREADY_LINKED){\n \terror.setText(\"Already logged in\");\n }\n else{\n \terror.setText(\"Account information not recognized\");\n }\n \n }\n }\n });\n }", "public void login() {\n presenter.login(username.getText().toString(), password.getText().toString());\n }", "public int logIn() {\n guestPresenter.printLogInMessage();\n int id = requestInt(\"id\");\n char[] password = requestString(\"password\").toCharArray();\n UserManager.UserType user = guestManager.logIn(id, password);\n\n if (user == null) {\n guestPresenter.logInFailure();\n return -1;\n } else {\n return id;\n }\n }", "private void signInUidPass(){\n mAuth.signInWithEmailAndPassword(mTextEmail.getText().toString(), mTextPassword.getText().toString()).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(Constants.TAG, \"signInwithEmail: onComplete:\" + task.isSuccessful());\n if(!task.isSuccessful()){\n Log.w(Constants.TAG, \"signInwithEmail: failed\", task.getException());\n }\n }\n });\n }", "private void signInMethod() {\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 // Build a GoogleSignInClient with the options specified by gso.\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n }", "public synchronized void invokeSignIn(final String username, final String password, final String contentUrl)\n throws TsResponseException {\n final String url = getUriBuilder().path(SIGN_IN).build().toString();\n\n // Create the sign in credentials payload\n final TableauCredentialsType credentialsSignIn = OBJECT_FACTORY.createTableauCredentialsType();\n credentialsSignIn.setName(username);\n credentialsSignIn.setPassword(password);\n final SiteType site = OBJECT_FACTORY.createSiteType();\n site.setContentUrl(contentUrl);\n credentialsSignIn.setSite(site);\n\n // Create a ts request\n final TsRequest payload = OBJECT_FACTORY.createTsRequest();\n payload.setCredentials(credentialsSignIn);\n\n // Execute the post\n final TsResponse response = post(url, payload);\n final TableauCredentialsType credentials = response.getCredentials();\n m_token = credentials.getToken();\n m_siteId = credentials.getSite().getId();\n m_signedIn = true;\n }", "private void startSignIn() {\n Intent intent = AuthUI.getInstance().createSignInIntentBuilder()\n .setIsSmartLockEnabled(!BuildConfig.DEBUG)\n .setAvailableProviders(Arrays.asList(\n new AuthUI.IdpConfig.EmailBuilder().build(),\n new AuthUI.IdpConfig.GoogleBuilder().build()))\n .setLogo(R.mipmap.ic_launcher)\n .build();\n\n startActivityForResult(intent, RC_SIGN_IN);\n }", "private LogIn() {}", "public String signin() {\n \t//System.out.print(share);\n \tSystem.out.println(username+\"&&\"+password);\n String sqlForsignin = \"select password from User where username=?\";\n Matcher matcher = pattern.matcher(sqlForsignin);\n String sql1 = matcher.replaceFirst(\"'\"+username+\"'\");//要到数据库中查询的语句\n select();\n DBConnection connect = new DBConnection();\n List<String> result = connect.select(sql1);//查询结果\n if (result.size() == 0) return \"Fail1\";\n \n if (result.get(0).equals(password)){\n \tsession.setAttribute( \"username\", username);\n \treturn \"Success\";\n }\n else return \"Fail\";\n }", "private void signIn(String email, String password){\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n FirebaseUser user = mAuth.getCurrentUser();\n updateUI(user.toString());\n accountEmail = user.getEmail();\n } else {\n // If sign in fails, display a message to the user.\n updateUI(\"Authentication failed\");\n }\n\n }\n });\n\n }", "private void loggedInUser() {\n\t\t\n\t}", "private void signIn(String email, String password) {\n if (!validateForm()) {\n return;\n }\n showProgressDialog();\n // [START sign_in_with_email]\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n FirebaseUser user = mAuth.getCurrentUser();\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"signInWithEmail:success\");\n updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"signInWithEmail:failure\", task.getException());\n Toast.makeText(getApplicationContext(), \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n updateUI(null);\n }\n\n // [START_EXCLUDE]\n hideProgressDialog();\n // [END_EXCLUDE]\n }\n });\n // [END sign_in_with_email]\n\n }", "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}", "int authenticateUser(IDAOSession session, String userName, String password);", "protected void login() {\n\t\t\r\n\t}", "public void click_SIGN_IN() {\r\n\t\tbtn_SIGN_IN.click();\r\n\t}", "public static void signin() {\n browseSetUp(chromeDriver, chromeDriverPath, url);\n // click on my account web element\n driver.findElement(By.cssSelector(\"#headerMyAccount > div.MyAccount__icon > div > div.HeaderIcon__primary > svg\")).click();\n // step two: enter your credentials\n //valid user name:\n driver.findElement(By.cssSelector(\"#SPSOSignIn > a > span\")).click();\n // step three: enter valid email\n driver.findElement(By.cssSelector(\"#email\")).sendKeys(\"ibrahimsidisaid@gmail.com\");\n // valid passoword:\n driver.findElement(By.id(\"password-input-field\")).sendKeys(\"java206java206\");\n // click on sign in\n driver.findElement(By.cssSelector(\"#single-signin__body > div > div.col__12-12.col__8-12--xs.u--paddingNone-top.col__4-12--lg.col__4-12--md.col__6-12--sm > form > button > span\")).click();\n\n\n\n\n }", "private void signInEvt() {\n // Retrieve Details\n String email = this.view.getWelcomePanel().getSignInPanel().getEmailText().getText().trim();\n String password = new String(this.view.getWelcomePanel().getSignInPanel().getPasswordText().getPassword()).trim();\n if (!email.equals(\"\") && !password.equals(\"\")) {\n if (model.getSudokuDB().checkLogin(email, password)) {\n // Set Player\n Player player = model.getSudokuDB().loadPlayer(email, password);\n if (player != null) {\n model.setPlayer(model.getSudokuDB().loadPlayer(email, password));\n // Clear Fields\n view.getWelcomePanel().getSignInPanel().clear();\n // Show Home Screen\n refreshHomePanel();\n view.getCardLayoutManager().show(view.getContent(), \"home\");\n } else {\n Object[] options = {\"OK\"};\n JOptionPane.showOptionDialog(this, \"An error occured during sign in, please try again.\", \"Sign In Error\", JOptionPane.OK_OPTION, JOptionPane.ERROR_MESSAGE, null, options, null);\n }\n } else {\n Object[] options = {\"Let me try again\"};\n JOptionPane.showOptionDialog(this, \"The credentials you have provided are invalid, please enter them correctly or create a new account.\", \"Invalid Credentials\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n } else {\n Object[] options = {\"Alright\"};\n JOptionPane.showOptionDialog(this, \"In order to sign in, all fields must be filled out.\", \"Empty Fields\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n }", "public void signInExistingUser(View v) {\n attemptLogin();\n\n }", "User loginUser(User userLoginRequest, HttpSession httpSession) throws Exception;", "void signInComplete();", "void login(String email, String password) throws InvalidCredentialsException, IOException;", "public void login(View v){\n String email = emailET.getText().toString();\n String password = passwordET.getText().toString();\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, task -> {\n if (task.isSuccessful()) {\n startActivity(new Intent(LoginActivity.this, MainActivity.class));\n } else {\n // If sign in fails, display a message to the user.\n Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n });\n }", "@WebMethod public boolean logIn(String userName, String password);", "public void StartLogIn(){\n\t}", "protected void launchSignIn()\r\n {\r\n \tIntent i = new Intent(this, LoginActivity.class);\r\n \tstartActivity(i);\r\n }", "private void login() {\n AnonimoTO dati = new AnonimoTO();\n String username = usernameText.getText();\n String password = passwordText.getText();\n\n if (isValidInput(username, password)) {\n dati.username = username;\n dati.password = password;\n\n ComplexRequest<AnonimoTO> request =\n new ComplexRequest<AnonimoTO>(\"login\", RequestType.SERVICE);\n request.addParameter(dati);\n\n SimpleResponse response =\n (SimpleResponse) fc.processRequest(request);\n\n if (!response.getResponse()) {\n if (ShowAlert.showMessage(\n \"Username o password non corretti\", AlertType.ERROR)) {\n usernameText.clear();\n passwordText.clear();\n }\n }\n }\n\n }", "public static void logIn(WebDriver dr) throws IOException {\n\t\tScanner sc = new Scanner(System.in);\n\t\t// Username\n\t\tSystem.out.println(\"Enter username:\");\n\t\tString username=sc.nextLine();\n\t\tIzletPage.clickLUsername(dr);\n\t\tIzletPage.sendKeysLUsername(dr, username);\n\t\t// Password\n\t\tSystem.out.println(\"Enter password: \");\n\t\tString pass = sc.nextLine();\n\t\tIzletPage.clickLPassword(dr);\n\t\tIzletPage.sendKeysLPassword(dr, pass);\n\t\t// Log in button\n\t\tIzletPage.clickLogInButton(dr);\n\t\tsc.close();\n\t}", "public void login() {\n\n String username = usernameEditText.getText().toString();\n String password = passwordEditText.getText().toString();\n regPresenter.setHost(hostEditText.getText().toString());\n regPresenter.login(username, password);\n }", "@Override\n public void onSignInClicked() {\n Prefs.setSignedIn(true);\n // Proceed to Main and finish\n proceedToMainActivityAndFinish();\n }", "public void loginUser() {\n \tString username = usernameField.getText().toString();\n \tString password = passwordField.getText().toString();\n \n \t// Validation part.\n \tString empty = \"\";\n \t// Check if username is empty.\n \tif(username.isEmpty()) {\n \t\tToast toast = Toast.makeText(\n \t\t\tthis,\n \t\t\t\"Please enter a username.\",\n \t\t\tToast.LENGTH_LONG);\n \t\ttoast.show();\n \t\treturn;\n \t}\n \t// Check if username contains othe characters.\n \tif(! Pattern.matches(\"[a-zA-Z]+\", username)) {\n \t\tToast toast = Toast.makeText(\n \t\t\tthis,\n \t\t\t\"Username can only contain alphabets\",\n \t\t\tToast.LENGTH_LONG);\n \t\ttoast.show();\n \t\treturn;\n \t}\n \t\n \t// Check if password is empty.\n \tif(password.isEmpty()) {\n \t\tToast toast = Toast.makeText(\n \t\t\tthis,\n \t\t\t\"Please enter a password.\",\n \t\t\tToast.LENGTH_LONG);\n \t\ttoast.show();\n \t\treturn;\n \t}\n\n \t\n \tArrayList<NameValuePair> userData = new ArrayList<NameValuePair>();\n \tuserData.add(new BasicNameValuePair(\"username\", username));\n \tuserData.add(new BasicNameValuePair(\"password\", password));\n \t\n \t// Now send the data to the login user task to\n \t// check if they are correct.\n \tnew AuthenticateUserTask(this, userData).execute();\n \t\n }", "private void authenticateAction() {\n if (requestModel.getUsername().equals(\"superuser\")\n && requestModel.getPassword().equals(\"\")) {\n Collection<Webres> webres = getAllWebres();\n proceedWhenAuthenticated(new User(null, null, null, \"superuser\", \"\", null) {\n @Override\n public Collection<Webres> getAllowedResources() {\n return webres;\n }\n @Override\n public ActionController getDefaultController() {\n return ActionController.EMPLOYEES_SERVLET;\n }\n });\n return;\n }\n \n // try to authenticate against other credentials from the database\n Optional<User> u = getUserByCredentials(requestModel.getUsername(), requestModel.getPassword()); \n if (u.isPresent()) {\n proceedWhenAuthenticated(u.get());\n return;\n }\n \n // report authentication failed\n LOG.log(Level.INFO, \"{0} Authentication failed. Login: {1}, Password: {2}\", new Object[]{httpSession.getId(), requestModel.getUsername(), requestModel.getPassword()});\n SignInViewModel viewModel = new SignInViewModel(true);\n renderSignInView(viewModel);\n }", "public void onClick(View arg0) {\n usernametxt = username.getText().toString();\n passwordtxt = password.getText().toString();\n\n // Send data to Parse.com for verification\n ParseUser.logInInBackground(usernametxt, passwordtxt,\n new LogInCallback() {\n public void done(ParseUser user, ParseException e) {\n if (user != null) {\n if (user.getBoolean(\"freeze_account\") != true) {\n // If user exist and authenticated and not frozen, send user to ChallengeActivity.class\n Intent intent = new Intent(rootView.getContext(), ChallengeActivity.class);\n startActivity(intent);\n Toast.makeText(getActivity().getApplicationContext(),\n \"Successfully Logged in\",\n Toast.LENGTH_SHORT).show();\n getActivity().finish();\n } else {\n Toast.makeText(\n getActivity().getApplicationContext(),\n \"Account frozen\",\n Toast.LENGTH_LONG).show();\n }\n\n } else {\n Toast.makeText(\n getActivity().getApplicationContext(),\n \"Username/Password incorrect, you may need to sign up\",\n Toast.LENGTH_LONG).show();\n }\n }\n });\n }", "@Override\n\tpublic void loginUser() {\n\t\t\n\t}", "private void loginAccount() {\n\t\taccountManager.loginAccount(etEmail.getText().toString(), etPassword.getText().toString());\n\n\t}", "void login(String userName) throws IllegalArgumentException, IOException;", "public HomePage loginAs(String username, String password) {\n // The PageObject methods that enter username, password & submit login have\n // already defined and should not be repeated here.\n typeUserName(username);\n typePassword(password);\n return clickOnSignInButton();\n }", "public void signIn(String email, String password) {\n\n // Validate the form, make sure that fields are filled in\n if (!validateForm()) {\n return;\n }\n\n loginBtn.setEnabled(false);\n startLoadAnim(getString(R.string.logging_in));\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"signInWithEmail:onComplete:\" + task.isSuccessful());\n\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 Log.w(TAG, \"signInWithEmail:failed\", task.getException());\n Toast.makeText(LoginActivity.this, R.string.auth_failed, Toast.LENGTH_SHORT).show();\n stopLoadAnim();\n loginBtn.setEnabled(true);\n }\n\n }\n });\n }", "private void startSignIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void auto_log_in()\n {\n jtf_username.setText(Config.USERNAME);\n jpf_password.setText(Config.PASSWORD);\n jb_prijavi.doClick();\n\n }", "private void signInRequest() {\n errorContainer.getChildren().clear();\n if (!validateForm()) {\n displayErrorMessages();\n } else {\n\n //update the UI to notify the user that the connection is in \n //progress.\n startWorkInProgress(\"Connecting\");\n\n final Runnable connectionRequestRunnable = new Runnable() {\n @Override\n public void run() {\n mConnectionRequestCommand.setLogin(userNameField.getText());\n mConnectionRequestCommand.setPassword(passwordField.getText());\n mConnectionRequestCommand.execute();\n }\n };\n new Thread(connectionRequestRunnable, \"Connection Request\").start();\n\n }\n }", "public void login(View view) {\n \t\t\t\t\n \t\tString uname = ((EditText)findViewById(R.id.loginUsername)).getText().toString().toLowerCase();\n \t\tString pw = ((EditText)findViewById(R.id.loginPassword)).getText().toString();\n \n \t\tfinal Toast successToast = Toast.makeText(this, \"Login Successful\", Toast.LENGTH_SHORT);\n \t\tfinal Intent i = new Intent(this, Home.class);\n \t\t\n \t\tfinal Toast failureToast = Toast.makeText(this, \"Login failed\", Toast.LENGTH_SHORT);\n \t\t\n \t\tParseUser.logInInBackground(uname, pw, new LogInCallback() {\n \t\t public void done(ParseUser user, ParseException e) {\n \t\t if (user != null) {\n \t\t // Hooray! The user is logged in.\n \t\t \tsuccessToast.show();\n \t\t \t\tfinish();\n \t\t \t\tstartActivity(i);\n \t\t } else {\n \t\t // Signup failed. Look at the ParseException to see what happened.\n \t\t \tfailureToast.show();\n \t\t }\n \t\t }\n \t\t});\n \t\t\n \t}", "public static void Login() \r\n\t{\n\t\t\r\n\t}", "public String login(){\n UsernamePasswordToken token = new UsernamePasswordToken(user.getAccount(),\n user.getPassword());\n\n// \"Remember Me\" built-in:\n token.setRememberMe(user.isRememberMe());\n\n Subject currentUser = SecurityUtils.getSubject();\n\n\n try {\n currentUser.login(token);\n } catch (AuthenticationException e) {\n // Could catch a subclass of AuthenticationException if you like\n FacesContext.getCurrentInstance().addMessage(\n null,\n new FacesMessage(\"Login Failed: \" + e.getMessage(), e\n .toString()));\n return \"/login\";\n }\n return \"index\";\n }", "private void loginUser(String username, String password) {\n ParseUser.logInInBackground(username, password, new LogInCallback() {\n @Override\n public void done(ParseUser user, ParseException e) {\n if(e != null){\n Log.e(TAG, \"Issue with login: \"+e);\n Toast.makeText(LoginActivity.this, e+\"\", Toast.LENGTH_SHORT);\n return;\n }\n\n linkOneSignalID(ParseUser.getCurrentUser());\n goMainActivity();\n Toast.makeText(LoginActivity.this, \"Success!\", Toast.LENGTH_SHORT);\n }\n });\n }", "@RequestMapping(value = \"/signin\", method = RequestMethod.POST)\n\tpublic String signin(@ModelAttribute(value=\"user\") User user) {\n\t\tlogger.info(\"Sign-in : \", user.getEmail());\n\t\t\n\t\t//Implement user session to login a user\n\t\tthis.user = vMDaoImpl.getUser(user.getEmail());\n\t\tSystem.out.println(user.getFirstname()+ user.getLastname()+ \"entered password \" + user.getPassword() );\n\t\tSystem.out.println(\"value from database\"+ this.user.getEmail()+ \" \"+ this.user.getPassword());\n\t\tModelAndView model = new ModelAndView();\n\t\tif(this.user.getEmail().equals(user.getEmail()) && this.user.getPassword().equals(user.getPassword())){\n\t\t if(this.user.getIsadmin()==false)\n\t\t\t{\n\t\t\t\n\t\t\t\tmodel.setViewName(\"user\");\n\t\t\t\treturn \"redirect:/user\";\n\t\t\t}\n\t\t else {\n\t\t\n\t\t\tmodel.setViewName(\"admin\");\n\t\t\treturn \"redirect:/admin\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tmodel.setViewName(\"signin\");\t\n\t\treturn \"signin\";\n\t}", "protected Response login() {\n return login(\"\");\n }", "private void signIn(String email, String password) {\n Log.d(TAG, \"signIn:\" + email);\n if (!validateForm()) {\n return;\n }\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n Log.d(TAG, \"signInWithEmail:success\");\n\n startActivity(new Intent(LoginActivity.this , MainActivity.class));\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"signInWithEmail:failure\", task.getException());\n Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n\n }\n\n if (!task.isSuccessful()) {\n mPasswordView.setError(getString(R.string.error_incorrect_password));\n mPasswordView.requestFocus();\n }\n }\n });\n }", "public void signIn(View v){\n\n //Get Sign in form data\n EditText userIdEntry = findViewById(R.id.userIDEntry);\n\n String userId = userIdEntry.getText().toString();\n Intent intent = null;\n\n UserAccountListManager.GetUserAccountsTask getUserAccountsTask =\n new UserAccountListManager.GetUserAccountsTask();\n getUserAccountsTask.execute(\"\");\n ArrayList<UserAccount> userAccountList = new ArrayList<>();\n try {\n userAccountList = getUserAccountsTask.get();\n } catch (Exception e) {\n Log.e(\"Error\", \"Failed to get the tweets out of the async object.\");\n }\n userAccountListController.getUserAccountList().setUserAccounts(userAccountList);\n //TODO Adjust for real ID/PW. maybe use size of UAL?\n for(UserAccount userAccount : userAccountList){\n if(userAccount.authenticate(userId)){\n\n //Check account type, direct to proper activity.\n if(userAccount.getAccountType().toLowerCase().trim().equals(\"patient\")){\n Patient newPatient = new Patient(userAccount.getAccountType(), userAccount.getUserID(), userAccount.getEmailAddress(), userAccount.getPhoneNumber());\n newPatient.setShortCode(userAccount.getShortCode());\n userAccountListController.getUserAccountList().setAccountOfInterest(newPatient);\n intent = new Intent(MainActivity.this, ViewConditionListActivity.class);\n startActivity(intent);\n }\n\n else if(userAccount.getAccountType().toLowerCase().trim().equals(\"care provider\")){\n CareProvider newCareProvider = new CareProvider(userAccount.getAccountType(), userAccount.getUserID(), userAccount.getEmailAddress(), userAccount.getPhoneNumber());\n newCareProvider.setShortCode(userAccount.getShortCode());\n userAccountListController.getUserAccountList().setActiveCareProvider(newCareProvider);\n intent = new Intent(MainActivity.this, ViewPatientListActivity.class);\n startActivity(intent);\n }\n }\n }\n if(intent == null) {\n Toast.makeText(this, \"Incorrect Username\", Toast.LENGTH_SHORT).show();\n }\n }", "private void logIn() throws IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n\n String user = a[0];\n String password = a[1];\n boolean rez = service.checkPassword(user, password);\n if(rez == TRUE)\n System.out.println(\"Ok\");\n else\n System.out.println(\"Not ok\");\n }", "public synchronized void login(String uid, String session_id) {\r\n if((uid != null) && (session_id != null)) {\r\n SignOnUser user = new SignOnUser();\r\n user.userID = uid;\r\n user.sessionID = session_id;\r\n try {\r\n dao.insertUser(user);\r\n } catch (DataAccessException e) {\r\n ExceptionBroadcast.print(e);\r\n }\r\n\r\n }\r\n }", "LoginContext login(String username, String password) throws LoginException;" ]
[ "0.7641766", "0.74646884", "0.73957646", "0.7338593", "0.7078497", "0.7052093", "0.69228387", "0.67968553", "0.6707056", "0.66695535", "0.6612184", "0.6610568", "0.6610568", "0.6610568", "0.6603647", "0.6516845", "0.65141743", "0.64816386", "0.6446309", "0.6425223", "0.6425223", "0.6425223", "0.6425223", "0.6424475", "0.6419867", "0.6408303", "0.6404615", "0.64026254", "0.6387935", "0.6379396", "0.6355882", "0.6352031", "0.6351481", "0.634282", "0.63262534", "0.6324076", "0.62524533", "0.62358", "0.6206022", "0.6181939", "0.61692506", "0.61311316", "0.61266935", "0.6116096", "0.61155975", "0.6109975", "0.609833", "0.6091034", "0.6088814", "0.6065155", "0.6062251", "0.6055194", "0.60482097", "0.6044933", "0.6026951", "0.60122937", "0.599008", "0.59662753", "0.59656554", "0.5960478", "0.5958216", "0.5949275", "0.593154", "0.59260494", "0.5920315", "0.5914843", "0.5913815", "0.59048605", "0.5903238", "0.5898947", "0.5896179", "0.588821", "0.586822", "0.5867908", "0.5861453", "0.5855624", "0.5842863", "0.58392406", "0.58330846", "0.5831477", "0.5810624", "0.5803403", "0.57990074", "0.5797213", "0.5791612", "0.57885134", "0.5781733", "0.5780489", "0.5764104", "0.5762818", "0.5760701", "0.57600397", "0.5759691", "0.5754013", "0.5753701", "0.573741", "0.57353574", "0.5727478", "0.57268447", "0.57237375" ]
0.5718347
100